samsinnamon / airtouch4pyapi

An api allowing control of AC state (temperature, on/off, mode) of an Airtouch 4 controller locally over TCP
MIT License
27 stars 14 forks source link

Current Set & Actual Temps #1

Closed noobydp closed 3 years ago

noobydp commented 3 years ago

Hi @LonePurpleWolf , I have several ITC sensors and I'd like to be able to get the status, current actual temp, and set temp reported for each zone.

The background behind this is: I'm not happy with how the AirTouch heats & cools. I find during summer it will cool my rooms to their set temps (using the ITC), but then instead of shutting down it simply dumps cold air into the spill zone. This means my spill area gets really cold, and the unit uses a lot of power. I was thinking that I could use automations to check the active zones set vs actual temps, and if they're all within a threshold, switch the AC into Fan (Fresh) mode.

I setup Home Assistant just to try to get this working :), I also have NodeRed setup which I might use to handle some of the complex logic.

I'd love to contribute, but I my skills are really basic and I can barely understand how this works :(

samsinnamon commented 3 years ago

@noobydp Hi! That sounds awesome - I have noticed the exact same behaviour and would love to do the same thing - for me, it's particularly bad at night - sometimes I'll wake up and the bedrooms will be nice and cool and the lounge room will be 14 C or something ridiculous.

You'll be super excited to know, the temp data you get back as part of this/the home assistant integration is actually down to 0.1 C - even though the base station only reports in whole degrees, it seems like the sensors are capable of more fine grained control.

I totally get your frustration at the fact that this isn't available yet. Until it is merged into HA core however, you are welcome to check out my branch, and copy all the files over the files in your home assistant installation - that should just 'magically work'. I have a fair few changes I want to make, but have been waiting until the initial PR gets merged before making them, so as to not muddy the waters.

The way this repo works is pretty basic - the main 'trick' are the 'maps' for different messages - it magically transforms a 'map' for a message into an object that has the things in the map as properties - so to use/enhance things we can just look at the different properties. All the info you're looking for for your usecase should be already accessible, but if there's any enhancements your keen to make, let me know

noobydp commented 3 years ago

Ok that's great thanks! I did some basic tests but didn't see the temp info.

I had an idea yesterday that I could use NodeRed with a PID plugin to do all of the flow levelling per room. (I was triggered because my room was hotter than the set point but the duct wasn't open much!!)

Anyway I'll test I out and let you know how I go. I'll start with a python module in nodered to see if I can bypass home assistant.

I did install the module manually in HA/HACS but I couldn't figure out what to do next. It didn't show up as a device.

samsinnamon commented 3 years ago

@noobydp in HA, once you've moved the files into the appropriate locations, you then have to go to the Integrations page and click add - you should then see AirTouch 4 in the list of integrations you can add. After that, you just need the local IP address of your AT4 controller and it should pull in all the groups (and associated temp data)

t1mb0 commented 3 years ago

Hey @LonePurpleWolf - jumping on here as I too have the exact same issues with my spill zone. So much so I'm actually contemplating setting up a zone to loop air back into the intake as an 8th zone in my place (there is an option to setup a spill zone this way).

Have spoken to the Airtouch developers and there is actually a fair amount going on in the background. Apparently their system attempts to keep track of how long it takes zones to get to set temperature, and does some quasi AI to mange temps, system setpoints and zone dampers based on this logic.

Lastly - I scraped your code and whacked it into a separate repo to work with HACS.
A nice way to get all of your hard work out in the wild (and makes it easier for people to setup, manage updates etc etc). https://github.com/t1mb0/airtouch4 -- have a read of https://github.com/t1mb0/airtouch4/issues/1 whilst you're there :-)

Cheers,

Tim

samsinnamon commented 3 years ago

Hey @LonePurpleWolf - jumping on here as I too have the exact same issues with my spill zone. So much so I'm actually contemplating setting up a zone to loop air back into the intake as an 8th zone in my place (there is an option to setup a spill zone this way).

Have spoken to the Airtouch developers and there is actually a fair amount going on in the background. Apparently their system attempts to keep track of how long it takes zones to get to set temperature, and does some quasi AI to mange temps, system setpoints and zone dampers based on this logic.

Lastly - I scraped your code and whacked it into a separate repo to work with HACS. A nice way to get all of your hard work out in the wild (and makes it easier for people to setup, manage updates etc etc). https://github.com/t1mb0/airtouch4 -- have a read of t1mb0/airtouch4#1 whilst you're there :-)

Cheers,

Tim

Thanks for doing this @t1mb0 - hopefully we can work out a way to do that that doesn't require two separate sets of the code (or alternatively, can just get the PR approved!)

noobydp commented 3 years ago

@t1mb0 installing the bypass is a good idea that I hadn't considered.

I think the underlying issue is the return air sensor is being affected by the ambient temp (in the roof space I assume). Mine could report 27c return temp when the spill zone is reporting 20c.

I'll investigate more and let you both know what I find.

As or the temp balancing, it's definitely complicated, but not some kind of voodoo magic (I'm being an *** (I read other forums that described their dev team as difficult and unhelpful).

They probably use a PID controller/code to control the AC unit based on desired temp and actual temp response to changes. https://en.m.wikipedia.org/wiki/PID_controller