From 8275cb776e4f7f7731d5f9058ba85b6b01256101 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Thu, 5 Jan 2023 15:02:55 +0100 Subject: [PATCH] Fix rule mqtt subscribe payload size Increase rule event buffer from 100 to 256 characters (#16943) --- CHANGELOG.md | 1 + RELEASENOTES.md | 1 + tasmota/tasmota_xdrv_driver/xdrv_10_rules.ino | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e013ce67..0cbc31475 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file. ### Changed - Energy totals max supported value from +/-21474.83647 to +/-2147483.647 kWh - Removed delays in TasmotaSerial and TasmotaModbus Tx enable switching +- Increase rule event buffer from 100 to 256 characters (#16943) ### Fixed - Energy dummy switched voltage and power regression from v12.2.0.2 diff --git a/RELEASENOTES.md b/RELEASENOTES.md index d1ad2cc54..5a621fc88 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -126,6 +126,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm - ESP32 Framework (Core) from v2.0.5.3 to v2.0.6 (IPv6 support) - Energy totals max supported value from +/-21474.83647 to +/-2147483.647 kWh - Removed delays in TasmotaSerial and TasmotaModbus Tx enable switching +- Increase rule event buffer from 100 to 256 characters [#16943](https://github.com/arendst/Tasmota/issues/16943) - TuyaMcu rewrite by btsimonh [#17051](https://github.com/arendst/Tasmota/issues/17051) - Tasmota OTA scripts now support both unzipped and gzipped file uploads [#17378](https://github.com/arendst/Tasmota/issues/17378) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_10_rules.ino b/tasmota/tasmota_xdrv_driver/xdrv_10_rules.ino index 4b3848e50..f99856144 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_10_rules.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_10_rules.ino @@ -186,7 +186,7 @@ struct RULES { bool busy = false; bool no_execute = false; // Don't actually execute rule commands - char event_data[100]; + char event_data[256]; } Rules; char rules_vars[MAX_RULE_VARS][33] = {{ 0 }}; @@ -936,7 +936,7 @@ void RulesInit(void) void RulesEvery50ms(void) { if ((Settings->rule_enabled || BERRY_RULES) && !Rules.busy) { // Any rule enabled - char json_event[120]; + char json_event[300]; if (-1 == Rules.new_power) { Rules.new_power = TasmotaGlobal.power; } if (Rules.new_power != Rules.old_power) {