Mercurial > code > home > repos > homeauto
view service/frontDoorMessage/automsg.py @ 1133:114ca7fd9d01
IR remote rule
Ignore-this: 901771de421a81129f2ddf4316af91d9
darcs-hash:a037a1bcf9631ac214fe1e61ff42fb00f25cb451
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Sat, 03 Feb 2018 14:38:10 -0800 |
parents | afc74853a1a4 |
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)