Support airtouch2+

Experimental branch pushed, discuss testing and issues below

Hey, keen to get this to work if I can help, here's the steps I've worked through today but will dig further later.
Also new to python from javascript so not sure if i'm doing basic things wrong.
I had connection issues at the start and couldn't ping the static IP assigned in the DHCP server (but the airtouch app would still work which is strange) and disconnecting and reconnecting the controller to the wifi seems to have fixed it.
nmap confirms the host is online and port is correct:
telnet nmap -p 9200 <IP_ADDRESS>
Starting Nmap 7.80 ( https://nmap.org ) at 2023-03-23 15:54 AWST
Nmap scan report for <IP_ADDRESS>
Host is up (0.0050s latency).

PORT     STATE SERVICE
9200/tcp open  wap-wsp

Nmap done: 1 IP address (1 host up) scanned in 0.10 second

At this stage I upgraded python to the latest version (3.11.1) with pyenv and tried to run it but hit a few errors

ModuleNotFoundError: No module named 'airtouch2'
Fixed this by adding the following to the top test_programs/at2plus_test.py

# import sys
# sys.path.append('../src')

AttributeError: 'AcStatusLogger' object has no attribute 'cleanup_callbacks'
Fixed this by initializing acs and cleanup_callbacks to empty lists in the AcStatusLogger class

acs: list[At2PlusAircon] = []
cleanup_callbacks: list[Callable] = []

AttributeError: 'At2PlusClient' object has no attribute '_new_ac_callbacks'. Did you mean: 'add_new_ac_callback'?
Same deal in the AT2PlusClient class and the _new_ac_callbacks list

self._new_ac_callbacks: list[Callable] = []

Now running python ./at2plus_test.py outputs the following after I added a print for the bytes read in _read_header of At2PlusClient class as hex):
Connecting to <IP_ADDRESS> on port 9200
Starting listener task
Sending AcStatusMessage
Enter 'q' to quit:
>> header_bytes as hex: 55 55 b0 80 01 c0 00 12
Failed reading header, trying again
>> header_bytes as hex: 23 00 00 00 00 0a 00 01
Failed reading header, trying again
>> header_bytes as hex: 10 43 96 c1 03 20 00 00
Failed reading header, trying again

Then I used the Polyaire 2+ communication doc to convert the bytes to information to validate its the correct version and matched what I saw in the app, which it does.
Raw response from AC status request
55 55 b0 80 01 c0 00 12
23 00 00 00 00 0a 00 01

10 43 96 c1 03 2a 00 00

00010000 = AC is on and AC number is 0
01000011 = Mode is set to cool and fan speed is set to medium
10010110 = convert byte to decimal and (VALUE + 100) / 10 is the current temperature. In this case its (150 + 100) / 10 = 25
11000001 = turbo inactive, bypass inactive, spill inactive and timer is set(?)

00000011 = skip
00101010 = combine 2 bytes and convert to decimal to get 810 then current temperature = (810 – 500)/10 = 31

00000000 = unused
00000000 = unused

So it looks like AC status request is being made correctly but breaks down parsing the response, will try again on the weekend.

@Chris112
To install the library you need to run pip install -e . from the project root (where pyproject.toml is located), my bad - should have put that in my post. The -e is for 'editable' which means the installation is just a symlink to the directory so any changes you made are reflected in the installation. With that done, you should be able to remove your manual addition to the PATH.

>> header_bytes as hex: 55 55 b0 80 01 c0 00 12
Failed reading header, trying again

I was parsing the address bytes in the header incorrectly.
The spec states:

b. Address
Address should 0x80 0xb0 or 0x90 0xb0 (for Extended message) when sending to AirTouch. When receiving from AirTouch, last byte of address will be 0x80 or 0x90 (for Extended message).

I interpreted this as 0x80 0xb0 for send and 0x80 0x80 for receive, when they're actually just swapped. The examples in the spec document do actually show this, I've now fixed it - have another go.

Awesome, working much better now, I was looking for a requirements.txt 😅
The next issue:
Connecting to <IP_ADDRESS> on port 9200
Starting listener task
Sending AcStatusMessage
Enter 'q' to quit:
>> ['0x55', '0x55', '0xb0', '0x80', '0x1', '0xc0', '0x0', '0x12']
Checksum mismatch, ignoring message: Got 2e:9e but expected f0:72
Reading message failed
>> ['0x55', '0x55', '0x9f', '0x80', '0xd5', '0xc0', '0x0', '0x20']
ValueError: Unexpected address byte: expected 0xb0, got 0x9f
Failed reading header, trying again
>> ['0x2b', '0x0', '0x0', '0x0', '0x0', '0x4', '0x0', '0x6']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x80', '0x80', '0x7', '0xff', '0x81', '0x81', '0x7', '0xff']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x82', '0x82', '0x7', '0xff', '0x83', '0x83', '0x7', '0xff']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x90', '0xff', '0x3', '0x3', '0x91', '0xff', '0x7', '0xff']
ValueError: Message header magic is invalid
Failed reading header, trying again

Logs:
2023-03-23 19:51:30,488 MainThread DEBUG: Connecting to <IP_ADDRESS> on port 9200
2023-03-23 19:51:30,580 MainThread DEBUG: Starting listener task
2023-03-23 19:51:30,581 MainThread DEBUG: Sending AcStatusMessage
2023-03-23 19:51:30,687 MainThread WARNING: Checksum mismatch, ignoring message: Got 2e:9e but expected f0:72
2023-03-23 19:51:30,687 MainThread WARNING: Reading message failed
2023-03-23 19:52:03,604 MainThread DEBUG: ValueError: Unexpected address byte: expected 0xb0, got 0x9f
2023-03-23 19:52:03,604 MainThread DEBUG: Failed reading header, trying again
2023-03-23 19:52:03,604 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 19:52:03,604 MainThread DEBUG: Failed reading header, trying again
2023-03-23 19:52:03,604 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 19:52:03,604 MainThread DEBUG: Failed reading header, trying again
2023-03-23 19:52:03,604 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 19:52:03,604 MainThread DEBUG: Failed reading header, trying again
2023-03-23 19:52:03,604 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 19:52:03,604 MainThread DEBUG: Failed reading header, trying again

