Hi
Im a complete newbie to eventghost but I think that it may be suitable for what I want to do. I want to use a Tellstick for home automation but integrate data from other sources such as my solar panels and water temperature that I have managed to save onto my PC in csv format. The values in the files are updated every five mins.
Ideally Id like to do something like turn on my heat pump if Im producing over 1kW of power from my solar panels or the time is after 10am when my tank temp is lower than 35 degrees. Is this possible to do? and could you point me in the right direction to start. I havent used python before but can handle basic well enough.
Hope you can help. Woody
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.
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.
Integrating Tellstick with csv data
Re: Integrating Tellstick with csv data
Ive done some playing in Event Ghost and used a Python Script to create the following
import csv
reader = csv.reader(open("C:\Documents and Settings\Mark\My Documents\SMA\Sunny Explorer\currentkw.csv", "rb"))
for row in reader:
vKw=str(row).strip('[]')
print vKw
if vKw>1:
print "high output"
else:
print "low output"
am I on the right lines? and how to I get this to cause an event with a tellstick. Ive added the Tellstick plugin but im waiting for one to be delivered.
Thanks Woody
import csv
reader = csv.reader(open("C:\Documents and Settings\Mark\My Documents\SMA\Sunny Explorer\currentkw.csv", "rb"))
for row in reader:
vKw=str(row).strip('[]')
print vKw
if vKw>1:
print "high output"
else:
print "low output"
am I on the right lines? and how to I get this to cause an event with a tellstick. Ive added the Tellstick plugin but im waiting for one to be delivered.
Thanks Woody
Re: Integrating Tellstick with csv data
Actually I mean cause an action not an event. eg if vKw>1 then cause a switch to turn on via tellstick.
Any help much appreciated. Woody
Any help much appreciated. Woody
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Integrating Tellstick with csv data
You can create an event on the criteria from the script as you have started on. To generate an event from a script you can use a code line like:
Test the script and when you get the event, you can drag this event from the log on the left side to a macro on the right side where you have a Tellstick action inside that will send a Tellstick command like on or off.
Best regards, Walter
Code: Select all
eg.TriggerEvent('Turn Heatpump ON', payload = None)Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Integrating Tellstick with csv data
Part of your example is below. It will generate an event if vKw is larger than 1. You can run it, change the value and play a bit with it and you will get the idea.
Best regards, Walter
Best regards, Walter
Code: Select all
vKw = 2
if vKw>1:
eg.TriggerEvent('Turn Heatpump ON', payload = None)
print "high output"
else:
eg.TriggerEvent('Turn Heatpump OFF', payload = None)
print "low output"
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Integrating Tellstick with csv data
Excellent! Thanks Walter I get it now. Justing waiting for the Tellstick which seem exceedingly difficult to source in the UK.
Thanks for taking the time to get me started.
Woody
Thanks for taking the time to get me started.
Woody
Re: Integrating Tellstick with csv data
Were you able to integrate the tellstick? It seems to be very effective system so can you share your true experience? I hope you will post suitable reply very soonbontwoody wrote:Hi
Im a complete newbie to eventghost but I think that it may be suitable for what I want to do. I want to use a Tellstick for home automation but integrate data from other sources such as my solar panels and water temperature that I have managed to save onto my PC in csv format. The values in the files are updated every five mins.
Ideally Id like to do something like turn on my heat pump if Im producing over 1kW of power from my solar panels or the time is after 10am when my tank temp is lower than 35 degrees. Is this possible to do? and could you point me in the right direction to start. I havent used python before but can handle basic well enough.
Hope you can help. Woody
Re: Integrating Tellstick with csv data
You have not shared the right solution.. It will help others so please post suitable reply soon.bontwoody wrote:Hi
Im a complete newbie to eventghost but I think that it may be suitable for what I want to do. I want to use a Tellstick for home automation but integrate data from other sources such as my solar panel and water temperature that I have managed to save onto my PC in csv format. The values in the files are updated every five mins.
Ideally Id like to do something like turn on my heat pump if Im producing over 1kW of power from my solar panels or the time is after 10am when my tank temp is lower than 35 degrees. Is this possible to do? and could you point me in the right direction to start. I havent used python before but can handle basic well enough.
Hope you can help. Woody