Skip to content

MRX 310: don't query the input right after switching it - #47

Open
NikolajChristensen wants to merge 1 commit into
nugget:masterfrom
NikolajChristensen:fix-mrx310-input-select
Open

NikolajChristensen wants to merge 1 commit into
nugget:masterfrom
NikolajChristensen:fix-mrx310-input-select

Conversation

@NikolajChristensen

Copy link
Copy Markdown

Fixes #46.

The input setter sent INP<n>; and immediately INP?;. 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 through data_received.

Tested by hand against an MRX 310 over raw TCP (not through the library): Z1INP8; then Z1INP?; back to back was rejected 3 of 3 times, while Z1INP8; 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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MRX 310: input change rejected because INP? is sent immediately after INP<n>;

1 participant