# HG changeset patch # User Matt Johnston # Date 1350130970 -28800 # Node ID ae12b30352f0c563266281f6493880e25232a3b2 # Parent 7c2efec9cd512dbe8bff4b9cc2a6049a9a747c09 extra logging diff -r 7c2efec9cd51 -r ae12b30352f0 web/config.py --- 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', } diff -r 7c2efec9cd51 -r ae12b30352f0 web/log.py --- 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'])