Mercurial > templog
changeset 133:190ac4e5a2bf
merge
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 14 Oct 2012 21:52:00 +0800 |
parents | 97aad4471593 (current diff) 719d5669ab27 (diff) |
children | 405785632c78 |
files | |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/web/config.py Sun Oct 14 21:51:55 2012 +0800 +++ b/web/config.py Sun Oct 14 21:52:00 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 Sun Oct 14 21:51:55 2012 +0800 +++ b/web/log.py Sun Oct 14 21:52:00 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'])