HA send start state

- Bump to new Arduino Core PIO 2.0.1 (esp8266-arduino v2.5.3 release)
- Address https://github.com/toblum/McLighting/issues/349
This commit is contained in:
Debashish Sahu 2019-03-04 13:11:52 -05:00
parent 7e7ac8ad52
commit c2b3b6d0fa
3 changed files with 6 additions and 3 deletions

View file

@ -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<JsonObject>();
@ -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<JsonObject>();

View file

@ -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
*/

View file

@ -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