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.

Integrating Tellstick with csv data

If you have a question or need help, this is the place to be.
Post Reply
bontwoody
Posts: 4
Joined: Mon Feb 06, 2012 6:17 pm

Integrating Tellstick with csv data

Post by bontwoody »

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
bontwoody
Posts: 4
Joined: Mon Feb 06, 2012 6:17 pm

Re: Integrating Tellstick with csv data

Post by bontwoody »

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
bontwoody
Posts: 4
Joined: Mon Feb 06, 2012 6:17 pm

Re: Integrating Tellstick with csv data

Post by bontwoody »

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
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Integrating Tellstick with csv data

Post by krambriw »

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:

Code: Select all

eg.TriggerEvent('Turn Heatpump ON', payload = None)
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
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Integrating Tellstick with csv data

Post by krambriw »

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

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"
bontwoody
Posts: 4
Joined: Mon Feb 06, 2012 6:17 pm

Re: Integrating Tellstick with csv data

Post by bontwoody »

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
MarcNewt
Posts: 1
Joined: Mon Dec 02, 2013 10:35 am

Re: Integrating Tellstick with csv data

Post by MarcNewt »

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 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. Wood
y
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 soon
TomasGray
Posts: 1
Joined: Fri Jan 10, 2014 10:12 am

Re: Integrating Tellstick with csv data

Post by TomasGray »

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. Wood
y
You have not shared the right solution.. It will help others so please post suitable reply soon.
Post Reply