annotate web/config.py @ 282:d3ebdb1d6a55

fridge sensor is back
author Matt Johnston <matt@ucc.asn.au>
date Mon, 30 Nov 2015 21:40:57 +0800
parents 2630995fb973
children 35ae717d48f0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
94330d90f11f use tcp instead
Matt Johnston <matt@ucc.asn.au>
parents: 131
diff changeset
3 SLEEP_TIME = 60
94330d90f11f use tcp instead
Matt Johnston <matt@ucc.asn.au>
parents: 131
diff changeset
4 SERIAL_HOST='home.example.com'
94330d90f11f use tcp instead
Matt Johnston <matt@ucc.asn.au>
parents: 131
diff changeset
5 SERIAL_PORT=1999
28
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
6
194
4fa8cbf31065 working kinda
Matt Johnston <matt@ucc.asn.au>
parents: 189
diff changeset
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
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
9
194
4fa8cbf31065 working kinda
Matt Johnston <matt@ucc.asn.au>
parents: 189
diff changeset
10 # local config items
4fa8cbf31065 working kinda
Matt Johnston <matt@ucc.asn.au>
parents: 189
diff changeset
11 HMAC_KEY = 'a hmac key'
4fa8cbf31065 working kinda
Matt Johnston <matt@ucc.asn.au>
parents: 189
diff changeset
12 ALLOWED_USERS = [] # list of sha1 hashes of client ssl keys
4fa8cbf31065 working kinda
Matt Johnston <matt@ucc.asn.au>
parents: 189
diff changeset
13 SSH_HOST = 'remotehost'
4fa8cbf31065 working kinda
Matt Johnston <matt@ucc.asn.au>
parents: 189
diff changeset
14 SSH_KEYFILE = '/home/matt/.ssh/somekey'
4fa8cbf31065 working kinda
Matt Johnston <matt@ucc.asn.au>
parents: 189
diff changeset
15 SSH_PROG = 'ssh'
189
101c66da848d watcher script
Matt Johnston <matt@ucc.asn.au>
parents: 185
diff changeset
16
89
51d889ad39a3 main.c : add a delay before turning on uart
Matt Johnston <matt@ucc.asn.au>
parents: 87
diff changeset
17 UPDATE_URL = 'http://evil.ucc.asn.au/~matt/templog/update'
33
024f5571df8c - Debug log file for server
Matt Johnston <matt@ucc.asn.au>
parents: 31
diff changeset
18
244
2071d939e4ff use base64 data, faster
Matt Johnston <matt@ucc.asn.au>
parents: 227
diff changeset
19 GRAPH_WIDTH = 600
2071d939e4ff use base64 data, faster
Matt Johnston <matt@ucc.asn.au>
parents: 227
diff changeset
20 GRAPH_HEIGHT = 700
78
c7b6da1adb47 ui tweaks
Matt Johnston <matt@ucc.asn.au>
parents: 77
diff changeset
21 ZOOM = 1
244
2071d939e4ff use base64 data, faster
Matt Johnston <matt@ucc.asn.au>
parents: 227
diff changeset
22 # determine by viewing the image
2071d939e4ff use base64 data, faster
Matt Johnston <matt@ucc.asn.au>
parents: 227
diff changeset
23 GRAPH_LEFT_MARGIN = 65
29
048143905092 work on web interface
Matt Johnston <matt@ucc.asn.au>
parents: 28
diff changeset
24
048143905092 work on web interface
Matt Johnston <matt@ucc.asn.au>
parents: 28
diff changeset
25 LINE_WIDTH = 2
048143905092 work on web interface
Matt Johnston <matt@ucc.asn.au>
parents: 28
diff changeset
26
164
632d436d227b LHS axis scaling easily changeable
Matt Johnston <matt@ucc.asn.au>
parents: 139
diff changeset
27 SENSOR_NAMES = {'sensor_28 CE B2 1A 03 00 00 99': "Old Fridge",
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
62112fc2af21 sort out voltage logging
Matt Johnston <matt@ucc.asn.au>
parents: 56
diff changeset
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
719d5669ab27 extra logging
Matt Johnston <matt@ucc.asn.au>
parents: 126
diff changeset
32 'sensor_fridge_on': 'Cool',
164
632d436d227b LHS axis scaling easily changeable
Matt Johnston <matt@ucc.asn.au>
parents: 139
diff changeset
33 'sensor_28-0000042cf4dd': "Wort",
276
2630995fb973 Change colours
Matt Johnston <matt@ucc.asn.au>
parents: 258
diff changeset
34 'sensor_28-0000042cccc4': "OldFridge",
2630995fb973 Change colours
Matt Johnston <matt@ucc.asn.au>
parents: 258
diff changeset
35 'sensor_28-0000042c6dbb': "Fridge",
164
632d436d227b LHS axis scaling easily changeable
Matt Johnston <matt@ucc.asn.au>
parents: 139
diff changeset
36 'sensor_internal': "Processor",
61
62112fc2af21 sort out voltage logging
Matt Johnston <matt@ucc.asn.au>
parents: 56
diff changeset
37 }
29
048143905092 work on web interface
Matt Johnston <matt@ucc.asn.au>
parents: 28
diff changeset
38
227
efb5cad2e98b Only print interesting legend labels
Matt Johnston <matt@ucc.asn.au>
parents: 202
diff changeset
39 # print legend for these ones
efb5cad2e98b Only print interesting legend labels
Matt Johnston <matt@ucc.asn.au>
parents: 202
diff changeset
40 LEGEND_NAMES = set(("Wort", "Fridge", "Ambient", "Setpoint"))
efb5cad2e98b Only print interesting legend labels
Matt Johnston <matt@ucc.asn.au>
parents: 202
diff changeset
41
61
62112fc2af21 sort out voltage logging
Matt Johnston <matt@ucc.asn.au>
parents: 56
diff changeset
42 SENSOR_COLOURS = {'Wort': 'e49222',
78
c7b6da1adb47 ui tweaks
Matt Johnston <matt@ucc.asn.au>
parents: 77
diff changeset
43 'Ambient': '028b3d',
61
62112fc2af21 sort out voltage logging
Matt Johnston <matt@ucc.asn.au>
parents: 56
diff changeset
44 'Voltage': '7db5d3aa',
202
6dd157a12035 Add url link, improve atomicfile
Matt Johnston <matt@ucc.asn.au>
parents: 194
diff changeset
45 'Fridge': '93c8ff',
126
6a9419ac8f77 ui tweaks, add fridge values
Matt Johnston <matt@ucc.asn.au>
parents: 124
diff changeset
46 'Setpoint': '39c662',
131
719d5669ab27 extra logging
Matt Johnston <matt@ucc.asn.au>
parents: 126
diff changeset
47 'Cool': 'd7cedd',
164
632d436d227b LHS axis scaling easily changeable
Matt Johnston <matt@ucc.asn.au>
parents: 139
diff changeset
48 'Processor': 'bf7a69',
61
62112fc2af21 sort out voltage logging
Matt Johnston <matt@ucc.asn.au>
parents: 56
diff changeset
49 }
62112fc2af21 sort out voltage logging
Matt Johnston <matt@ucc.asn.au>
parents: 56
diff changeset
50
31
5e75e08d20ac - Various fixes for web server, kind of works
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
51
67
46c43e13a759 more graph fiddling
Matt Johnston <matt@ucc.asn.au>
parents: 63
diff changeset
52 GRAPH_FONT = "Prociono"
46c43e13a759 more graph fiddling
Matt Johnston <matt@ucc.asn.au>
parents: 63
diff changeset
53 #GRAPH_FONT = "URW Gothic L"
69
a8ff20f15734 a bunch of web fiddli
Matt Johnston <matt@ucc.asn.au>
parents: 67
diff changeset
54
83
b9179968a272 - fix set_params (strange)
Matt Johnston <matt@ucc.asn.au>
parents: 82
diff changeset
55
185
adbf70d1449f working
Matt Johnston <matt@ucc.asn.au>
parents: 164
diff changeset
56 # 1 hour
adbf70d1449f working
Matt Johnston <matt@ucc.asn.au>
parents: 164
diff changeset
57 CSRF_TIMEOUT = 3600
adbf70d1449f working
Matt Johnston <matt@ucc.asn.au>
parents: 164
diff changeset
58
258
03e540c3ec24 fix server side long polling
Matt Johnston <matt@ucc.asn.au>
parents: 244
diff changeset
59 LONG_POLL_TIMEOUT = 500
03e540c3ec24 fix server side long polling
Matt Johnston <matt@ucc.asn.au>
parents: 244
diff changeset
60
83
b9179968a272 - fix set_params (strange)
Matt Johnston <matt@ucc.asn.au>
parents: 82
diff changeset
61 try:
87
81b8c84344c4 - log more details
Matt Johnston <matt@ucc.asn.au>
parents: 84
diff changeset
62 from localconfig import *
83
b9179968a272 - fix set_params (strange)
Matt Johnston <matt@ucc.asn.au>
parents: 82
diff changeset
63 except ImportError:
b9179968a272 - fix set_params (strange)
Matt Johnston <matt@ucc.asn.au>
parents: 82
diff changeset
64 pass