Closed phardy closed 1 year ago
Sweet! It would be nice for others to confirm if this is also the case for them: @Chris112, @bigjezza
But if they don't reply soon, I'm happy to merge this. Someone can raise an issue later if there's any differences.
I will push the commit myself. For future reference, please run the tests and make sure they all pass. This PR is missing the swap in the from_bytes()
method and the test (test_control_status_common.py
).
Attempting to send command messages using
at2plus_test.py
for me was failing. For example, trying to change the set point:at which point the script would reconnect, fetch the status (which definitely did not include the new setpoint of 20) and continue as normal.
So I captured the traffic between the AirTouch 2+ app on my android phone and my controller. The AC control packet the app sent when changing the set point to 20° was:
The only functional difference is that the repeat count (0x00 0x01) and repeat length (0x00 0x04) have swapped places in the working command sent by the app. I then verified this by sending a group control message from my app (turning off zone 3). The group control packet sent by the app was:
Again, repeat count and repeat length are in the opposite order to what's described in the protocol documentation.
So, I believe the documentation is incorrect, and the repeat length should go before the repeat count. This PR swaps those around in both kinds of control messages by the library.
With this change, requests to change the set point using the
at2plus_test.py
script work: