diff --git a/Arduino/McLighting/request_handlers.h b/Arduino/McLighting/request_handlers.h index f7e7678..4e3da66 100644 --- a/Arduino/McLighting/request_handlers.h +++ b/Arduino/McLighting/request_handlers.h @@ -1008,6 +1008,7 @@ void checkForRequests() { #ifdef ENABLE_HOMEASSISTANT ha_send_data.detach(); mqtt_client.subscribe(mqtt_ha_state_in.c_str(), qossub); + ha_send_data.once(5, tickerSendState); #ifdef MQTT_HOME_ASSISTANT_SUPPORT DynamicJsonDocument jsonBuffer(JSON_ARRAY_SIZE(strip->getModeCount()) + JSON_OBJECT_SIZE(12) + 1500); JsonObject json = jsonBuffer.to(); @@ -1106,6 +1107,7 @@ void checkForRequests() { ha_send_data.detach(); uint16_t packetIdSub2 = amqttClient.subscribe((char *)mqtt_ha_state_in.c_str(), qossub); DBG_OUTPUT_PORT.printf("Subscribing at QoS %d, packetId: ", qossub); DBG_OUTPUT_PORT.println(packetIdSub2); + ha_send_data.once(5, tickerSendState); #ifdef MQTT_HOME_ASSISTANT_SUPPORT DynamicJsonDocument jsonBuffer(JSON_ARRAY_SIZE(strip->getModeCount()) + JSON_OBJECT_SIZE(12) + 1500); JsonObject json = jsonBuffer.to(); diff --git a/Arduino/McLighting/version_info.ino b/Arduino/McLighting/version_info.ino index 36cf257..1e545f9 100644 --- a/Arduino/McLighting/version_info.ino +++ b/Arduino/McLighting/version_info.ino @@ -71,5 +71,6 @@ * - new "REST API": /pixels?pin=GPIO_NO to change PIN# (Allowed GPIO values: 16/5/4/0/2/14/12/13/15/3/1) * - added HA 0.87 version support https://github.com/toblum/McLighting/issues/327 * - Added alternative way to send large messages using PubSubClient - * - Added Jason2866's link to Arduino Core v2.5.0 in platformio.ini as official core on PIO is not yet released + * - Bump PIO core to 2.0.1 + * - Send HA state on MQTT connect, address https://github.com/toblum/McLighting/issues/349 */ diff --git a/platformio.ini b/platformio.ini index 5710209..3ae5eca 100644 --- a/platformio.ini +++ b/platformio.ini @@ -14,14 +14,14 @@ description = The ESP8266 based multi-client lighting gadget # arduino core 2.4.0 = platformIO 1.6.0 # arduino core 2.4.1 = platformIO 1.7.3 # arduino core 2.4.2 = platformIO 1.8.0 -# arduino core 2.5.0 = Jason2866's PIO branch for tasmota +# arduino core 2.5.0 = platformIO 2.0.1 # arduino core stage = platformIO feature#stage # ------------------------------------------------------------------------------ arduino_core_2_3_0 = espressif8266@1.5.0 arduino_core_2_4_0 = espressif8266@1.6.0 arduino_core_2_4_1 = espressif8266@1.7.3 arduino_core_2_4_2 = espressif8266@1.8.0 -arduino_core_2_5_0 = https://github.com/Jason2866/platform-espressif8266.git#Tasmota +arduino_core_2_5_0 = espressif8266@2.0.1 arduino_core_stage = https://github.com/platformio/platform-espressif8266.git#feature/stage framework = arduino