Skip to content

Commit

Permalink
add LORA gateway auto discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
1technophile committed Mar 4, 2019
1 parent 97e8217 commit a34d476
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ZmqttDiscovery.ino
Expand Up @@ -260,6 +260,21 @@ void pubMqttDiscovery()
false, false, 0,"","",true,"");
#endif

#ifdef ZgatewayLORA
// Sensor to display RF received value
trc(F("gatewayLORADiscovery"));
char * gatewayLORA[8] = {"sensor", "gatewayLORA", "", "","{{ value_json.message }}","", "", ""};
//component type,name,availability topic,device class,value template,payload on, payload off, unit of measurement

trc(F("CreateDiscoverySensor"));
trc(gatewayLORA[1]);
createDiscovery(gatewayLORA[0],
subjectLORAtoMQTT, gatewayLORA[1], (char *)getUniqueId(gatewayLORA[1], gatewayLORA[2]).c_str(),
will_Topic, gatewayLORA[3], gatewayLORA[4],
gatewayLORA[5], gatewayLORA[6], gatewayLORA[7],
false, false, 0,"","",true,"");
#endif

#ifdef ZgatewaySRFB
// Sensor to display RF received value
trc(F("gatewaySRFBDiscovery"));
Expand Down

0 comments on commit a34d476

Please sign in to comment.