Skip to content

Commit 484da9f

Browse files
jumpalottahigh1technophile
authored andcommitted
Comment out the advanced config (#60)
Indeed should be commented per default thanks
1 parent 89e1d6f commit 484da9f

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

OpenMQTTGateway.ino

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
/*
2-
OpenMQTTGateway - ESP8266 or Arduino program for home automation
1+
/*
2+
OpenMQTTGateway - ESP8266 or Arduino program for home automation
33
4-
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
4+
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
55
Send and receiving command by MQTT
6-
6+
77
This program enables to:
88
- receive MQTT data from a topic and send RF 433Mhz signal corresponding to the received MQTT data
99
- publish MQTT data to a different topic related to received 433Mhz signal
1010
- receive MQTT data from a topic and send IR signal corresponding to the received MQTT data
1111
- publish MQTT data to a different topic related to received IR signal
1212
- publish MQTT data to a different topic related to BLE devices rssi signal
13-
13+
1414
Copyright: (c)Florian ROBERT
1515
1616
Contributors:
@@ -24,7 +24,7 @@
2424
- ronvl from Home assistant forum
2525
2626
This file is part of OpenMQTTGateway.
27-
27+
2828
OpenMQTTGateway is free software: you can redistribute it and/or modify
2929
it under the terms of the GNU General Public License as published by
3030
the Free Software Foundation, either version 3 of the License, or
@@ -155,11 +155,11 @@ void setup()
155155
//Begining ethernet connection in case of Arduino + W5100
156156
setup_ethernet();
157157
#endif
158-
158+
159159
delay(1500);
160-
160+
161161
lastReconnectAttempt = 0;
162-
162+
163163
#ifdef ZgatewayIR
164164
setupIR();
165165
#endif
@@ -184,10 +184,10 @@ void setup_wifi() {
184184
IPAddress subnet_adress(subnet);
185185
IPAddress dns_adress(Dns);
186186
WiFi.begin(wifi_ssid, wifi_password);
187-
WiFi.config(ip_adress,gateway_adress,subnet_adress); //Uncomment this line if you want to use advanced network config
188-
trc(F("OpenMQTTGateway ip adress: "));
187+
//WiFi.config(ip_adress,gateway_adress,subnet_adress); //Uncomment this line if you want to use advanced network config
188+
trc(F("OpenMQTTGateway ip adress: "));
189189
Serial.println(WiFi.localIP());
190-
190+
191191
while (WiFi.status() != WL_CONNECTED) {
192192
delay(500);
193193
trc(F("."));
@@ -198,7 +198,7 @@ void setup_wifi() {
198198
void setup_ethernet() {
199199
Ethernet.begin(mac, ip); //Comment and uncomment the following line if you want to use advanced network config
200200
//Ethernet.begin(mac, ip, Dns, gateway, subnet);
201-
trc(F("OpenMQTTGateway ip adress: "));
201+
trc(F("OpenMQTTGateway ip adress: "));
202202
Serial.println(Ethernet.localIP());
203203
trc(F("Ethernet connected"));
204204
}
@@ -219,6 +219,7 @@ void loop()
219219
} else { //connected
220220
// MQTT loop
221221
client.loop();
222+
222223
#ifdef ESP8266
223224
ArduinoOTA.handle();
224225
#endif
@@ -243,7 +244,7 @@ void loop()
243244
if(resultBT)
244245
trc(F("BT sent by MQTT"));
245246
#endif
246-
247+
247248
}
248249

249250
}
@@ -303,7 +304,7 @@ void receivingMQTT(char * topicOri, char * datacallback) {
303304
storeValue(data);
304305
trc(F("Data stored"));
305306
}
306-
307+
307308
#ifdef ZgatewayRF
308309
MQTTtoRF(topicOri, datacallback);
309310
#endif

0 commit comments

Comments
 (0)