Fix button press timing issue - Rule Once flag was causing single-fire
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 <noreply@anthropic.com>
This commit is contained in:
parent
8f758599cf
commit
65147fe4be
@ -184,9 +184,12 @@ 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"
|
||||
# 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}")
|
||||
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
|
||||
|
||||
@ -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"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user