annotate web/config.py @ 547:7689af9f56a8

Update to bottle 0.12.8
author Matt Johnston <matt@ucc.asn.au>
date Wed, 27 May 2015 22:17:39 +0800
parents 30628aa50a10
children 03e540c3ec24
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"
438
2607e4f322cf use tcp instead
Matt Johnston <matt@ucc.asn.au>
parents: 431
diff changeset
3 SLEEP_TIME = 60
2607e4f322cf use tcp instead
Matt Johnston <matt@ucc.asn.au>
parents: 431
diff changeset
4 SERIAL_HOST='home.example.com'
2607e4f322cf use tcp instead
Matt Johnston <matt@ucc.asn.au>
parents: 431
diff changeset
5 SERIAL_PORT=1999
334
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
6
492
23c6cf01d237 working kinda
Matt Johnston <matt@ucc.asn.au>
parents: 488
diff changeset
7
344
ea1779d27641 - Getting there, update has problems
Matt Johnston <matt@ucc.asn.au>
parents: 339
diff changeset
8 DATA_PATH = '/home/matt/templog/web/data'
334
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
9
492
23c6cf01d237 working kinda
Matt Johnston <matt@ucc.asn.au>
parents: 488
diff changeset
10 # local config items
23c6cf01d237 working kinda
Matt Johnston <matt@ucc.asn.au>
parents: 488
diff changeset
11 HMAC_KEY = 'a hmac key'
23c6cf01d237 working kinda
Matt Johnston <matt@ucc.asn.au>
parents: 488
diff changeset
12 ALLOWED_USERS = [] # list of sha1 hashes of client ssl keys
23c6cf01d237 working kinda
Matt Johnston <matt@ucc.asn.au>
parents: 488
diff changeset
13 SSH_HOST = 'remotehost'
23c6cf01d237 working kinda
Matt Johnston <matt@ucc.asn.au>
parents: 488
diff changeset
14 SSH_KEYFILE = '/home/matt/.ssh/somekey'
23c6cf01d237 working kinda
Matt Johnston <matt@ucc.asn.au>
parents: 488
diff changeset
15 SSH_PROG = 'ssh'
488
4792e9910cde watcher script
Matt Johnston <matt@ucc.asn.au>
parents: 485
diff changeset
16
395
f0ddb75bcf04 main.c : add a delay before turning on uart
Matt Johnston <matt@ucc.asn.au>
parents: 393
diff changeset
17 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
18
542
30628aa50a10 use base64 data, faster
Matt Johnston <matt@ucc.asn.au>
parents: 526
diff changeset
19 GRAPH_WIDTH = 600
30628aa50a10 use base64 data, faster
Matt Johnston <matt@ucc.asn.au>
parents: 526
diff changeset
20 GRAPH_HEIGHT = 700
384
abe8c530812e ui tweaks
Matt Johnston <matt@ucc.asn.au>
parents: 383
diff changeset
21 ZOOM = 1
542
30628aa50a10 use base64 data, faster
Matt Johnston <matt@ucc.asn.au>
parents: 526
diff changeset
22 # determine by viewing the image
30628aa50a10 use base64 data, faster
Matt Johnston <matt@ucc.asn.au>
parents: 526
diff changeset
23 GRAPH_LEFT_MARGIN = 65
335
1e22eaf93620 work on web interface
Matt Johnston <matt@ucc.asn.au>
parents: 334
diff changeset
24
1e22eaf93620 work on web interface
Matt Johnston <matt@ucc.asn.au>
parents: 334
diff changeset
25 LINE_WIDTH = 2
1e22eaf93620 work on web interface
Matt Johnston <matt@ucc.asn.au>
parents: 334
diff changeset
26
464
c3926e7cfb0c LHS axis scaling easily changeable
Matt Johnston <matt@ucc.asn.au>
parents: 438
diff changeset
27 SENSOR_NAMES = {'sensor_28 CE B2 1A 03 00 00 99': "Old Fridge",
c3926e7cfb0c LHS axis scaling easily changeable
Matt Johnston <matt@ucc.asn.au>
parents: 438
diff changeset
28 'sensor_28 CC C1 1A 03 00 00 D4': "Old Ambient",
c3926e7cfb0c LHS axis scaling easily changeable
Matt Johnston <matt@ucc.asn.au>
parents: 438
diff changeset
29 'sensor_28 49 BC 1A 03 00 00 54': "Old Wort",
367
3db118498b97 sort out voltage logging
Matt Johnston <matt@ucc.asn.au>
parents: 362
diff changeset
30 'sensor_voltage': 'Voltage',
425
eb685e1afcbb ui tweaks, add fridge values
Matt Johnston <matt@ucc.asn.au>
parents: 423
diff changeset
31 'sensor_fridge_setpoint': 'Setpoint',
431
ae12b30352f0 extra logging
Matt Johnston <matt@ucc.asn.au>
parents: 425
diff changeset
32 'sensor_fridge_on': 'Cool',
464
c3926e7cfb0c LHS axis scaling easily changeable
Matt Johnston <matt@ucc.asn.au>
parents: 438
diff changeset
33 'sensor_28-0000042cf4dd': "Wort",
c3926e7cfb0c LHS axis scaling easily changeable
Matt Johnston <matt@ucc.asn.au>
parents: 438
diff changeset
34 'sensor_28-0000042cccc4': "Fridge",
c3926e7cfb0c LHS axis scaling easily changeable
Matt Johnston <matt@ucc.asn.au>
parents: 438
diff changeset
35 'sensor_28-0000042c6dbb': "Ambient",
c3926e7cfb0c LHS axis scaling easily changeable
Matt Johnston <matt@ucc.asn.au>
parents: 438
diff changeset
36 'sensor_internal': "Processor",
367
3db118498b97 sort out voltage logging
Matt Johnston <matt@ucc.asn.au>
parents: 362
diff changeset
37 }
335
1e22eaf93620 work on web interface
Matt Johnston <matt@ucc.asn.au>
parents: 334
diff changeset
38
526
1f25c9d97111 Only print interesting legend labels
Matt Johnston <matt@ucc.asn.au>
parents: 501
diff changeset
39 # print legend for these ones
1f25c9d97111 Only print interesting legend labels
Matt Johnston <matt@ucc.asn.au>
parents: 501
diff changeset
40 LEGEND_NAMES = set(("Wort", "Fridge", "Ambient", "Setpoint"))
1f25c9d97111 Only print interesting legend labels
Matt Johnston <matt@ucc.asn.au>
parents: 501
diff changeset
41
367
3db118498b97 sort out voltage logging
Matt Johnston <matt@ucc.asn.au>
parents: 362
diff changeset
42 SENSOR_COLOURS = {'Wort': 'e49222',
384
abe8c530812e ui tweaks
Matt Johnston <matt@ucc.asn.au>
parents: 383
diff changeset
43 'Ambient': '028b3d',
367
3db118498b97 sort out voltage logging
Matt Johnston <matt@ucc.asn.au>
parents: 362
diff changeset
44 'Voltage': '7db5d3aa',
501
236e5d131b3e Add url link, improve atomicfile
Matt Johnston <matt@ucc.asn.au>
parents: 492
diff changeset
45 'Fridge': '93c8ff',
425
eb685e1afcbb ui tweaks, add fridge values
Matt Johnston <matt@ucc.asn.au>
parents: 423
diff changeset
46 'Setpoint': '39c662',
431
ae12b30352f0 extra logging
Matt Johnston <matt@ucc.asn.au>
parents: 425
diff changeset
47 'Cool': 'd7cedd',
464
c3926e7cfb0c LHS axis scaling easily changeable
Matt Johnston <matt@ucc.asn.au>
parents: 438
diff changeset
48 'Processor': 'bf7a69',
367
3db118498b97 sort out voltage logging
Matt Johnston <matt@ucc.asn.au>
parents: 362
diff changeset
49 }
3db118498b97 sort out voltage logging
Matt Johnston <matt@ucc.asn.au>
parents: 362
diff changeset
50
337
f575ef538f5d - Various fixes for web server, kind of works
Matt Johnston <matt@ucc.asn.au>
parents: 335
diff changeset
51
373
1f530c97c053 more graph fiddling
Matt Johnston <matt@ucc.asn.au>
parents: 369
diff changeset
52 GRAPH_FONT = "Prociono"
1f530c97c053 more graph fiddling
Matt Johnston <matt@ucc.asn.au>
parents: 369
diff changeset
53 #GRAPH_FONT = "URW Gothic L"
375
f22427bcfda8 a bunch of web fiddli
Matt Johnston <matt@ucc.asn.au>
parents: 373
diff changeset
54
389
5e3880342390 - fix set_params (strange)
Matt Johnston <matt@ucc.asn.au>
parents: 388
diff changeset
55
485
d68af9e84485 working
Matt Johnston <matt@ucc.asn.au>
parents: 464
diff changeset
56 # 1 hour
d68af9e84485 working
Matt Johnston <matt@ucc.asn.au>
parents: 464
diff changeset
57 CSRF_TIMEOUT = 3600
d68af9e84485 working
Matt Johnston <matt@ucc.asn.au>
parents: 464
diff changeset
58
389
5e3880342390 - fix set_params (strange)
Matt Johnston <matt@ucc.asn.au>
parents: 388
diff changeset
59 try:
393
afce71f829d6 - log more details
Matt Johnston <matt@ucc.asn.au>
parents: 390
diff changeset
60 from localconfig import *
389
5e3880342390 - fix set_params (strange)
Matt Johnston <matt@ucc.asn.au>
parents: 388
diff changeset
61 except ImportError:
5e3880342390 - fix set_params (strange)
Matt Johnston <matt@ucc.asn.au>
parents: 388
diff changeset
62 pass