Support for Daikin AirBase units

I only have low and high too

I guess we need to reach some consensus in this. How can we detect (via the API) which fan_modes that are supported?

Suppose maybe we need from more sample data to see if there is anything relevant in the various api results from those with high-low vs high-med-low

I know we saw High which was Fan mode=3 gives a f_rate=5
I know we saw Low which was Fan mode=1 gives a f_rate=1

Ok maybe there are different rates depending on the Units?
As a survey I have
Airbase App = 3 modes - low, mid, high
Daikin Physical controller = 3 modes - low, mid, high

In my current I have the unit - Set to Cooling mode 22 deg but off
Fan speed “low” returns:
ret=OK,pow=0,mode=2,stemp=22,dt1=22,dt2=22,dt3=22,f_rate=1,dfr0=3,dfr1=1,dfr2=1,dfr3=1,f_airside=0,airside0=0,airside1=0,airside2=0,airside3=0,f_auto=0,auto0=0,auto1=0,auto2=0,auto3=0,f_dir=0,dfd0=0,dfd1=0,dfd2=0,dfd3=0,dfd7=0,filter_sign_info=0

Fan speed “mid” returns:
ret=OK,pow=0,mode=2,stemp=22,dt1=22,dt2=22,dt3=22,f_rate=3,dfr0=3,dfr1=1,dfr2=3,dfr3=1,f_airside=0,airside0=0,airside1=0,airside2=0,airside3=0,f_auto=0,auto0=0,auto1=0,auto2=0,auto3=0,f_dir=0,dfd0=0,dfd1=0,dfd2=0,dfd3=0,dfd7=0,filter_sign_info=0

Fan speed “high” returns:
ret=OK,pow=0,mode=2,stemp=22,dt1=22,dt2=22,dt3=22,f_rate=5,dfr0=3,dfr1=1,dfr2=5,dfr3=1,f_airside=0,airside0=0,airside1=0,airside2=0,airside3=0,f_auto=0,auto0=0,auto1=0,auto2=0,auto3=0,f_dir=0,dfd0=0,dfd1=0,dfd2=0,dfd3=0,dfd7=0,filter_sign_info=0

Just some more info - if I use get_model_info I get the following. I wonder if the “frate_steps” below tells us the difference between 2 step fan modes and 3 step fan modes?
ret=OK,err=0,model=NOTSUPPORT,type=N,humd=0,s_humd=7,en_zone=0,en_filter_sign=1,acled=1,land=0,elec=0,temp=1,m_dtct=0,ac_dst=au,dmnd=0,en_temp_setting=1,en_frate=1,en_fdir=0,en_rtemp_a=0,en_spmode=0,en_ipw_sep=0,en_scdltmr=0,en_mompow=0,en_patrol=0,en_airside=0,en_quick_timer=1,en_auto=0,en_dry=1,en_common_zone=0,cool_l=16,cool_h=32,heat_l=16,heat_h=32,frate_steps=3,en_frate_auto=0

1 Like

for my Airbase with only Low and High -

ret=OK,err=0,model=NOTSUPPORT,type=N,humd=0,s_humd=7,en_zone=0,en_filter_sign=1,acled=1,land=0,elec=0,temp=1,m_dtct=0,ac_dst=au,dmnd=0,en_temp_setting=1,en_frate=1,en_fdir=0,en_rtemp_a=0,en_spmode=0,en_ipw_sep=0,en_scdltmr=0,en_mompow=0,en_patrol=0,en_airside=0,en_quick_timer=1,en_auto=0,en_dry=1,en_common_zone=0,cool_l=16,cool_h=32,heat_l=16,heat_h=32,frate_steps=2,en_frate_auto=0

So the f_rate is different to ones with 3 speeds… But looks promising as a way to determine the difference and how to map it.! well done.

1 Like

