Coder Social home page Coder Social logo

tellstick-server-plugins's People

Contributors

adamathehutt avatar ajajul avatar fredrikgullberg avatar mickeprag avatar quazzie avatar viart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tellstick-server-plugins's Issues

Lifx plugin - how to configure?

@mickeprag : I've activated the Lifx plugin, but I have absolutely no idea how to proceed to connect it to my Lifx bulbs. Please enlighten me (drum roll 🥁), because I'm out of ideas.

Also, there seem to be a missing "icon.png" in the lifx plugin folder in this repository.

Support for reading Hue color values

I would like to have hue/sat state read from a light available to be used in a lua script. The plan is to use the existing lighting setting so it can return back to that setting after a period.

Using Device.state("hue") returns a value that is the the device state (on/off/dim)

This line appears to record the whole state from the light

but it does not appear to parse that state out to anything but brightness. It does not appear to set Device._stateValues so Device::state("hue") can read it back.

Is this correct? Is there a workaround?

The Verisure plugin needs an update

I have two Verisure alarm systems, and a Tellstick Znet at each location. The Verisure plugin is not handling this very well.

A few issues immediately found:

  1. Does not separate the locations. The sensors from one of the locations are seen at both locations
  2. Only one location appears to be polled
  3. Does not pick up climate data from smoke detectors.

I checked the functionality of this project, https://github.com/persandstrom/python-verisure, and it seems to handle this better.

Require extra libraries?

Hi,

I’m working on a plugin that requires a library. I placed a "requirements.txt" in the plugin root with the name of the library.
If I install it on the local server, it downloads the library and everything works. But if I try to

./tellstick.sh build-plugin plugins/myplugin

I get an error message (with a long error trace log…I just copied the bottom half):

  File "***/site-packages/sdk/plugin.py", line 95, in run
    requirements = self.__downloadRequirements(prebuiltPackages)
  File "***/site-packages/sdk/plugin.py", line 171, in __downloadRequirements
    cmd = DownloadCommand()
  File "***/site-packages/pip/_internal/cli/req_command.py", line 261, in __init__
    super().__init__(*args, **kw)
TypeError: __init__() missing 2 required positional arguments: 'name' and 'summary'
Registered VCS backend: bzr Registered VCS backend: git Registered VCS backend: hg Registered VCS backend: svn running telldus_plugin
Could not build plugin

I know it’s possible to accomplish somehow. The LIFX plugin by @mickeprag also has a requirements.txt, and imports the lifx-sdk python lib just fine. How do I proceed? Give me your l337est commands 😀

Configuration Values….mayday

Hi again,

I don’t know where else to address this issue…feel free to remove it. But the thing is:
All plugins containing configuration values (i.e. every plugin I made) are in fact useless at the moment, and they have been for a relatively long time. Why? Because the "minimumLength" and "maximumlength" field values (subclasses configuration.ConfigurationString and configuration.ConfigurationNumber) are in fact creating a catch 22 of its own:

If there is a blank config field, the user isn’t allowed to write anything if the minimum length isn’t defined specifically. If defined, it must be set to -1 or 0, or it catapults the local webserver containing the plugin configuration into a bug/nag-fest galore where your only option is to force quit the browser.

If your character count goes above the maximum value….same result if you backspace beyond the minimum char value.
But for the most part, the most annoying about all of this, is that you’re not allowed to write anything into the configuration.
The Pushover plugin has a 30 character (!) minimum value and 30 characters (!) maximum…i.e. it can’t be used.


Even my dead simple blink(1) plugin that only has a maximum length for one of the fields set, breaks beyond repair if you happen to erase the example IP address. You can remove it from the Tellstick, but the Telllstick will remember and keep the empty default value to infinity and beyond in Telldus.conf, which means the plugin is a waste of virtual memory space if you don’t happen to have SSH access to the Tellstick.

The good news is that this is very easy to fix:

  1. Hardcode the minimum value to -1 chars
  2. Set the default maximum character length to 99 characters (at least a ridicuosly high number) - if no value is specified by the plugin configuration (important)
  3. Do not allow a minimum char length greater than 0 IF the HTML page checks the value continously.
    If set to greater than 2, the character count will have to be executed when you press the Save/OK button, or not at all.
    For simplicity's sake, just set it 0. It won't break anything, and problem solved 🌈🦄🐛

That way you never release that specific deathmonkey, and the plugins can be put to good use again.
I don’t know if there is anyone working at #telldus here anymore (@mickeprag?), but they need to know this, because it’s downright annoying as f**k when you painted yourself into a corner. Fix please.

Sincerely,

Grouchy old man plugin and web developer

How to install plugin to device?

I have a Tellstick net v2 and want to try the philips hue plugin. But how do I install it? Can't seem to find any instructions anywhere.

Sending remote data

Since the http plugin is waiting for scoder/lupa#84, can be get another way in the meantime to send remote-data in a more generic way..?

  • Will the mqtt plugin be available soon? Or is it possible to upload it myself?
  • Can the http plugin be made available using a zip that we can upload ourself, even tho it might be unstable? I'm willing to take the risk..
  • If I make a new generic plugin, almost like pushover, that sends data over http to a configurable url, will it be accepted as a pull-request?

