Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
This topic has been moved to the plugins support section
viewtopic.php?f=9&t=9687&p=46213#p46213
Anyone mess around with them for eventghost? I got a python script from some website to make WEMO switches work which is great! The TP-Link device seems to perform a lot better, but I dont have an easy way to control with EG.
There is a python script from a website that i am unable to modify because i do not know how. Any chance someone could help/teach me? Looking to learn more python.
well lets start out with the first step and see if the software you found will even run in EG
go to that github site and download the software as a zip file.
you will only want to decompress the folder named pyHS100 into this directory if you are using EG 0.5 c:\program files (x86)\eventghost\lib27\site-packages and if you are using EG 0.4 c:\program files (x86)\eventghost\lib26\site-packages
then start EG and create a new macro with a Python Script as an action and copy and paste the code below into the PythonScript action. apply and ok the dialog.. then right click the newly created PythonScript and click on execute and see if anything comes up in the log
from pprint import pformat
from pyHS100 import TPLinkSmartHomeProtocol
for dev in TPLinkSmartHomeProtocol.discover(timeout=10):
print "Found device: %s" % pformat(dev)
If you like the work I have been doing then feel free to
And no they are not backwards compatable. Because the error is a syntax error the issue is probably going to be how they did some like creating a dictionary.
If you like the work I have been doing then feel free to
Hmm, so do you think you can convert it? Or is that really hard? I tried running this script through cmd prompt and I couldn't even get that to work either. I was thinking I could modify the script and have eventghost just run a program. I was hoping running TP-Link commands would be easy. I was able to get a WEMO script working but TP-Link is way more reliable. I wonder if anyone on this forum has gotten it to work.
so importing the module into a python script does work. I have no means to test the thing to make sure it works beyond just importing it so that is what you will do.. uncompress that file and run that python script again
If you like the work I have been doing then feel free to
make sure you backup your EventGhost folder in c:\Program Files (x86) first.. do a simple copy and paste of the whole EG folder. And in the path bar at the top of Windows Explorer (File Explorer) type in %appdata% and press enter and copy the EventGhost folder in there as well. because the program files folder and the one in app data have the same name I would make a folder on my desktop called EG Backup and in that folder make a new folder called Config put the program files EventGhost folder into the EG Backup folder and put the EventGhost folder from the %appdata% into the EG Backup\Config folder. then you can do the installation.. this is just incase something goes wierd. we haven't had any recent issues of this but if it does happen I don't want you to lose anything.
Succefully updated and backed up eventghost. I moved the files you sent me into the lib27 instead of the lib26 folder. This is now the error i am receiving. Thanks!
21:12:35 Traceback (most recent call last):
21:12:35 Python script "20", line 2, in <module>
21:12:35 from pyHS100 import TPLinkSmartHomeProtocol
21:12:35 File "C:\Python27\Lib\site-packages\pyhs100-0.2.4.2-py2.7.egg\pyHS100\__init__.py", line 2, in <module>
21:12:35 from .smartplug import SmartPlug
21:12:35 File "C:\Python27\Lib\site-packages\pyhs100-0.2.4.2-py2.7.egg\pyHS100\smartplug.py", line 4, in <module>
21:12:35 from .pyHS100 import SmartDevice
21:12:35 SyntaxError: invalid syntax (pyHS100.py, line 65)
ok! followed your instructions sir. What do you think?
23:39:47 Traceback (most recent call last):
23:39:47 Python script "20", line 2, in <module>
23:39:47 from pyHS100 import TPLinkSmartHomeProtocol
23:39:47 File "C:\Python27\Lib\site-packages\pyhs100-0.2.4.2-py2.7.egg\pyHS100\__init__.py", line 2, in <module>
23:39:47 from .smartplug import SmartPlug
23:39:47 File "C:\Python27\Lib\site-packages\pyhs100-0.2.4.2-py2.7.egg\pyHS100\smartplug.py", line 4, in <module>
23:39:47 from .pyHS100 import SmartDevice
23:39:47 SyntaxError: invalid syntax (pyHS100.py, line 65)