Commit Graph

18 Commits

Author SHA1 Message Date
65147fe4be 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>
2026-01-04 07:07:28 -06:00
8f758599cf Fix button press timing issue by increasing SetOption32 to 40
Issue: Some Tasmota switches (e.g., KitchenBar) required multiple button
presses before responding, while others (e.g., KitchenMain) worked immediately.

Root Cause: SetOption32 was set to 8 (0.8 seconds) which creates too short
a time window for multi-press detection. This causes the device to sometimes
misinterpret single presses or require multiple attempts.

Solution: Changed SetOption32 from 8 to 40 (4.0 seconds) in both Traditional
and SONOFF_ULTIMATE console_set profiles. This matches the working devices
and provides a longer, more reliable detection window for single button presses
when using rule: "on button1#state=10 do power0 toggle endon"

SetOption32 controls the button hold time in 0.1s increments. A higher value
means the device waits longer to confirm it's a single press vs multi-press,
resulting in more reliable single-press detection.

Tested on KitchenBar (192.168.8.244) - button now responds reliably on first press.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-04 06:53:40 -06:00
2f3fd5d711 Feature: Add parallel device processing and improved error handling
Major changes:
- Implement parallel device processing using ThreadPoolExecutor (10 workers)
- Add comprehensive error and warning tracking in ReportGenerator
- Fix MQTT configuration verification (query Topic/FullTopic directly)
- Improve console settings thread safety with locks
- Fix UniFi client for UniFi OS API endpoints
- Normalize FullTopic handling (strip URL-encoded spaces)
- Update network exclude patterns to support wildcards
- Add test_unifi_connection.py for debugging UniFi connectivity

Performance improvements:
- Process devices concurrently for faster execution
- Reduced verbose logging during parallel processing

Bug fixes:
- Handle deprecated.json format correctly (list vs dict)
- Fix exclude_patterns matching with partial string support
- Fix UniFi API authentication and endpoint paths for UniFi OS

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-04 06:33:21 -06:00
8637c89e65 Fix Issue #5: Remove empty string from Traditional console_set
- Removed blank entry that was causing empty parameter errors
- Fixes 'Verification failed for blank parameter' errors on all devices
- Issue discovered during testing and root cause identified in config
2025-10-28 09:47:01 +00:00
8603cd3e7e Added ignore rules 2025-10-26 12:45:08 -05:00
3e66920c2a Stage network_configuration.json for git: ensure updated device_list formatting and console_set profiles are committed 2025-08-28 08:41:16 -05:00
35e6098a61 Save latest session changes: migrate to console_set profiles, device_list structure with per-device console_set, docs updated, formatting updates 2025-08-28 08:07:29 -05:00
126cd39555 Major code improvements and bug fixes:
1. Restructured configuration: Moved config_other and console to top level
2. Added common _match_pattern function for regex pattern matching
3. Implemented Unifi Hostname bug fix in is_hostname_unknown
4. Created common get_device_hostname function to eliminate code duplication
5. Added comprehensive test scripts for all new functionality
6. Added detailed documentation for all changes
2025-08-08 19:04:33 -05:00
d585f0f284 Implement template activation, fix console settings duplication, and improve connection display 2025-08-06 20:31:57 -05:00
daa015b4c2 Add automatic rule enabling feature to simplify configuration
This commit implements automatic enabling of Tasmota rules when they are defined in the configuration.
Key changes:
- Modified TasmotaManager.py to detect rule definitions and automatically send enable commands
- Updated network_configuration.json to remove redundant Rule1 entry
- Updated documentation in README.md and CONSOLE_COMMANDS.md to explain the new feature
- Added test script to verify the automatic rule enabling functionality

This change simplifies the configuration by allowing users to define rules without needing to
explicitly enable them with a separate command.
2025-08-05 02:21:56 -05:00
42915f508e Fix rule configuration in network_configuration.json and documentation. Changed rule2 to Rule1 to properly enable rule1 instead of rule2. 2025-08-05 02:07:42 -05:00
301eb03c3e Update TasmotaManager with console parameters and documentation 2025-08-05 01:36:18 -05:00
d566a7fdbb Implement console parameters feature to set Tasmota device settings 2025-08-05 01:13:43 -05:00
3d2afbd248 Fix NoRetain MQTT setting implementation to properly use config value 2025-08-05 01:04:50 -05:00
040fbd68d8 Implement unknown device processing with interactive toggle feature and update documentation 2025-08-04 23:04:25 -05:00
b57a0ffa88 saving files 2025-08-03 22:22:24 -05:00
e106dc50fd More features added 2025-07-15 09:46:16 -05:00
245646a7b7 Added config file 2025-07-15 01:48:20 -05:00