It seems that all the checksum validation is consistently failing but the algorithm doesn't look wrong from a quick inspection.
Connecting to <IP_ADDRESS> on port 9200
Starting listener task
Sending AcStatusMessage
Enter 'q' to quit:
>> ['0x55', '0x55', '0xb0', '0x80', '0x1', '0xc0', '0x0', '0x12']
Checksum mismatch, ignoring message: Got 2e:9e but expected f0:72
Reading message failed
>> ['0x55', '0x55', '0x9f', '0x80', '0xda', '0xc0', '0x0', '0x20']
ValueError: Unexpected address byte: expected 0xb0, got 0x9f
Failed reading header, trying again
>> ['0x2b', '0x0', '0x0', '0x0', '0x0', '0x4', '0x0', '0x6']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x80', '0x80', '0x7', '0xff', '0x81', '0x81', '0x7', '0xff']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x82', '0x82', '0x7', '0xff', '0x83', '0x83', '0x7', '0xff']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x90', '0xff', '0x2', '0xfe', '0x91', '0xff', '0x7', '0xff']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0xf6', '0x27', '0x55', '0x55', '0xb0', '0x80', '0x1a', '0xc0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x48', '0x21', '0x0', '0x0', '0x0', '0x0', '0x8']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x8', '0x40', '0x23', '0x96', '0x23', '0x2', '0xf8']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x0', '0x41', '0x23', '0x96', '0x23', '0x2', '0xf8']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x0', '0x2', '0x4b', '0x96', '0x4b', '0x2', '0xf8']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x0', '0x3', '0x64', '0x96', '0x0', '0x2', '0xf8']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x0', '0x4', '0x55', '0x96', '0x0', '0x2', '0xf8']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x0', '0x5', '0x64', '0x96', '0x0', '0x2', '0xf8']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x0', '0x46', '0x3c', '0x96', '0x3c', '0x2', '0xf8']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x0', '0x7', '0x14', '0x96', '0x0', '0x2', '0xf8']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x0', '0xcb', '0x75', '0x55', '0x55', '0x9f', '0x80']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0xdb', '0xc0', '0x0', '0x48', '0x21', '0x0', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x8', '0x0', '0x8', '0x40', '0x23', '0x96', '0x23']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x2', '0xf8', '0x0', '0x0', '0x41', '0x23', '0x96', '0x23']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x2', '0xf8', '0x0', '0x0', '0x2', '0x4b', '0x96', '0x4b']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x2', '0xf8', '0x0', '0x0', '0x3', '0x64', '0x96', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x2', '0xf8', '0x0', '0x0', '0x4', '0x55', '0x96', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x2', '0xf8', '0x0', '0x0', '0x5', '0x64', '0x96', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x2', '0xf8', '0x0', '0x0', '0x46', '0x3c', '0x96', '0x3c']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x2', '0xf8', '0x0', '0x0', '0x7', '0x14', '0x96', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x2', '0xf8', '0x0', '0x0', '0x4c', '0x6d', '0x55', '0x55']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x9f', '0x80', '0xdc', '0xc0', '0x0', '0x48', '0x21', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x0', '0x0', '0x8', '0x0', '0x8', '0x40', '0x23']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x96', '0x23', '0x2', '0xf8', '0x0', '0x0', '0x1', '0x23']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x96', '0x23', '0x2', '0xf8', '0x0', '0x0', '0x2', '0x4b']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x96', '0x23', '0x2', '0xf8', '0x0', '0x0', '0x3', '0x64']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x96', '0x0', '0x2', '0xf8', '0x0', '0x0', '0x4', '0x55']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x96', '0x0', '0x2', '0xf8', '0x0', '0x0', '0x5', '0x64']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x96', '0x0', '0x2', '0xf8', '0x0', '0x0', '0x46', '0x3c']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x96', '0x3c', '0x2', '0xf8', '0x0', '0x0', '0x7', '0x14']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x96', '0x0', '0x2', '0xf8', '0x0', '0x0', '0x45', '0xb7']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x55', '0x55', '0xb0', '0x80', '0x1b', '0xc0', '0x0', '0x48']
Checksum mismatch, ignoring message: Got 06:a4 but expected 6e:b1
Reading message failed
>> ['0x55', '0x55', '0xb0', '0x80', '0x1c', '0xc0', '0x0', '0x48']
Checksum mismatch, ignoring message: Got 2c:5a but expected 01:b9
Reading message failed
>> ['0x55', '0x55', '0x9f', '0x80', '0xdd', '0xc0', '0x0', '0x48']
ValueError: Unexpected address byte: expected 0xb0, got 0x9f
Failed reading header, trying again
>> ['0x21', '0x0', '0x0', '0x0', '0x0', '0x8', '0x0', '0x8']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x23', '0x96', '0x23', '0x2', '0xf8', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x1', '0x23', '0x96', '0x20', '0x2', '0xf8', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x2', '0x4b', '0x96', '0x20', '0x2', '0xf8', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x3', '0x64', '0x96', '0x0', '0x2', '0xf8', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x4', '0x55', '0x96', '0x0', '0x2', '0xf8', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x5', '0x64', '0x96', '0x0', '0x2', '0xf8', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x46', '0x3c', '0x96', '0x3c', '0x2', '0xf8', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x7', '0x14', '0x96', '0x0', '0x2', '0xf8', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0xab', '0x42', '0x55', '0x55', '0x9f', '0x80', '0xde', '0xc0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x48', '0x21', '0x0', '0x0', '0x0', '0x0', '0x8']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x8', '0x40', '0x23', '0x96', '0x12', '0x2', '0xf8']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x0', '0x1', '0x23', '0x96', '0xf', '0x2', '0xf8']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x0', '0x2', '0x4b', '0x96', '0x10', '0x2', '0xf8']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x0', '0x3', '0x64', '0x96', '0x0', '0x2', '0xf8']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x0', '0x4', '0x55', '0x96', '0x0', '0x2', '0xf8']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x0', '0x5', '0x64', '0x96', '0x0', '0x2', '0xf8']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x0', '0x46', '0x3c', '0x96', '0x3c', '0x2', '0xf8']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x0', '0x7', '0x14', '0x96', '0x0', '0x2', '0xf8']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x0', '0xb5', '0xfe', '0x55', '0x55', '0xb0', '0x80']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x1d', '0xc0', '0x0', '0x48', '0x21', '0x0', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x8', '0x0', '0x8', '0x40', '0x23', '0x96', '0x12']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x2', '0xf8', '0x0', '0x0', '0x1', '0x23', '0x96', '0xf']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x2', '0xf8', '0x0', '0x0', '0x2', '0x4b', '0x96', '0x10']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x2', '0xf8', '0x0', '0x0', '0x3', '0x64', '0x96', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x2', '0xf8', '0x0', '0x0', '0x4', '0x55', '0x96', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x2', '0xf8', '0x0', '0x0', '0x5', '0x64', '0x96', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x2', '0xf8', '0x0', '0x0', '0x46', '0x3c', '0x96', '0x3c']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x2', '0xf8', '0x0', '0x0', '0x7', '0x14', '0x96', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x2', '0xf8', '0x0', '0x0', '0x71', '0x1f', '0x55', '0x55']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x9f', '0x80', '0xdf', '0xc0', '0x0', '0x48', '0x21', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0x0', '0x0', '0x8', '0x0', '0x8', '0x40', '0x23']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x96', '0x14', '0x2', '0xf8', '0x0', '0x0', '0x41', '0x23']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x96', '0xd', '0x2', '0xf8', '0x0', '0x0', '0x2', '0x4b']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x96', '0xd', '0x2', '0xf8', '0x0', '0x0', '0x3', '0x64']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x96', '0x0', '0x2', '0xf8', '0x0', '0x0', '0x4', '0x55']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x96', '0x0', '0x2', '0xf8', '0x0', '0x0', '0x5', '0x64']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x96', '0x0', '0x2', '0xf8', '0x0', '0x0', '0x46', '0x3c']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x96', '0x3c', '0x2', '0xf8', '0x0', '0x0', '0x7', '0x14']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x96', '0x0', '0x2', '0xf8', '0x0', '0x0', '0x1c', '0x96']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x55', '0x55', '0xb0', '0x80', '0x1e', '0xc0', '0x0', '0x48']
Checksum mismatch, ignoring message: Got 9b:8e but expected f5:94
Reading message failed
>> ['0x55', '0x55', '0x9f', '0x80', '0xe0', '0xc0', '0x0', '0x12']
ValueError: Unexpected address byte: expected 0xb0, got 0x9f
Failed reading header, trying again
>> ['0x23', '0x0', '0x0', '0x0', '0x0', '0xa', '0x0', '0x1']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x10', '0x43', '0x82', '0xc1', '0x3', '0x2', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x80', '0x0', '0x83', '0xc9', '0x55', '0x55', '0xb0', '0x80']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x1f', '0xc0', '0x0', '0x12', '0x23', '0x0', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0xa', '0x0', '0x1', '0x10', '0x43', '0x82', '0xc1']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x3', '0x2', '0x0', '0x0', '0x80', '0x0', '0x23', '0x61']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x55', '0x55', '0x9f', '0x80', '0xe1', '0xc0', '0x0', '0x12']
ValueError: Unexpected address byte: expected 0xb0, got 0x9f
Failed reading header, trying again
>> ['0x23', '0x0', '0x0', '0x0', '0x0', '0xa', '0x0', '0x1']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x10', '0x43', '0xa0', '0xc1', '0x3', '0x2', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x80', '0x0', '0x8e', '0x9a', '0x55', '0x55', '0xb0', '0x80']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x20', '0xc0', '0x0', '0x12', '0x23', '0x0', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0xa', '0x0', '0x1', '0x10', '0x43', '0xa0', '0xc1']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x3', '0x2', '0x0', '0x0', '0x80', '0x0', '0xb5', '0x6e']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x55', '0x55', '0x9f', '0x80', '0xe2', '0xc0', '0x0', '0x12']
ValueError: Unexpected address byte: expected 0xb0, got 0x9f
Failed reading header, trying again
>> ['0x23', '0x0', '0x0', '0x0', '0x0', '0xa', '0x0', '0x1']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x10', '0x13', '0x96', '0xc1', '0x3', '0x2', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x80', '0x0', '0xa6', '0x96', '0x55', '0x55', '0xb0', '0x80']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x21', '0xc0', '0x0', '0x12', '0x23', '0x0', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0xa', '0x0', '0x1', '0x10', '0x13', '0x96', '0xc1']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x3', '0x2', '0x0', '0x0', '0x80', '0x0', '0x44', '0xc1']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x55', '0x55', '0x9f', '0x80', '0xe3', '0xc0', '0x0', '0x12']
ValueError: Unexpected address byte: expected 0xb0, got 0x9f
Failed reading header, trying again
>> ['0x23', '0x0', '0x0', '0x0', '0x0', '0xa', '0x0', '0x1']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x10', '0x43', '0xa0', '0xc1', '0x3', '0x2', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x80', '0x0', '0x57', '0x39', '0x55', '0x55', '0xb0', '0x80']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x22', '0xc0', '0x0', '0x12', '0x23', '0x0', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0xa', '0x0', '0x1', '0x10', '0x43', '0xa0', '0xc1']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x3', '0x2', '0x0', '0x0', '0x80', '0x0', '0x6c', '0xcd']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x55', '0x55', '0x9f', '0x80', '0xe4', '0xc0', '0x0', '0x12']
ValueError: Unexpected address byte: expected 0xb0, got 0x9f
Failed reading header, trying again
>> ['0x23', '0x0', '0x0', '0x0', '0x0', '0xa', '0x0', '0x1']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x10', '0x42', '0xa0', '0xc1', '0x3', '0x2', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x80', '0x0', '0x21', '0x2', '0x55', '0x55', '0xb0', '0x80']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x23', '0xc0', '0x0', '0x12', '0x23', '0x0', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0xa', '0x0', '0x1', '0x10', '0x42', '0xa0', '0xc1']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x3', '0x2', '0x0', '0x0', '0x80', '0x0', '0x30', '0x10']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x55', '0x55', '0x9f', '0x80', '0xe5', '0xc0', '0x0', '0x12']
ValueError: Unexpected address byte: expected 0xb0, got 0x9f
Failed reading header, trying again
>> ['0x23', '0x0', '0x0', '0x0', '0x0', '0xa', '0x0', '0x1']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x10', '0x43', '0xa0', '0xc1', '0x3', '0x2', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x80', '0x0', '0x7d', '0xdf', '0x55', '0x55', '0xb0', '0x80']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x24', '0xc0', '0x0', '0x12', '0x23', '0x0', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0xa', '0x0', '0x1', '0x10', '0x43', '0xa0', '0xc1']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x3', '0x2', '0x0', '0x0', '0x80', '0x0', '0x46', '0x2b']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x55', '0x55', '0x9f', '0x80', '0xe6', '0xc0', '0x0', '0x12']
ValueError: Unexpected address byte: expected 0xb0, got 0x9f
Failed reading header, trying again
>> ['0x23', '0x0', '0x0', '0x0', '0x0', '0xa', '0x0', '0x1']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x10', '0x43', '0xa0', '0xc1', '0x3', '0x2', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x80', '0x0', '0x68', '0xac', '0x55', '0x55', '0x9f', '0x80']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0xe7', '0xc0', '0x0', '0x12', '0x23', '0x0', '0x0', '0x0']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x0', '0xa', '0x0', '0x1', '0x10', '0x44', '0xa0', '0xc1']
ValueError: Message header magic is invalid
Failed reading header, trying again
>> ['0x3', '0x2', '0x0', '0x0', '0x80', '0x0', '0x94', '0x5a']
ValueError: Message header magic is invalid
Failed reading header, trying again

