Repository navigation
MRX 310: don't query the input right after switching it - #47
Open
NikolajChristensen wants to merge 1 commit into
Open
NikolajChristensen wants to merge 1 commit into
NikolajChristensen wants to merge 1 commit into
Conversation
The MRX 310 rejects an input change (answers !I) when another command arrives while it is still switching, so INP<n>; followed at once by INP?; never changes the input. The receiver echoes the new input by itself, which already updates the state.
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.
Fixes #46.
The input setter sent
INP<n>;and immediatelyINP?;. The MRX 310 takes about 330 ms to switch and rejects the change (it answers!I) if another command arrives meanwhile, so the input never changed from Home Assistant.This removes the extra query. The receiver echoes the new input by itself (
Z1INP6;), which already updates the state throughdata_received.Tested by hand against an MRX 310 over raw TCP (not through the library):
Z1INP8;thenZ1INP?;back to back was rejected 3 of 3 times, whileZ1INP8;alone, or followed by the query after 0.6 s, switched every time. I have not run this patched library itself against the receiver and have not added a test.