telldus / tellstick-server-plugins Goto Github PK
View Code? Open in Web Editor NEWPlugins for TellStick Server
Plugins for TellStick Server
To create and install plugins, please see the documentation here: https://tellstick-server.readthedocs.io/en/latest/python/intro.html
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?
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.
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.from distutils.core import setup
to
from setuptools import setup
/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
./tellstick.sh setup
again, and (hopefully) it will fix any "Unknown distribution option" errors, and install everything sandboxed.Enjoy.
It looks like much of the code is ready... But even tho you make a plugin you want to use, there is no way for me to use my own key.
When will the return {'success': False, 'msg': 'Importing of custom keys are not allowed'}
block be removed?
Importing keys are not possible... https://github.com/telldus/tellstick-server/blob/master/plugin-loader/src/pluginloader/Loader.py#L190
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.
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 😀
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.
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
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
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:
I checked the functionality of this project, https://github.com/persandstrom/python-verisure, and it seems to handle this better.
@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.
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..?
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?
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).
Hello,
The current link to the latest plugins docs is:
https://tellstick-server.readthedocs.io/en/latest/python.html
Which returns the big ol' 404.
If I'm not mistaken, it should be:
https://tellstick-server.readthedocs.io/en/latest/python/
or
https://tellstick-server.readthedocs.io/en/latest/python/intro.html
Thanks,
Andreas
At https://github.com/telldus/tellstick-server-plugins/blob/master/http/long_description.md you write:
More examples can be found here:
https://github.com/telldus/tellstick-lua-examples/tree/master/plugins/http
I don't know if this is a member access issue or not, but now you know anyway. 💡
Andreas
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.