From 7a7529bb692bb6e404106de6ef453067745b320d Mon Sep 17 00:00:00 2001 From: 1technophile Date: Mon, 27 Feb 2017 20:09:09 +0100 Subject: [PATCH] put mqtt port into a contant --- OpenMQTTGateway.ino | 2 +- User_config.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenMQTTGateway.ino b/OpenMQTTGateway.ino index 2b357e6..19c0ed3 100644 --- a/OpenMQTTGateway.ino +++ b/OpenMQTTGateway.ino @@ -61,7 +61,7 @@ RCSwitch mySwitch = RCSwitch(); decode_results results; // client parameters -PubSubClient client(mqtt_server, 1883, callback, eClient); +PubSubClient client(mqtt_server, mqtt_port, callback, eClient); //MQTT last attemps reconnection date int lastReconnectAttempt = 0; diff --git a/User_config.h b/User_config.h index 5e5a0a7..d860d34 100644 --- a/User_config.h +++ b/User_config.h @@ -34,6 +34,7 @@ CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFT #define mqtt_server "192.168.1.17" #define mqtt_user "your_username" // not compulsory only if your broker needs authentication #define mqtt_password "your_password" // not compulsory only if your broker needs authentication +#define mqtt_port 1883 // Update these with values suitable for your network. #ifdef ESP8266 // for nodemcu, weemos and esp8266