Logs:

2023-03-23 20:20:53,032 MainThread DEBUG: Connecting to <IP_ADDRESS> on port 9200
2023-03-23 20:20:53,149 MainThread DEBUG: Starting listener task
2023-03-23 20:20:53,149 MainThread DEBUG: Sending AcStatusMessage
2023-03-23 20:20:53,307 MainThread WARNING: Checksum mismatch, ignoring message: Got 2e:9e but expected f0:72
2023-03-23 20:20:53,308 MainThread WARNING: Reading message failed
2023-03-23 20:22:55,550 MainThread DEBUG: ValueError: Unexpected address byte: expected 0xb0, got 0x9f
2023-03-23 20:22:55,550 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:22:55,550 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:22:55,550 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:22:55,550 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:22:55,550 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:22:55,550 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:22:55,550 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:22:55,550 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:22:55,550 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:02,764 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:02,764 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:02,764 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:02,764 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:02,764 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:02,764 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:02,764 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:02,764 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:02,764 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:02,764 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:02,764 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:02,764 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:02,765 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:02,765 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:02,765 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:02,765 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:02,765 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:02,765 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:02,765 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:02,765 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:02,776 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:02,776 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:02,776 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:02,776 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:02,777 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:02,777 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:02,777 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:02,777 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:02,777 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:02,777 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:02,777 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:02,777 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:02,777 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:02,777 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:02,777 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:02,777 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:02,777 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:02,777 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:02,778 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:02,778 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:08,707 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:08,708 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:08,708 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:08,708 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:08,708 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:08,709 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:08,709 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:08,709 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:08,710 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:08,710 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:08,711 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:08,711 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:08,711 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:08,711 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:08,712 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:08,712 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:08,712 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:08,712 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:08,713 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:08,713 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:08,713 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:08,713 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:08,744 MainThread WARNING: Checksum mismatch, ignoring message: Got 06:a4 but expected 6e:b1
2023-03-23 20:27:08,744 MainThread WARNING: Reading message failed
2023-03-23 20:27:09,064 MainThread WARNING: Checksum mismatch, ignoring message: Got 2c:5a but expected 01:b9
2023-03-23 20:27:09,064 MainThread WARNING: Reading message failed
2023-03-23 20:27:09,069 MainThread DEBUG: ValueError: Unexpected address byte: expected 0xb0, got 0x9f
2023-03-23 20:27:09,069 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:09,070 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:09,070 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:09,070 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:09,070 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:09,070 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:09,070 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:09,070 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:09,070 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:09,070 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:09,070 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:09,070 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:09,070 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:09,070 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:09,071 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:09,071 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:09,071 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:09,071 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:09,071 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,589 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,590 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,590 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,591 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,591 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,592 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,592 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,592 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,593 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,593 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,593 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,594 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,594 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,594 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,594 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,594 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,594 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,595 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,595 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,595 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,607 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,607 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,608 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,608 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,608 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,608 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,608 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,608 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,608 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,608 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,608 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,608 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,608 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,608 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,608 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,608 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,608 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,608 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,608 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,608 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,996 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,997 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,997 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,998 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,998 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,998 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,999 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,999 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:11,999 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:11,999 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:12,000 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:12,000 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:12,000 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:12,000 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:12,001 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:12,001 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:12,001 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:12,001 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:12,001 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:12,001 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:12,001 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:12,001 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:12,005 MainThread WARNING: Checksum mismatch, ignoring message: Got 9b:8e but expected f5:94
2023-03-23 20:27:12,005 MainThread WARNING: Reading message failed
2023-03-23 20:27:13,580 MainThread DEBUG: ValueError: Unexpected address byte: expected 0xb0, got 0x9f
2023-03-23 20:27:13,580 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:13,581 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:13,581 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:13,582 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:13,582 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:13,587 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:13,587 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:13,588 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:13,588 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:13,588 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:13,588 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:13,588 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:13,588 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:14,054 MainThread DEBUG: ValueError: Unexpected address byte: expected 0xb0, got 0x9f
2023-03-23 20:27:14,054 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:14,054 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:14,054 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:14,054 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:14,054 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:14,059 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:14,059 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:14,059 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:14,059 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:14,059 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:14,059 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:14,059 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:14,059 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:16,110 MainThread DEBUG: ValueError: Unexpected address byte: expected 0xb0, got 0x9f
2023-03-23 20:27:16,110 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:16,110 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:16,110 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:16,110 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:16,110 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:16,112 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:16,112 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:16,112 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:16,112 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:16,112 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:16,112 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:16,112 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:16,113 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:17,502 MainThread DEBUG: ValueError: Unexpected address byte: expected 0xb0, got 0x9f
2023-03-23 20:27:17,502 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:17,502 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:17,502 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:17,503 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:17,503 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:17,505 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:17,506 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:17,506 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:17,506 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:17,506 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:17,506 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:17,506 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:17,506 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:18,990 MainThread DEBUG: ValueError: Unexpected address byte: expected 0xb0, got 0x9f
2023-03-23 20:27:18,991 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:18,991 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:18,992 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:18,992 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:18,992 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:18,999 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:18,999 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:19,000 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:19,000 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:19,000 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:19,001 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:19,001 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:19,001 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:20,604 MainThread DEBUG: ValueError: Unexpected address byte: expected 0xb0, got 0x9f
2023-03-23 20:27:20,605 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:20,605 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:20,606 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:20,606 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:20,606 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:20,614 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:20,614 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:20,615 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:20,615 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:20,615 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:20,615 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:20,615 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:20,615 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:20,978 MainThread DEBUG: ValueError: Unexpected address byte: expected 0xb0, got 0x9f
2023-03-23 20:27:20,978 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:20,978 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:20,978 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:20,978 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:20,978 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:21,982 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:21,983 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:21,983 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:21,984 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:21,984 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:21,984 MainThread DEBUG: Failed reading header, trying again
2023-03-23 20:27:21,985 MainThread DEBUG: ValueError: Message header magic is invalid
2023-03-23 20:27:21,985 MainThread DEBUG: Failed reading header, trying again

Looks like the checksum is calculated from the whole message minus the header bytes instead of just the message data.
Fixed a couple bugs and now the AC status is returned with ID 0 (I only have 1 AC unit)
  id: 0
  power: 1
  mode: 4
  fan_speed: 4
  set_point: 25.0
  temperature: 25.0
  turbo: False
  bypass: False
  spill: False
  timer: True
  error: 0

and now the request to get the AC ability is being sent but the at2plus_test script hangs on ac_ability = await self._ability_message_queue.get() as it looks like the queue is always empty and is probably a bug I can't brute force with print statements.
Right before it waits forever, I can read the ability payload directly (confirmed by the fixed 0xFF, 0x11 bytes) which indicates that there is at least a response from the controller with the ability of AC0
<< Reading payload of size 8: 55:55:b0:90:01:1f:00:1c
<< Reading payload of size 28: ff:11:00:18:46:75:6a:69:74:73:75:00:00:00:00:00:00:00:00:00:00:08:1f:1d:12:12:10:10
<< Reading payload of size 2: 0e:61

Thanks for all your work 🙏

Hey man, pushed a few fixes - have another go.

