Confirming my findings for the Daikin BRP072C42 WIFI component

I have recently had a couple of Daikin Heat Pumps installed which use the BRP072C42 WIFI controller, initially I thought this was supported by Home Assistant but it looks like there are some subtle differences between the BRP072A42 and the BRP072C42 which prevent it from working with the standard Daikin component.

I have been looking at how to get this controller working however it requires a slight modification to the Home Assistant component code as well as pydaikin. I also can only test against my controllers so I would like someone who has a similar unit or more knowledge in this space to review what I have found in case I have made some incorrect assumptions.

But to break down what I have found to work:

  • The controller operates on https rather than http and uses a Daikin signed certificate (ie. self signed, although I suspect they ship the CA cert with the Daikin Mobile Controller app for Android because the app wont talk to my apache server), attempting to connect via http gives a Connection Refused.
  • When requesting the https end points in a browser you are given a 403 error, however when emulating a controller with a response to the DAIKIN_UDP/common/basic_info command the app connected to http and sends a header of X-Daikin-uuid with what appears to be an md5, I suspect this is a unique device ID which is granted access after initially authenticating with the SSID and Key as the same ID lets me access any controller and I get the standard 200 Daikin responses, however changing this ID returns the 403. This is not something I have added as my ID works, however the simple way to get this at the moment would be to open the app and emulate a response to the DAIKIN_UDP/common/basic_info command so that it calls back to the local http server

So the change I needed to make to pydaikin was this (I have kept secret a secret in case it is a unique identifier):

--- daikin.orig/pydaikin/appliance.py   2019-05-23 19:01:41.000000000 +1200
+++ daikin.new/pydaikin/appliance.py    2019-07-18 22:55:57.000000000 +1200
@@ -242,7 +242,7 @@
         if self._airbase:
             resource = 'skyfi/%s' % resource
         async with self.session.get(
-                'http://%s/%s' % (self.ip, resource)) as resp:
+                'https://%s/%s' % (self.ip, resource), headers={"X-Daikin-uuid": "*secret*"}, ssl=False) as resp:
             if resp.status == 200:
                 return self.parse_response(await resp.text())
             return {}

Obviously this will allow any Self-Signed SSL cert, but thats what my limited Python knowledge could work out for testing. I am also unsure if the older BRP072A42 units support https so the code may need to handle both http and https (the app seems to always try http first which is why the UDP trick worked).

Here is a response for common/basic_info with this change in place:

ret=OK,type=aircon,reg=th,dst=1,ver=1_12_8,rev=93E736A,pow=0,err=0,location=0,name=%4d%61%73%74%65%72%42%65%64%72%6f%6f%6d,icon=3,method=home only,lpw_flag=0,adp_kind=3,pv=2,cpv=2,cpv_minor=00,led=1,en_setzone=1,mac=D0C5D3******,ssid=DaikinAP****,adp_mode=ap_run,en_hol=0,enlver=1.00,grp_name=,en_grp=0,en_secure=1,port=30050,id=,pw=

In addition my units are really slow to respond (> 10 seconds) so the 10 second timeouts inside the Home Assistant component code will fail to detect them during auto-discovery or even when manually adding them. To fix this I increased the timeout from 10 seconds to 60 seconds and they appear in Home Assistant and I can control them without any issues.

--- daikin.orig/hass/components/daikin/config_flow.py   2019-07-18 23:33:20.000000000 +1200
+++ daikin.new/hass/components/daikin/config_flow.py    2019-07-18 23:28:22.000000000 +1200
@@ -43,7 +43,7 @@
                 host,
                 self.hass.helpers.aiohttp_client.async_get_clientsession(),
             )
-            with timeout(10):
+            with timeout(60):
                 await device.init()
         except asyncio.TimeoutError:
             return self.async_abort(reason='device_timeout')
diff -rub daikin.orig/hass/components/daikin/__init__.py daikin.new/hass/components/daikin/__init__.py
--- daikin.orig/hass/components/daikin/__init__.py      2019-07-18 23:33:30.000000000 +1200
+++ daikin.new/hass/components/daikin/__init__.py       2019-07-18 23:28:08.000000000 +1200
@@ -87,7 +87,7 @@
     from pydaikin.appliance import Appliance
     session = hass.helpers.aiohttp_client.async_get_clientsession()
     try:
-        with timeout(10):
+        with timeout(60):
             device = Appliance(host, session)
             await device.init()
     except asyncio.TimeoutError:

Is someone able to test this and/or maybe rewrite this to ensure it is also compatible with the older controllers.

I am happy to post this as a bug/feature report once I know it works for other people.

i have yet to learn about codes and such
can someone compile it into files which i can overwrite into the old daikin component

that or i have to find the BRP072A42

thanks a bunch!