Mqtt discovery for ha (#323)

* MQTT discovery factoring

* add DHT discovery

* BME topic macro change

* add sensors to ha discovery

* correct a comment typo #327

* let the possibility at buildtime to don't publish service data

* reduce string usage

* change MQTT ONOFF actuator to ON OFF commands instead of true false

* add ZactuatorONOFF discovery

* add simple publishing for GPIO input

* Add RF switch and gateway discovery
This commit is contained in:
Florian authored and GitHub committed 2018-12-16 17:05:30 +01:00
1 parent ed44418a7f
commit 133e9cd33a
21 files changed
+442 -201

No files matched your search

+1 -2
View File
@@ -272,10 +272,9 @@ bool _rfbToChar(byte * in, char * out) {
void MQTTtoSRFB(char * topicOri, JsonObject& SRFBdata) {
// RF DATA ANALYSIS
String topic = topicOri;
const char * raw = SRFBdata["raw"];
int valueRPT = SRFBdata["repeat"]|1;
if (topic == subjectMQTTtoSRFB){
if (strcmp(topicOri,subjectMQTTtoSRFB) == 0){
trc(F("MQTTtoSRFB json data analysis"));
if (raw){ // send raw in priority when defined in the json
trc(F("MQTTtoSRFB raw ok"));