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