From 65147fe4be3fa4d6bcfa5cf786532d67e1f9497b Mon Sep 17 00:00:00 2001 From: Mike Geppert Date: Sun, 4 Jan 2026 07:07:28 -0600 Subject: [PATCH] Fix button press timing issue - Rule Once flag was causing single-fire MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root Cause: console_settings.py was using "Rule{N} 1" command which BOTH enables the rule AND sets the Once flag to ON. The Once flag causes rules to fire only one time and then stop, requiring multiple button presses before the rule would work again. Solution: Changed rule enablement from "Rule{N} 1" to "Rule{N} 4" - Rule 1 = Enable rule + Set Once ON (WRONG) - Rule 4 = Enable rule only (CORRECT) - Rule 5 = Set Once ON only - Rule 6 = Set Once OFF only This allows rules to fire repeatedly on every button press, fixing the issue where devices like KitchenBar required multiple presses. Changes: - console_settings.py line 190: Use Rule{N} 4 instead of Rule{N} 1 - Added detailed comments explaining Tasmota rule command behavior - Reverted SetOption32 changes (was red herring, not the actual issue) Tested on KitchenBar (192.168.8.244) - button now responds on every press. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- console_settings.py | 13 ++++++++----- network_configuration.json | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/console_settings.py b/console_settings.py index 3a36e40..c41c6a1 100644 --- a/console_settings.py +++ b/console_settings.py @@ -184,14 +184,17 @@ class ConsoleSettingsManager: if param_name.lower().startswith('rule'): rule_number = param_name.lower().replace('rule', '') if rule_number.isdigit(): - enable_command = f"Rule{rule_number}%201" - - self.logger.debug(f"{device_name}: Enabling rule{rule_number}") - + # Use Rule{N} 4 to enable without setting Once flag + # Rule 1 = Enable + Once ON (WRONG - causes single-fire issue) + # Rule 4 = Enable only (CORRECT - allows repeated firing) + enable_command = f"Rule{rule_number}%204" + + self.logger.debug(f"{device_name}: Enabling rule{rule_number} (Once=OFF)") + result, success = send_tasmota_command( device_ip, enable_command, timeout=5, logger=self.logger ) - + if not success: self.logger.warning(f"{device_name}: Failed to enable rule{rule_number}") diff --git a/network_configuration.json b/network_configuration.json index b9aef20..81e917b 100644 --- a/network_configuration.json +++ b/network_configuration.json @@ -84,7 +84,7 @@ "SetOption4 1", "SetOption13 0", "SetOption19 0", - "SetOption32 40", + "SetOption32 8", "SetOption40 40", "SetOption53 1", "SetOption73 1", @@ -101,7 +101,7 @@ "SetOption4 1", "SetOption13 0", "SetOption19 0", - "SetOption32 40", + "SetOption32 8", "SetOption40 40", "SetOption53 1", "SetOption73 1"