Support for Daikin AirBase units

Neither - the iOS Home app.

If home-assistant shows right info it’s an issue withe the apple home integration, I suggest that you raise an issue on github for this.

hvac_mode “auto” isn’t working (airbase Australia) :frowning:

2020-01-03 15:57:30 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.139826232287184] 'auto'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 133, in handle_call_service
    connection.context(msg),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call
    await asyncio.shield(self._execute_service(handler, service_call))
  File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 205, in handle_service
    self._platforms.values(), func, call, service_name, required_features
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 336, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 358, in _handle_service_platform_call
    await getattr(entity, func)(**data)
  File "/usr/src/homeassistant/homeassistant/components/daikin/climate.py", line 199, in async_set_hvac_mode
    await self._set({ATTR_HVAC_MODE: hvac_mode})
  File "/usr/src/homeassistant/homeassistant/components/daikin/climate.py", line 131, in _set
    values[daikin_attr] = HA_STATE_TO_DAIKIN[value]
KeyError: 'auto'

Any help appreciated

Are you sure that you are running tle latest version and no extra components? There have been some major changes in the climate component over the last months but your issue should not be possible to reach.

Yeah, -> Home Assistant 0.103.6
I don’t have any custom components, I’m running hassio / ubuntu.
I tried dropping and readding the daikin intergration, but that didn’t help.
Is there some caching somewhere?

Any ideas, anything I can try?

That’s, awesome, thanks for your help

Could you please explain what you are doing to trigger the error?

Are you sure that it isn’t an old automation from before
https://www.home-assistant.io/blog/2019/07/17/release-96/#climate that is causing the error?
You do know that auto have been removed in July. It is now called heat_cold.

I setup a fresh install on a RPi and added the Daikin integration. I don’t get the error anymore but the heat_cool option still doesn’t work. If I press the heat_cool option the aircon doesn’t change, logs below.

2020-01-20 23:12:02 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.548130921552] Received {'type': 'call_service', 'domain': 'climate', 'service': 'set_hvac_mode', 'service_data': {'entity_id': 'climate.daikinap27027', 'hvac_mode': 'heat_cool'}, 'id': 43}
2020-01-20 23:12:02 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=climate, service=set_hvac_mode, service_data=entity_id=climate.daikinap27027, hvac_mode=heat_cool>
2020-01-20 23:12:02 DEBUG (MainThread) [pydaikin.appliance] Sending query_c: aircon/set_control_info?pow=1&mode=auto&stemp=23&shum=--&f_rate=5&f_dir=0&lpw=&f_airside=0
2020-01-20 23:12:03 DEBUG (MainThread) [pydaikin.appliance] Represent: mode, mode, auto
2020-01-20 23:12:03 DEBUG (MainThread) [pydaikin.appliance] Represent: f_rate, fan rate, high
2020-01-20 23:12:03 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=climate.daikinap27027, old_state=<state climate.daikinap27027=cool; hvac_modes=['fan_only', 'dry', 'cool', 'heat', 'heat_cool', 'off'], min_temp=7, max_temp=35, target_temp_step=1, fan_modes=['Low', 'Mid', 'High'], current_temperature=23.0, temperature=23.0, fan_mode=High, friendly_name=DaikinAP27027, supported_features=9 @ 2020-01-20T23:08:10.008825+11:00>, new_state=<state climate.daikinap27027=heat_cool; hvac_modes=['fan_only', 'dry', 'cool', 'heat', 'heat_cool', 'off'], min_temp=7, max_temp=35, target_temp_step=1, fan_modes=['Low', 'Mid', 'High'], current_temperature=23.0, temperature=23.0, fan_mode=High, friendly_name=DaikinAP27027, supported_features=9 @ 2020-01-20T23:12:03.061673+11:00>>
2020-01-20 23:12:03 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.548134659088] Sending {'id': 2, 'type': 'event', 'event': <Event state_changed[L]: entity_id=climate.daikinap27027, old_state=<state climate.daikinap27027=cool; hvac_modes=['fan_only', 'dry', 'cool', 'heat', 'heat_cool', 'off'], min_temp=7, max_temp=35, target_temp_step=1, fan_modes=['Low', 'Mid', 'High'], current_temperature=23.0, temperature=23.0, fan_mode=High, friendly_name=DaikinAP27027, supported_features=9 @ 2020-01-20T23:08:10.008825+11:00>, new_state=<state climate.daikinap27027=heat_cool; hvac_modes=['fan_only', 'dry', 'cool', 'heat', 'heat_cool', 'off'], min_temp=7, max_temp=35, target_temp_step=1, fan_modes=['Low', 'Mid', 'High'], current_temperature=23.0, temperature=23.0, fan_mode=High, friendly_name=DaikinAP27027, supported_features=9 @ 2020-01-20T23:12:03.061673+11:00>>}
2020-01-20 23:12:03 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.548130921552] Sending {'id': 2, 'type': 'event', 'event': <Event state_changed[L]: entity_id=climate.daikinap27027, old_state=<state climate.daikinap27027=cool; hvac_modes=['fan_only', 'dry', 'cool', 'heat', 'heat_cool', 'off'], min_temp=7, max_temp=35, target_temp_step=1, fan_modes=['Low', 'Mid', 'High'], current_temperature=23.0, temperature=23.0, fan_mode=High, friendly_name=DaikinAP27027, supported_features=9 @ 2020-01-20T23:08:10.008825+11:00>, new_state=<state climate.daikinap27027=heat_cool; hvac_modes=['fan_only', 'dry', 'cool', 'heat', 'heat_cool', 'off'], min_temp=7, max_temp=35, target_temp_step=1, fan_modes=['Low', 'Mid', 'High'], current_temperature=23.0, temperature=23.0, fan_mode=High, friendly_name=DaikinAP27027, supported_features=9 @ 2020-01-20T23:12:03.061673+11:00>>}
2020-01-20 23:12:03 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.548130921552] Sending {'id': 43, 'type': 'result', 'success': True, 'result': {'context': Context(user_id='ca2fd1eb2f134d579c6c2ba1f1af20a4', parent_id=None, id='ce5936da513a4e8caf8c6b66bab14327')}}

