Airtouch 4 integration (AUS)

Thanks @LonePurpleWolf

I didn’t even think of extracting the component out of the pull request and adding it as a custom component - just did it and got it installed. Thanks for the suggestion!

I’m heading away for a week so will properly test once I’m back

@LonePurpleWolf this works great. Been using it for a bit now. For those interested, I have placed all the airtouch files into a custom-components/airtouch4 folder and it works great.

Do you see a way to get the % based reading for each area? Not sure how this would work with a climate entity but I have a few use cases where I would like to manually control the % open as opposed to room set point.

@jlich glad it is working for you! In regards to percents, a little further above in this thread I think someone else brought that up - the way that other climate control plugins handle this is by exposing a ‘cover’ entity for each zone which can be incremented in 5% increments. All the information and server calls to do this are mostly supported by the python plugin, so the only thing left would be to create climate entities in the AirTouch plugin…

The dev guidelines on integrations explain (i think) that if you’re adding a new integration, you should only be adding one type of entity - so I have been waiting until the initial integration request gets approved before going back in and changing it.

Another thing that I’m not happy with is that I’ve put the climate controls (eg. hot, cold) on each zone, however with AT4 the climate control setting is actually at the AC level - so I’d like to give the option to people to have an AC entity as well to handle the climate setting and then control the temps/percents on the individual zones. But again I have held back in the interests of getting the pull request approved.

I’m interested in any update for this.

I tried copying the files (via VScode) into the Config folder as suggested, but no-go. (I assume seeing I can’t download the files in the normal way it is copy from raw into VSC and then save???)

Are there any mods required - IP address etc???

I got this integration working. It’s great, thank you for all the hard work. It would be great if there was an entity for the fan speed and mode. Leaving each zone as a temp and zone control.

It took me a bit to work out what to do once I had added the files as a custom_component. It was as simple as selecting +Add Integration from the configuration/intergrations screen.

1 Like

I copied the 5 files from https://github.com/LonePurpleWolf/airtouch4pyapi, thanks @LonePurpleWolf !

__ini __.py
airtouch.py
communicate.py
helper.py
packetmap.py

into custom_components/airtouch4

But it didn’t add an option to add integrations.

Could anyone point me in the right direction here… i’m pretty new to this. Just got my air con installed and I’d love to get the home assistant side of it working. I’m hoping to be able to log oom tempeatures as well as use automations and generally just have my entire house run of home assistant.

Eventually planning to run the HA UI on the airtouch controller so i can controll the entire house from the tablet as well as phone.

Hi @mike12378912, that repository is just the python API for the airtouch integration - the files that you would need are from the airtouch4-integration branch here https://github.com/LonePurpleWolf/core/tree/airtouch4-integration - not too sure about exactly what’s required for the custom_components route, as I just copied all the files over the top of my home assistant installation and it works as expected - in my pull request above you can see exactly what files are changed, which should point you in the right direction if you want to go down that road.

1 Like

I got it working - just needed to restart everything a couple of times and after a software update it appeared.

There is a blank “welcome” screen that I guessed (correctly) wanted the IP address of the Airtouch4 console.

I now have this linked into a ventilation system I installed. When it is not hot enough for the air-con I turn on relays that open a powered damper and turn on a 450mm fan in the ceiling to draw cool air into the house. The automation looks at the current temp from the Airtouch4 thermostat in the bedroom and if the temp goes below a desired level, it uses a Sonoff bridge and turns off the fan and closes the damper.

Well I’ve made a little progress… but I really have no idea what I’m doing. Copying the main integrations as well as the pyapi… didn’t turn up in integrations for a few restarts…

Had issues connecting to the airtouch tablet, however that was because I had set a local password on the wifi via the tablet, which once I turned off, connected fine… (couldn’t work out where to put a password in home assistant anywhere so leaving it without for now)

It will show zones, and temperatures… i can turn zones on by just amending the temperatures, they turn on…

but turning the main system on/off or the zone isn’t working on my implementation, and the overall modes are duplicated on every zone, though they do seem to work… i’d prefer just a control for the aircon and just the ability to change zone temperatures.

Anyone who is currently using the integration - As its been brought up by a few people on here I have reworked the way the integration works to separate out the ac and group functionality - it behaves a bit closer to the airtouch 4 tablet now, so hopefully more in line with what people are expecting - Still no support for percentages yet (that one will take a bit of doing). If anyone is keen to help test this (even more) experimental version, its available on the airtouch4-integration-2 branch in my forked repo (https://github.com/LonePurpleWolf/core/tree/airtouch4-integration-2)

Great update. The only issue I’ve found is the AC0 state.

When I installed the update the AC0 showed as Off. When changed to Cool the AC turned on. I then turned the AC off at the controller however the AC0 state in HA still shows a Cool

On a HA restart updated it back to Off

I’ve had a bit of a try and I can’t reproduce this behaviour - does it consistently happen for you? Could the airtouch or your wifi be misbehaving?

My network is rock solid. The issue I’m seeing is repeatable.

The zones update (after sometime) when turned on and off via the app and console. However I’m not seeing a AC0 update when changed outside of HA.

Running Version core-2021.2.3c
Airtouch 4 added as a custom component

I installed the update, and can confirm I have the same issue as Jason.

Any changes on the console / app don’t seem to propagate through to HA AC0. All other changes do, however takes up to 60 seconds to update the HA side.

Any changes on HA on AC0 are sent to the console and executed and updated on the console side immediately.

That being said its a big step forward in other respects. I can now turn off and on all zones with HA which I couldn’t before.

While I can’t appreciate how difficult it is to make changes, a single button to toggle the zone would be preferable to two separate buttons (power button for off and a recycling (?) button to turn it on).

Big thanks for all your work!

Edit: Just noticed you updated a line of code in the last 20 minutes and it works now. Though still with upto about a 60 second delay. I guess it just poles every minute.

Yeah @t1mbo gave me a stacktrace and apparently that fixed his issue. It does just poll - as far as I know, there’s no subscription mechanism provided by airtouch through their TCP API - the polling strategy is in line with alot of other integrations for HA - the polling period is also controlled (to a certain degree) by HA itself. The buttons on the climate control correspond to something called a ‘hvac mode’ - the multiple buttons/states is again, consistent with how other climate integrations with similar architectures work - I suspect that at the service/automation level, having distinct modes will be more helpful as well.

Hi Sam

What is a stacktrace?

@mycrouch sorry, its just programmer-speak for a log (eg from home assistant) that includes a list of the methods that were running at the time that something breaks - like this https://github.com/t1mb0/airtouch4/issues/1#issuecomment-780314240
- it was helpful in this case because I wasn’t experiencing the issue (turns out I had accidentally fixed it locally and had not published it!)

Ok. So if we pull that repo again it should be right?

Thanks for all your work on this, it’s greatly appreciated.

hopefully - fingers crossed! If you do run into the error again (or any others), if you can find any errors in your home assistant log that look related it would greatly help me track it down!

No worries, I am excited to be able to contribute (been wanting to get involved in an open source project for a while!) - I just wish that the HA core repo owners would move it along! hopefully once we get it in, we’re able to all keep working to improve it (and improvements should be easier to get in than a brand new integration!) :slight_smile:

Latest update resolved it. Thanks again.