693 /* |
693 /* |
694 * Final publish 0 to clients/<hostname>/thermferm/state |
694 * Final publish 0 to clients/<hostname>/thermferm/state |
695 * After that, remove the retained topic. |
695 * After that, remove the retained topic. |
696 */ |
696 */ |
697 syslog(LOG_NOTICE, "MQTT disconnecting"); |
697 syslog(LOG_NOTICE, "MQTT disconnecting"); |
|
698 publisher(mosq, topic_base((char *)"DBIRTH"), NULL, true); // Not always needed, but ... |
|
699 publisher(mosq, topic_base((char *)"DDEATH"), NULL, true); |
698 publisher(mosq, topic_base((char *)"NBIRTH"), NULL, true); |
700 publisher(mosq, topic_base((char *)"NBIRTH"), NULL, true); |
699 publisher(mosq, topic_base((char *)"NDEATH"), NULL, true); |
701 publisher(mosq, topic_base((char *)"NDEATH"), NULL, true); |
700 mqtt_last_mid = mqtt_mid_sent; |
702 mqtt_last_mid = mqtt_mid_sent; |
701 mqtt_status = STATUS_WAITING; |
703 mqtt_status = STATUS_WAITING; |
702 mqtt_my_shutdown = TRUE; |
704 mqtt_my_shutdown = TRUE; |