From 8a124c8841591d40c83abf84c3b607ed6f0de87f Mon Sep 17 00:00:00 2001 From: Florian Date: Sun, 24 Sep 2023 10:10:06 -0500 Subject: [PATCH] [SYS] Increase mqtt username, base topic, otapassword and mqtt password max length (#1757) fix #1746 --- docs/integrate/home_assistant.md | 2 +- docs/upload/portal.md | 8 ++++---- main/User_config.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/integrate/home_assistant.md b/docs/integrate/home_assistant.md index 676fd8b8ed..48f2b31ebd 100644 --- a/docs/integrate/home_assistant.md +++ b/docs/integrate/home_assistant.md @@ -22,7 +22,7 @@ The gateway will need an MQTT username and password, you have to create a new us ![Home Assistant Auto Discovery](../img/OpenMQTTGateway-Configuration-Home-Assistant.png) ::: warning Note -The max size of the username is 30 and 60 for the password. +The max size of the username and password is 64 characters. ::: OMG will use the auto discovery functionality of home assistant to create gateway and sensors into your HASS instance automatically. diff --git a/docs/upload/portal.md b/docs/upload/portal.md index 6fb2e9afac..e316ed6bd0 100644 --- a/docs/upload/portal.md +++ b/docs/upload/portal.md @@ -22,11 +22,11 @@ Once connected to the WiFi, a web page should appear. On Android, you may also h * Set your MQTT Server Port (default: 1883) * Set the MQTT secure connection box to select whether or not the connection should be secure * Copy/paste the MQTT server certificate in the MQTT server cert box (only required if using a secure connection), be sure to include the `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----` markers -* Set your MQTT Server username (optional) -* Set your MQTT Server password (optional) -* Set your MQTT base topic if you need to change it (you must keep the / at the end) (default: home/) +* Set your MQTT Server username (optional, 64 characters maximum) +* Set your MQTT Server password (optional, 64 characters maximum) +* Set your MQTT base topic if you need to change it (you must keep the / at the end) (default: home/, 64 characters maximum) * Set your gateway name if you need to change it -* Set your Over The Air password `ota_password`, this password is used for local and remote OTA - it is also the password being used for the WebUI login. (default: OTAPASSWORD) +* Set your Over The Air password `ota_password`, this password is used for local and remote OTA - it is also the password being used for the WebUI login. (default: OTAPASSWORD, 64 characters maximum) * Click on save diff --git a/main/User_config.h b/main/User_config.h index 540f311f7b..a81a566246 100644 --- a/main/User_config.h +++ b/main/User_config.h @@ -150,7 +150,7 @@ const byte mac[] = {0xDE, 0xED, 0xBA, 0xFE, 0x54, 0x95}; //W5100 ethernet shield /*-------------DEFINE YOUR MQTT PARAMETERS BELOW----------------*/ //MQTT Parameters definition #if defined(ESP8266) || defined(ESP32) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__) -# define parameters_size 60 +# define parameters_size 64 # define mqtt_topic_max_size 150 # ifndef mqtt_max_packet_size # ifdef MQTT_HTTPS_FW_UPDATE