Ok, so I’ve build temporary support for modular fan-rates (reading the supported settings from get_model_info) in https://github.com/fredrike/home-assistant/blob/daikin_fan-mode/homeassistant/components/daikin/climate.py and https://bitbucket.org/mustang51/pydaikin/src/fan_mode/pydaikin/appliance.py it would be great if some of you could test the changes.

Also, does the AirBase units support Holiday mode and how does it work? It seems to be fairly easy to implement it. Below is a screenshot of how it looks in the Daikin Online Controller app for my unit.

Hi Fredrike, and thanks for all your efforts.

I have the airbase app (1.0.4) on an android and have recently updated the firmware to 1.1.1 on the airbase module. The app main page provides support for:
MODE: cool, fan, heat, dry
TARGET TEMPERATURE: 16-32
FAN SPEED: this toggles Lo or Hi for me (though there are 3 bars on the icon suggesting med is possible where supported)
POWER: on/off
TEMPERATURE: this seems to be the duct temperature no matter what I do with the daikin field settings.
There is no “HOLIDAY” mode that I can find.

If I check the model info I get exactly the same response string that borgy has. This fits with the two fan steps.

I have no zone controller, but the daikin component loads 8 switches - does the airbase app allow zone control for those with zone controllers? If so the airbase app seems to be able to exclude them for me.

I have only one temperature, but the daikin component loads 2 thermometer sensors for me. The airbase app only shows one temperature. Maybe it is excluding one based on the response below (see htemp=/otemp=)

The following responses occur for me (no zone controller installed):

http://192.168.1.191/skyfi/aircon/get_zone_setting?lpw=
ret=OK,zone_name=%2d%3b%2d%3b%2d%3b%2d%3b%2d%3b%2d%3b%2d%3b%2d,zone_onoff=0%3b0%3b0%3b0%3b0%3b0%3b0%3b0

http://192.168.1.191/skyfi/aircon/get_sensor_info?lpw=
ret=OK,err=0,htemp=11,otemp=-

Finally, with the recent files you have suggested I get the below error. The 2 thermometer sensors and 8 switches still load but there is no climate component. I am running hassio, and have implemented this as a custom component and substituted your 2 recommended files where appropriate. It is possible I have done this incorrectly (my experience is very limited).

Error while setting up platform daikin
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py”, line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 416, in wait_for
return fut.result()
File “/config/custom_components/daikin/climate.py”, line 69, in async_setup_entry
async_add_entities([DaikinClimate(daikin_api)])
File “/config/custom_components/daikin/climate.py”, line 82, in init
ATTR_FAN_MODE: self._api.device.fan_modes,
AttributeError: ‘Appliance’ object has no attribute ‘fan_modes’

I hope this helps

Thank you @racsa for your extensive description of your AirBase setting.

I hope the current settings with Auto could be ok. When it comes to Temperature the current supported values are: 7-35 (I’m not planning to change that as an incorrect value will reset to the closest correct value).

Ok, I’ll hide it for ALL AirBase units then.

I did try to remove the Zones switches here, but apparently is it not working, could you please add a debug string to L26 like this _LOGGER.info(zones) so we can see what is going on.

Yes, the old Daikin devices (non AirBase units) reports otemp as outside temperature but only when the device is on. So I need to add the sensor for outside temperature even if it is not supported by your unit (you just have to live with a sensor wo value).

edit: I’ve added a fix for that here: AirBase units does not support outside temp · home-assistant/core@300e5cf · GitHub (requires the f1d5067 version of appliance.py)

You need to replace the appliance.py file in pydaikin (typically located at /usr/local/lib/python3.7/site-packages/pydaikin/applicance.py) to support the latest changes to pyDaikin.

Fredrike

Sorry for the delay. Busy week here.

switch.py edit:
……
zones = daikin_api.device.zones
_LOGGER.info(zones)
if zones:
……

log output:

