@bignacho I have an AirTouch 2+ and am familiar with software development. I’d love to help test it and contribute in any other way that the community would deem valuable.
Me too, on both job and having an AirTouch 2+
I’ve just created a Swift package to communicate with an AirTouch 2+ unit.
I’m hoping someone else can somehow leverage this into working for Home Assistant, but I’m not yet sure of the best way to bridge this code with Home Assistant.
I’ll see if I can figure out how to build and run it to test. What languages does HA support for plugins?
You’ve beaten me to implementing the spec - nice work. My python library is almost done I’ll post the code soon with a test python script for someone with the system to test.
So I’ve pushed an experimental at2plus branch to my github: GitHub - nathanvdh/airtouch2-python at at2-plus-support
It requires Python >= 3.10 due to some new syntax for type checking that I’m using.
I’ve made a simple test program that should print out the state of your aircon(s) as it updates.
It’d be great if someone could test it out.
First run pip install -e .
from the project root (location of pyproject.toml)
Then run the test_programs/at2plus_test.py
script from the source directory. Let me know how it goes (I have no expectation for it to work at first…) by replying to this issue: Support airtouch2+ · Issue #6 · nathanvdh/airtouch2-python · GitHub
Usual speel about no warranty provided or liability for damages, I am not responsible if stuff catches fire, explodes or the world ends.
I have uploaded a newer version of the api hopefully it helps
Great to see movement on this! Especially leveraging existing Python, or other languages. I’ll try give them a test.
My Node-RED flow was never really going to be a slick solution, but these have potential.
I’m still going to try finish it anyway, as it’ll be useful as a proof-of-concept ‘lite’ solution. I haven’t done much bitwise stuff before so takes a bit to build momentum when I can get time amongst life, work and family.
I’ve made a first attempt at an integration now. Don’t expect it to work well, I would be grateful for people to test it and report any issues here: Airtouch 2+ support · Issue #8 · nathanvdh/homeassistant-airtouch2 · GitHub.
If you add my airtouch2 repo to HACS and enable the ‘show beta versions’ box you should see it as at2plus.beta.1. The integration should appear in the list as ‘airtouch2plus’.
Might just be me however when I install your beta version (at2plus.beta.1) I still only see airtouch2 in the integrations (not airtouch2plus)?
Ah HACS integration repos can only have 1 integration per repo. I thought I could have them both in the same repo but apparently not: Integrations | HACS
Okay just made a separate repo - try using this: GitHub - nathanvdh/homeassistant-airtouch2plus: Custom component integration for Polyaire Airtouch 2+, you will need to enable ‘show beta versions’.
Thanks! That worked however when I enter the IP of my airtouch2+, I get “unknown”.
Is there anything in the logs? If not, could you please enable debug logs for the integration and try again.
Yes, sorry.
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.11/site-packages/airtouch2/common/NetClient.py”, line 110, in _main
await self._handle_message()
File “/usr/local/lib/python3.11/site-packages/airtouch2/at2plus/At2PlusClient.py”, line 65, in handle_one_message
subheader = ControlStatusSubHeader.from_buffer(message.data_buffer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/airtouch2/protocol/at2plus/control_status_common.py”, line 77, in from_buffer
return ControlStatusSubHeader.from_bytes(buffer.read_bytes(CONTROL_STATUS_SUBHEADER_LENGTH))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/airtouch2/common/Buffer.py”, line 54, in read_bytes
raise BufferError(“Cannot read from incomplete buffer”)
BufferError: Cannot read from incomplete buffer
Awesome thanks for getting back quickly. Just released a new version, can you please try it.
Woo! That worked… I now have the integration but, no entities? What is the expected behavior?
Ah, entity has just showed up however received the following error just came up in my notifications
Unable to prepare setup for platform airtouch2plus.fan: Platform not found (No module named ‘custom_components.airtouch2plus.fan’).
I can change the mode and temp but can’t turn the device on/off.
Ah, because this was a bit of a copy-paste job from the original airtouch2 integration I accidentally left the fan platform in (I’m using that for zones in the other integration). Will remove it.
Good to hear some of it’s working. It’s not immediately obvious to me why on/off wouldn’t be working - is there any related logs?
I’d appreciate any debug logs you could give me - enable them by editing your configuration.yaml:
# Logging setup
logger:
default: warning
logs:
custom_components.airtouch2plus: debug
airtouch2.at2plus.At2PlusClient: debug
airtouch2.common.NetClient: debug
This should enable pretty verbose logging about the integration.
Thanks! That fixed the error in notifications. I have enabled the logs but nothing new has shown up.
I’ve got a new issue now where I can click between the modes (and it switches on the airtouch2+) but doesn’t reflect on Home Assistant (i.e. mode remains static on the thermostat card on the dashboard)
The useful logs will probably only be in the home-assistant.log file the config directory. You can email it to me at [email protected] if you like, as it may have a lot of information about your home in it. You could filter out only things with “airtouch2” if you don’t want to share the whole thing with me.