Support for Daikin AirBase units

Hi nickdos, I believe you will definitely be able to achieve what you want. I actually have setup an Automation using the climate component on my split in a non ducted part of the house (actually controlled by a Sensibo) but I can’t see why it won’t work with the daikin climate component. Home Assistant with the airbase (thanks to fredrike) and the ios app, actually works so much easier and better then the standard Daikin airbase app (which has a silly search function on startup which forces you to wait).

1 Like

You can setup any type of automations you like. For instance do I shutdown my AC when the patio door is open for some time and reactivate it when the door is closed.

It is also possible to build automations and schedules like nest so that you always come home to a perfectly temperated home.

The sky is the limit with Home Assistant, wellcome to the world of building a smart home @nickdos.

1 Like

I got my Airbase working today (Daikin app works as expected) and tried to integrate into HA (0.93.2 - via hassio) but it appears broken for me. I tried deleting from integrations page and re-adding in again, as suggested in this thread but it made no difference.

I get 2 temperature sensors but neither show any values (indoor and outdoor). I also get 8 identical switches appearing (all with the name DaikinAP66647 - but they do not reflect the state of the A/C on/off nor do they do anything when changed from on to off or back.

I’ve got quite an old, single zone system and the Daikin app does not report the indoor temp (only the set temp), which is probably due to my older system. The Airbase firmware is 1.1.1. Some errors in my log which may be helpful:

019-05-28 17:54:09 WARNING (MainThread) [homeassistant.config_entries] Config entry for daikin not ready yet. Retrying in 5 seconds.
2019-05-28 17:54:11 ERROR (MainThread) [homeassistant.components.daikin.config_flow] ClientError
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 495, in _request
    resp = await req.send(conn)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 626, in send
    await writer.write_headers(status_line, self.headers)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/http_writer.py", line 112, in write_headers
    self._write(buf)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/http_writer.py", line 67, in _write
    raise ConnectionResetError('Cannot write to closing transport')
ConnectionResetError: Cannot write to closing transport

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/daikin/config_flow.py", line 47, in _create_device
    await device.init()
  File "/usr/local/lib/python3.7/site-packages/pydaikin/appliance.py", line 184, in init
    await self.update_status(HTTP_RESOURCES[:1])
  File "/usr/local/lib/python3.7/site-packages/pydaikin/appliance.py", line 226, in update_status
    self.values.update(await self.get_resource(resource))
  File "/usr/local/lib/python3.7/site-packages/pydaikin/appliance.py", line 204, in get_resource
    return await self._get_resource(resource)
  File "/usr/local/lib/python3.7/site-packages/pydaikin/appliance.py", line 218, in _get_resource
    'http://%s/%s' % (self.ip, resource)) as resp:
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 1005, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 507, in _request
    raise ClientOSError(*exc.args) from exc
aiohttp.client_exceptions.ClientOSError: Cannot write to closing transport
==
019-05-28 17:54:30 ERROR (MainThread) [homeassistant.core] 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'

@nickdos. The issues you are referring to are already solved in the developer code. We are just hoping to get it included in 0.94. (I guess it worked before in 0.92 too).

@fredrike - Thanks for confirming that. I’ll eagerly await the next update of HA.

I just updated to HA 0.94 and saw the release notes mentioned the Daikin AC component had been updated (it listed this PR)

However I still get the same error in my logs:

File “/usr/local/lib/python3.7/site-packages/aiohttp/client.py”, line 495, in _request
esp = await req.send(conn)etc. same as I posted above.

I presume this means the fixes did not make the 0.94 release?

Update: I removed my config entry in configuration.yml and manually added the component via the Integrations screen and it worked! Happy days.

Update 2: I’m seeing this (new) error in my logs:

Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/homekit/type_thermostats.py", line 245, in update_state
    if isinstance(target_temp, float) and current_temp < target_temp:
TypeError: '<' not supported between instances of 'NoneType' and 'float'

@Nickdos - has that update (new error) caused any visible issues with the integration or function? (About to look at doing the HA 0.94 update :slight_smile: )

@Borgy - has that update (new error) caused any visible issues with the integration or function? (About to look at doing the HA 0.94 update :slight_smile: )

Nothing broken, no - everything seems to be working as expected.

The error I posted is likely a silent failure due to my system not providing a current_temp value. My particular Daikin system is quite old and doesn’t show the current temperature (either in the Airbase app or via the dedicated sensor component).

I’ve got an ESP32 with a DHT22 sensor right next to my Daikin controller, so it would be nice if I could provide the entity ID of that sensor as my current_temp reading instead (via config).

The only odd thing is in HomeKit, where it shows the “current temperature” as 21° all the time, no matter what the set temperature is. So I’m guessing there might be some hard coded value in there as a fallback for when the climate component is exported to HomeKit, as I don’t see the constant 21° in HA.

I you can create a generic thermostat that combines both your Daikin and the DHT22.

