Wifi managers improvements (#503)

* Add parameters to wifi manager: gateway name and base topic
Enable to restart the ESP and erase the parameters by MQTT
This commit is contained in:
Florian authored and GitHub committed 2019-12-07 10:18:42 +01:00
1 parent a05fd01505
commit 4b1f09b06b
41 files changed
+308 -196

No files matched your search

+2 -3
View File
@@ -132,7 +132,7 @@ void MQTTtoRF(char * topicOri, char * datacallback) {
trc(valueBITS);
}
if ((topic == subjectMQTTtoRF) && (valuePRT == 0) && (valuePLSL == 0) && (valueBITS == 0)){
if ((strstr(topicOri,catToMainTopic(subjectMQTTtoRF)) != NULL) && (valuePRT == 0) && (valuePLSL == 0) && (valueBITS == 0)){
trc(F("MQTTtoRF dflt"));
mySwitch.setProtocol(1,350);
mySwitch.send(data, 24);
@@ -156,8 +156,7 @@ void MQTTtoRF(char * topicOri, char * datacallback) {
#ifdef jsonReceiving
void MQTTtoRF(char * topicOri, JsonObject& RFdata) { // json object decoding
if (strcmp(topicOri,subjectMQTTtoRF) == 0){
if (strstr(topicOri,catToMainTopic(subjectMQTTtoRF)) != NULL){
trc(F("MQTTtoRF json"));
unsigned long data = RFdata["value"];
if (data != 0) {