add timeout
This commit is contained in:
parent
b2897829cc
commit
20bdbecfce
1 changed files with 2 additions and 2 deletions
4
main.py
4
main.py
|
@ -104,7 +104,7 @@ if not check_wifi_connection():
|
|||
machine.reset()
|
||||
|
||||
# MQTT Setup
|
||||
mqtt_client = MQTTClient(config.MQTT_ID, config.MQTT_SERVER, config.MQTT_PORT, config.MQTT_USER, config.MQTT_PASSWORD)
|
||||
mqtt_client = MQTTClient(config.MQTT_ID, config.MQTT_SERVER, config.MQTT_PORT, config.MQTT_USER, config.MQTT_PASSWORD, 30)
|
||||
mqtt_client.set_callback(mqtt_receive_message)
|
||||
mqtt_client.connect()
|
||||
mqtt_client.subscribe(config.MQTT_TOPIC + "/brightness/set")
|
||||
|
@ -137,4 +137,4 @@ while True:
|
|||
|
||||
print("Set Time:", current_time)
|
||||
set_time(current_time[3], current_time[4])
|
||||
time.sleep(1)
|
||||
time.sleep(1)
|
||||
|
|
Loading…
Reference in a new issue