Or you have to modify the climate.py of Daikin to make it use an external sensor.

1 Like

Hi Guys, Daikin component is working great with my airbase controller, thanks for those who’ve contributed. I was just wondering whether it was possible to get the outside temperature as well.
Airbase app shows both inside and outside temperature and I get ‘ret=OK,err=0,htemp=25,otemp=20’ from 'http://192.168.0.23/skyfi/aircon/get_sensor_info?’. Apologies if this has been covered, newbie here.

I was under the impression that Airbase units did not support outside temperature…

A simple fix would be to edit the appliance.py of the pydaikin package to always return true on the support_outside_temperature property: https://bitbucket.org/mustang51/pydaikin/src/9ae66dea721af5f64c90ccc5d431ba78f95f620a/pydaikin/appliance.py#lines-224

I’ll see if I can submit a patch for you but don’t get your hopes up in the near future.

Not sure about other units but the outside temp is supported on my ducted system (installed 2017).

I tried a few things yesterday and ended up just copying the current daikin component into the custom components folder and reversing the sensor.py changes done on 13/05/19, which worked. Probably not good practice but my knowledge is pretty limited. Thanks heaps for your response Fredrik

1 Like

I’ve created a fix for this in pydaikin 1.6.1. It will be shown when https://github.com/home-assistant/home-assistant/pull/25416 gets merged.

@mackspower, Normal Daikin behaviour is that the unit doesn’t show outside temperature when the unit is off, is it the same with your unit? I assumed that the unit must send outside temperature during startup otherwise the outside temperature (if it is an AirBase unit) will not be shown. Is that a safe assumption?

-        return not self._airbase
+        return not (self._airbase and not self.outside_temperature)

Hello and congrats for the awesome work!

I have 2 Daikin units with the BRP069B45 controller. Both are integrated in the Daikin app and I can control them from there.

Discovery on home assistant initially discover both units, but then I started getting some errors and then one of them disappeared.

ClientError
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 495, in _request
    resp = await req.send(conn)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 626, in send
    await writer.write_headers(status_line, self.headers)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/http_writer.py", line 112, in write_headers
    self._write(buf)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/http_writer.py", line 67, in _write
    raise ConnectionResetError('Cannot write to closing transport')
ConnectionResetError: Cannot write to closing transport

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/daikin/config_flow.py", line 47, in _create_device
    await device.init()
  File "/usr/local/lib/python3.7/site-packages/pydaikin/appliance.py", line 188, in init
    await self.update_status(HTTP_RESOURCES[:1])
  File "/usr/local/lib/python3.7/site-packages/pydaikin/appliance.py", line 254, in update_status
    self.values.update(await self.get_resource(resource))
  File "/usr/local/lib/python3.7/site-packages/pydaikin/appliance.py", line 230, in get_resource
    return await self._get_resource(resource)
  File "/usr/local/lib/python3.7/site-packages/pydaikin/appliance.py", line 245, in _get_resource
    'http://%s/%s' % (self.ip, resource)) as resp:
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 1005, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 507, in _request
    raise ClientOSError(*exc.args) from exc
aiohttp.client_exceptions.ClientOSError: Cannot write to closing transport

Then I am getting these kind of errors:

Config entry for daikin not ready yet. Retrying in 80 seconds.
3:03 PM config_entries.py (WARNING) - message first occured at 2:57 PM and shows up 5 times
Config entry for daikin not ready yet. Retrying in 40 seconds.
2:57 PM config_entries.py (WARNING)
Config entry for daikin not ready yet. Retrying in 20 seconds.
2:56 PM config_entries.py (WARNING)
Config entry for daikin not ready yet. Retrying in 10 seconds.
2:56 PM config_entries.py (WARNING)
Config entry for daikin not ready yet. Retrying in 5 seconds.
2:56 PM config_entries.py (WARNING) - message first occured at 2:56 PM and shows up 2 times

Any idea as to why this is happening?

I also tried setting netdisco to ignore daikin and manually added them (I have static lease on DHCP for the units) but same issue occurs.

Thanks Fredrik. Also, my airbase unit returns outside temp even when the aircon is off, see below (aircon is on only for a few hours in the morning)

1 Like

my Airbase unit also gives the outside temperature at all times.

No I do not know what is happening report it as an issue so we can involve the core develpers too.

I think it is due to some other component you are using…

I found when I had issues like this, I turned off discovery and added them in manually in the integrations config.

Hi! I had Airbase installed yesterday, added the integration in HA - has mostly been perfect!

One issue I’m having which appears to be HomeKit related - let’s say in the Home app, I set the the Daikin to cool to 23 degrees, then after a few minutes also turn it off in the Home app - all works as expected. Then, if I ask Siri to cool to 20 degrees, she confirms back the command, the Daikin wall controller does indeed set to cool to 20 degrees, but the Home app still reflects cooling to 23 degrees - the last cooling temperature that was set in the app.

1 Like

Do you mean HomeAssistant or the Daikin app?