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

Temperature setting is missing when switching mode from "Fan Only" to "Heat/Cool" #31

Open
chiahsing opened this issue Sep 19, 2024 · 3 comments
Labels
BRP069 Devices with the BRP069 - module

Comments

@chiahsing
Copy link

Follow up on home-assistant/core#126089

Issue:

Temperature setting is missing when switching mode directly from "Fan Only" to "Heat/Cool". Switching from "Fan Only" to "Cool" to "Heat/Cool" is fine as the temperature setting is restored when switching to "Cool".

Log:

Switch from Off to Cool

2024-09-19 20:05:10.344 DEBUG (MainThread) [pydaikin.daikin_base] Calling: https://192.168.36.169/aircon/get_control_info {} [{'X-Daikin-uuid': '7c8d62335baf4778b98ba0304916a962'}]
2024-09-19 20:05:12.266 DEBUG (MainThread) [pydaikin.daikin_brp069] Parsing ret=OK,pow=0,mode=6,adv=,stemp=--,shum=--,dt1=26.0,dt2=M,dt3=26.0,dt4=25.0,dt5=25.0,dt7=26.0,dh1=0,dh2=50,dh3=0,dh4=0,dh5=0,dh7=0,dhh=50,b_mode=6,b_stemp=--,b_shum=--,alert=255
2024-09-19 20:05:12.269 DEBUG (MainThread) [pydaikin.daikin_brp069] Sending request to aircon/set_control_info with params: {'mode': '3', 'pow': '1', 'shum': '0', 'stemp': '26.0'}
2024-09-19 20:05:12.270 DEBUG (MainThread) [pydaikin.daikin_base] Calling: https://192.168.36.169/aircon/set_control_info {'mode': '3', 'pow': '1', 'shum': '0', 'stemp': '26.0'} [{'X-Daikin-uuid': '7c8d62335baf4778b98ba0304916a962'}]
2024-09-19 20:05:14.151 DEBUG (MainThread) [pydaikin.daikin_brp069] Parsing ret=OK,adv=

Switching from Cool to Fan Only

2024-09-19 20:05:24.383 DEBUG (MainThread) [pydaikin.daikin_base] Calling: https://192.168.36.169/aircon/get_control_info {} [{'X-Daikin-uuid': '7c8d62335baf4778b98ba0304916a962'}]
2024-09-19 20:05:26.227 DEBUG (MainThread) [pydaikin.daikin_brp069] Parsing ret=OK,pow=1,mode=3,adv=,stemp=26.0,shum=0,dt1=26.0,dt2=M,dt3=26.0,dt4=25.0,dt5=25.0,dt7=26.0,dh1=0,dh2=50,dh3=0,dh4=0,dh5=0,dh7=0,dhh=50,b_mode=3,b_stemp=26.0,b_shum=0,alert=255
2024-09-19 20:05:26.229 DEBUG (MainThread) [pydaikin.daikin_brp069] Sending request to aircon/set_control_info with params: {'mode': '6', 'pow': '1', 'shum': '0', 'stemp': '26.0'}
2024-09-19 20:05:26.230 DEBUG (MainThread) [pydaikin.daikin_base] Calling: https://192.168.36.169/aircon/set_control_info {'mode': '6', 'pow': '1', 'shum': '0', 'stemp': '26.0'} [{'X-Daikin-uuid': '7c8d62335baf4778b98ba0304916a962'}]
2024-09-19 20:05:28.126 DEBUG (MainThread) [pydaikin.daikin_brp069] Parsing ret=OK,adv=

Switching from Fan Only to Heat/Cool

2024-09-19 20:05:34.030 DEBUG (MainThread) [pydaikin.daikin_base] Calling: https://192.168.36.169/aircon/get_control_info {} [{'X-Daikin-uuid': '7c8d62335baf4778b98ba0304916a962'}]
2024-09-19 20:05:36.275 DEBUG (MainThread) [pydaikin.daikin_brp069] Parsing ret=OK,pow=1,mode=6,adv=,stemp=--,shum=--,dt1=26.0,dt2=M,dt3=26.0,dt4=25.0,dt5=25.0,dt7=26.0,dh1=0,dh2=50,dh3=0,dh4=0,dh5=0,dh7=0,dhh=50,b_mode=6,b_stemp=--,b_shum=--,alert=255
2024-09-19 20:05:36.276 DEBUG (MainThread) [pydaikin.daikin_brp069] Sending request to aircon/set_control_info with params: {'mode': '0', 'pow': '1', 'shum': '--', 'stemp': '--'}
2024-09-19 20:05:36.277 DEBUG (MainThread) [pydaikin.daikin_base] Calling: https://192.168.36.169/aircon/set_control_info {'mode': '0', 'pow': '1', 'shum': '--', 'stemp': '--'} [{'X-Daikin-uuid': '7c8d62335baf4778b98ba0304916a962'}]
2024-09-19 20:05:38.120 DEBUG (MainThread) [pydaikin.daikin_brp069] Parsing ret=PARAM NG

The last one set both stemp and shum with '--' and the request failed.

@chiahsing
Copy link
Author

chiahsing commented Sep 19, 2024

It looks like mode for 'Heat/Cool' is 0, but there is no dt0 in current_val, so it fails to set stemp.

https://github.com/fredrike/pydaikin/blob/master/pydaikin/daikin_brp069.py#L177-L182

Or, '--' is actually a value, so it doesn't even bother to look for dt0?

@fredrike fredrike added the BRP069 Devices with the BRP069 - module label Sep 19, 2024
@fredrike
Copy link
Owner

Yes, you are right if val == "--" we should skip updating.

@chiahsing
Copy link
Author

I am not familir with this, but if there's a guide or instructions on showing how to set up the development env, maybe I can contribute a patch to fix this. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BRP069 Devices with the BRP069 - module
Projects
None yet
Development

No branches or pull requests

2 participants