Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daikin integration fan change upon changing other climate parameter #51268

Closed
Tekno-man opened this issue May 30, 2021 · 13 comments · Fixed by #51797
Closed

Daikin integration fan change upon changing other climate parameter #51268

Tekno-man opened this issue May 30, 2021 · 13 comments · Fixed by #51797

Comments

@Tekno-man
Copy link

The problem

The daikin integration has 6 fan options, low, mid, high, low/auto, mid/auto, high/auto. When the daikin climate entity has the fan parameter on any auto setting and then you change one of the other parameters such as the set point temperature or the mode the fan with change to the non auto variant of the speed selected. This doesn't happen when using the airbase app.

image

image

What is version of Home Assistant Core has the issue?

core-2021.5.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Daikin

Link to integration documentation on our website

https://www.home-assistant.io/integrations/daikin/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No errors

Additional information

using BRP15B61 and airbase app with BRC24Z4B zone controller

@probot-home-assistant
Copy link

daikin documentation
daikin source
(message by IssueLinks)

@fredrike
Copy link
Contributor

fredrike commented Jun 8, 2021

I've reviewed the backend code and it tries to adopt to the fan auto modes.

Could you please paste debugging info fråm pydaikin so we can see what is sent for the various modes.

@Tekno-man
Copy link
Author

Tekno-man commented Jun 8, 2021

Hi Fredrike,

thanks for looking into this. I've n ever run debugging before so had to google had to add it. I think i did it correctly by adding this to log.

  logger:
 
   default: warning
   logs:
     homeassistant.helpers.script: debug
     homeassistant.components.pydaikin: debug
     homeassistant.components.daikin: debug
     homeassistant.components.climate: debug
     pydaikin:  debug

