-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhotpot.cfg
144 lines (144 loc) · 4.64 KB
/
hotpot.cfg
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
// Example hotpot.cfg
// You are NOT recommended to edit this file directly. Instead create your
// own hotpot.cfg file and use the --config option to point Hotpot at it.
//
// Note that $ in strings is used to refer to environment variables e.g.
// $HOME
//
{
server: {
// Home location of the central heating system, optional
location: {
latitude: 57.812502,
longitude: -8.573135
},
port: 13196, // server network port
docroot: "$PWD/../..",
ssl: { // optional
// HTTPS key server private key `key` and certificate `cert`.
// If no private key and certificate are given, an HTTP server
// will be used.
// Key/cert must be generated e.g. using openssl
cert: "$HOME/hotpot.crt",
key: "$HOME/hotppot.key"
},
auth: { // optional, BasicAuth details
user: "hotpot",
pass: "hotpot",
realm: "hotpot"
}
},
controller: {
thermostat: {
// Sets up the DS18X20 thermostats available to the system.
HW: {
// ID of the ds18x20 device
id: "28-0115914ff5ff",
history: { // Optional, see README.md#History
// Where to store the history, and how often to sample
file: "/var/log/hotpot/HW_temp.log",
// Gap between history snapshots, 60 seconds
interval: 60000
},
timeline: {
min: 0,
max: 50,
period: 86400000,
points: [
{ times: "00:00", value: 10 },
{ times: "06:00", value: 50 },
{ times: "18:00", value: 10 }
]
}
},
CH: {
id: "29-0155917ff58f",
history: { file: "/var/log/hotpot/CH_temp.log" },
timeline: {
min: 0,
max: 50,
period: 86400000,
points: [
{ times: "00:00", value: 10 },
{ times: "08:00", value: 20 },
{ times: "22:00", value: 10 }
]
}
}
},
pin: {
// Sets up the GPIO pins, mapping the pin name to the GPIO pin
// number.
// The pin names `HW` and `CH` have special support to take account
// of a subtle dependency in Y-plan systems, but otherwise pin names
// are up to the user.
HW: {
// RPi gpio
gpio: 23,
history: { // Optional, see README.md#History
// Where to store the history, and how big to let it grow
// Normally this will be in /var/log
file: "$HOME/HW_state.log"
}
},
CH: {
gpio: 25,
history: { file: "$HOME/CH_state.log" }
}
},
rule: {
// List of rules that are used to control state of the system. Rules
// are executed in the order they are specified. See README.md.
"Hot Water" : {
// Path relative to where the Hotpot.js script is run from
$instance_of: "src/server/HotWaterRule"
},
"Central Heating": {
$instance_of: "src/server/CentralHeatingRule"
}
},
calendar: { // Calendars
"Example": {
// Currently only type "GoogleCalendar" is supported
$instance_of: "src/server/GoogleCalendar",
id: "primary", // name of the calendar
prefix: "hotpot:", // prefix for requests in calendar events
// pathname of a file on the server used to cache the
// authentication for this calendar
auth_cache: "$HOME/google_calendar.authcache",
// Secrets used by calendar (see Calendars in README.md)
secrets: {
client_id: "748295330634-stsav91ruqclo45gu873opsput6ljoabsapph.googleusercontent.com",
client_secret: "XAffgnutso4kk4whs06dss6DD",
redirect_uris: [ "urn:ietf:wg:oauth:2.0:oob", "http://localhost" ]
},
update_period: 24,
cache_length: 72
}
},
weather: {
// Data services providing weather information. In the
// reference implementation (class "MetOffice", weather
// information is retrieved from the UK Meteorological
// Office data service. Each entry here corresponds to the
// class that provides the service.
"MetOffice": {
$instance_of: "src/server/MetOffice",
// An API key is required. These are available for free.
api_key: "f6fd8945-e57f-4768-8fa2-59fa19a5fc6d",
history: { // Optional, see README.md#History
file: "/var/log/hotpot/weather.log"
}
}
},
mail: { // optional, email to notify if something is wrong
// requiring admin intervention
host: "smtp.ethereal.email",
port: 587,
user: "hotpot",
pass: "hotpot",
from: "[email protected]",
to: "[email protected]"
}
}
}