Commit Graph

8 Commits

Author SHA1 Message Date
72b21bc838 Disable SetOption verification to prevent overwhelming devices
- Verification was doubling the number of HTTP requests per setting
- Devices were refusing connections due to request overload
- Trust command success based on response, don't verify separately
- Fixes connection refused and timeout errors
2026-01-07 19:58:04 -06:00
c1eb707519 Revert "Add delays and retry logic for SetOption verification"
This reverts commit 794eb4319b.
2026-01-07 19:57:47 -06:00
794eb4319b Add delays and retry logic for SetOption verification
- Wait 0.5s after sending command before first verification
- Retry verification once with 0.5s delay if first attempt fails
- Increase delay between commands from 0.3s to 0.5s
- Add delay after enabling rules
- Prevents false verification failures by giving device time to process
- Avoids overwhelming device with rapid command sequences
2026-01-07 19:52:32 -06:00
73acc41145 Fix SetOption verification to handle ON/OFF vs 1/0 responses
- Tasmota returns 'ON'/'OFF' for SetOption queries
- Config file uses '1'/'0' for SetOption values
- Added normalize_value() to convert both formats to comparable values
- Eliminates false verification warnings for correctly applied settings
2026-01-04 22:30:43 -06:00
265fa33497 Fix console settings matching to use DeviceName instead of Hostname
- Changed from using Hostname base (e.g., 'KitchenBar') to DeviceName (e.g., 'TreatLife_SW_SS02S')
- DeviceName matches the template names in device_list configuration
- This fixes issue where console settings weren't being applied correctly
- Devices were not matching any templates due to hostname vs device type mismatch
- Now uses exact match first, then case-insensitive fallback
2026-01-04 16:17:06 -06:00
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
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
9c22168f79 Refactor: Split TasmotaManager into modular structure
- Created modular Python files (main, utils, discovery, configuration, console_settings, unknown_devices, reporting, unifi_client)
- Moved documentation files to docs/
- Moved data files to data/
- Removed old monolithic TasmotaManager.py and TasmotaManager_fixed.py
- Updated .gitignore and pyproject.toml
- All functionality preserved, command-line interface unchanged
Version: 2.0.0
2025-10-29 16:38:03 +00:00