Skip to content
This repository was archived by the owner on Apr 28, 2022. It is now read-only.

Commit 828d870

Browse files
authored
Merge pull request #297 from toblum/develop
v1.1.11
2 parents b85e5e4 + 4df3667 commit 828d870

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

Arduino/McLighting/request_handlers.h

+2-4
Original file line numberDiff line numberDiff line change
@@ -936,11 +936,10 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght
936936
ha_send_data.detach();
937937
mqtt_client.subscribe(mqtt_ha_state_in.c_str(), qossub);
938938
#ifdef MQTT_HOME_ASSISTANT_SUPPORT
939-
DynamicJsonDocument jsonBuffer(JSON_ARRAY_SIZE(strip.getModeCount()) + JSON_OBJECT_SIZE(12));
939+
DynamicJsonDocument jsonBuffer(JSON_ARRAY_SIZE(strip.getModeCount()) + JSON_OBJECT_SIZE(12) + 1500);
940940
JsonObject json = jsonBuffer.to<JsonObject>();
941941
json["name"] = HOSTNAME;
942942
#ifdef MQTT_HOME_ASSISTANT_0_84_SUPPORT
943-
json["platform"] = "mqtt";
944943
json["schema"] = "json";
945944
#else
946945
json["platform"] = "mqtt_json";
@@ -1021,11 +1020,10 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght
10211020
uint16_t packetIdSub2 = amqttClient.subscribe((char *)mqtt_ha_state_in.c_str(), qossub);
10221021
DBG_OUTPUT_PORT.printf("Subscribing at QoS %d, packetId: ", qossub); DBG_OUTPUT_PORT.println(packetIdSub2);
10231022
#ifdef MQTT_HOME_ASSISTANT_SUPPORT
1024-
DynamicJsonDocument jsonBuffer(JSON_ARRAY_SIZE(strip.getModeCount()) + JSON_OBJECT_SIZE(12));
1023+
DynamicJsonDocument jsonBuffer(JSON_ARRAY_SIZE(strip.getModeCount()) + JSON_OBJECT_SIZE(12) + 1500);
10251024
JsonObject json = jsonBuffer.to<JsonObject>();
10261025
json["name"] = HOSTNAME;
10271026
#ifdef MQTT_HOME_ASSISTANT_0_84_SUPPORT
1028-
json["platform"] = "mqtt";
10291027
json["schema"] = "json";
10301028
#else
10311029
json["platform"] = "mqtt_json";

Arduino/McLighting/version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
#define SKETCH_VERSION "2.1.10"
1+
#define SKETCH_VERSION "2.1.11"

Arduino/McLighting/version_info.ino

+4
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,8 @@
4444
*
4545
* 16 Dec 2018 v 1.1.10
4646
* - more ArduinoJson library memory managment fixes
47+
*
48+
* 18 Dec 2018 v 2.1.11
49+
* - More Auto-Discovery fix for HA version >= 0.84 #286
50+
* - Suggestions from https://github.com/home-assistant/home-assistant/issues/19420
4751
*/

0 commit comments

Comments
 (0)