Hey, got a little further but hitting a strange error.
In the example doc, the header of the example AC ability message responds with 26 bytes but my AC is responding with 28 bytes in the header and the checksum is passing.
The AC ability response data looks fine except for the maximum set point is being reported as 18 instead of 30. I changed the number of zones and the min/max temps and everything reported the new values correctly except for the max temp.
The additional 2 bytes on the end with no mapping is 0x10 and 0x10 which is unexplained in the doc 😥
Looking at [another implementation] (https://github.com/HendX/AirTouch2Plus/blob/main/Sources/AirTouch2Plus/Messages/UnitAbilitiesResponseMessage.swift#LL200C33-L200C33) written in Swift, the repeating length has also been hardcoded to 24 bytes making me think my AC unit is dodgy or nobody else is running the latest firmware.

The swift guy is also just doing what I am - implementing what's in that document. He doesn't have an AT2+ unit either. So I suppose you just have a newer version and it's different from the doc. You can see your 4th data byte is 0x18 = 24 bytes of following data, whereas the spec states 22 at this moment, implying it could change - and lo and behold it has changed.
By the way, thanks for continually fixing the runtime mistakes - the downside of interpreted languages is you don't know if a line is really valid until you actually try to interpret it at runtime and of course I can't get past the client.connect() line without a unit to connect to haha.
Could you please investigate the last 4 bytes of the 28 data bytes - adjust your minimum and maximum set points and see if/how those last 4 data bytes change and what their significance is. If changing the maximum changes other bytes, let me know. It's kind of up to you now to reverse engineer what the values mean - because the doc is outdated and I can't do it without a unit. Whenever _read_message() reads a complete message it should dump the bytes to a .dump file, if you want me to help then you can make adjustments to min/max set temp, re-request the AcAbility then post here what you changed, in order, and the subsequent AcAbilityMessage .dump files. I'll make a commit now that allows you to manually re-request the AcAbilityMessage.

There's a few command and status messages firing with undocumented sub message types which look next to impossible to figure out which bits represent what feature/status, I've emailed the generic Polyaire support email and hopefully they can bounce it around to someone with knowledge.
I think the AC ability state is imported initially when it's first connected to one of the supported Polyaire gateways (mine being a Fujitsu for example) representing the physical hardware and should be confirmed by the installer but nothing stops the home owner from modifying it with the default installer password which was just "Polyaire" so it's safe to assume the values can be modified.

Fair enough, I was going to ignore any other messages for now. Will you have a go at working out the AcAbility one though? It's only a couple of extra bytes.

Yeah sure, would love to get the basic working still.
The current AC0 ability response:
Read payload of size 8: 55:55:b0:90:01:1f:00:1c
Read payload of size 28: ff:11:00:18:46:75:6a:69:74:73:75:00:00:00:00:00:00:00:00:00:00:07:1f:1d:14:14:1b:1b
Read payload of size 2: 70:38

Under the installer settings I can change the min and max setpoint values for cool and heat and it appears to update in the ability response but the max is now excluded for some reason.
The console inputs are currently set to the following to see if the setpoint range did anything but the response was the same.
Min cool (0x14): 20
Max cool(0x1c): 28
Min heat (0x1b): 27
Max heat (0x1b): 27
Of the final 4 bytes, the first 2 always represent the cool min setpoint value set and the last 2 always represent the heat min setpoint value set.
If I had to have a guess after pressing all the buttons, the final 4 bytes are something like
cool_min_setpoint: int
all_cool_min_setpoint: int
heat_min_setpoint: int
all_cool_min_setpoint: int

In the context of a single AC I don't really understand why it would display the min and max of the whole AC unit (max 4 ACs per controller) but it's the only thing I can think of outside of it being a bug.
Let me know if you've got any ideas 👌👌👌
Also unrelated, I think the controller is also pushing the data to the cloud, have you ever thought about if it's possible to just pull the data from there?
also unrelated 2: I have this error printed when I change a value on the controller with the script running but struggle to trace through the callbacks
Task exception was never retrieved
future: <Task finished name='Task-4' coro=<At2PlusClient._handle_status_message() done, defined at /home/chris112/projects/airtouch2-python/src/airtouch2/at2plus/AT2PlusClient.py:99> exception=TypeError("log_ac_info() missing 1 required positional argument: 'ac'")>
Traceback (most recent call last):
  File "/home/chris112/projects/airtouch2-python/src/airtouch2/at2plus/AT2PlusClient.py", line 104, in _handle_status_message
    self.aircons_by_id[status.id]._update_status(status)
  File "/home/chris112/projects/airtouch2-python/src/airtouch2/at2plus/AT2PlusAircon.py", line 70, in _update_status
    callback()
TypeError: log_ac_info() missing 1 required positional argument: 'ac'

On unrelated 2: Yeah my bad, the callbacks don't take arguments, although perhaps I should pass in the ID of the AC that was updated. Anyway, just pushed a quick workaround.
Weird that there's those 4 related values on the panel but they don't quite correspond with what we're seeing in the message. Just to confirm - each of the pairs of bytes at the end always change together? They're never different? Seems odd to have the same value twice - like you say perhaps its only important when there's more connected AC units. What's more alarming is that the max values don't seem be there at all....not helpful. The spec definitely says the last two bytes are minimum and maximum - it seems weird they would remove the maximum from the message in this later version.
Alas, if that information has been removed from this AcAbility message we're looking at, I would guess it's now available in a different message? So we're again getting back to either needing a newer version of this spec document, or doing some serious reverse engineering work. E.g. Set up a packet capture of the airtouch2+ app and play around with changing different things on both the panel and app and working out what messages are sent and their content.
Anyway, I can just ignore the max temp thing for now. I'll update the code so the length of the AcAbility isn't hardcoded and then I'll start working on commands and getting you test that.

Hi Here is a newer version of the API that someone was kind enough to send me, Hopefully it helps.
AirTouch 2+ Communication Protocol V1.1.pdf

Yeah so this doc says the last 4 bytes of the Ability message are:
cool_min
cool_max
heat_min
heat_max
which makes sense - perhaps you were misreading something Chris? I'm going to implement handling what's in both of these specs now.

Hi Here is a newer version of the API that someone was kind enough to send me, Hopefully it helps. AirTouch 2+ Communication Protocol V1.1.pdf

Fantastic, thanks for sharing.

which makes sense - perhaps you were misreading something Chris? I'm going to implement handling what's in both of these specs now.

I expect it must be a fault in my device, wireshark reporting the same values.
Keen to test further when you've implemented the spec change + group/ac set messages

Hey @Chris112 I just pushed a commit that attempts to support the 1.1 AcAbility message. See what happens :)

Also just pushed a commit that allows you to control the AC - setpoint, mode, fan speed, toggle on/off.

I've tried the latest commit c5663b4:
Connecting to <IP_ADDRESS> on port 9200 Starting listener task Sending AcStatusMessage with data: 55:55:80:b0:01:c0:00:08:23:00:00:00:00:00:00:0a:7a:30 Waiting for AC0 to be ready Traceback (most recent call last):   File "C:\at2\airtouch2-python-at2-plus-support\test_programs\at2plus_test.py", line 135, in <module>     asyncio.run(main())   File "C:\Users\jerem\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run     return loop.run_until_complete(main)   File "C:\Users\jerem\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 649, in run_until_complete     return future.result()   File "C:\at2\airtouch2-python-at2-plus-support\test_programs\at2plus_test.py", line 101, in main     await ac0_waiter.wait()   File "C:\at2\airtouch2-python-at2-plus-support\test_programs\at2plus_test.py", line 70, in wait     await self.found_ac0.wait() AttributeError: 'Ac0Waiter' object has no attribute 'found_ac0'
commit 6a8204d:
`Connecting to <IP_ADDRESS> on port 9200
Starting listener task
Sending AcStatusMessage with data: 55:55:80:b0:01:c0:00:08:23:00:00:00:00:00:00:0a:7a:30
Enter: 'q' to quit
'r' to request AC0 ability
Read payload of size 8: 55:55:b0:80:01:c0:00:12
Read payload of size 18: 23:00:00:00:00:0a:00:01:00:14:78:c9:02:c0:00:00:90:00
Read payload of size 2: 3f:b7
Handling status message
New AC (0) found
        id: 0
        power: 0
        mode: 1
        fan_speed: 4
        set_point: 22.0
        temperature: 20.4
        turbo: True
        bypass: False
        spill: False
        timer: True
        error: 0

Requesting ability of AC0
Sending RequestAcAbilityMessage with data: 55:55:90:b0:01:1f:00:03:ff:11:00:09:83
Waiting for ability message response...
Read payload of size 8: 55:55:b0:90:01:1f:00:1c
Read payload of size 28: ff:11:00:18:4d:48:49:00:00:00:00:00:00:00:00:00:00:00:00:00:00:06:1f:1e:12:12:12:12
Read payload of size 2: b0:89
Creating ability message from 26 bytes
Got ability message response
Task exception was never retrieved
future: <Task finished name='Task-5' coro=<At2PlusClient._handle_status_message() done, defined at C:\at2\airtouch2-python-at2-plus-support\src\airtouch2\at2plus\AT2PlusClient.py:99> exception=AttributeError("'AcAbility' object has no attribute 'number'")>
Traceback (most recent call last):
File "C:\at2\airtouch2-python-at2-plus-support\src\airtouch2\at2plus\AT2PlusClient.py", line 110, in _handle_status_message
ability = await self._request_ac_ability(status.id)
File "C:\at2\airtouch2-python-at2-plus-support\src\airtouch2\at2plus\AT2PlusClient.py", line 93, in _request_ac_ability
if ac_ability.abilities[0].number != number:
AttributeError: 'AcAbility' object has no attribute 'number'
`
Earlier commit 519a8b7
Connecting to <IP_ADDRESS> on port 9200
Starting listener task
Sending AcStatusMessage with data: 55:55:80:b0:01:c0:00:08:23:00:00:00:00:00:00:0a:7a:30
Enter: 'q' to quit
'r' to request AC0 ability
Read payload of size 8: 55:55:b0:80:01:c0:00:12
Read payload of size 18: 23:00:00:00:00:0a:00:01:00:14:78:c9:02:bb:00:00:90:00
Read payload of size 2: 35:53
Handling status message
New AC (0) found
        id: 0
        power: 0
        mode: 1
        fan_speed: 4
        set_point: 22.0
        temperature: 19.9
        turbo: True
        bypass: False
        spill: False
        timer: True
        error: 0