It is my understanding that the Airbase units does not support ‘auto’. Is that correct @jurgenweber @Borgy @Sam_Bonsing? It is at least not supported in the pydaikin library https://bitbucket.org/mustang51/pydaikin/src/534c78e4e8c0fc0b4b244be645279cd91ee2e3a5/pydaikin/appliance.py#lines-92.

We (I) probably need to change the code in home-assistant to indicate that…

Yeah pretty sure auto (heat/cool) was not a valid mode during our testing/setup per

http://daikinip/skyfi/aircon/get_control_info?lpw=’ returns current information from the controller

My controller has a mode button that rotates thru the following states
Here are my results:

Cool ->
curl http://192.168.1.163/skyfi/aircon/get_control_info?lpw=
ret=OK,pow=1,mode=2,stemp=23,dt1=24,dt2=23,dt3=23,f_rate=5,dfr0=5,dfr1=1,dfr2=5,dfr3=5,f_airside=0,airside0=0,airside1=0,airside2=0,airside3=0,f_auto=0,auto0=0,auto1=1,auto2=0,auto3=0,f_dir=0,dfd0=0,dfd1=0,dfd2=0,dfd3=0,dfd7=0,filter_sign_info=0,cent=0,en_cent=0,remo=2

Heat ->
curl http://192.168.1.163/skyfi/aircon/get_control_info?lpw=
ret=OK,pow=1,mode=1,stemp=24,dt1=24,dt2=23,dt3=23,f_rate=1,dfr0=5,dfr1=1,dfr2=5,dfr3=5,f_airside=0,airside0=0,airside1=0,airside2=0,airside3=0,f_auto=1,auto0=0,auto1=1,auto2=0,auto3=0,f_dir=0,dfd0=0,dfd1=0,dfd2=0,dfd3=0,dfd7=0,filter_sign_info=0,cent=0,en_cent=0,remo=2

