-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
80 lines (69 loc) · 1.8 KB
/
config.py
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
#
# config
#
from device_config import MACHINE_ID_QSUM
MY_STAGE = "test"
MY_LOCATION = "heating"
MY_HOST = "esp-" + MY_LOCATION + "-" + str( MACHINE_ID_QSUM )
MY_STAGE_HEX = "{0:02x}".format(ord( MY_STAGE[0] ))
MY_LOCATION_HEX = "{0:02x}".format(ord( MY_LOCATION[0] ))
MY_HOST_LEN = str(len(MY_HOST))
MY_MAC = "2222%s%s%s%s" % (MY_STAGE_HEX, MY_LOCATION_HEX, MY_HOST_LEN, MACHINE_ID_QSUM)
CONFIG = {
# events
"EVENTS_FILE": "events.csv",
# pins
"BOOT_BUTTON": 0,
"STATUS_LED": {
"TYPE": "NEOLED",
"PIN": 18
},
# location
"MY_STAGE": MY_STAGE,
"MY_LOCATION": MY_LOCATION,
"MY_HOST": MY_HOST,
"MY_MAC": MY_MAC,
# mqtt
"MQTT_BROKER": "mosquitto.pub-a.devara.world",
"MQTT_CLIENT_NAME": MY_HOST,
"MQTT_TOPIC_STATES": "sensornet/states",
"MQTT_TOPIC_EVENTS": "sensornet/events",
"MQTT_TOPIC_MEASUREMENTS": "sensornet/measurements",
# intervals & timeouts
"BOOT_WAIT_MS": 1000,
"MEASUREMENT_INTERVAL_MS": 5000,
"WDT_TIMEOUT_MS": 7000,
"SENSORS":
[
{
"sensor_name": "warmwasser_zirkulation_temp",
"sensor_type": "DS18X20_SENSOR",
"measure_type": "temp",
"sensor_pin": 39
},
{
"sensor_name": "ruecklauf_temp",
"sensor_type": "DS18X20_SENSOR",
"measure_type": "temp",
"sensor_pin": 40
},
{
"sensor_name": "vorlauf_temp",
"sensor_type": "DS18X20_SENSOR",
"measure_type": "temp",
"sensor_pin": 41
},
{
"sensor_name": "raum_temp",
"sensor_type": "DHT22_SENSOR",
"measure_type": "temp",
"sensor_pin": 42
},
{
"sensor_name": "raum_humi",
"sensor_type": "DHT22_SENSOR",
"measure_type": "humi",
"sensor_pin": 42
}
]
}