mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-25 20:26:41 +00:00
Merge branch 'master' of http://github.com/fvanroie/hasp-lvgl
This commit is contained in:
commit
db40945782
@ -278,7 +278,7 @@ static void onConnect(void* context)
|
|||||||
if(mqttHAautodiscover) mqtt_subscribe(mqtt_client, "homeassistant/status");
|
if(mqttHAautodiscover) mqtt_subscribe(mqtt_client, "homeassistant/status");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mqttPublish(TOPIC LWT_TOPIC, "online", 6, false);
|
mqttPublish(TOPIC LWT_TOPIC, "online", 6, true);
|
||||||
|
|
||||||
mqtt_send_object_state(0, 0, "connected");
|
mqtt_send_object_state(0, 0, "connected");
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
@ -307,7 +307,7 @@ void mqttStart()
|
|||||||
conn_opts.will = &will_opts;
|
conn_opts.will = &will_opts;
|
||||||
conn_opts.will->message = "offline";
|
conn_opts.will->message = "offline";
|
||||||
conn_opts.will->qos = 1;
|
conn_opts.will->qos = 1;
|
||||||
conn_opts.will->retained = 0;
|
conn_opts.will->retained = 1;
|
||||||
conn_opts.will->topicName = "hasp/plate35/LWT";
|
conn_opts.will->topicName = "hasp/plate35/LWT";
|
||||||
|
|
||||||
conn_opts.keepAliveInterval = 20;
|
conn_opts.keepAliveInterval = 20;
|
||||||
@ -376,4 +376,4 @@ void mqttLoop()
|
|||||||
void mqttEvery5Seconds(bool wifiIsConnected){};
|
void mqttEvery5Seconds(bool wifiIsConnected){};
|
||||||
|
|
||||||
#endif // USE_PAHO
|
#endif // USE_PAHO
|
||||||
#endif // USE_MQTT
|
#endif // USE_MQTT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user