Requesting ability of AC0
Sending RequestAcAbilityMessage with data: 55:55:90:b0:01:1f:00:03:ff:11:00:09:83
Waiting for ability message response...
Read payload of size 8: 55:55:b0:90:01:1f:00:1c
Read payload of size 28: ff:11:00:18:4d:48:49:00:00:00:00:00:00:00:00:00:00:00:00:00:00:06:1f:1e:12:12:12:12
Read payload of size 2: b0:89
Creating ability message from 26 bytes
Got ability message response
Got ability of AC0:
number: 0
name: MHI
start_group: 0
group_count: 6
supported_modes: [<AcMode.AUTO: 0>, <AcMode.HEAT: 1>, <AcMode.DRY: 2>, <AcMode.FAN: 3>, <AcMode.COOL: 4>]
supported_fan_speeds: [<AcFanSpeed.QUIET: 1>, <AcFanSpeed.LOW: 2>, <AcFanSpeed.MEDIUM: 3>, <AcFanSpeed.HIGH: 4>]
min_setpoint: 18
max_setpoint: 18
Finished handling status message

Thanks. I really need to write a server emulator so I can actually run this code myself...
Try again @bigjezza

Following on from the discussion about addresses in #9, I've gone ahead and tried testing the different scenarios where a client will receive a message, to see what addresses we can expect.
The first thing I learned is that a client can use any address it likes, and the controller will respond to it with the same address. If ADDRESS_CONSTANT is changed to 0xb1, commands will be sent with that addr and responses from the controller will include it.
Another thing I've learned is that when a client sends a command packet, then the controller seems to send a corresponding status packet to all connected clients, with the requester's address. But when a client sends a status request packet, the controller only seems to respond directly to the requester.
I've tried testing by connecting to the controller with the at2plus_test.py test client, sending packets from a number of different clients, and logging what addresses were received by the test client. The clients I sent commands from were:

the test client itself
another instance of at2plus_test.py running from a different working tree
the AirTouch2+ Android app, connecting over the LAN
the AirTouch2+ Android app, connecting via the cloud service
sending commands from the controller touchscreen
scheduled commands (I used a timer to turn the AC off, and a small scheduled program)
automatic commands (the AC turning itself off when it reaches set temp)

For AC control messages, I turned the AC on and off, and changed the fan speed. For group control messages, I turned zones on and off. The addresses received by the test client for these were:

Group control
AC control

same
?
b0

remote
?
ADDRESS_CONSTANT

official-local
9f
9f

official-cloud
9f
9f

controller
9f
9f

auto
?
9f

schedule
9f
9f

From this I'm concluding that all of the Polyaire client code is using 0x9f for the address, and it makes sense to accept that address. And obviously the address this client uses (0xb0) should be recognised as a valid address. Practically, that's probably all that's really required. But recognising those two and accepting everything else as "some other client connected to the controller" might also be desirable? Not sure.

@phardy
Yes yes yes! Awesome work , thank you!
You didn't explicitly say this, so I will ask - did you try changing the address constant to random addresses other than 0x9f and 0xb0? Did everything behave as expected? If so, then I probably should allow anything to go in that byte.
You say:

a client can use any address it likes, and the controller will respond to it with the same address
So I would assume you did.

It's great to have someone with the system to actually try stuff out, thanks again.

You didn't explicitly say this, so I will ask - did you try changing the address constant to random addresses other than 0x9f and 0xb0?

Sorry, I did mean to explicitly say that, but finished up later than I expected. I did change the address constant, although when I was testing previously I only tried an address of 0xb1. With that, the sender would log
Sending AcControlMessage with data: 55:55:80:b1:01:c0:00:0c:22:00:00:00:00:04:00:01:f0:f3:00:fb:bf:ee

and both sender and receiver would receive
Read payload of size 8: 55:55:b1:80:01:c0:00:12

But now I'm trying other values for the address constant, and the controller doesn't like everything. 0xb0 - 0xbf seem fine. But other addresses that I've tried like 0x37, 0x88, 0xd5 never get a response from the controller.
I was considering accepting anything in that byte, but logging a debug level message if it's not a known constant, 0x9f or our sending address 0xb0. Does that make sense?

other addresses that I've tried like 0x37, 0x88, 0xd5 never get a response from the controller

Cheers, this is what I really wanted to know. It seems there's some kind of meaning to the value that we don't know.

Does that make sense?

Yes, it makes sense to expect what we've seen works and log a warning or something when it deviates from that, but...
I really want to crash the whole program when we get something unfamiliar (aka fail-fast/fail-early). It means nothing slips by unnoticed - it annoys people and forces them to look at what's happened and raise an issue. When that we happens we gain another piece of the puzzle.  If anything else comes up in the future, it can be added. Have a play around and let me know if there's any issues.

Well I can set the fan speed and setpoints correctly :)
The setpoint limits being reported for both cooling and heating are listed as 18/18
After toggling from on to off I get this (the unit does turn off the ac though):
Failed reading header, trying again
Read payload of size 8: 64:02:f8:00:00:45:64:96
ValueError: Message header magic is invalid

@bigjezza did the logs really appear in that order?
If something went wrong reading the header, I would expect them to be in this order:
Read payload of size 8: 64:02:f8:00:00:45:64:96
ValueError: Message header magic is invalid
Failed reading header, trying again

Can you experiment a bit more and see if it happens often? And if it's after specific commands or if there's any kind of pattern to when it happens? Cheers.

The setpoint limits being reported for both cooling and heating are listed as 18/18

I've noticed this as well and, unfortunately, from what I can see it's a bug in the controller not in this code. Looking at the appropriate parts of the payload, all I see is "12 12 12 12", ie 18 in hexadecimal. I see this in logs you've posted, and in logs I've captured experimenting with my controller. When I get time I'll play with changing these settings and see if changing them has any affect in what's sent. But I'm not holding my breath.

@phardy does the airtouch2+ app display the min/max limits anywhere?

