Mercurial > templog
annotate web/config.py @ 586:87c20b8c5472 default master
port to python3
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 09 Sep 2019 22:24:10 +0800 |
parents | f7261dd970da |
children |
rev | line source |
---|---|
82
0f7c005b3f87
move server config into config.py
Matt Johnston <matt@ucc.asn.au>
parents:
78
diff
changeset
|
1 # for server |
0f7c005b3f87
move server config into config.py
Matt Johnston <matt@ucc.asn.au>
parents:
78
diff
changeset
|
2 BTADDR = "00:12:03:27:70:88" |
139 | 3 SLEEP_TIME = 60 |
4 SERIAL_HOST='home.example.com' | |
5 SERIAL_PORT=1999 | |
28 | 6 |
194 | 7 |
37
8da0fdadc8d7
- Getting there, update has problems
Matt Johnston <matt@ucc.asn.au>
parents:
33
diff
changeset
|
8 DATA_PATH = '/home/matt/templog/web/data' |
28 | 9 |
194 | 10 # local config items |
11 HMAC_KEY = 'a hmac key' | |
291
f7261dd970da
- replace ssl client certs with cookies
Matt Johnston <matt@ucc.asn.au>
parents:
290
diff
changeset
|
12 ALLOWED_USERS = [] # list of hashes allowed, as provided by the Email link |
189 | 13 |
89
51d889ad39a3
main.c : add a delay before turning on uart
Matt Johnston <matt@ucc.asn.au>
parents:
87
diff
changeset
|
14 UPDATE_URL = 'http://evil.ucc.asn.au/~matt/templog/update' |
33 | 15 |
291
f7261dd970da
- replace ssl client certs with cookies
Matt Johnston <matt@ucc.asn.au>
parents:
290
diff
changeset
|
16 EMAIL = "[email protected]" |
f7261dd970da
- replace ssl client certs with cookies
Matt Johnston <matt@ucc.asn.au>
parents:
290
diff
changeset
|
17 |
244 | 18 GRAPH_WIDTH = 600 |
19 GRAPH_HEIGHT = 700 | |
78 | 20 ZOOM = 1 |
244 | 21 # determine by viewing the image |
22 GRAPH_LEFT_MARGIN = 65 | |
29 | 23 |
24 LINE_WIDTH = 2 | |
25 | |
290 | 26 SENSOR_NAMES = { |
27 'sensor_28 CE B2 1A 03 00 00 99': "Old Fridge", | |
164
632d436d227b
LHS axis scaling easily changeable
Matt Johnston <matt@ucc.asn.au>
parents:
139
diff
changeset
|
28 'sensor_28 CC C1 1A 03 00 00 D4': "Old Ambient", |
632d436d227b
LHS axis scaling easily changeable
Matt Johnston <matt@ucc.asn.au>
parents:
139
diff
changeset
|
29 'sensor_28 49 BC 1A 03 00 00 54': "Old Wort", |
61 | 30 'sensor_voltage': 'Voltage', |
126
6a9419ac8f77
ui tweaks, add fridge values
Matt Johnston <matt@ucc.asn.au>
parents:
124
diff
changeset
|
31 'sensor_fridge_setpoint': 'Setpoint', |
131 | 32 'sensor_fridge_on': 'Cool', |
290 | 33 'sensor_28-0000042cf4dd': "New Old Wort", |
34 'sensor_28-0000042d36cc': "Wort", | |
276 | 35 'sensor_28-0000042cccc4': "OldFridge", |
290 | 36 'sensor_28-0000042c6dbb': "New Old Fridge", |
37 'sensor_28-0000068922df': "Fridge", | |
164
632d436d227b
LHS axis scaling easily changeable
Matt Johnston <matt@ucc.asn.au>
parents:
139
diff
changeset
|
38 'sensor_internal': "Processor", |
61 | 39 } |
29 | 40 |
227
efb5cad2e98b
Only print interesting legend labels
Matt Johnston <matt@ucc.asn.au>
parents:
202
diff
changeset
|
41 # print legend for these ones |
efb5cad2e98b
Only print interesting legend labels
Matt Johnston <matt@ucc.asn.au>
parents:
202
diff
changeset
|
42 LEGEND_NAMES = set(("Wort", "Fridge", "Ambient", "Setpoint")) |
efb5cad2e98b
Only print interesting legend labels
Matt Johnston <matt@ucc.asn.au>
parents:
202
diff
changeset
|
43 |
61 | 44 SENSOR_COLOURS = {'Wort': 'e49222', |
78 | 45 'Ambient': '028b3d', |
61 | 46 'Voltage': '7db5d3aa', |
202
6dd157a12035
Add url link, improve atomicfile
Matt Johnston <matt@ucc.asn.au>
parents:
194
diff
changeset
|
47 'Fridge': '93c8ff', |
126
6a9419ac8f77
ui tweaks, add fridge values
Matt Johnston <matt@ucc.asn.au>
parents:
124
diff
changeset
|
48 'Setpoint': '39c662', |
131 | 49 'Cool': 'd7cedd', |
164
632d436d227b
LHS axis scaling easily changeable
Matt Johnston <matt@ucc.asn.au>
parents:
139
diff
changeset
|
50 'Processor': 'bf7a69', |
61 | 51 } |
52 | |
31
5e75e08d20ac
- Various fixes for web server, kind of works
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
53 |
67 | 54 GRAPH_FONT = "Prociono" |
55 #GRAPH_FONT = "URW Gothic L" | |
69 | 56 |
83 | 57 |
185 | 58 # 1 hour |
59 CSRF_TIMEOUT = 3600 | |
60 | |
258
03e540c3ec24
fix server side long polling
Matt Johnston <matt@ucc.asn.au>
parents:
244
diff
changeset
|
61 LONG_POLL_TIMEOUT = 500 |
03e540c3ec24
fix server side long polling
Matt Johnston <matt@ucc.asn.au>
parents:
244
diff
changeset
|
62 |
83 | 63 try: |
87 | 64 from localconfig import * |
83 | 65 except ImportError: |
66 pass |