019-05-09 21:31:46 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for daikin which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-05-09 21:31:55 ERROR (MainThread) [.] Error connecting to the Hue bridge at 192.168.1.234
2019-05-09 21:31:55 WARNING (MainThread) [homeassistant.config_entries] Config entry for hue not ready yet. Retrying in 5 seconds.
2019-05-09 21:31:58 WARNING (MainThread) [homeassistant.config_entries] Config entry for daikin not ready yet. Retrying in 5 seconds

The climate, 2 temp sensors and 8 switches are still loading. So it appears there is nothing for .info(zones) to report. I did incorrectly edit the switch.py file initially and it broke the switch loading - so home assistant looks to be using this file.

HASSIO and I are proving to be not very compatible when it comes to file access and replacement. I will try and put together a docker or hassbian version when I get a chance. Hopefully this weekend.

Thanks again

Change _LOGGER.info(zones) to _LOGGER.warning(zones)

As it seems like you not are logging info messages…

Is the climate component broken?

docker build https://github.com/fredrike/home-assistant.git#daikin_fan-mode

019-05-10 06:22:10 WARNING (MainThread) [custom_components.daikin.switch] [(’-’, ‘0’), (’-’, ‘0’), (’-’, ‘0’), (’-’, ‘0’), (’-’, ‘0’), (’-’, ‘0’), (’-’, ‘0’), (’-’, ‘0’)]

I am not yet using your modified climate/appliance because I have not yet worked out how to get to the correct directory for the appliance file on HASSIO. I will hopefully be able to read up on docker and try it out on the weekend.

Thanks, I’ve totally forgotten that zones is a list of tuples. New PR have been submitted Fix for non existing Daikin zones by fredrike · Pull Request #23792 · home-assistant/core · GitHub

It is quite simple, just build the docker image with:

docker build -t homeassistant/home-assistant https://github.com/fredrike/home-assistant.git#daikin_fan-mode

And then you can run it as described in Installation - Home Assistant

Fredrike

Unfortunately the docker link would not build - I suspect some problem with jessie on my pi3 ARM. I have been able to load hassbian, and change the relevant climate/appliance files.

This leaves me with 2 instances of Home Assistant - both of them 0.92.2 - one on hassio straight out of the box, the other modified as mentioned. They both load climate, 2 temps and 8 switches (I haven’t caught up with your modifications yet). They both work well for everything but the fan modes:

I can reliably change f_rate from 1 to 5 using:

curl http://192.168.1.191/skyfi/aircon/set_control_info?lpw=&mode=0&dt0=--&f_airside=0&f_rate=3&shum=--&pow=0&stemp=--&f_dir=1&f_auto=0
And check f_rate with:
curl http://192.168.1.191/skyfi/aircon/get_control_info?lpw=
This change is picked up by the Hassio “standard” build as “fan mode” 1 - 5 on the GUI. This change is not picked up at all by the Hassbian “modified” GUI - the relevant field just displaying “Fan mode” (it looks like it is awaiting a polling update)
When it comes to initiating changes in fan mode from the GUI:
The standard Hassio allows selection of several modes - including 1 to 5. If I change anything it just defaults to f_rate=1 and “fan mode” 1 on the GUI.
The modified Hassbian offers “mid” ”hi” ”lo” as options - but does nothing.
FYI:
fan_rate 1,2 show up as 1 of 3 bars on my daikin wall controller - and the fan sets to low speed mechanically.
fan_rate 3,4 show up as 2 of 3 bars - and the fan sets to low speed (my system only has 2 speeds - for 3 speed systems this would be medium speed I presume)
fan_rate 5 shows up as 3 of 3 bars - and the fan sets to high speed mechanically.

Thank you for trying to debug the build. The changes was merged yesterday and it is unfortunate that it doesn’t seem to work.

I think I’ve found the issue and created a new PR.

