-
Notifications
You must be signed in to change notification settings - Fork 0
/
example-electricityd.conf
69 lines (58 loc) · 2.17 KB
/
example-electricityd.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Configuration file for electricityd
{
# (host, port) tuple to serve pass-through xml data on
'xmlServerAddress': ('', 20222),
# (host, port) tuple to serve http requests on
'httpServerAddress': ('', 20080),
# directory to serve static http requests
'httpServerRoot': None,
# path to serial port
#'serialAddr': '/dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0',
# for remote serial port you can also use the following syntax
# (see http://pyserial.sourceforge.net/pyserial_api.html#urls for details):
#'serialAddr': 'rfc2217://<host>:<port>',
#'serialAddr': 'socket://<host>:<port>',
'serialAddr': 'loop://',
# baud rate
'serialBaud': '57600',
# timeout in seconds before running power fail script
'serialTimeout': 90,
# list of device make / model.
#'devices': ['cc128'],
'devices': ['eagle', 'tempered'],
# script to run when serial port goes idle
'powerFailScript': 'sudo -n /opt/etc/power/%s',
# file to log recnet events to when power fails
'logFile': '/var/log/electricity.log',
# string format to use to write log entries
'logTimeFormat': '%b %_2d %H:%M:%S',
# number of entries to write to the log file when power fails
'maxLogItems': 24,
# services to post your data to
'services': {
'xively': {
'enabled': False, # default is True
'url': 'http://api.xively.com/v2/feeds/1234.csv?_method=put',
'headers': {'X-ApiKey': '<update_api_key>'},
'data': '0,{temp}\n1,{watts}',
'interval': 300,
#'timeout': 10, # default is 10
},
'open.sen.se': {
'enabled': False, # default is True
'url': 'http://api.sen.se/events/',
'headers': {'Content-type': 'application/json', 'sense_key': '<sense_key>'},
'data': '[{{"feed_id":1234,"value":{temp}}},{{"feed_id":1235,"value":{watts}}}]',
'interval': 300,
#'timeout': 10, # default is 10
},
'thingspeak': {
'enabled': False, # default is True
'url': 'http://api.thingspeak.com/update',
'headers': {'X-THINGSPEAKAPIKEY': '<write_api_key>'},
'data': 'field1={temp}&field2={watts}',
'interval': 300,
#'timeout': 10, # default is 10
},
},
}