Mercurial > code > home > repos > homeauto
annotate service/frontDoorMessage/automsg.py @ 139:5b607e8d35d0
add color/hex
Ignore-this: 20a75656647a5049527ba255437a8542
author | drewp@bigasterisk.com |
---|---|
date | Sat, 12 Jul 2014 11:32:00 -0700 |
parents | 912a3dae5c2c |
children |
rev | line source |
---|---|
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, | |
35
912a3dae5c2c
don't break automsg when livingroom temp is missing
drewp@bigasterisk.com
parents:
0
diff
changeset
|
20 allTemp.get('livingRoom', 0), |
0 | 21 allTemp.get('frontDoor', 0)) |
22 fd.put("lastLine", payload=line) | |
23 time.sleep(60) |