Mercurial > code > home > repos > homeauto
view 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 |
line wrap: on
line source
""" write the automatic last line to LCD /lastLine """ import sys, time sys.path.append("/my/site/magma") from datetime import datetime from graphitetemp import getAllTemps import restkit # needs poller with status report while True: fd = restkit.Resource("http://bang:9081/") allTemp = getAllTemps() now = datetime.now() line = "%02d:%02d %02dF in, %02dF out" % (now.hour, now.minute, allTemp.get('livingRoom', 0), allTemp.get('frontDoor', 0)) fd.put("lastLine", payload=line) time.sleep(60)