Mercurial > templog
comparison py/config.py @ 220:251524081924
make the fridge off timer more robust
add a few comments
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 19 Dec 2014 22:32:59 +0800 |
parents | ccebadce4619 |
children | d9e81a563923 |
comparison
equal
deleted
inserted
replaced
219:16a83e2c97a0 | 220:251524081924 |
---|---|
1 import os.path | 1 import os.path |
2 | 2 |
3 FRIDGE_SLEEP = 60 | 3 FRIDGE_SLEEP = 60 # this value works. may affect the algorithm |
4 SENSOR_SLEEP = 15 | 4 SENSOR_SLEEP = 15 # same for this. |
5 UPLOAD_SLEEP = 80 | 5 UPLOAD_SLEEP = 83 # nice and prime |
6 | 6 |
7 FRIDGE_DELAY = 600 # 10 mins | 7 FRIDGE_DELAY = 600 # 10 mins, to avoid fridge damage from frequent cycling off/on |
8 FRIDGE_WORT_INVALID_TIME = 300 # 5 mins | 8 FRIDGE_WORT_INVALID_TIME = 300 # 5 mins |
9 | 9 |
10 # 12 hours | 10 # 12 hours of "offline" readings stored |
11 MAX_READINGS = 12*60*60 / SENSOR_SLEEP | 11 MAX_READINGS = 12*60*60 / SENSOR_SLEEP |
12 | 12 |
13 PARAMS_FILE = os.path.join(os.path.dirname(__file__), 'tempserver.conf') | 13 PARAMS_FILE = os.path.join(os.path.dirname(__file__), 'tempserver.conf') |
14 | 14 |
15 SENSOR_BASE_DIR = '/sys/devices/w1_bus_master1' | 15 SENSOR_BASE_DIR = '/sys/devices/w1_bus_master1' |
21 | 21 |
22 HMAC_KEY = "a key" | 22 HMAC_KEY = "a key" |
23 #UPDATE_URL = 'https://matt.ucc.asn.au/test/templog/update' | 23 #UPDATE_URL = 'https://matt.ucc.asn.au/test/templog/update' |
24 UPDATE_URL = 'https://evil.ucc.asn.au/~matt/templog/update' | 24 UPDATE_URL = 'https://evil.ucc.asn.au/~matt/templog/update' |
25 | 25 |
26 # site-local values overridden in localconfig, eg WORT_NAME, HMAC_KEY | |
26 try: | 27 try: |
27 from localconfig import * | 28 from localconfig import * |
28 except ImportError: | 29 except ImportError: |
29 pass | 30 pass |