@nathanvdh Good point. The app does know about the limits (it won't let you set a temperature outside those limits). And changes to min/max limits via the keypad are immediately reflected in the app. Let me look closer at what's being sent when the limits change.

After toggling it off from on, the first message appears almost instantly and in the space of about a minute:
Finished handling status message
Read payload of size 8: 55:55:9f:80:0d:27:00:01
ValueError: 39 is not a valid MessageType
Failed reading header, trying again
Read payload of size 8: 00:2c:4d:55:55:9f:80:0e
ValueError: Message header magic is invalid
Failed reading header, trying again
Read payload of size 8: c0:00:12:23:00:00:00:00
ValueError: Message header magic is invalid
Failed reading header, trying again
Read payload of size 8: 0a:00:01:00:12:82:c9:02
ValueError: Message header magic is invalid
Failed reading header, trying again
Read payload of size 8: d6:00:00:90:00:8c:0d:55
ValueError: Message header magic is invalid
Failed reading header, trying again
Read payload of size 8: 55:9f:80:0f:c0:00:20:2b
ValueError: Message header magic is invalid
Failed reading header, trying again
Read payload of size 8: 00:00:00:00:04:00:06:80
ValueError: Message header magic is invalid
Failed reading header, trying again
Read payload of size 8: 80:07:ff:81:81:07:ff:82
ValueError: Message header magic is invalid
Failed reading header, trying again
Read payload of size 8: 82:07:ff:83:83:07:ff:90
ValueError: Message header magic is invalid
Failed reading header, trying again
Read payload of size 8: ff:02:d5:91:ff:07:ff:96
ValueError: Message header magic is invalid
Failed reading header, trying again
Read payload of size 8: dc:55:55:9f:80:10:c0:00
ValueError: Message header magic is invalid
Failed reading header, trying again
Read payload of size 8: 12:23:00:00:00:00:0a:00
ValueError: Message header magic is invalid
Failed reading header, trying again
Read payload of size 8: 01:00:12:82:c9:02:d5:00
ValueError: Message header magic is invalid
Failed reading header, trying again
Read payload of size 8: 00:90:00:0d:37:55:55:b0
ValueError: Message header magic is invalid
Failed reading header, trying again
Read payload of size 8: 80:bf:c0:00:38:21:00:00
ValueError: Message header magic is invalid
Failed reading header, trying again
Read payload of size 8: 00:00:08:00:06:40:64:96
ValueError: Message header magic is invalid
Failed reading header, trying again
Read payload of size 8: 64:02:f8:80:00:41:64:96
ValueError: Message header magic is invalid
Failed reading header, trying again
Read payload of size 8: 64:02:f8:00:00:42:64:96
ValueError: Message header magic is invalid
Failed reading header, trying again
Read payload of size 8: 64:02:f8:00:00:03:64:96
ValueError: Message header magic is invalid
Failed reading header, trying again
Read payload of size 8: 00:02:f8:00:00:44:64:96
ValueError: Message header magic is invalid
Failed reading header, trying again
Read payload of size 8: 64:02:f8:00:00:45:64:96
ValueError: Message header magic is invalid
Failed reading header, trying again

Alrighty, pushed a commit that should handle unrecognised messages, log them, and hopefully continue working. If there's any syntax errors or silly mistakes I've made, please see if you can quickly fix it up and continue testing. Thanks again guys, appreciate the help and the time you're putting in.

I haven't yet seen a sub message type 27, but haven't been running a test client much lately sorry.
I did spend some time looking at the traffic between the Android app and the console when the app starts, though. When it starts the app sends an undocumented extended message request of type 0xff 0xf0. I've been thinking of it as a controller status, because the response from the controller contains:

Controller hardware and firmware info
AC ability and status (including correct min/max set points)
Group info and status
Program info (probably timer too but I haven't figured it out)
Favourites info

What I've been able to find in it so far is in https://gist.github.com/phardy/4bde13205c2c4ccf384807f0bf184b94 (maybe easier to read the raw file, github's org mode parser is struggling with my tables). There's a few gaps, especially around the programs and timer that I'll keep working on. But it's mostly complete by now.

How can i test this in HA? i have an AT2+ system

How can i test this in HA? i have an AT2+ system

I haven't done the HA integration yet. This library is a stage where it sort of works, I'm going to see if I can add airtouch2+ support to my existing integration. Will be working on that next.

How can i test this in HA? i have an AT2+ system

There is a now a prerelease/beta version in my custom components repo for you to test.

@phardy @Chris112 are you able to test the homeassistant integration I've made. I've had a couple report some issues and I'm not sure if it's this client or the integration at the moment.

Looks good so far after completing the following steps:

Add the custom repo
Download the integration
Add the airtouch2plus integration and enter the ip address of my airtouch 2+ controller

2023-07-12 19:51:28.563 INFO (SyncWorker_4) [homeassistant.util.package] Attempting install of airtouch2==0.7.5
2023-07-12 19:52:25.781 INFO (MainThread) [homeassistant.setup] Setting up airtouch2plus
2023-07-12 19:52:25.781 INFO (MainThread) [homeassistant.setup] Setup of domain airtouch2plus took 0.0 seconds
2023-07-12 19:52:25.960 INFO (MainThread) [homeassistant.components.climate] Setting up climate.airtouch2plus
2023-07-12 19:52:25.963 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new climate.airtouch2plus entity: climate.at2plus_ac_0

I've added some screenshots below but I'm not too sure where to find the logs just yet, I've enabled debug logging on the integration but couldn't find anything under the Home Assistant Core logs.
Some observations/thoughts:

Initially, I was setting the fan speed via HA and it was updating my airtouch native mobile app well
Changing the operation did also update the airtouch app in real time but the operation dropdown would snap back to it's initial value (video below). The device Logbook shows only a single request and then stopped updating:

AC Fujitsu changed to Cool triggered by service climate.set_hvac_mode

The initial airtouch operation state was off and I was never able to turn it on by setting the operation to cool/warm/ect
When manually turning on the ac, selecting the off operation would successfully turn off the ac (then snap back to cool)
After some time playing around, the fan speed also started snapping back to it's initial value after correctly updating the airtouch controller
Setting the target temperature via HA would use a step of 0.1 which should probably be a whole number which would align with the airtouch 2+ controller + native android app
Changing the target temperature from 28 to 27.9 would result in the airtouch controller updating to 27 so i'm guessing it's just truncating the decimal (proves the set point command is working)
The integration logo isn't working, it's trying to hit https://brands.home-assistant.io/airtouch2plus/dark_icon.png

https://github.com/nathanvdh/airtouch2-python/assets/1500031/6c0af5c9-3f3e-40f1-9d1f-78f6f2d839c4

I dont have any of those Elements on the card, the only item i have in the drop down lists is "Off"

@Chris112 for full debug logs you will need to do something like this in configuration.yaml
# Logging setup
logger:
  default: warning
  logs:
    custom_components.airtouch2plus: debug
    airtouch2.at2plus.At2PlusClient: debug
    airtouch2.common.NetClient: debug

Setting the target temperature via HA would use a step of 0.1 which should probably be a whole number which would align with the airtouch 2+ controller + native android app

From what I could see about the protocol it seemed like it allows steps of 0.1deg.
Is there any part of the system that shows temperature to 0.1deg accuracy?
When you change stuff outside of home assistant (airtouch panel or app). Does anything ever change inside home assistant?

@Chris112 can you update everything to latest, go back to the test_programs/at2plus_test.py script and verify it's printing out the AC state as you change stuff? Send me the airtouch2plus.log produced by that, and then also the debug logs from the integration.

I've tested this with my Panasonic and it set itself up seamlessly.
Changing the mode and temperature also reflects the same on my MQTT Climate card through the NodeRED flow, so I'm stoked.
Thanks so much for your work nathanvdh!
For others reference, I added the repository as a custom repository in HACS and installed from there.

From what I could see about the protocol it seemed like it allows steps of 0.1deg. Is there any part of the system that shows temperature to 0.1deg accuracy?

I think the setpoint may take 0.1deg steps, however I don't think my reported actual temperature has that accuracy; it may depend on the brand and model of the AC though? Bumping mine up a .5 degree of setpoint seems to round up/ceiling the actual as an integer.

@Chris112 can you update everything to latest, go back to the test_programs/at2plus_test.py script and verify it's printing out the AC state as you change stuff? Send me the airtouch2plus.log produced by that, and then also the debug logs from the integration.

Sure, here are the logs + the steps I took with the native Android airtouch2+ app:

Uninstall homeassistant-airtouch2plus and reinstall
Start program with python3 ./at2plus_test.py
Turn the AC on
Set the temp to 22
Set the operation to cool
Set the operation to heat
Change the fan speed to low
Set the temp to 27
ctrl+c the program

ha_log.txt
airtouch2plus.log
From what I could see about the protocol it seemed like it allows steps of 0.1deg.
Is there any part of the system that shows temperature to 0.1deg accuracy?

When I set the AC to a decimal via HA, the at2plus python program reports the new temperature correctly at the decimal value but the Android app + Airtouch2 console both report the floor value e.g, 25.9 displays as 25.
When you change stuff outside of home assistant (airtouch panel or app). Does anything ever change inside home assistant?
Yeah, initially the HA device was responding instantly to updates made via console or android app + creating the correct state change log on the device but then it appears to break at some point (some unhandled header error maybe?) and UI updates no longer occur but it still sends the correct commands to the airtouch controller to update the state then promptly flick back to the previous state (as seen in the gif above)

Thanks for that, it was being broken by an unrecognised status message (0x2B / decimal 43). I'm handling these now (by ignoring them and logging an error).

Hey Nathan, initially after updating there was no real difference, HA would update the console but then flick back to the previous state.
I then noticed my Airtouch 2+ console had a firmware update from 1.2.1 to 1.2.2 and after installing the new version, everything in HA is working as expected ✨🎈
The only problem remaining that I've noticed is setting an operation or hvac mode won't turn on the AC if it's off which I think is the expected behavior. When I set the operation mode to 'off', it turns off the AC but the HA operation flips back to the previous operation.
If I had to guess, the response from the ac turn off request comes back with "mode : x" and that updates the hvac operation mode. If "power:0" returns, maybe the operation mode can be ignored and set to "off" if that's the case.
In the meantime, using the "Climate: Turn on" service is a good work around with a helper variable has the "power" property isn't exposed.
Here's the log from changing the hvac mode from heat to cool which shows power never flips
2023-08-17 10:58:16.965 DEBUG (MainThread) [airtouch2.common.NetClient] Sending AcControlMessage with data: 55:55:80:b0:01:c0:00:0c:22:00:00:00:00:04:00:01:f0:4f:00:fb:cb:7e
2023-08-17 10:58:16.966 DEBUG (MainThread) [airtouch2.common.NetClient] <airtouch2.protocol.at2plus.messages.AcControl.AcControlMessage object at 0x7fd749e8c750>
2023-08-17 10:58:17.199 DEBUG (MainThread) [airtouch2.common.NetClient] Read payload of size 1: 55
2023-08-17 10:58:17.199 DEBUG (MainThread) [airtouch2.common.NetClient] Read payload of size 1: 55
2023-08-17 10:58:17.199 DEBUG (MainThread) [airtouch2.common.NetClient] Read payload of size 6: 9f:80:f5:c0:00:12
2023-08-17 10:58:17.200 DEBUG (MainThread) [airtouch2.common.NetClient] Read payload of size 18: 23:00:00:00:00:0a:00:01:00:43:aa:c1:02:b2:00:00:80:00
2023-08-17 10:58:17.200 DEBUG (MainThread) [airtouch2.common.NetClient] Read payload of size 2: 91:0f
2023-08-17 10:58:17.200 DEBUG (MainThread) [airtouch2.at2plus.At2PlusClient] Handling status message
2023-08-17 10:58:17.201 DEBUG (MainThread) [airtouch2.at2plus.At2PlusClient] Updated AC 0 with value
            id: 0
            power: 0
            mode: 4
            fan_speed: 3
            set_point: 27.0
            temperature: 19.0
            turbo: False
            bypass: False
            spill: False
            timer: True
            error: 0

2023-08-17 10:58:17.201 DEBUG (MainThread) [airtouch2.at2plus.At2PlusClient] Finished handling status message
2023-08-17 10:58:17.208 DEBUG (MainThread) [airtouch2.common.NetClient] Read payload of size 1: 55
2023-08-17 10:58:17.208 DEBUG (MainThread) [airtouch2.common.NetClient] Read payload of size 1: 55
2023-08-17 10:58:17.208 DEBUG (MainThread) [airtouch2.common.NetClient] Read payload of size 6: b0:80:01:c0:00:12
2023-08-17 10:58:17.209 DEBUG (MainThread) [airtouch2.common.NetClient] Read payload of size 18: 23:00:00:00:00:0a:00:01:00:43:aa:c1:02:b2:00:00:80:00
2023-08-17 10:58:17.209 DEBUG (MainThread) [airtouch2.common.NetClient] Read payload of size 2: 82:5d
2023-08-17 10:58:17.209 DEBUG (MainThread) [airtouch2.at2plus.At2PlusClient] Handling status message
2023-08-17 10:58:17.210 DEBUG (MainThread) [airtouch2.at2plus.At2PlusClient] Updated AC 0 with value
            id: 0
            power: 0
            mode: 4
            fan_speed: 3
            set_point: 27.0
            temperature: 19.0
            turbo: False
            bypass: False
            spill: False
            timer: True
            error: 0

@Chris112 just found a mistake in the integration. It wasn't checking the on/off state of the AC correctly.
Can you try beta 6?

@Chris112 just found a mistake in the integration. It wasn't checking the on/off state of the AC correctly.
Can you try beta 6?

Everything is working as expected now, thanks so much for your awesome work 🎉
The real icing on the cake now would be the integration creating fan entities to represent the zones and fan speed, then we could ditch the native mobile app 🚀

Everything works well! Agreed, separate entities for each zone would be the pièce de résistance ;)

