0
|
1 """
|
|
2 write the automatic last line to LCD /lastLine
|
|
3 """
|
|
4 import sys, time
|
|
5 sys.path.append("/my/site/magma")
|
|
6 from datetime import datetime
|
|
7 from graphitetemp import getAllTemps
|
|
8
|
|
9 import restkit
|
|
10
|
|
11 # needs poller with status report
|
|
12
|
|
13 while True:
|
|
14 fd = restkit.Resource("http://bang:9081/")
|
|
15
|
|
16 allTemp = getAllTemps()
|
|
17 now = datetime.now()
|
|
18
|
|
19 line = "%02d:%02d %02dF in, %02dF out" % (now.hour, now.minute,
|
|
20 allTemp['livingRoom'],
|
|
21 allTemp.get('frontDoor', 0))
|
|
22 fd.put("lastLine", payload=line)
|
|
23 time.sleep(60)
|