Fan ->
curl http://192.168.1.163/skyfi/aircon/get_control_info?lpw=
ret=OK,pow=1,mode=0,stemp=24,dt1=24,dt2=23,dt3=23,f_rate=5,dfr0=5,dfr1=1,dfr2=5,dfr3=5,f_airside=0,airside0=0,airside1=0,airside2=0,airside3=0,f_auto=0,auto0=0,auto1=1,auto2=0,auto3=0,f_dir=0,dfd0=0,dfd1=0,dfd2=0,dfd3=0,dfd7=0,filter_sign_info=0,cent=0,en_cent=0,remo=2

Dry ->
curl http://192.168.1.163/skyfi/aircon/get_control_info?lpw=
ret=OK,pow=1,mode=7,stemp=24,dt1=24,dt2=23,dt3=23,f_rate=5,dfr0=5,dfr1=1,dfr2=5,dfr3=5,f_airside=0,airside0=0,airside1=0,airside2=0,airside3=0,f_auto=0,auto0=0,auto1=1,auto2=0,auto3=0,f_dir=0,dfd0=0,dfd1=0,dfd2=0,dfd3=0,dfd7=0,filter_sign_info=0,cent=0,en_cent=0,remo=2

Cool Auto ->
curl http://192.168.1.163/skyfi/aircon/get_control_info?lpw=
ret=OK,pow=1,mode=3,stemp=23,dt1=24,dt2=23,dt3=23,f_rate=5,dfr0=5,dfr1=1,dfr2=5,dfr3=5,f_airside=0,airside0=0,airside1=0,airside2=0,airside3=0,f_auto=0,auto0=0,auto1=1,auto2=0,auto3=0,f_dir=0,dfd0=0,dfd1=0,dfd2=0,dfd3=0,dfd7=0,filter_sign_info=0,cent=0,en_cent=0,remo=2

Thus mode:
0 = Fan
1 = Heat
2 = Cool
3 = Cool Auto
7 = Dry

I can’t get “Cool Auto” using the integration.

What’s the API for changing the mode? I’ll have a play.

1 Like

What’s wrong with this command?
It returns OK but doesn’t seem to work, doesn’t change on the controller :frowning:

C:\Users\Family>curl -d “lpw=&pow=1&mode=0&stemp=23&shum=–&f_rate=5&f_dir=0&lpw=&f_airside=0” http://192.168.1.163/skyfi/aircon/set_control_info
ret=OK

Modify appliance.py in pydaikin to have support for auto. I’ll do the necessary changes in a few hours.

Edit: PR submitted, https://github.com/home-assistant/home-assistant/pull/31080 this is the change needed in pydaikin, https://bitbucket.org/mustang51/pydaikin/pull-requests/16/some-airbase-units-support-auto/diff

Thanks heaps.

Just for my sanity, do you know why this didn’t work ->

C:\Users\Family>curl -d “lpw=&pow=1&mode=0&stemp=23&shum=–&f_rate=5&f_dir=0&lpw=&f_airside=0” http://192.168.1.163/skyfi/aircon/set_control_info
ret=OK

No, but test it in your browser…

http://192.168.1.163/skyfi/aircon/set_control_info?pow=1&mode=3&stemp=23&shum=--&f_rate=5&f_dir=0&lpw=&f_airside=0

Yeah that works, cheers

Getting some weird behaviour with HA, HomeKit, the Daikin integration and airbase.

Since the last update, where the air conditioner was previously set to “Cool” to 22 degrees, if I ask Siri “turn on the air conditioner”, it now turns on the Daikin to “Auto” mode instead of “Cool”.

Homekit reflects cooling to 22 degrees, Lovelace reflects cooling to 22 degrees, but the Daikin wall controller reflects “Auto” with the Cool setback temperature at 22 degrees.

On the Daikin wall controller, if I manually set it to “Cool”, within a few seconds something is forcing it back to “Auto”, every time.

Appreciate any help!!

Here’s some weirdness in the logs. Never setting Auto mode in Homekit, so not sure why it’s requesting it. Also it says it’s instantly switching back to Cool but this isn’t happening either. Daikin control panel stuck on “Auto”.

Strange. Could you test and disable homekit and see what’s happening then.

Perhaps it is the homekit integration that is broken, not Daikin.