Closing as complete. Will open separate issue for zones.


Is it possible to get this working on more modern processors?

I'm trying to get this library to work with a Arduino nano ble 33 IOT which uses a Samd21 processor. What would the best way be to go about this?
Thank you!

You'll have to check the LUFA website and documentation about this. AFAIK, LUFA is exclusively for AVR processors. As the SAMD21 is an ARM processor, you'll probably need to look for another solution.
What do you need to use LUFA for anyway? The standard Arduino USB device functionality should get you quite far.

It's to allow the Arduino to emulate a PS4 controller which uses the LUFA library.
Apparently the standard USB library lacks some of the low level functionality that LUFA provides access to: https://github.com/fraca7/dsremap/issues/2

I see! Yeah, this is quite annoying, but I think you're pretty much out of luck here and your best bet is to find different hardware that supports both LUFA (i.e. uses an AVR processor) and BLE.
The reason is that the whole build-pipeline of LUFA relies on the AVR processor architecture and the avr-gcc compiler. The SAMD21 is an ARM processor, so it has a completely different architecture and uses the arm-gcc compiler. I'm sure someone with A LOT of experience could make it work, but I think we both don't have the necessary know-how.
It's not impossible, though! NXP ported LUFA to ARM in 2011, and people have already forked that. It seems to be compatible with Cortex-M0+, so maybe you can re-use the Hardware Abstraction Layers that Arduino is using for that processor?
You'd have to do all that work first, and could afterwards adapt Arduino-Lufa to insert the result as a library for Arduino.

Thank you, I'll have a dig around and see if I can figure it out!


allow for sqlite backend database for low-profile self-hosting deploy…

…ments
Just a quick proof of concept to validate that the gorm config will work well with sqlite on a low-profile backend self-hosted, in case others don't want the weight of running postgresql for their own history.

Thank you for this contribution! The server works great with sqlite and I think this is a positive change. Just waiting for tests to run then I'll merge this. :)

Thanks!  I re-rolled my docker image with this today and it's working great.  I'm considering using tailscale's tsnet go library in the container to proxy for the server instead of having tailscaled running in the container.  Would be more self-contained and require less "acls."  This is such a nifty project.  Thanks again.


complete home dex

i would like support for a full living dex for pokemon home with all pokemon from all games.

we have have support for a home dex, which we will be updating as new games are launched.


feat: use ndyus to speed up the image deployment process in image-rs

Integrate nydus related services into image-rs initially. Only nydus FUSE service is supported right now.

Is it possible to add a nydus feature so that this support is optional?

Is it possible to add a nydus feature so that this support is optional?

Yes, that sounds good. I am currently completing the support of the nydus erofs driver and doing some performance tests,
the nydus feature will also be launched when I finish these.

The PR shows development history, could you please help to fold the commit history?

The PR shows development history, could you please help to fold the commit history?

done


Improve "Submission" on arcticdata.io

Goals:

set better expectations using "Submission" and "Q&A" pages
clear / clarification on expectations (useful for our team and for users)
resource for data team
quickly changeable

Document Structure:

overview
-> links to examples
--> links to broader / deeper explanations
---> links to EML

Example:
Dataverse Project - User Guide
Proposed review process:

[ ] Data team creates document
[ ] Outreach team assists with wordsmithing
[ ] MB approves
[ ] Marc Steiglitz reviews / approves

Needed:

[ ] pop up to present the support documentation

What is the difference between DMP template for ADC and "Submission":

Submission doc is more in depth
DMP template can link to sections of the submission doc

MJ - requests we update submissions page on arcticdata.io sooner rather than later and iteratively as opposed to perfectly.

The updates look great.  Let's try to make it more readable/approachable, and include some images and figures as needed.

@erinlynmclean This is largely out of date and you have been working on web page updates. However, I am not closing the issue since there may be some elements that are worth considering. Please review and either close or integrate pieces into new issues you are building.


Differentiate between implicit any and explicit any in the Compiler API.

Search Terms

"Differentiate between implicit any and explicit any in the Compiler API."

Suggestion

Working with the compiler API I've noticed the type checker doesn't differentiate between any originating from a decision by the author and a default case by the compiler.
In an internal branch I've fixed this by adding a new field to ts.TypeFlags and a new intrinsic type which is any with the flag added. I'm happy to upstream my implementation if this is accepted.
Use Cases

function hello(a, b) {}

function world(a: any, b: any) {
  const c = b;
}

In the current version of TypeScript these 2 methods take identical arguments and can't be differentiated by the signatures alone. Adding explicit any to the compiler allows tools to distinguish these.
I've found this modification particularly valuable when utilizing the type checker for tools that analyse the output of the compiler. An example I've been using this for internaly is calculating the explicit type coverage of TypeScript code which could otherwise not be done.
Examples

    if (ts.isIdentifier(node)) {
      const type = this.checker.getTypeAtLocation(node);
      if (type.getFlags() & ts.TypeFlags.Any &&
           !(type.getFlags() & ts.TypeFlags.Explicit)) {
        this._untypedIdentifiers += 1;
      } else {
        this._typedIdentifiers += 1;
      }
    }

With the compiler change it's now possible to exclude explicit any from type coverage calculations.
Checklist
My suggestion meets these guidelines:

[x] This wouldn't be a breaking change in existing TypeScript / JavaScript code
[x] This wouldn't change the runtime behavior of existing JavaScript code
[x] This could be implemented without emitting different JS based on the types of the expressions
[x] This isn't a runtime feature (e.g. new expression-level syntax)

I would very much like this to be added.


Question: How do I find out the current WSL version?

Your Windows build number:  (Type ver at a Windows Command Prompt)
C:\Users\mtrinidad> ver
Microsoft Windows [Version 10.0.16193.1001]