The Daikin climate entity appears to be broken in 93 :frowning:

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py”, line 365, in _async_add_entity
await entity.async_update_ha_state()
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py”, line 225, in async_update_ha_state
self._async_write_ha_state()
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py”, line 255, in _async_write_ha_state
attr.update(self.state_attributes or {})
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/climate/init.py”, line 268, in state_attributes
is_away = self.is_away_mode_on
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/daikin/climate.py”, line 295, in is_away_mode_on
HA_ATTR_TO_DAIKIN[ATTR_AWAY_MODE]
File “/usr/local/lib/python3.7/site-packages/pydaikin/appliance.py”, line 248, in represent
v = self.values[key]
KeyError: ‘en_hol’

There is a fix for this in Daikin adaptions for AirBase units by fredrike · Pull Request #23734 · home-assistant/core · GitHub, please comment on that issue that the code should be part of 0.93.1 as it fixes issues there.

The whole thing would have been avoided if someone could have tested the code I asked for 16d ago, Support for Daikin AirBase units - #58 by fredrike

I don’t own an Airbase unit, making it quite hard to develop features for it…

Awesome, thanks heaps. I would love to help with the testing but I don’t think I can on hassio, or can I? Maybe I should setup a development environment for stuff like this. I’m a Java developer by trade but I’d like to learn python at some stage. Anyway thanks heaps for your efforts.

fredrike,

I have managed to put a docker image of 0.94.0.dev0 on my synology.
This version loads climate, 8 switches and 1 temp sensor (thanks). Fan modes displayed in the drop down box are “Low”, “Mid”, “High”
The sensor seems to report the temp OK, but no commands are available from the GUI.

Sun May 19 2019 16:07:02 GMT+0930 (Australian Central Standard Time)
‘Appliance’ object has no attribute ‘support_fan_mode’
Traceback (most recent call last):
File “/usr/src/app/homeassistant/components/websocket_api/commands.py”, line 121, in handle_call_service
connection.context(msg))
File “/usr/src/app/homeassistant/core.py”, line 1141, in async_call
self._execute_service(handler, service_call))
File “/usr/src/app/homeassistant/core.py”, line 1163, in _execute_service
await handler.func(service_call)
File “/usr/src/app/homeassistant/helpers/entity_component.py”, line 194, in handle_service
required_features
File “/usr/src/app/homeassistant/helpers/service.py”, line 316, in entity_service_call
future.result() # pop exception if have
File “/usr/src/app/homeassistant/helpers/service.py”, line 337, in _handle_service_platform_call
await getattr(entity, func)(**data)
File “/usr/src/app/homeassistant/components/daikin/climate.py”, line 232, in async_set_operation_mode
await self._set({ATTR_OPERATION_MODE: operation_mode})
File “/usr/src/app/homeassistant/components/daikin/climate.py”, line 179, in _set
await self._api.device.set(values)
File “/usr/local/lib/python3.7/site-packages/pydaikin/appliance.py”, line 314, in set
if self.support_fan_mode:
AttributeError: ‘Appliance’ object has no attribute ‘support_fan_mode’

I hope this is of use. I am sorry that my computer skills are not more sophisticated.

I much appreciate your help.

No you can’t but it is really easy to fire-up a Docker instance with ha:dev on your computer.

Great! (it wasn’t more than docker run docker run --init -d --name="home-assistant" -v /PATH_TO_YOUR_CONFIG:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant:dev right :slight_smile:)

Great find! I’ve added a PR that fixes it.

the climate component works fine now
fan modes work

minor glitches:
FAN MODES - my unit only has High and Low - I think you tried to put in a fix for this, but I am still coming up with 3 fan speeds on the gui.
SWITCHES - I think you tried to fix it so that switches were not loaded where no zone existed. I still have 8 switches loading but no zone controller.
TEMPERATURE HI LO - I know you mentioned not necessary, but for those interested it can easily be set in customize.yaml:
climate.daikinap61623:
max_temp: 32
min_temp: 16
This just looks a bit neater on the gui and makes it a little easier when setting the temperature

Great work!