Replace pytuya with tinytuya, add protocol auto-detection and real-ti… - #67
Open
msupino wants to merge 9 commits into
Open
Replace pytuya with tinytuya, add protocol auto-detection and real-ti…#67msupino wants to merge 9 commits into
msupino wants to merge 9 commits into
Conversation
…me state monitoring - Replace bundled pytuya with tinytuya (protocol 3.1-3.5 support) - Add automatic protocol version detection - Add persistent listener for real-time plug state updates - Replace polling checkbox with status monitor dropdown - Remove plugin debug_logging toggle, use OctoPrint's Logging settings - Consolidate to single logger, remove separate debug log file - Code cleanup, lint/format with ruff, drop Python 2 compat - Rewrite README for forked project Made-with: Cursor
OctoPrint sends "M81 POWER" even when user types "M81 power", so the label search must be case-insensitive. Made-with: Cursor
Slot field now accepts comma-separated values (e.g. "3,4") to control multiple outlets on the same device together. The primary slot (first) is used for state monitoring. Made-with: Cursor
Made-with: Cursor
New linkedPlugs field (comma-separated labels) triggers other plugs to turn on/off together. Runs linked actions in separate threads to avoid blocking. Uses _from_link flag to prevent loops. Made-with: Cursor
Made-with: Cursor
Some Tuya devices only allow one active connection. The persistent listener would conflict with sendCommand's connection, causing 914 errors. Now pauses the specific plug's listener before sending and resumes it after, using per-plug stop events. Made-with: Cursor
Only restart listeners when plug config actually changes (ip, id, key, slot, version). Status updates that just save currentState no longer trigger a full listener restart cascade. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…me state monitoring
Made-with: Cursor