-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
32 lines (27 loc) · 903 Bytes
/
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
import logging
import board
# Debug level of info prints the temperature every minute, might be
# too much data
logging.getLogger().setLevel(logging.INFO)
# Currently no authentication on client level implemented
# Should be really easy to add
MQTT_HOST = "10.80.30.11"
MQTT_PORT = 1883
# We end both with a slash, and append the string of the topics below
# (FRIDGE_COOL_TOPIC and FRIDGE_HEAT_TOPIC) for the specific topics
MQTT_RELAY_READ = "raspberry/switch/"
MQTT_RELAY_PUBLISH = "raspberry/switch_state/"
# How often to read the temperature and send to mqtt server
# In seconds
TEMP_READ_INTERVAL = 60
TEMP_MQTT_TOPIC = "raspberry/temperature/1"
BEER_TEMP_MQTT_TOPIC = "raspberry/temperature/2"
# Pin for PT100
PT100_PIN = board.D5
# The settings for the two relays
COOL_GPIO = 20
HEAT_GPIO = 21
FRIDGE_COOL_TOPIC = "2"
FRIDGE_HEAT_TOPIC = "1"
RELAY_OFF_PAYLOAD = b"1"
RELAY_ON_PAYLOAD = b"0"