Hi, K-..
tnx for reply,...
maybe you can help me with some answers

(i am not good at python, but know some other programing language, php, batch, etc etc..)
I am trying to execute a action at a spesific time, when the temprature is lower than... and this is working ..
I was able to read the values of the temp by using this script:
Code: Select all
temp0 = eg.event.suffix.split(';')
print temp0
temp1 = temp0[4]
print temp1
temp2 = temp1[5:9]
print temp2
if float(temp2[0])>25.0:
print "TellStickDuo: Turn off Spisestue tak"
eg.TriggerEvent("Turn off Spisestue tak")
if float(temp2[0])<25.0:
print "TellStickDuo: Turn on Spisestue tak"
eg.TriggerEvent("Turn ON Spisestue tak")
The event shows reports....
['RawEvent: class:sensor', 'protocol:mandolyn', 'id:11', 'model:temperaturehumidity', 'temp:21.4', 'humidity:27', 'Duo_ID:3']
My scripts shows:
is both working and now...
a) just after I see a event report (in the live windows), that means the temprature sensor reports into TellStickCenter and also into EventGhost.
Python Script
['RawEvent: class:sensor', 'protocol:mandolyn', 'id:11', 'model:temperaturehumidity', 'temp:19.5', 'humidity:34', 'Duo_ID:3']
temp:19.5
19.5
TellStickDuo: Turn on Spisestue tak
Main.Turn ON Spisestue tak
This IS working....
b) BUT after 3-4 second later, I get this error... and it failes...
Python Script
[u'Activated.EventGhost']
Traceback (most recent call last):
Python script "1290", line 4, in <module>
temp1 = temp0[4]
IndexError: list index out of range
So the questions will be:
1) should I use a shedule to run the script at my prefered time??? or just put my script into root/autorun..
2) Should I use file read (of the log file to EventGhost) and read the temp var?
3) I also have 2 temprature sensors,,, how can I diffrence on the events?
INFO:root:2014-09-12 22:09:47: RawEvent: class:sensor;protocol:oregon;model:EA4C;id:176;temp:22.7;Duo_ID:3
and
INFO:root:2014-09-12 22:10:04: RawEvent: class:sensor;protocol:mandolyn;id:11;model:temperaturehumidity;temp:11.9;humidity:76;Duo_ID:3
any tips will be helpful..
Eddie