Closed gogreenpower closed 1 year ago
What brand is your ac unit?
Fujitsu
Hm so is mine - will have to investigate, likely with some help from you.
No worries, just let me know what your need
I forked the repo and have found a working combination.
ACFanSpeed.AUTO: FAN_AUTO,
ACFanSpeed.QUIET: FAN_LOW,
ACFanSpeed.LOW: FAN_MEDIUM,
ACFanSpeed.HIGH: FAN_HIGH,
This updates my AT2 unit correctly.
The original setup was doing this:
AUTO and HIGH combos worked correctly. Not sure if its my Fujitsu unit, I'll try and find the docs and check model numbers and if I can't, I'll climb into the roof
edit: code tags
The problem seems to be that you don't have a 'quiet' fan speed. The values sent to the airtouch for fan speed are:
AUTO = 0
QUIET = 1
LOW = 2
MEDIUM = 3
HIGH = 4
And it seems that with 'quiet' missing, your values are offset by 1 i.e.
AUTO = 0
LOW = 1
MEDIUM = 2
HIGH = 3
so you can see where the problem is.
I'll have to see if there's a way to determine what modes a particular airtouch system supports. It must be there if everything displays and works correctly in the airtouch2 app but it hasn't been documented for airtouch2 or 3. It has for airtouch4, see here: https://github.com/LonePurpleWolf/airtouch4pyapi/blob/main/airtouch4pyapi/packetmap.py
But yeah I'm probably going to need to get a dump of the response message your airtouch unit is sending to work it out. If you have an android phone can you please force close the airtouch2 app then install 'PCAPdroid' and set it to dump to a PCAP file, set the target app to the airtouch2 app. Then just open up the app. Upload the file for me. Alternatively I can probably update my airtouch2 python client to save the response somewhere for you.
Before doing that can you confirm that the quiet speed is missing/greyed out in the app for you?
I'm happy to roll with what you have done. No need to do all this for just me. I'll grab those dumps anyway just in case others find the same issue.
I'm happy to roll with what you have done. No need to do all this for just me. I'll grab those dumps anyway just in case others find the same issue.
Yes please do it anyway. There is likely a bunch of information about things that supported or not so it will help solve similar issues in future
Here is the capture. I cycled though the fan speeds
The file is not public, I cannot access it.
The file is not public, I cannot access it.
Try now
All good thanks
I'm experiencing the same issue on AirTouch2 controller connected to Mitsubishi Electric Ducted Aircon unit
I'm experiencing the same issue on AirTouch2 controller connected to Mitsubishi Electric Ducted Aircon unit
Would you be able to produce the same dump for me, as I described above? The more I have from different people/units, the easier it is to reverse engineer.
Sure, Im iPhone user. How can I create a dump for you?
Same issue with my Dakin unit. I only have low medium and high speeds
Sure, Im iPhone user. How can I create a dump for you?
I've now added a way to dump the response from my python client. So you'll need to:
pip3 install airtouch2
in a terminal/command windowpython3 test.py
(probably py test.py
on windows)q
and press return to quit the test program. It should have created 2 files: airtouch2.log and last_response.dump.2022-09-28 21:38:47,892 Thread-1 (_handle_incoming) DEBUG: Received new valid response
2022-09-28 21:38:47,893 Thread-2 (_main_loop) DEBUG:
System Name: NATHANVDH
AC Name: Fujitsu
On: True
Status: 8
Mode: HEAT
Fan Speed: AUTO
Ambient Temp: 19
Set Temp: 19
Manufacturer: FUJITSU
Same issue with my Dakin unit. I only have low medium and high speeds
Could you also produce a log and dump as I described above, the more data I have the easier it will be to support more systems.
Same issue with my Dakin unit. I only have low medium and high speeds
Could you also produce a log and dump as I described above, the more data I have the easier it will be to support more systems.
Just sent mate.
Manufacture is detected as “none” sent you the logs with a photo of the AirTouch unit showing Daikin
Sure, Im iPhone user. How can I create a dump for you?
I've now added a way to dump the response from my python client. So you'll need to:
- Go to a computer
- Install python3
- Run
pip3 install airtouch2
in a terminal/command window- Download test.py from here (right click 'Raw' -> save link as test.py)
- Open a terminal/command window and run
python3 test.py
(probablypy test.py
on windows)- Just type
q
and press return to quit the test program. It should have created 2 files: airtouch2.log and last_response.dump.- Check the airtouch2.log contains something like:
2022-09-28 21:38:47,892 Thread-1 (_handle_incoming) DEBUG: Received new valid response 2022-09-28 21:38:47,893 Thread-2 (_main_loop) DEBUG: System Name: NATHANVDH AC Name: Fujitsu On: True Status: 8 Mode: HEAT Fan Speed: AUTO Ambient Temp: 19 Set Temp: 19 Manufacturer: FUJITSU
- Tell me what it says your 'manufacturer' is and what your manufacturer really is (I know these are totally wrong at the moment apart from a couple)
- Send me both airtouch2.log and last_response.dump (you can email them to me at nathanmvdh@gmail.com if you don't want to post it publicly here - it will contain all your zone names and system name and stuff).
Sent you the log and dump file.
Just an update: I've assumed I am looking for a single 'bit' (1 or 0) in the airtouch 2 response message that indicates if the aircon supports the quiet fan speed or not (I could be wrong). Looking at the difference between my dumps and the ones I've received so far there are 3 possible bits (that are 1 for me and 0 for all of you) - 2 of them are in the 2 bytes immediately after the constant header, I don't know what these bytes are but it seems unlikely to me this fan speed information would be stored so soon in the message (I could be wrong). This leaves 1 remaining bit - the 5th bit after 0x124 so for now I'm just going to implement checking that. It will fix the issue for all of you and if I'm wrong then someone in the future will find out :) and hopefully let me know.
I've been very busy with uni but done now. NoirElec's dump disagrees with the rest of them and the 2 bytes after the header actually seem to change (my most recent dump from my own unit doesn't match the last one much at all), so I've got no idea now. I might just add a config entry that makes you specify if the unit supports Quiet mode or not.
Okay I've been looking in the wrong places and can't believe it's taken me this long, but I'm pretty sure I've found it now. The only issue is that your dump, @ruaandeysel, seems to indicate your AC has 4 fan speeds (like mine) whereas everyone else's only has 3 (low, med, high). Are you sure you don't have a 4th fan speed? Likely either Quiet/diffuse like mine is or perhaps a turbo mode?
Okay I've been looking in the wrong places and can't believe it's taken me this long, but I'm pretty sure I've found it now. The only issue is that your dump, @ruaandeysel, seems to indicate your AC has 4 fan speeds (like mine) whereas everyone else's only has 3 (low, med, high). Are you sure you don't have a 4th fan speed? Likely either Quiet/diffuse like mine is or perhaps a turbo mode?
Here's screenshot
Okay I've been looking in the wrong places and can't believe it's taken me this long, but I'm pretty sure I've found it now. The only issue is that your dump, @ruaandeysel, seems to indicate your AC has 4 fan speeds (like mine) whereas everyone else's only has 3 (low, med, high). Are you sure you don't have a 4th fan speed? Likely either Quiet/diffuse like mine is or perhaps a turbo mode?
Screenshot of the AirTouch app.
Okay thanks, so you have an extra 'powerful' mode. Can you tell me exactly how my current integration sets the fan speeds for you? Go through and use home assistant to set it to auto, diffuse, low, medium, high and tell me what each one actually sets on your AC. Thanks.
@ruaandeysel ^
Okay thanks, so you have an extra 'powerful' mode. Can you tell me exactly how my current integration sets the fan speeds for you? Go through and use home assistant to set it to auto, diffuse, low, medium, high and tell me what each one actually sets on your AC. Thanks.
Here you go:
HA AC Auto = Auto Diffuse = Low Low = Medium Medium = High High = Power
Also do not have quiet setting PCAP
Hi Noir, would you be able to give me some more info? What brand is your unit and what fan speeds does it support?
@gogreenpower @ruaandeysel @TETZUO @NoirElec @DmitryNefedov
Can you all please enable betas for the repo and download the new 0.3.beta1 version of the integration. Can you test if your fan speeds are correct now and let me know if you experience any warnings/errors in the logs or other issues.
@gogreenpower @ruaandeysel @TETZUO @NoirElec @DmitryNefedov
Can you all please enable betas for the repo and download the new 0.3.beta1 version of the integration. Can you test if your fan speeds are correct now and let me know if you experience any warnings/errors in the logs or other issues.
@nathanvdh Thank you for releasing this beta version. I installed it and all the fan speeds are working fine now for me.
@gogreenpower @ruaandeysel @TETZUO @NoirElec @DmitryNefedov @nathanvdh Can you all please enable betas for the repo and download the new 0.3.beta1 version of the integration. Can you test if your fan speeds are correct now and let me know if you experience any warnings/errors in the logs or other issues.
@nathanvdh Thank you for releasing this beta version. I installed it and all the fan speeds are working fine now for me.
Tested and the only issue I found is with my unit I only have low, med and high.
If I am in a mode like low then select auto, any option I select after that will always revert to the option I selected before auto mode which is this case was low.
Out side of that the mappings are working correctly
@gogreenpower @ruaandeysel @TETZUO @NoirElec @DmitryNefedov
Can you all please enable betas for the repo and download the new 0.3.beta1 version of the integration. Can you test if your fan speeds are correct now and let me know if you experience any warnings/errors in the logs or other issues.
Working for me too, great job.
Tested and the only issue I found is with my unit I only have low, med and high.
If I am in a mode like low then select auto, any option I select after that will always revert to the option I selected before auto mode which is this case was low.
Out side of that the mappings are working correctly
Are you saying you don't have an auto fan speed at all on your airtouch?
When you say it 'will always revert' do you mean just on the home assistant display or truly on your airtouch - e.g. you are watching it on the touch panel or in the app.
Can you please cycle through modes and describe what happens both in home assistant, and also what actually happens to your airtouch. Also are there any errors or warnings in the log, thanks.
Tested and the only issue I found is with my unit I only have low, med and high. If I am in a mode like low then select auto, any option I select after that will always revert to the option I selected before auto mode which is this case was low. Out side of that the mappings are working correctly
Are you saying you don't have an auto fan speed at all on your airtouch?
When you say it 'will always revert' do you mean just on the home assistant display or truly on your airtouch - e.g. you are watching it on the touch panel or in the app.
Can you please cycle through modes and describe what happens both in home assistant, and also what actually happens to your airtouch. Also are there any errors or warnings in the log, thanks.
Yes only 3 speed as per the photo.
And yes it reverts on both HA and the panel(so the fan speed physically changes) but it only happens after I select auto.
I also have no errors reported.
Here is a video showing everything working fine until I select auto.
Thanks. I thought there was always an auto mode, I guess not. Seems like I'm not done with this just yet...
Yes only 3 speed as per the photo.
And yes it reverts on both HA and the panel(so the fan speed physically changes) but it only happens after I select auto.
I also have no errors reported.
Here is a video showing everything working fine until I select auto.
When you do medium->auto->low->(automatic back to) medium Do both those final ones actually change on your aircon? Do you see on the panel/app that it quickly goes from low to medium? Or does it just get stuck on medium (in this scenario) once you've tried to set auto?
Yes only 3 speed as per the photo. And yes it reverts on both HA and the panel(so the fan speed physically changes) but it only happens after I select auto. I also have no errors reported. Here is a video showing everything working fine until I select auto. https://youtube.com/shorts/3FuxNCbT1mw?feature=share
When you do medium->auto->low->(automatic back to) medium Do both those final ones actually change on your aircon? Do you see on the panel/app that it quickly goes from low to medium? Or does it just get stuck on medium (in this scenario) once you've tried to set auto?
Yes they actually do change on the aircon.
The panel and app all change
Okay thanks for that. I really have no idea why that would happen, does changing it from the panel/app after you've tried setting auto in home assistant yield the same behaviour?
It doesn't really matter, though. All I'm going to do now is identify if units actually support auto mode or not, so the fix will be just to not give you the auto button.
Ok sorry to ping you all again but: @gogreenpower @ruaandeysel @TETZUO @NoirElec @DmitryNefedov
I've put out a beta2 update that (at least tries to) detect support of an auto fan speed mode, can you all test again to make sure I haven't broken anything (and Pete/tetzuo make sure you no longer have the auto option).
It's been very painful because this information is not conveyed in the airtouch2 communications - auto and fan speed support is literally hard coded in the airtouch app based on the ac brand, gateway and number of speeds. I'm trying to reverse engineer all the rules by decompiling the app and reading through the Smali bytecode but it's not fun. Hopefully this fixes everything for you guys and if someone else discovers problems, I'll cross that bridge when I come to it.
Ok sorry to ping you all again but:
@gogreenpower @ruaandeysel @TETZUO @NoirElec @DmitryNefedov
I've put out a beta2 update that (at least tries to) detect support of an auto fan speed mode, can you all test again to make sure I haven't broken anything (and Pete/tetzuo make sure you no longer have the auto option).
It's been very painful because this information is not conveyed in the airtouch2 communications - auto and fan speed support is literally hard coded in the airtouch app based on the ac brand, gateway and number of speeds. I'm trying to reverse engineer all the rules by decompiling the app and reading through the Smali bytecode but it's not fun. Hopefully this fixes everything for you guys and if someone else discovers problems, I'll cross that bridge when I come to it.
Updated and still working fine 🙂
Hey mate the fan speeds are correct but if I change the speeds the speed automatically goes back to the first speed HA saw after the update.
Also the unit operation keeps turning off the AC in HA which is replicated to the panel.
Video for reference
Hey mate the fan speeds are correct but if I change the speeds the speed automatically goes back to the first speed HA saw after the update.
Also the unit operation keeps turning off the AC in HA which is replicated to the panel.
Video for reference
Did you update to beta2? Is the auto fan speed still visible for you in HA?
What do you mean by the second part? HA is turning off the AC when it shouldn't be?
Yes it’s updated.
The auto fan speed is no longer present.
The issue I see is similar to before which the fan speeds changing after selecting auto. But now it happens when changing the mode of the AC and still happens to the fan speed but if any speed selected.
Yes it’s updated.
The auto fan speed is no longer present.
The issue I see is similar to before which the fan speeds changing after selecting auto. But now it happens when changing the mode of the AC and still happens to the fan speed but if any speed selected.
Peculiar. Does your AC not support all the operation modes? (Heat, Cool, Fan, Dry, Auto?). Would you be able to do the following so I can try and work out what is different about your unit:
pip install airtouch2==0.3b2
Then redownload the test.py file from the same place as before, run it, and (on your actual touchpad/airtouch app) cycle through all the fan speeds and operation modes? Then compress and zip all the .dump files and .log file and email it to me? Hopefully that'll be enough info for me to work out what's going on.
tried to run it but I am getting this error
C:\Users\Peter\Downloads\AC>python test.py
Traceback (most recent call last):
File "C:\Users\Peter\Downloads\AC\test.py", line 2, in
tried to run it but I am getting this error
C:\Users\Peter\Downloads\AC>python test.py Traceback (most recent call last): File "C:\Users\Peter\Downloads\AC\test.py", line 2, in from airtouch2 import ACFanSpeed, ACMode ImportError: cannot import name 'ACFanSpeed' from 'airtouch2' (C:\Users\Peter\AppData\Local\Programs\Python\Python311\Lib\site-packages\airtouch2init.py)
Sorry, you should use the test.py from here: https://github.com/nathanvdh/airtouch2-python/blob/detect-fan-speeds/tests/test.py
I forgot I was pushing to a new branch called 'detect-fan-speeds'.
I've discovered a small oversight...try beta3 now @TETZUO ?
Hi mate, great work. Just been playing around and noticed the fan level set in the integration is one level higher than the unit. Low is medium, medium is high, high is diffuse (which I don't have on my unit) and diffuse is low. Auto is good.