From a34d476f040ae9716b9964901102f333f40f27d1 Mon Sep 17 00:00:00 2001 From: Florian <1technophile@users.noreply.github.com> Date: Mon, 4 Mar 2019 22:29:39 +0100 Subject: [PATCH] add LORA gateway auto discovery --- ZmqttDiscovery.ino | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ZmqttDiscovery.ino b/ZmqttDiscovery.ino index 4d2e6db..d2751af 100644 --- a/ZmqttDiscovery.ino +++ b/ZmqttDiscovery.ino @@ -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"));