Present locally attached sensors and node when missing radio (#532)

* Present locally attached sensors and node when missing radio

Fix #524

* Combining gateway and node presentation.
This commit is contained in:
Henrik Ekblad
2016-08-01 23:59:31 +02:00
committed by Olivier
parent e475be2980
commit 37119b2a3a
7 changed files with 15 additions and 10 deletions
+5 -2
View File
@@ -20,6 +20,7 @@
// Topic structure: MY_MQTT_PUBLISH_TOPIC_PREFIX/NODE-ID/SENSOR-ID/CMD-TYPE/ACK-FLAG/SUB-TYPE
#include "MyGatewayTransport.h"
#if defined MY_CONTROLLER_IP_ADDRESS
IPAddress _brokerIp(MY_CONTROLLER_IP_ADDRESS);
@@ -146,8 +147,10 @@ bool reconnectMQTT() {
#endif
)) {
debug(PSTR("MQTT connected\n"));
if (presentation)
presentation();
// Send presentation of locally attached sensors (and node if applicable)
presentNode();
// Once connected, publish an announcement...
//_MQTT_client.publish("outTopic","hello world");
// ... and resubscribe