smtpServer length validation impossible to pass

In the mailsender plugin, this:
smtpServer = ConfigurationString(
defaultValue='',
title='SMTP server name',
description='Address to the smtpserver',
minLength=4

...causes the input validation in the browser to fail, as it allows only strings of "length between 4 and 0" as smtpServers. No change is possible to perform given this. By rewriting the validation code in the browser manually (using the developer mode in Chrome), I can work around it, so it is clear that the issue is that the browser validation is the problem. Just removing the length check makes it possible to send the update to the server.

My guess is that the server has been amended to actually generate some validation checking code for the browser based on "minLength = 4" , and that this has exposed the incorrect check in the plugin code. An earlier version of the server side probably did not create that check in the browser-side code at all. Which is why mailsender used to work (I know it did, since I used it)

EDIT: It should be noted that "minLength = 4" is faulty only if the generation of validation code requires a maxLength to be given as well, or else defaults 0. Unfortunately the validation code that results from the current plugin values does exactly that (i.e. it checks for "length between 4 and 0", which always fails, by definition). The solution can be to add a maxLength in the configuration dialog (and treat it correctly when turning it into validation code), OR if there is only minLength = 4 and no maxLength given, just check for "length between 4 and infinity" instead.

Problem building http plugin

Just a heads-up in this repo as well...

Building the http plugin gives this error:

....
File "/data/repo/tellstick-server/sdk/sdk/plugin.py", line 189, in __downloadRequirements
'--dist-dir', self.packageDir
File "/usr/local/lib/python2.7/distutils/core.py", line 218, in run_setup
exec f.read() in g, l
File "", line 25, in
File "", line 15, in get_version
NameError: global name 're' is not defined
Could not build plugin

Created a simple fix and made an issue @ chardet/chardet#166

Anyone else managed to build this plugin without manual fixes?

Mailsender local plugin broken

port = ConfigurationString(
	defaultValue='25',
	title='SMTP server port',
	minLength=4

Due to minLenght 4 and default val 2 it breaks and won't work. Remove minLength=4 or atleast change to =2

How to fix broken "./tellstick.sh setup" on Mac

There isn't currently possible to post issues in Tellstick Server, so I post this here for now:

I've had major problems running ./tellstick.sh setup on macOS 10.15 with Python 2 & 3 installed from Homebrew. I managed to fix it, and here's how I did it, if anyone else is having issues with the same thing:

First of all, make sure you have Homebrews "pip2" and "pip3" symlinked & working (just check that both "pip2" and "pip3" are valid commands).

Then run sudo easy_install virtualenv, ./tellstick.sh shell and ./tellstick.sh setup.

Let it install until it eventually stops and you get error messages all over the place.

  1. Insert alias pip="/usr/local/bin/pip2" in .zshconfig. Or whatever way you prefer to do this. I found this to be a LOT easier than symlinking etc.
  2. In "/api", edit setup.py and change
from distutils.core import setup

to

from setuptools import setup
  1. Run
/PATH-TO/tellstick-server/build/env/bin/pip install setuptools
/PATH-TO/tellstick-server/build/env/bin/pip install lupa
/PATH-TO/tellstick-server/build/env/bin/pip install watchdog
  1. Run ./tellstick.sh setup again, and (hopefully) it will fix any "Unknown distribution option" errors, and install everything sandboxed.

Enjoy.

Unable to build the MQTT Plugin

I successfully pulled and built the MQTT Plugin in early 2019. Now two years later the same build server fail to build the plugin (not the original v1.0, nor the updated v1.1).

Apart from using the original build machine I have tried with a "fresh" Debian Buster, a reinstall of Debian Stretch (both running on Raspberry PI) and also a new Ubuntu 20.04 server in VMware Workstation 16 (Microsoft Windows 10).

The tellstick.sh build-plugin command fails when using the embedded pip version to collect dependencies.

./tellstick.sh build-plugin /home/pi/src/tellstick-server-plugins/mqtt-client
Building plugin /home/pi/src/tellstick-server-plugins/mqtt-client
Traceback (most recent call last):
File "setup.py", line 22, in <module>
extras_require=dict(cREQ='Base>=0.1\nTelldus>=0.1'),
File "/home/pi/src/tellstick-server/build/env/local/lib/python2.7/site-packages/setuptools/__init__.py", line 162, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/home/pi/src/tellstick-server/sdk/sdk/plugin.py", line 95, in run
requirements = self.__downloadRequirements(prebuiltPackages)
File "/home/pi/src/tellstick-server/sdk/sdk/plugin.py", line 171, in __downloadRequirements
cmd = DownloadCommand()
File "/home/pi/src/tellstick-server/build/env/local/lib/python2.7/site-packages/pip/_internal/cli/req_command.py", line 195, in __init__
super(RequirementCommand, self).__init__(*args, **kw)
TypeError: __init__() takes at least 3 arguments (1 given)
running telldus_plugin
Could not build plugin

Replacing the embedded build/env/local/lib/python2.7/site-packages/pip with a standard version has taken me a few steps further (I get the .egg files, but no PGP hashes, nor final .zip file).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.