annotate web/config.py @ 433:411ff85e16e3

use delay_ms not timer tick - more robust
author Matt Johnston <matt@ucc.asn.au>
date Sun, 14 Oct 2012 21:52:09 +0800
parents ae12b30352f0
children 94330d90f11f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
388
b33045e7e08e move server config into config.py
Matt Johnston <matt@ucc.asn.au>
parents: 384
diff changeset
1 # for server
b33045e7e08e move server config into config.py
Matt Johnston <matt@ucc.asn.au>
parents: 384
diff changeset
2 BTADDR = "00:12:03:27:70:88"
b33045e7e08e move server config into config.py
Matt Johnston <matt@ucc.asn.au>
parents: 384
diff changeset
3 SLEEP_TIME = 5
334
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
4
344
ea1779d27641 - Getting there, update has problems
Matt Johnston <matt@ucc.asn.au>
parents: 339
diff changeset
5 DATA_PATH = '/home/matt/templog/web/data'
334
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
6
389
5e3880342390 - fix set_params (strange)
Matt Johnston <matt@ucc.asn.au>
parents: 388
diff changeset
7 HMAC_KEY = 'a hmac key' # override in local config file
334
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
8
395
f0ddb75bcf04 main.c : add a delay before turning on uart
Matt Johnston <matt@ucc.asn.au>
parents: 393
diff changeset
9 UPDATE_URL = 'http://evil.ucc.asn.au/~matt/templog/update'
339
449272fc63a3 - Debug log file for server
Matt Johnston <matt@ucc.asn.au>
parents: 337
diff changeset
10
384
abe8c530812e ui tweaks
Matt Johnston <matt@ucc.asn.au>
parents: 383
diff changeset
11 GRAPH_WIDTH = 1200
abe8c530812e ui tweaks
Matt Johnston <matt@ucc.asn.au>
parents: 383
diff changeset
12 GRAPH_HEIGHT = 600
abe8c530812e ui tweaks
Matt Johnston <matt@ucc.asn.au>
parents: 383
diff changeset
13 ZOOM = 1
335
1e22eaf93620 work on web interface
Matt Johnston <matt@ucc.asn.au>
parents: 334
diff changeset
14
1e22eaf93620 work on web interface
Matt Johnston <matt@ucc.asn.au>
parents: 334
diff changeset
15 LINE_WIDTH = 2
1e22eaf93620 work on web interface
Matt Johnston <matt@ucc.asn.au>
parents: 334
diff changeset
16
423
d828f409c4ed update sensors config
Matt Johnston <matt@ucc.asn.au>
parents: 403
diff changeset
17 SENSOR_NAMES = {'sensor_28 CE B2 1A 03 00 00 99': "Fridge",
384
abe8c530812e ui tweaks
Matt Johnston <matt@ucc.asn.au>
parents: 383
diff changeset
18 'sensor_28 CC C1 1A 03 00 00 D4': "Ambient",
423
d828f409c4ed update sensors config
Matt Johnston <matt@ucc.asn.au>
parents: 403
diff changeset
19 'sensor_28 49 BC 1A 03 00 00 54': "Wort",
367
3db118498b97 sort out voltage logging
Matt Johnston <matt@ucc.asn.au>
parents: 362
diff changeset
20 'sensor_voltage': 'Voltage',
425
eb685e1afcbb ui tweaks, add fridge values
Matt Johnston <matt@ucc.asn.au>
parents: 423
diff changeset
21 'sensor_fridge_setpoint': 'Setpoint',
431
ae12b30352f0 extra logging
Matt Johnston <matt@ucc.asn.au>
parents: 425
diff changeset
22 'sensor_fridge_on': 'Cool',
367
3db118498b97 sort out voltage logging
Matt Johnston <matt@ucc.asn.au>
parents: 362
diff changeset
23 }
335
1e22eaf93620 work on web interface
Matt Johnston <matt@ucc.asn.au>
parents: 334
diff changeset
24
367
3db118498b97 sort out voltage logging
Matt Johnston <matt@ucc.asn.au>
parents: 362
diff changeset
25 SENSOR_COLOURS = {'Wort': 'e49222',
384
abe8c530812e ui tweaks
Matt Johnston <matt@ucc.asn.au>
parents: 383
diff changeset
26 'Ambient': '028b3d',
367
3db118498b97 sort out voltage logging
Matt Johnston <matt@ucc.asn.au>
parents: 362
diff changeset
27 'Voltage': '7db5d3aa',
423
d828f409c4ed update sensors config
Matt Johnston <matt@ucc.asn.au>
parents: 403
diff changeset
28 'Fridge': '4c40c8',
425
eb685e1afcbb ui tweaks, add fridge values
Matt Johnston <matt@ucc.asn.au>
parents: 423
diff changeset
29 'Setpoint': '39c662',
431
ae12b30352f0 extra logging
Matt Johnston <matt@ucc.asn.au>
parents: 425
diff changeset
30 'Cool': 'd7cedd',
367
3db118498b97 sort out voltage logging
Matt Johnston <matt@ucc.asn.au>
parents: 362
diff changeset
31 }
3db118498b97 sort out voltage logging
Matt Johnston <matt@ucc.asn.au>
parents: 362
diff changeset
32
337
f575ef538f5d - Various fixes for web server, kind of works
Matt Johnston <matt@ucc.asn.au>
parents: 335
diff changeset
33
373
1f530c97c053 more graph fiddling
Matt Johnston <matt@ucc.asn.au>
parents: 369
diff changeset
34 GRAPH_FONT = "Prociono"
1f530c97c053 more graph fiddling
Matt Johnston <matt@ucc.asn.au>
parents: 369
diff changeset
35 #GRAPH_FONT = "URW Gothic L"
375
f22427bcfda8 a bunch of web fiddli
Matt Johnston <matt@ucc.asn.au>
parents: 373
diff changeset
36
f22427bcfda8 a bunch of web fiddli
Matt Johnston <matt@ucc.asn.au>
parents: 373
diff changeset
37 # determine by zooming in an image viewer
379
fed6738be1ab Get rid of axes labels, tidy html
Matt Johnston <matt@ucc.asn.au>
parents: 375
diff changeset
38 GRAPH_LEFT_MARGIN = 63
389
5e3880342390 - fix set_params (strange)
Matt Johnston <matt@ucc.asn.au>
parents: 388
diff changeset
39
5e3880342390 - fix set_params (strange)
Matt Johnston <matt@ucc.asn.au>
parents: 388
diff changeset
40 try:
393
afce71f829d6 - log more details
Matt Johnston <matt@ucc.asn.au>
parents: 390
diff changeset
41 from localconfig import *
389
5e3880342390 - fix set_params (strange)
Matt Johnston <matt@ucc.asn.au>
parents: 388
diff changeset
42 except ImportError:
5e3880342390 - fix set_params (strange)
Matt Johnston <matt@ucc.asn.au>
parents: 388
diff changeset
43 pass