configure watchdog before mqtt setup
This commit is contained in:
parent
95603b02c5
commit
b2897829cc
1 changed files with 3 additions and 3 deletions
6
main.py
6
main.py
|
@ -97,6 +97,9 @@ for minute in range(0, 59):
|
||||||
time.sleep(0.05)
|
time.sleep(0.05)
|
||||||
set_time(0, 0)
|
set_time(0, 0)
|
||||||
|
|
||||||
|
# Configure Watchdog
|
||||||
|
wdt = WDT(timeout=5000)
|
||||||
|
|
||||||
if not check_wifi_connection():
|
if not check_wifi_connection():
|
||||||
machine.reset()
|
machine.reset()
|
||||||
|
|
||||||
|
@ -107,9 +110,6 @@ mqtt_client.connect()
|
||||||
mqtt_client.subscribe(config.MQTT_TOPIC + "/brightness/set")
|
mqtt_client.subscribe(config.MQTT_TOPIC + "/brightness/set")
|
||||||
mqtt_client.subscribe(config.MQTT_TOPIC + "/switch/set")
|
mqtt_client.subscribe(config.MQTT_TOPIC + "/switch/set")
|
||||||
|
|
||||||
# Configure Watchdog
|
|
||||||
wdt = WDT(timeout=5000)
|
|
||||||
|
|
||||||
# Main Loop
|
# Main Loop
|
||||||
while True:
|
while True:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue