nathanvdh / homeassistant-airtouch2plus

Custom component integration for Polyaire Airtouch 2+
12 stars 2 forks source link

Sort of works #1

Closed ozhound closed 1 year ago

ozhound commented 1 year ago

THis only partially works

Working

  1. All functions on the climate card work and are reflected in the app. its very quick to update
  2. Temperature change working.

Not Working

  1. Power off/on doesnt do anything the unit doesnt change state - Edit - it will turn the unit off but not on.
  2. the climate card doesnt update to reflect the last change and reverts pretty much insantly, not giving the user feedback as to the current settings
nathanvdh commented 1 year ago

@ozhound can you please try Beta 5

ozhound commented 1 year ago

@nathanvdh i have updated to that version

there is no change.

Line 37058: 2023-08-08 09:49:25.612 WARNING (MainThread) [airtouch2.common.NetClient] Connection lost, reconnecting Line 37059: 2023-08-08 09:49:38.394 ERROR (MainThread) [airtouch2.protocol.at2plus.control_status_common] Unknown message type in header (0x2b) Line 37061: File "/usr/local/lib/python3.11/site-packages/airtouch2/protocol/at2plus/control_status_common.py", line 74, in from_bytes Line 37070: 2023-08-08 09:49:38.395 ERROR (MainThread) [airtouch2.at2plus.At2PlusClient] Unknown status message type: subtype=0, data=2b:00:00:00:00:04:00:06:80:80:07:ff:81:81:07:ff:82:82:07:ff:83:83:07:ff:90:ff:02:b2:91:ff:07:ff Line 37093: 2023-08-08 09:50:08.531 ERROR (MainThread) [airtouch2.protocol.at2plus.control_status_common] Unknown message type in header (0x2b) Line 37095: File "/usr/local/lib/python3.11/site-packages/airtouch2/protocol/at2plus/control_status_common.py", line 74, in from_bytes Line 37104: 2023-08-08 09:50:08.532 ERROR (MainThread) [airtouch2.at2plus.At2PlusClient] Unknown status message type: subtype=0, data=2b:00:00:00:00:04:00:06:80:80:07:ff:81:81:07:ff:82:82:07:ff:83:83:07:ff:90:ff:02:b1:91:ff:07:ff Line 37131: 2023-08-08 09:51:38.930 ERROR (MainThread) [airtouch2.protocol.at2plus.control_status_common] Unknown message type in header (0x2b) Line 37133: File "/usr/local/lib/python3.11/site-packages/airtouch2/protocol/at2plus/control_status_common.py", line 74, in from_bytes Line 37142: 2023-08-08 09:51:38.931 ERROR (MainThread) [airtouch2.at2plus.At2PlusClient] Unknown status message type: subtype=0, data=2b:00:00:00:00:04:00:06:80:80:07:ff:81:81:07:ff:82:82:07:ff:83:83:07:ff:90:ff:02:b0:91:ff:07:ff Line 37164: 2023-08-08 09:51:58.471 ERROR (MainThread) [airtouch2.protocol.at2plus.message_common] Unknown message type in header (0x27) Line 37166: File "/usr/local/lib/python3.11/site-packages/airtouch2/protocol/at2plus/message_common.py", line 73, in from_bytes Line 37175: 2023-08-08 09:51:58.472 ERROR (MainThread) [airtouch2.at2plus.At2PlusClient] Unknown message type, header=55:55:b0:80:01:00:00:01, data=01 Line 37177: 2023-08-08 09:52:08.957 ERROR (MainThread) [airtouch2.protocol.at2plus.control_status_common] Unknown message type in header (0x2b) Line 37179: File "/usr/local/lib/python3.11/site-packages/airtouch2/protocol/at2plus/control_status_common.py", line 74, in from_bytes Line 37188: 2023-08-08 09:52:08.958 ERROR (MainThread) [airtouch2.at2plus.At2PlusClient] Unknown status message type: subtype=0, data=2b:00:00:00:00:04:00:06:80:80:07:ff:81:81:07:ff:82:82:07:ff:83:83:07:ff:90:ff:02:b1:91:ff:07:ff Line 37230: 2023-08-08 09:53:09.100 ERROR (MainThread) [airtouch2.protocol.at2plus.control_status_common] Unknown message type in header (0x2b) Line 37232: File "/usr/local/lib/python3.11/site-packages/airtouch2/protocol/at2plus/control_status_common.py", line 74, in from_bytes Line 37241: 2023-08-08 09:53:09.101 ERROR (MainThread) [airtouch2.at2plus.At2PlusClient] Unknown status message type: subtype=0, data=2b:00:00:00:00:04:00:06:80:80:07:ff:81:81:07:ff:82:82:07:ff:83:83:07:ff:90:ff:02:b0:91:ff:07:ff Line 37269: 2023-08-08 09:54:09.416 ERROR (MainThread) [airtouch2.protocol.at2plus.control_status_common] Unknown message type in header (0x2b) Line 37271: File "/usr/local/lib/python3.11/site-packages/airtouch2/protocol/at2plus/control_status_common.py", line 74, in from_bytes Line 37280: 2023-08-08 09:54:09.418 ERROR (MainThread) [airtouch2.at2plus.At2PlusClient] Unknown status message type: subtype=0, data=2b:00:00:00:00:04:00:06:80:80:07:ff:81:81:07:ff:82:82:07:ff:83:83:07:ff:90:ff:02:b1:91:ff:07:ff Line 37282: 2023-08-08 09:54:35.524 ERROR (MainThread) [airtouch2.protocol.at2plus.message_common] Unknown message type in header (0x27) Line 37284: File "/usr/local/lib/python3.11/site-packages/airtouch2/protocol/at2plus/message_common.py", line 73, in from_bytes Line 37293: 2023-08-08 09:54:35.525 ERROR (MainThread) [airtouch2.at2plus.At2PlusClient] Unknown message type, header=55:55:b0:80:01:00:00:01, data=00 Line 37316: 2023-08-08 09:55:09.916 ERROR (MainThread) [airtouch2.protocol.at2plus.control_status_common] Unknown message type in header (0x2b) Line 37318: File "/usr/local/lib/python3.11/site-packages/airtouch2/protocol/at2plus/control_status_common.py", line 74, in from_bytes Line 37327: 2023-08-08 09:55:09.917 ERROR (MainThread) [airtouch2.at2plus.At2PlusClient] Unknown status message type: subtype=0, data=2b:00:00:00:00:04:00:06:80:80:07:ff:81:81:07:ff:82:82:07:ff:83:83:07:ff:90:ff:02:b0:91:ff:07:ff

nathanvdh commented 1 year ago

@ozhound can you clone https://github.com/nathanvdh/airtouch2-python/commits/master. Run pip install -e . from inside the source directory (where pyproject.toml is). Then run pip install aioconsole. Then run the test_programs/at2plus_test.py script and see it's printing out the AC state as you change stuff. Please type in 'q' and press enter to quit the script rather than trying to Ctrl-C it.

Send me the airtouch2plus.log and all the *.dump files produced in the directory from which you ran the script.

ozhound commented 1 year ago

this might be an issue (and why its not working properly) Im using the HAOS image deployed in a container on Proxmox. There is no Python installed on the image.. Does that make sense?

nathanvdh commented 1 year ago

Home assistant is entirely written in Python... Python must be in the environment.

But I'm just asking you to run this script on any old PC on the same network as the AC.

randellmatt commented 1 year ago

I sem to have the same functionalitiy. I've only begun testing, but I definitely cannot turn on with the entity card.

Tried to run your test program to try and debug but only got this

_common.py Traceback (most recent call last): File "/home/randell/airtouch/airtouch2-python/tests/protocol/at2plus/test_control_status_common.py", line 3, in from airtouch2.protocol.at2plus.control_status_common import ControlStatusSubType, SubDataLength, ControlStatusSubHeader ModuleNotFoundError: No module named 'airtouch2'

bbigg8886 commented 1 year ago

Home assistant is entirely written in Python... Python must be in the environment.

But I'm just asking you to run this script on any old PC on the same network as the AC.

I had similar issues in HA (toggle states didn't seem to work reliably), have run the Python script - can toggle the AC on and off and it is updating successfully within the output of the script and on the wall control. Will drop you some logs for further details.

nathanvdh commented 1 year ago

Home assistant is entirely written in Python... Python must be in the environment. But I'm just asking you to run this script on any old PC on the same network as the AC.

I had similar issues in HA (toggle states didn't seem to work reliably), have run the Python script - can toggle the AC on and off and it is updating successfully within the output of the script and on the wall control. Will drop you some logs for further details.

Great news that the script works.

Probably there's some uncaught exception in the integration. Logs would be good.

@randellmatt seems like the package isn't installed.

Make sure you follow my instructions above - pip install -e . from inside the source directory will install it.

randellmatt commented 1 year ago

I did follow the instruction. However I think it installed it in a unused path. I'll have a further look today.

randellmatt commented 1 year ago

I started playing with setting up automations with the airtouch. From what I can see there is an "off" state that can be set to turn it off, but no "on" state. Changing the mode to "heat" only changes the air con mode, it doesn't turn it on.

randellmatt commented 1 year ago

Apologies. I am dumb. I have set the climate automation in the correct way to turn it on. Seems I can turn it on via automation, but not via the entity card. Awesome to have it working in some regard!

nathanvdh commented 1 year ago

Apologies. I am dumb. I have set the climate automation in the correct way to turn it on. Seems I can turn it on via automation, but not via the entity card. Awesome to have it working in some regard!

Wow that's strange! I'm interested to work out wtf is going on.

randellmatt commented 1 year ago

When the aircon unit is on there doesn't seem to be a state within the entitiy to reflect that status.

bbigg8886 commented 1 year ago

Home assistant is entirely written in Python... Python must be in the environment. But I'm just asking you to run this script on any old PC on the same network as the AC.

I had similar issues in HA (toggle states didn't seem to work reliably), have run the Python script - can toggle the AC on and off and it is updating successfully within the output of the script and on the wall control. Will drop you some logs for further details.

Great news that the script works.

Probably there's some uncaught exception in the integration. Logs would be good.

@randellmatt seems like the package isn't installed.

Make sure you follow my instructions above - pip install -e . from inside the source directory will install it.

Dropped you a note on email with the .log file from running it briefly.

nathanvdh commented 1 year ago

@bbigg8886 Yeah the logs look good. There's some unhandled messages that I already know about but the rest seems to be working. It's not crashing the program or anything.

Definitely a problem in my integration then. I've just found a mistake so can you try beta 6 now :crossed_fingers: :grimacing:

randellmatt commented 1 year ago

Just loaded the new one. The integration now knows when it is off or on. Seems to function as intended. Nice work!

bbigg8886 commented 1 year ago

Yep just loaded it up too and working now. Noooice! Thanks for your work on getting this up and running.

nathanvdh commented 1 year ago

If @ozhound confirms it's working I'll close this issue, glad it's working for you.

ozhound commented 1 year ago

@nathanvdh all good now. the power button turns the unit off but not on. however selecting a mode (heat in this case) turns the unit on

ozhound commented 1 year ago

Closing this issue as rectified