Comment out the advanced config (#60)

Indeed should be commented per default thanks
This commit is contained in:
Georgi Yanev authored and Florian committed 2017-06-09 22:19:28 +02:00
1 parent 89e1d6fbd8
commit 484da9ff50
1 file changed
+16 -15
+16 -15
View File
@@ -1,16 +1,16 @@
/* /*
OpenMQTTGateway - ESP8266 or Arduino program for home automation OpenMQTTGateway - ESP8266 or Arduino program for home automation
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
Send and receiving command by MQTT Send and receiving command by MQTT
This program enables to: This program enables to:
- receive MQTT data from a topic and send RF 433Mhz signal corresponding to the received MQTT data - receive MQTT data from a topic and send RF 433Mhz signal corresponding to the received MQTT data
- publish MQTT data to a different topic related to received 433Mhz signal - publish MQTT data to a different topic related to received 433Mhz signal
- receive MQTT data from a topic and send IR signal corresponding to the received MQTT data - receive MQTT data from a topic and send IR signal corresponding to the received MQTT data
- publish MQTT data to a different topic related to received IR signal - publish MQTT data to a different topic related to received IR signal
- publish MQTT data to a different topic related to BLE devices rssi signal - publish MQTT data to a different topic related to BLE devices rssi signal
Copyright: (c)Florian ROBERT Copyright: (c)Florian ROBERT
Contributors: Contributors:
@@ -24,7 +24,7 @@
- ronvl from Home assistant forum - ronvl from Home assistant forum
This file is part of OpenMQTTGateway. This file is part of OpenMQTTGateway.
OpenMQTTGateway is free software: you can redistribute it and/or modify OpenMQTTGateway is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
@@ -155,11 +155,11 @@ void setup()
//Begining ethernet connection in case of Arduino + W5100 //Begining ethernet connection in case of Arduino + W5100
setup_ethernet(); setup_ethernet();
#endif #endif
delay(1500); delay(1500);
lastReconnectAttempt = 0; lastReconnectAttempt = 0;
#ifdef ZgatewayIR #ifdef ZgatewayIR
setupIR(); setupIR();
#endif #endif
@@ -184,10 +184,10 @@ void setup_wifi() {
IPAddress subnet_adress(subnet); IPAddress subnet_adress(subnet);
IPAddress dns_adress(Dns); IPAddress dns_adress(Dns);
WiFi.begin(wifi_ssid, wifi_password); WiFi.begin(wifi_ssid, wifi_password);
WiFi.config(ip_adress,gateway_adress,subnet_adress); //Uncomment this line if you want to use advanced network config //WiFi.config(ip_adress,gateway_adress,subnet_adress); //Uncomment this line if you want to use advanced network config
trc(F("OpenMQTTGateway ip adress: ")); trc(F("OpenMQTTGateway ip adress: "));
Serial.println(WiFi.localIP()); Serial.println(WiFi.localIP());
while (WiFi.status() != WL_CONNECTED) { while (WiFi.status() != WL_CONNECTED) {
delay(500); delay(500);
trc(F(".")); trc(F("."));
@@ -198,7 +198,7 @@ void setup_wifi() {
void setup_ethernet() { void setup_ethernet() {
Ethernet.begin(mac, ip); //Comment and uncomment the following line if you want to use advanced network config Ethernet.begin(mac, ip); //Comment and uncomment the following line if you want to use advanced network config
//Ethernet.begin(mac, ip, Dns, gateway, subnet); //Ethernet.begin(mac, ip, Dns, gateway, subnet);
trc(F("OpenMQTTGateway ip adress: ")); trc(F("OpenMQTTGateway ip adress: "));
Serial.println(Ethernet.localIP()); Serial.println(Ethernet.localIP());
trc(F("Ethernet connected")); trc(F("Ethernet connected"));
} }
@@ -219,6 +219,7 @@ void loop()
} else { //connected } else { //connected
// MQTT loop // MQTT loop
client.loop(); client.loop();
#ifdef ESP8266 #ifdef ESP8266
ArduinoOTA.handle(); ArduinoOTA.handle();
#endif #endif
@@ -243,7 +244,7 @@ void loop()
if(resultBT) if(resultBT)
trc(F("BT sent by MQTT")); trc(F("BT sent by MQTT"));
#endif #endif
} }
} }
@@ -303,7 +304,7 @@ void receivingMQTT(char * topicOri, char * datacallback) {
storeValue(data); storeValue(data);
trc(F("Data stored")); trc(F("Data stored"));
} }
#ifdef ZgatewayRF #ifdef ZgatewayRF
MQTTtoRF(topicOri, datacallback); MQTTtoRF(topicOri, datacallback);
#endif #endif