It would be great to get this fixed up. It does work although it fills my logs with errors.
Hi Daniel, did you manage to successfully integrate Zena ? I have Zena (FTXJ35TVMAW), with integrated WiFi and D-mobile app. I have tried Deakin integration and connection is being refused. I saw somewhere on this forum that https protocol is being used for this model. Any tips ?
Yeah mine’s been working beautifully with the Daikin component. Did you get the same BRP072A42 adapter?
I can access the API via http, no need for https and seems everything is up to date (firmware 3.4.3 on my adapter).
Hi Daniel, my version of Zena has integrated WiFi adapter, I hope to use it, but not sure if that it possible. Did your Zena have integrated WiFi ?
My Zena didn’t have built-in wifi, I had to buy that module and install it in a compartment on the indoor unit. My Zena model is FTXJ35PVMAS bought a few years ago now so maybe things have changed a bit.
There seems to be four different ways Daikin apps communicate.
- BRP069Axx/BRP069Bxx/BRP072Axx (supported natively)
- BRP15B61 aka. AirBase (supported natively)
- BRP072B/Cxx (needs https access and a key)
- SkyFi (different protocol, have a password)
It seems think that the D-mobile app are communicating with BRP072 units: https://www.daikin.co.nz/controllers/d-mobile-app-wall-mounted-only
In conjunction with Daikin’s BRP072A42 wireless LAN adaptor, the easy to use D-Mobile app lets you use your smartphone or tablet to operate your Daikin wall mounted air conditioning unit via Wi-Fi or the internet.
I’m working on adding the last two into the Daikin integration, but it is going quite slow as I need testers for the new code.
Here is a discussion on how to get 72B/C working: Daikin BRP072C42 WIFI custom component - #29 by LintHart
Anyone (ping @Borgy, @moorey81, @markss), please send me a PM so we can set up a test environment for testing pyDaikin 2.0 (with support for all known models).
Thanks @fredrike. I am not sure what version of WiFi adapter I have, as it is internal, but I will try your suggestions. I am available for any testing against my Zena, if needed.
Cheers, Boris
Which mobile app are you using?
I am using Mobile Controller app. The Zena model is: FTXJ35TVMAW.
This one: https://play.google.com/store/apps/details?id=eu.daikin.remoapp / DAIKIN Mobile Controller on the App Store ?
BC, that falls under the first category (Daikin AC - Home Assistant)
- BRP069Axx/BRP069Bxx/BRP072Axx
I have a BRP069B myself so that is already tested .
Yes, I am using that Mobile app.
Hi!
I’ve got a new version of pydaikin, it would be great if someone could test the new SkyFi support it adds. If you have docker installed it will quite easy to set up a testing environment:
docker run -it --rm python:3-alpine sh -c 'apk add --no-cache build-base linux-headers; pip install pydaikin==2.0.0.dev7; sh'
From there you can run the pydaikin
app with just pydaikin -p <skyfi-password> -a <ip of device>
.
Ive spun that up and got this response:
/ # pydaikin -p ##### -a 192.168.1.2
Traceback (most recent call last):
File “/usr/local/bin/pydaikin”, line 111, in
daikin = loop.run_until_complete(
File “/usr/local/lib/python3.8/asyncio/base_events.py”, line 616, in run_until _complete
return future.result()
File “/usr/local/lib/python3.8/site-packages/pydaikin/daikin_base.py”, line 77 , in factory
await appl.init()
File “/usr/local/lib/python3.8/site-packages/pydaikin/daikin_skyfi.py”, line 6 3, in init
await self.update_status(self.HTTP_RESOURCES)
File “/usr/local/lib/python3.8/site-packages/pydaikin/daikin_base.py”, line 16 5, in update_status
self.values.update(await self._get_resource(resource))
File “/usr/local/lib/python3.8/site-packages/pydaikin/daikin_base.py”, line 14 5, in _get_resource
return await self._run_get_resource(resource)
File “/usr/local/lib/python3.8/site-packages/pydaikin/daikin_skyfi.py”, line 9 7, in _run_get_resource
return await super()._run_get_resource(resource)
File “/usr/local/lib/python3.8/site-packages/pydaikin/daikin_base.py”, line 15 6, in _run_get_resource
return self.parse_response(await resp.text())
File “/usr/local/lib/python3.8/site-packages/pydaikin/daikin_skyfi.py”, line 9 1, in parse_response
response = dict([e.split(’=’) for e in response_body.split(’,’)])
ValueError: dictionary update sequence element #0 has length 20; 2 is required
/ #
Hi @fredrike
I’ve run the command through docker and here are the results:
/ # pydaikin -p XXXX -a 192.168.X.X -v
DEBUG:asyncio:Using selector: EpollSelector
DEBUG:pydaikin.daikin_base:Updating [‘ac.cgi?’, ‘zones.cgi?’]
Traceback (most recent call last):
File “/usr/local/bin/pydaikin”, line 111, in
daikin = loop.run_until_complete(
File “/usr/local/lib/python3.8/asyncio/base_events.py”, line 616, in run_until_complete
return future.result()
File “/usr/local/lib/python3.8/site-packages/pydaikin/daikin_base.py”, line 77, in factory
await appl.init()
File “/usr/local/lib/python3.8/site-packages/pydaikin/daikin_skyfi.py”, line 63, in init
await self.update_status(self.HTTP_RESOURCES)
File “/usr/local/lib/python3.8/site-packages/pydaikin/daikin_base.py”, line 165, in update_status
self.values.update(await self._get_resource(resource))
File “/usr/local/lib/python3.8/site-packages/pydaikin/daikin_base.py”, line 145, in _get_resource
return await self._run_get_resource(resource)
File “/usr/local/lib/python3.8/site-packages/pydaikin/daikin_skyfi.py”, line 97, in _run_get_resource
return await super()._run_get_resource(resource)
File “/usr/local/lib/python3.8/site-packages/pydaikin/daikin_base.py”, line 156, in _run_get_resource
return self.parse_response(await resp.text())
File “/usr/local/lib/python3.8/site-packages/pydaikin/daikin_skyfi.py”, line 91, in parse_response
response = dict([e.split(’=’) for e in response_body.split(’,’)])
ValueError: dictionary update sequence element #0 has length 20; 2 is required
I’ll dig in and have a look to see if I can see more but felt I would post this for now
Hi Fredrik
I dont know if this will help. I am using splendstroms code which works to some degree, these are the errors in my home assistant log.
2020-04-27 00:43:17 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.daikin is taking over 10 seconds
2020-04-27 00:43:21 WARNING (SyncWorker_19) [custom_components.skyfi.climate] decode opmode=0 tried [‘opmode’, ‘0’]:
2020-04-27 00:43:21 WARNING (SyncWorker_19) [custom_components.skyfi.climate] decode units=. tried [‘units’, ‘.’]:
2020-04-27 00:43:21 WARNING (SyncWorker_19) [custom_components.skyfi.climate] decode settemp=26.0 tried [‘settemp’, ‘26.0’]:
2020-04-27 00:43:21 WARNING (SyncWorker_19) [custom_components.skyfi.climate] decode fanspeed=3 tried [‘fanspeed’, ‘3’]:
2020-04-27 00:43:21 WARNING (SyncWorker_19) [custom_components.skyfi.climate] decode fanflags=1 tried [‘fanflags’, ‘1’]:
2020-04-27 00:43:21 WARNING (SyncWorker_19) [custom_components.skyfi.climate] decode acmode=8 tried [‘acmode’, ‘8’]:
2020-04-27 00:43:21 WARNING (SyncWorker_19) [custom_components.skyfi.climate] decode tonact=0 tried [‘tonact’, ‘0’]:
2020-04-27 00:43:21 WARNING (SyncWorker_19) [custom_components.skyfi.climate] decode toffact=0 tried [‘toffact’, ‘0’]:
2020-04-27 00:43:21 WARNING (SyncWorker_19) [custom_components.skyfi.climate] decode prog=0 tried [‘prog’, ‘0’]:
2020-04-27 00:43:21 WARNING (SyncWorker_19) [custom_components.skyfi.climate] decode time=10:47 tried [‘time’, ‘10:47’]:
2020-04-27 00:43:21 WARNING (SyncWorker_19) [custom_components.skyfi.climate] decode day=0 tried [‘day’, ‘0’]:
2020-04-27 00:43:21 WARNING (SyncWorker_19) [custom_components.skyfi.climate] decode roomtemp=21 tried [‘roomtemp’, ‘21’]:
2020-04-27 00:43:21 WARNING (SyncWorker_19) [custom_components.skyfi.climate] decode outsidetemp=19 tried [‘outsidetemp’, ‘19’]:
2020-04-27 00:43:21 WARNING (SyncWorker_19) [custom_components.skyfi.climate] decode louvre=0 tried [‘louvre’, ‘0’]:
2020-04-27 00:43:21 WARNING (SyncWorker_19) [custom_components.skyfi.climate] decode zone=32 tried [‘zone’, ‘32’]:
2020-04-27 00:43:21 WARNING (SyncWorker_19) [custom_components.skyfi.climate] decode flt=0 tried [‘flt’, ‘0’]:
2020-04-27 00:43:21 WARNING (SyncWorker_19) [custom_components.skyfi.climate] decode test=0 tried [‘test’, ‘0’]:
2020-04-27 00:43:21 WARNING (SyncWorker_19) [custom_components.skyfi.climate] decode errcode= tried [‘errcode’, ‘’]:
2020-04-27 00:43:21 WARNING (SyncWorker_19) [custom_components.skyfi.climate] decode sensors=1 tried [‘sensors’, ‘1’]:
@markss, @stavroz: I’ve updated the code and pushed a new version: docker run -it --rm python:3-alpine sh -c 'apk add --no-cache build-base linux-headers; pip install pydaikin==2.0.0.dev10; sh'
should do the trick.
Try running it with pydaikin -p XXXX -a -v 192.168.X.X
to get the debug logging.
Done, results:
/var # **pydaikin -p XXXXX -a -v 192.168.X.X**
DEBUG:asyncio:Using selector: EpollSelector
DEBUG:pydaikin.daikin_base:Updating ['ac.cgi?', 'zones.cgi?']
Traceback (most recent call last):
File "/usr/local/bin/pydaikin", line 111, in <module>
daikin = loop.run_until_complete(
File "/usr/local/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/usr/local/lib/python3.8/site-packages/pydaikin/daikin_base.py", line 77, in factory
await appl.init()
File "/usr/local/lib/python3.8/site-packages/pydaikin/daikin_skyfi.py", line 63, in init
await self.update_status(self.HTTP_RESOURCES)
File "/usr/local/lib/python3.8/site-packages/pydaikin/daikin_base.py", line 165, in update_status
self.values.update(await self._get_resource(resource))
File "/usr/local/lib/python3.8/site-packages/pydaikin/daikin_base.py", line 145, in _get_resource
return await self._run_get_resource(resource)
File "/usr/local/lib/python3.8/site-packages/pydaikin/daikin_skyfi.py", line 97, in _run_get_resource
return await super()._run_get_resource(resource)
File "/usr/local/lib/python3.8/site-packages/pydaikin/daikin_base.py", line 156, in _run_get_resource
return self.parse_response(await resp.text())
File "/usr/local/lib/python3.8/site-packages/pydaikin/daikin_skyfi.py", line 91, in parse_response
response = dict([e.split('=') for e in response_body.split(',')])
**ValueError: dictionary update sequence element #0 has length 20; 2 is required**
if I put http://192.168.X.XX:2000/ac.cgi?pass=XXXXX in the browser, I get:
opmode=0&units=.&settemp=24.0&fanspeed=3&fanflags=1&acmode=16&tonact=0&toffact=0&prog=0&time=07:40&day=6&roomtemp=28&outsidetemp=0&louvre=1&zone=0&flt=0&test=0&errdata=146&sensors=1
Looking at the code (I am still learning python so I coul dbe wrong) this seems to be trying to parse the response from http into the different values.
I’ll try and dig in further later, family calls
That is not from the dev8 code…
Edit:
To set up a test-environment to run my HA code the following Docker command should work:
docker run --name=hadev -p 8123:8123 -it python:3.8 sh -c 'apt-get update; apt-get install -y python3-pip python3.7-dev python3.7-venv python-wheel-common autoconf libssl-dev libxml2-dev libxslt1-dev libjpeg-dev libffi-dev libudev-dev zlib1g-dev libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libavresample-dev libavfilter-dev; git clone -b daikin-2.0 --single-branch https://github.com/fredrike/home-assistant.git /home-assistant; cd /home-assistant; git reset --hard; git pull; pip install sqlalchemy; script/setup; hass'
Then you can just go to http://localhost:8123 and set up an user and a Daikin component, be sure to fill the “Password” field as that is used to identify that it is a SKYFi unit.
To stop press ctrl-c, and docker stop hadev
, then you can do docker start --attach hadev
to update and run a new version.
All patience with this type of cruel testing is much appreciated.
here is my logs for this version. I will give the test-environment atry tomorrow.
/ # pydaikin -p ##### -a -v 192.168.1.2
DEBUG:asyncio:Using selector: EpollSelector
DEBUG:pydaikin.daikin_base:Updating [‘ac.cgi?’, ‘zones.cgi?’]
DEBUG:pydaikin.daikin_skyfi:Parsing opmode=0&units=.&settemp=26.0&fanspeed=3&fanflags=1&acmode=8&tonact=0&toffact=0&prog=0&time=20:49&day=0&roomtemp=21&outsidetemp=19&louvre=0&zone=32&flt=0&test=0&errcode=&sensors=1
DEBUG:pydaikin.daikin_skyfi:Parsing nz=4&zone1=Bed%202%2C3%2C4&zone2=Bed%201%2C%20upsta&zone3=Family&zone4=Bed%205%2C%20lower
DEBUG:pydaikin.daikin_base:Represent: acmode, acmode, 8
acmode: 8
DEBUG:pydaikin.daikin_base:Represent: day, day, 0
day: 0
DEBUG:pydaikin.daikin_base:Represent: errcode, errcode,
errcode:
DEBUG:pydaikin.daikin_base:Represent: fanflags, fanflags, 1
fanflags: 1
DEBUG:pydaikin.daikin_base:Represent: fanspeed, fanspeed, 3
fanspeed: 3
DEBUG:pydaikin.daikin_base:Represent: flt, flt, 0
flt: 0
DEBUG:pydaikin.daikin_base:Represent: louvre, louvre, 0
louvre: 0
DEBUG:pydaikin.daikin_base:Represent: nz, nz, 4
nz: 4
DEBUG:pydaikin.daikin_base:Represent: opmode, opmode, 0
opmode: 0
DEBUG:pydaikin.daikin_base:Represent: outsidetemp, outsidetemp, 19
outsidetemp: 19
DEBUG:pydaikin.daikin_base:Represent: prog, prog, 0
prog: 0
DEBUG:pydaikin.daikin_base:Represent: roomtemp, roomtemp, 21
roomtemp: 21
DEBUG:pydaikin.daikin_base:Represent: sensors, sensors, 1
sensors: 1
DEBUG:pydaikin.daikin_base:Represent: settemp, settemp, 26.0
settemp: 26.0
DEBUG:pydaikin.daikin_base:Represent: test, test, 0
test: 0
DEBUG:pydaikin.daikin_base:Represent: time, time, 20:49
time: 20:49
DEBUG:pydaikin.daikin_base:Represent: toffact, toffact, 0
toffact: 0
DEBUG:pydaikin.daikin_base:Represent: tonact, tonact, 0
tonact: 0
DEBUG:pydaikin.daikin_base:Represent: units, units, .
units: .
DEBUG:pydaikin.daikin_base:Represent: zone, zone, 32
Traceback (most recent call last):
File “/usr/local/bin/pydaikin”, line 116, in
daikin.show_values(only_summary)
File “/usr/local/lib/python3.8/site-packages/pydaikin/daikin_base.py”, line 220, in show_values
(k, val) = self._represent(key)
File “/usr/local/lib/python3.8/site-packages/pydaikin/daikin_skyfi.py”, line 107, in _represent
val = list(str(bin(int(self[key])) + 256))[3:]
TypeError: can only concatenate str (not “int”) to str
Great! I’ve found that error too. I think we are quite close. Would be fun to see how the HA integration comes out.