I then turned system on to heat, changed it auto med, then changed to cool, then changed to auto med, then changed to off. At every change the system states that daikin is at med. Please let me know if you need anything else. Cheers

 2021-06-08 15:49:45 DEBUG (MainThread) [pydaikin.daikin_airbase] Parsing ret=OK,pow=0,mode=1,stemp=22,dt1=22,dt2=20,dt3=22,f_rate=3,dfr0=3,dfr1=3,dfr2=1,dfr3=3,f_airside=0,airside0=0,airside1=0,airside2=0,airside3=0,f_auto=0,auto0=1,auto1=0,auto2=1,auto3=1,f_dir=0,dfd0=1,dfd1=0,dfd2=1,dfd3=0,dfd7=1,filter_sign_info=0,cent=0,en_cent=0,remo=2
 2021-06-08 15:49:45 DEBUG (MainThread) [pydaikin.daikin_airbase] Sending query_c: aircon/set_control_info?pow=1&mode=1&stemp=22&shum=--&f_rate=3&f_auto=0&f_dir=0&lpw=&f_airside=0
 2021-06-08 15:49:45 DEBUG (MainThread) [pydaikin.daikin_airbase] Parsing ret=OK
 2021-06-08 15:49:47 DEBUG (MainThread) [pydaikin.daikin_base] Updating ['aircon/get_sensor_info', 'aircon/get_control_info', 'aircon/get_zone_setting']
 2021-06-08 15:49:47 DEBUG (MainThread) [pydaikin.daikin_airbase] Parsing ret=OK,err=0,htemp=19,otemp=-
 2021-06-08 15:49:47 DEBUG (MainThread) [pydaikin.daikin_airbase] Parsing ret=OK,pow=1,mode=1,stemp=22,dt1=22,dt2=20,dt3=22,f_rate=3,dfr0=3,dfr1=3,dfr2=1,dfr3=3,f_airside=0,airside0=0,airside1=0,airside2=0,airside3=0,f_auto=0,auto0=1,auto1=0,auto2=1,auto3=1,f_dir=0,dfd0=1,dfd1=0,dfd2=1,dfd3=0,dfd7=1,filter_sign_info=0,cent=0,en_cent=0,remo=2
 2021-06-08 15:49:48 DEBUG (MainThread) [pydaikin.daikin_airbase] Parsing ret=OK,zone_name=%4c%49%56%49%4e%47%20%4d%45%44%49%41%3b%4d%41%53%54%45%52%3b%42%45%44%53%3b%20%20%20%20%20%20%20%5a%6f%6e%65%34%3b%20%20%20%20%20%20%20%5a%6f%6e%65%35%3b%20%20%20%20%20%20%20%5a%6f%6e%65%36%3b%20%20%20%20%20%20%20%5a%6f%6e%65%37%3b%20%20%20%20%20%20%20%5a%6f%6e%65%38,zone_onoff=0%3b0%3b1%3b0%3b0%3b0%3b0%3b0
 2021-06-08 15:49:50 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 3b31652b7860738ea0f968fa4b44ea1ee3ecae8a9c5af2fb5b6a0993d8ee9341 from 192.168.1.178
 2021-06-08 15:49:53 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 3b31652b7860738ea0f968fa4b44ea1ee3ecae8a9c5af2fb5b6a0993d8ee9341 from 192.168.1.178
 2021-06-08 15:49:57 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 3b31652b7860738ea0f968fa4b44ea1ee3ecae8a9c5af2fb5b6a0993d8ee9341 from 192.168.1.178
 2021-06-08 15:49:58 DEBUG (MainThread) [pydaikin.daikin_airbase] Parsing ret=OK,pow=1,mode=1,stemp=22,dt1=22,dt2=20,dt3=22,f_rate=3,dfr0=3,dfr1=3,dfr2=1,dfr3=3,f_airside=0,airside0=0,airside1=0,airside2=0,airside3=0,f_auto=0,auto0=1,auto1=0,auto2=1,auto3=1,f_dir=0,dfd0=1,dfd1=0,dfd2=1,dfd3=0,dfd7=1,filter_sign_info=0,cent=0,en_cent=0,remo=2
 2021-06-08 15:49:58 DEBUG (MainThread) [pydaikin.daikin_airbase] Sending query_c: aircon/set_control_info?pow=1&mode=1&stemp=22&shum=--&f_rate=3&f_auto=1&f_dir=0&lpw=&f_airside=0
 2021-06-08 15:49:59 DEBUG (MainThread) [pydaikin.daikin_airbase] Parsing ret=OK
 2021-06-08 15:50:05 DEBUG (MainThread) [pydaikin.daikin_airbase] Parsing ret=OK,pow=1,mode=1,stemp=22,dt1=22,dt2=20,dt3=22,f_rate=3,dfr0=3,dfr1=3,dfr2=1,dfr3=3,f_airside=0,airside0=0,airside1=0,airside2=0,airside3=0,f_auto=1,auto0=1,auto1=1,auto2=1,auto3=1,f_dir=0,dfd0=1,dfd1=0,dfd2=1,dfd3=0,dfd7=1,filter_sign_info=0,cent=0,en_cent=0,remo=2
 2021-06-08 15:50:05 DEBUG (MainThread) [pydaikin.daikin_airbase] Sending query_c: aircon/set_control_info?pow=1&mode=2&stemp=20&shum=--&f_rate=1&f_auto=0&f_dir=0&lpw=&f_airside=0
 2021-06-08 15:50:06 DEBUG (MainThread) [pydaikin.daikin_airbase] Parsing ret=OK
 2021-06-08 15:50:07 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 3b31652b7860738ea0f968fa4b44ea1ee3ecae8a9c5af2fb5b6a0993d8ee9341 from 192.168.1.178
 2021-06-08 15:50:10 DEBUG (MainThread) [pydaikin.daikin_airbase] Parsing ret=OK,pow=1,mode=2,stemp=20,dt1=22,dt2=20,dt3=22,f_rate=1,dfr0=3,dfr1=3,dfr2=1,dfr3=3,f_airside=0,airside0=0,airside1=0,airside2=0,airside3=0,f_auto=0,auto0=1,auto1=1,auto2=0,auto3=1,f_dir=0,dfd0=1,dfd1=0,dfd2=0,dfd3=0,dfd7=1,filter_sign_info=0,cent=0,en_cent=0,remo=2
 2021-06-08 15:50:10 DEBUG (MainThread) [pydaikin.daikin_airbase] Sending query_c: aircon/set_control_info?pow=1&mode=2&stemp=20&shum=--&f_rate=3&f_auto=1&f_dir=0&lpw=&f_airside=0
 2021-06-08 15:50:11 DEBUG (MainThread) [pydaikin.daikin_airbase] Parsing ret=OK
 2021-06-08 15:50:11 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 3b31652b7860738ea0f968fa4b44ea1ee3ecae8a9c5af2fb5b6a0993d8ee9341 from 192.168.1.178
 2021-06-08 15:50:13 DEBUG (MainThread) [pydaikin.daikin_airbase] Parsing ret=OK,pow=1,mode=2,stemp=20,dt1=22,dt2=20,dt3=22,f_rate=3,dfr0=3,dfr1=3,dfr2=3,dfr3=3,f_airside=0,airside0=0,airside1=0,airside2=0,airside3=0,f_auto=1,auto0=1,auto1=1,auto2=1,auto3=1,f_dir=0,dfd0=1,dfd1=0,dfd2=0,dfd3=0,dfd7=1,filter_sign_info=0,cent=0,en_cent=0,remo=2
 2021-06-08 15:50:13 DEBUG (MainThread) [pydaikin.daikin_airbase] Sending query_c: aircon/set_control_info?pow=0&mode=2&stemp=20&shum=--&f_rate=3&f_auto=0&f_dir=0&lpw=&f_airside=0
 2021-06-08 15:50:13 DEBUG (MainThread) [pydaikin.daikin_airbase] Parsing ret=OK`

@fredrike
Copy link
Contributor

fredrike commented Jun 9, 2021

Just to make things clearer for me..

  • At 2021-06-08 15:49:45 you set to heat ->
    aircon/set_control_info?pow=1&mode=1&stemp=22&shum=--&f_rate=3&f_auto=0&f_dir=0&lpw=&f_airside=0

  • At 2021-06-08 15:49:58 you set fan to auto/med ->
    aircon/set_control_info?pow=1&mode=1&stemp=22&shum=--&f_rate=3&f_auto=1&f_dir=0&lpw=&f_airside=0

  • At 2021-06-08 15:50:05 you changed mode to cool ->
    aircon/set_control_info?pow=1&mode=2&stemp=20&shum=--&f_rate=1&f_auto=0&f_dir=0&lpw=&f_airside=0

  • At 2021-06-08 15:50:10 you set fan to auto/med ->
    aircon/set_control_info?pow=1&mode=2&stemp=20&shum=--&f_rate=3&f_auto=1&f_dir=0&lpw=&f_airside=0

As you can see is the f_auto wrong when you send mode updates, it could be the fact that we are asking the unit what mode (and temp) it had before and tries to match it. But this matching looses fan auto mode.

I'll contact you in the forum for some more testing..

@Tekno-man
Copy link
Author

Thank so much, that looks right. Happy to run a more accurate test with more commands if that helps to decipher.

Cheers

@discobean
Copy link

discobean commented Jun 10, 2021

Hi, not entirely sure if my issue is related. But when I run an action to modify the mode ie. like so:

target:
  device_id: 64d36747a818451f899a0327b9d5785d
data:
  hvac_mode: heat

It also modifies the fan speed.

I also noticed that there is no Airside option anywhere, which is the default option I use. So it is constantly setting the fan speed to high by default whenever changing the hvac_mode.

Also, I would have expected there should be another fan_mode just called Auto which means Airside.

@fredrike
Copy link
Contributor

fredrike commented Jun 11, 2021

Well, it is actually a feature that the fan (and temp) setting follow each mode. But, it seems like the fan mode auto is missed somewhere in the process. I'm slammed with work now but will investigate it further soon, in the meantime I suggest that you send two set modes.

@fredrike
Copy link
Contributor

Ok, got 10 minutes to spare so had a look at it. It seems like the "stored" modes doesn't contain fan-auto.

Would an ok solution be to reuse the old value of fan-auto? So, if you have fan-auto ON in cool and go to heat it will follow that? The fan rate will still follow the mode so if you have fan-low on cool and switches to heat (where the fan was set to high) you will still get fan high when switching modes (this is how Daikin wants it).

If that is the case you should find the daikin_airbase.pyfile and change this line L110 (comment it out or completely remove the line):

        self.values['f_auto'] = '1' if 'a' in self.values["f_rate"] else '0'

to

        # self.values['f_auto'] = '1' if 'a' in self.values["f_rate"] else '0'

@Tekno-man
Copy link
Author

Tekno-man commented Jun 11, 2021

Thanks for looking into this I will give your suggestion a go. Just so it's clear the main issue of fan speed maintaining issue isn't when I switch between modes but that it also happens when the temperature is changed it also looses the automation status. I think your solution should work though for this too as the script will just keep the previous fan mode anyway. I will give it a try and let you know. Cheers

Edit just realised your previous comment was for maybe for discobeen and not the issue I was having?

@discobean
Copy link

I can confirm this fixes the issue of overwriting the previous fan speed for me when switching hvac_mode to off and heat.

However, there is still an issue with airside, because when airside is on, it is disabled whenever a call is made.

I noticed this part in the code where f_airside is hardcoded as 0, I set this to 1 in the query build here:

        query_c = (                                                                                                                                                                                                
            'aircon/set_control_info'                                                                                                                                                                              
            '?pow={pow}&mode={mode}&stemp={stemp}&shum={shum}'                                                                                                                                                     
            '&f_rate={f_rate[0]}&f_auto={f_auto}&f_dir={f_dir}'                                                                                                                                                    
            '&lpw=&f_airside=1'                                                                                                                                                                                    
        ).format(**self.values)                                                                                                                                                                                    

and it switches airside on, so I guess this parameter needs to be fetched/remembered instead of hardcoded somehow?

@fredrike
Copy link
Contributor

Thank you @Tekno-man & @discobean! I'll update the pydaikin code and send a PR here. It might take some time though..

I noticed this part in the code where f_airside is hardcoded as 0, I set this to 1 in the query build here

Try this instead:

        query_c = (                                                                                                                                                                                                
            'aircon/set_control_info'                                                                                                                                                                              
            '?pow={pow}&mode={mode}&stemp={stemp}&shum={shum}'                                                                                                                                                     
            '&f_rate={f_rate[0]}&f_auto={f_auto}&f_dir={f_dir}'                                                                                                                                                    
            '&lpw=&f_airside={f_airside}'                                                                                                                                                                                    
        ).format(**self.values)     

@discobean
Copy link

using {f_airside} works :) Legend! Thanks so much for this.

@fredrike
Copy link
Contributor

using {f_airside} works :) Legend! Thanks so much for this.

Cool fun to code on my phone :).

@github-actions github-actions bot locked and limited conversation to collaborators Jul 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants