Mercurial > code > home > repos > homeauto
view service/frontDoorMessage/automsg.py @ 0:6fd208b97616
start
Ignore-this: e06ac598970a0d4750f588ab89f56996
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Mon, 01 Aug 2011 03:30:30 -0700 |
parents | |
children | 912a3dae5c2c |
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['livingRoom'], allTemp.get('frontDoor', 0)) fd.put("lastLine", payload=line) time.sleep(60)