Just would like to find  out what's my current WSL version. At the same time, If need to rebuild WSL every time after I do my Windows Insider Build upgrade??
See our contributing instructions for assistance.

What do you mean by WSL version?  The parts that Microsoft develops are tied to Windows builds, so if you're talking about the lxcore driver, bash.exe, etc it's the same version you have above.
You do not need to reinstall WSL every time you do a build-to-build upgrade.  If you run into issues after upgrade it's a bug and please report it here.

Great!!  Thanks for the information.
:)


[Explore] when changing column in filters, filters retain previous value or operation

In explore, if we add a filter, save, open to edit and change the column, value or operation stays the same - even though it shouldn't. There are two cases that I was able to find and as I think they are related they are documented in this bug report.
How to reproduce the bug
Operation stays the same

Create a filter in Explore and save it
Open the filter you created and change the column
See error: operation from the previous column is selected and added to the drop down

Value stays the same

Create a filter in Explore and save it
Open the filter you created and change the column
Do not change value or operation - value should seem empty
Save filter
See error: Filter retains value from the previous filter that was applied

Expected results
Operations and value should be cleared when user changes the column if the operation or value is not relevant/available. If operations/values fields are empty button should be grayed out.
Actual results
Operations and/or value are not cleared when user changes the column. Operation is added to the dropdown even though it shouldn't be available. Value seems empty, but the previous one is retained.
Screenshots
Operation stays the same
https://user-images.githubusercontent.com/36897697/140500135-7bc02141-8976-4ef1-8e90-9f00f1f18354.mov
Value stays the same
https://user-images.githubusercontent.com/36897697/140500184-4a3e0ceb-08de-4803-b439-68986a1d181f.mov
Environment

browser type and version:
superset version: latest master
python version: -
node.js version: -
any feature flags active: -

@jinghua-qa please add test case thanks!

@kasiazjc is this still an issue? I'm kind of assuming this can be closed by now.

This is likely fixed by now, and is pretty out of date if not. If people are still encountering this in current versions (3.x) please open a new Issue or a PR to address the problem.


GLBs load with images, but GLTF files can't load images

Tested build.
https://github.com/V-Sekai-fire/VSK_model_explorer
https://cdn.discordapp.com/attachments/714269155523690587/1045043164517498910/game_windows.zip

untitled.glb.zip

donut_3_0.zip

I guess it should be bug for GLTFDocument...

Looking into this.

Added https://github.com/godotengine/godot/pull/69181.

Discussed with the project manage how this is a hacky way that can work but isn't well design as we've had problems designing a good runtime file import api.

@AllenDang Please check this is fixed.

@fire Wow! Thanks to inform me. I'll test it and feedback to you later.

As far as I know this is fixed in 4.0 stable.


Example Blog | Orion v1.0 Beta Working Example

Here is a link to a repository with a fully working example for Orion v1.0 beta testers.
I have already taken care of pulling in the v1.0 packages , and updating the example to work with the new package examples.
For anyone wanting to do beta testing . simply clone this repo , and fire up meteor.
https://github.com/rwatts3/example-blog-v1.0-beta

Thanks buddy
On Apr 17, 2015 5:48 AM, "Ryan Watts"<EMAIL_ADDRESS>wrote:

Here is a link to a repository with a fully working example for Orion v1.0
beta testers.
I have already taken care of pulling in the v1.0 packages , and updating
the example to work with the new package examples.
For anyone wanting to do beta testing . simply clone this repo , and fire
up meteor.
https://github.com/rwatts3/example-blog-v1.0-beta
—
Reply to this email directly or view it on GitHub
https://github.com/orionjs/orion/issues/108.

Im am using to much joy, but I cant seem to upload images!

@maxfinnsjo  what package are using s3 or local packages?

If you use s3 there is a new configuration

i use s3 have put in api key, secret and bucket name, from user ami of aws account in admin..  but gives "Error": in console when trying to upload selected image file

@maxfinnsjo
Would you submit a new issue.  Add the error code , and mention me in the issue.  This initial issue is seperate from the issue you're having.


[develop] Documentation for ledger eco-system

Summary

updated README.md linking to developer notes
added CONTRIBUTING.md with high level steps for updating the eos ledger app
added Developer Notes with overview of tasks and links to online reasources
added Guide on How to Run tests with Ragger, incl building Ragger from source
added Guide on setting up and installing Speculos Emulator
added notes on setting up python virtual env and building out ledger blue toolset

resolves https://github.com/eosnetworkfoundation/ledger-app/issues/42

@xchapron-ledger could you review these documentation updates. Thank you in advance

@ericpassmore Is it ok for you if I merge it or do you want to add some more change?

@ericpassmore Is it ok for you if I merge it or do you want to add some more change?

ok to merge. Thank you!


unable to build docker images using promu

What did you do?
git clone https://github.com/vigneshkumar2016/postgres_exporter.git
cd postgres_exporter

apt install golang-go
go version

make build

./postgres_exporter --help

wget https://github.com/prometheus/promu/releases/download/v0.15.0/promu-0.15.0.linux-amd64.tar.gz
tar -zxvf promu-0.15.0.linux-amd64.tar.gz

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

cat /etc/apt/sources.list.d/docker.list

apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

promu-0.15.0.linux-amd64/promu crossbuild -p linux/amd64 -p linux/armv7 -p linux/arm64 -p linux/ppc64l

1.21-base: Pulling from prometheus/golang-builder
Digest: sha256:37fb5c269dbc2d79e2e5173c84d81cd309a04801082705352cca418cc16a3126
Status: Image is up to date for quay.io/prometheus/golang-builder:1.21-base
quay.io/prometheus/golang-builder:1.21-base
> running the base builder docker image
5d29afeafa83c67ba6d0f448bd5b4c734df30a54baa297a7fa84d413bb821a9c
Successfully copied 41MB to promu-crossbuild-base1708999491-0:/app/
# linux-amd64
curl -s -L https://github.com/prometheus/promu/releases/download/v0.15.0/promu-0.15.0.linux-amd64.tar.gz | tar -xvzf - -C /tmp/tmp.gJQcQYfxjI

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
make: *** [Makefile.common:238: /go/bin/promu] Error 2
!! The base builder docker image exited unexpectedly: exit status 2

What did you expect to see?
I was expecting to build docker images.
What did you see instead? Under which circumstances?
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
make: *** [Makefile.common:238: /go/bin/promu] Error 2
!! The base builder docker image exited unexpectedly: exit status 2

System information
No response
Prometheus version
No response
Prometheus configuration file
No response
Alertmanager version
No response
Alertmanager configuration file
No response
Logs
No response

It looks like the curl command does not work. Can you try to run it alone,, without -s?


CSP script-src violations

I try to implement Content Security Policy on a game written using Phaser.js in Cordova for mobile.
I have my security rules set pretty ok:
Content-Security-Policy: default-src 'self';
script-src 'self' *.example.com *.google-analytics.com mc.yandex.ru;
style-src *.example.com;
img-src 'self' *.example.com;
frame-src *.example.com;
connect-src *.example.com ws://api.example.com wss://api.example.com"

Where example.com is some hosting i use to do some back-end logic and statistics.
However Chrome shows me next errors:

Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src ...
phaser.js:34155 ... phaser.js:70453
Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src ...
phaser.js:34155 ... phaser.js:70453

Here's the code:
// The accessor creates a new Signal (and so it should only be used from user-code.)
    Object.defineProperty(Phaser.Events.prototype, prop, {
        get: new Function("return "+backing+" || ("+backing+" = new Phaser.Signal())") //line 34155
    });
...
}).call(this); //line 70453

I don't really want to use  'unsafe-eval' for script-src, especially since it is not recommended.
Please read Content Security Policy Specs for more information.

I'll get a patch in later today - I didn't realize there was a restriction.
The fix is as easy as changing the evals into closures, but that was me trying to be clever and not have the enclosing scope closed over - "don't ask".

I'll get a patch in later today - I didn't realize there was a restriction.
The fix is as easy as changing the evals into closures, but that was me trying to be clever and not have the enclosing scope closed over - "don't ask".

@elennaro would you mind testing the dev branch please? (you'll have to build phaser using grunt, but otherwise it should be good to go).

@elennaro would you mind testing the dev branch please? (you'll have to build phaser using grunt, but otherwise it should be good to go).

@photonstorm I've got the build from dev branch. And here I see:
Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src ... phaser.js:34267 phaser.js:70574
Here's the code
 // The accessor creates a new Signal (and so it should only be used from user-code.)
    Object.defineProperty(Phaser.Events.prototype, prop, {
        get: new Function("return "+backing+" || ("+backing+" = new Phaser.Signal())") //Here's the error it's line 34267
    });
...
}).call(this); // Line 70574

According to CSP spec 1.1 <IP_ADDRESS> script-src:

If 'unsafe-eval' is not in allowed script sources:
Instead of evaluating their arguments, both operator eval and function eval ECMA-262 MUST throw a SecurityError exception. DOM4

So sorry, no luck with this approach.

Great stuff, thanks. I'll close this off once I've checked a few more things.