Mercurial > templog
changeset 431:ae12b30352f0
extra logging
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 13 Oct 2012 20:22:50 +0800 |
parents | 7c2efec9cd51 |
children | b90e9c695cfd |
files | web/config.py web/log.py |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/web/config.py Thu Oct 11 19:21:11 2012 +0800 +++ b/web/config.py Sat Oct 13 20:22:50 2012 +0800 @@ -19,7 +19,7 @@ 'sensor_28 49 BC 1A 03 00 00 54': "Wort", 'sensor_voltage': 'Voltage', 'sensor_fridge_setpoint': 'Setpoint', - 'sensor_fridge_on': 'On', + 'sensor_fridge_on': 'Cool', } SENSOR_COLOURS = {'Wort': 'e49222', @@ -27,7 +27,7 @@ 'Voltage': '7db5d3aa', 'Fridge': '4c40c8', 'Setpoint': '39c662', - 'On': 'd7cedd', + 'Cool': 'd7cedd', }
--- a/web/log.py Thu Oct 11 19:21:11 2012 +0800 +++ b/web/log.py Sat Oct 13 20:22:50 2012 +0800 @@ -78,7 +78,7 @@ elif 'fridge_on' in sensor: vname = 'fridge_on' graph_args.append('DEF:raw%(vname)s=%(rrdfile)s:temp:LAST' % locals()) - graph_args.append('CDEF:%(vname)s=raw%(vname)s,3,+' % locals()) + graph_args.append('CDEF:%(vname)s=raw%(vname)s,-0.2,*,3,+' % locals()) else: vname = 'temp%d' % n graph_args.append('DEF:raw%(vname)s=%(rrdfile)s:temp:AVERAGE' % locals()) @@ -216,6 +216,10 @@ if len(entries) != len(lines): raise Exception("Keys are not unique") + if 'sensors' not in entries: + # only debug info, it's been recorded + return + num_sensors = int(entries['sensors']) num_measurements = int(entries['measurements'])