-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CTXM15R5V1B and FTXM20R5V1B : New API? #123
Comments
Hi @jptoucas If you can find out how your device works and you can provide a list of working URLs, preferred in CURL format, there is a chance that API can be added too. |
Thanks for your feedback. |
This may be that API your are dealing with: |
Yes it looks like to be the right one ! |
I have a plan to do a plugin for that API, but I have to finish another project first, an iOS app. I can't believe how bad the DKN app is. It's an embarrassment. |
I agree, the app is far from perfect :( |
I’ve run into the same problem...my brand new Daikins only talk the new protocol. Shit. |
@jptoucas what is the full endpoint for the first call to authenticate? |
Oh by the way... if you look at the webpage of your WiFi controller, it looks like it’s got MQTT built in... that would be really interesting |
The first request I see from iOS Is a POST to https://sentry.io/api/1860051/envelope/ then a GET with https://api.prod.unicloud.edc.dknadmin.be/v1/info The webpage shows FreeRTOS and mention "Eclipse Paho MQTT C/C++ client for Embedded platforms" : Only the port 80 is listening on my unit, I'm not sure there is MQTT capability here |
Interesting... I've put this in a bit of code, conform the procedure listed in the API document above... but now with the URL you indicated:
I've used the e-mail address and password I'm using to authenticate the Daikin Residential Controller. The response I get makes a little more sense than with the Daikin URL from the document:
However, it looks like the authentication process does not conform with the API document. |
The Sentry also supports an OAuth process... https://docs.sentry.io/product/integrations/integration-platform/ |
If I run the same code with a link to: https://api.prod.unicloud.edc.dknadmin.be/v1/info then the response is:
which makes sense because I do not yet have a token. |
Hi, I also have a pair of devices with the BRP069C4x adapter, I'm following this thread and open to do testing if needed. |
To complete my last message: There is the curl command : There is a bearer token (replaced by ZZZZ) , an api-key (replaced by yyyy) and another string if-none-match (replaced by XXXX, it has to be different for another calls) |
I tried to log the same with Charles Proxy however when I did I'm sure I must be doing something wrong. The Daikin app complains there is no network, and it won't find my airconditioning units. So I have no sensible values for XXXX, YYYY and ZZZ above. Could you perhaps mail me them at vanes.peter at google.com so that I can insert them into code and see if I can get a valid token. We are getting closer: Then we also need the exact payload of the PUT and GET to daikin-unicloud... and api.prod.unicloud... as I think that is where the interaction is happening! |
Hi, you need to enable SSL proxying in Charles, for each target hosts. I followed this tutorial : https://www.raywenderlich.com/1827524-charles-proxy-tutorial-for-ios#toc-anchor-004 I had the same issue in the iOS App (don’t forget to enable the full trust of the Charles certificate in your iOS devise in Settings/General/Informations/certificate settings, it was not on the tutorial) |
The XXXX should be irrelevant and you could be able to remove that header. it is just the ETAG from last call to allow server side caching. And the "bearer token" should have come from an earlier login into the cloud account? So maybe the best idea ois to try a "complete fresh app install". maybe I can try next days with my app, i never logged in into that cloud account, maybe so I can get a fresh capture |
Maybe also @rjcarlson49 or @LostInTheTrees ... I saw you created some time ago ca new homebrudget fork with a name like "cloud" :-) maybe you also have some notes .... |
Hi guys, I was following up this topic since I got a brand new Daikin HVAC coming with the new BRP069C4x controller. Unfortunately I cannot add it from my Home Assitant server because of the brand new cloud API using AWS. I have done some tests, catching some traffic, and I was able to catch the request to obtain a bearer token composed of an id_token, an access_token, a refresh_token and an default expiration of 3600. I've also catched something that is probably the whole configuration of my unit by using this URL https://api.prod.unicloud.edc.dknadmin.be/v1/gateway-devices And, last but not least I was barely able to replay a ON action and a OFF action with a valid authorization from my laptop by using this URL https://api.prod.unicloud.edc.dknadmin.be/v1/gateway-devices/7f9245ed-26a0-4a01-ba61-5fb2145df510/management-points/climateControl/characteristics/onOffMode with this kind of argument: I'm not copy/pasting things here since I'm not sure what should be obfuscated. I'm not a dev and I don't have skills regarding API but I'm just here to help if somebody wants to go a little bit further. Thanks, |
Were you also able to get the call to get the access/refresh tokens before? (normally happens when you login into the cloud account) If you like (and are ok with someone else looking at the traffic I would be happy to get your infos via email (not that public) to [email protected] (and to tell why I ask that ... I develop the nodejs daikin lib daikin-controller |
That's not clear at this point but I'll sent you required info tonight since I'm not focused at the moment I'm just doing things in background. I was also able to retrieve new access token by using the refresh token and send commands to the unit like changing the temperature with the new generated access token succesfully. |
That's really good, because that is what is needed to keep this going. And as @Apollon77 says, we need to know how to start up the exchange for a particular device. |
Hi, I would like to test my device as well, may I ask you some questions? How can I signup for a cloud account? Which is the URL I should refer to? |
In my eyes it is all about getting the app traffic. Then ideally uninstall the app and install again and then gettraffic started with the veeery first start (because some apps register themself on first start and get an id or such). ANd then regioster the new adapter and then wee see what happens there. I'm also at that process right now with one other user, but also here the "startpoint" is missing ... lets see :-) When we then understood it we can make it public (so not data but "how to do it") :-) |
Those are both me. I have not gotten to this project yet. I did another plugin first since this one will be a lot more complicated. I am also working on an unrelated iOS app that is almost done. I suspect I'll start this one in about a month. I have 6 Daikin Vista indoor units that mount in the ceiling. They connect to 2 compressors outdoors. Having lived with them awhile I have learned a lot. First, I think their controls are godawful bad. The app they made is pathetic, so I am dying to get them into Homekit so I have decent control. For just one example, we cannot get them to heat unless all three indoor units on a compressor are set to identical settings and then cycled off then on. Even then, one of the systems will not heat. |
I'm not sure why you think you need to capture the app traffic. The API doc looked pretty good to me. My plan was to get a good OAUTH2 package and let that do the login. Then once the security is taken care of, the API should define how to control the devices. I've done a lot of wifi and ethernet capturing in my life and when encryption is happening it's quite difficult. I would use it only as a last resort. |
Thanks. This morning I have managed to work out most of the protocol used by the BRP069C41 to talk to the main unit (certainly the main temperature and mode controls), and so am working on a replacement unit. Hopefully it is similar protocol to the other new WiFi units. One idea would be to make it have the same URLs on it as the older Daikin WiFi modules - that should not be too hard. And also add MQTT and other stuff. I have documented what I have worked out so far: https://github.com/revk/ESP32-Daikin/raw/main/Daikin.pages This is proposed circuit board (well, it will be this size anyway, needs a couple of FETs adding). |
Impressive job @revk !! Actually somebody has found some local endpoints but the search didn't get far, maybe there could be something more to try but who knows. You may want to have a look at these two threads: Nice job for the ESP adapter, how much does it cost to have it prototyped? |
I'll get a batch of 10 boards to start, and a stencil, probably a few pounds a board, and then a few pounds of components. Nothing that expensive on there. |
Hi, I have managed to get a token using Apollon77's method, however, I'm at an end on what to do next. Does the homebridge pluggin support these tokens? How can I go about making it work through homebridge? Any help would be greatly appreciated. I understand this isn't the local method everyone was hoping for (me included) but it is at least a good start and gets these devices working in Homekit. M |
hey all, I got a report that since an app update yesterday the API is no longer working and produces an Error 400 ... anyone else having this issue? Are any more details available? Else we need a new "traffic sniffing" from the app |
Any idea on how we can use this method with homebridge ? |
@bartjanisse And which request got that error? tried with a new token? |
One feedback was that the old tokens seems to have issues ... so people need to regenerate the token |
The new token did the trick. I didn't needed a new one for such a long time I was forgotten about it completely. Thanks for the feedback! |
Hey everyone. I was redirected here from #207, but it was for the FTHP09Q5VL model. Does the solution you guys are implementing work for this model? |
No idea, try and see if it works... cheers |
I'm creating a basic Homebridge plugin for Daikin cloud devices: https://github.com/JeroenVdb/homebridge-daikin-cloud I'll try to publish this ASAP but I have some problems with my npmjs account. Remarks:
|
You can try it out: https://www.npmjs.com/package/homebridge-daikin-cloud |
Ok, I think we can close here too or? Hoembridge plugin exists, library exists, (ioBroker adater exists too) (and Home-Assistant is also done) ... :-) |
Thanks guys for your work!!!!! |
It’s working well to with BRP069B4x 👍🏻👍🏻 |
@cbrandlehner as per discussed on this issue, the solution above using the Any updates on this? |
@edgarfroes I do not own one of these devices so I can not help with testing or coding. My devices are old ones that work without cloud, https and without UUID. |
@edgarfroes What mobile app do you use in brazil? Is it also the "Onecta App" or something else? In fact it would require exact infos about which app and such and access credentials of such an account to check out whats exactly behind it (and obviously time to do that) |
I use these apps: Play Store (Android) They can be available in certain countries only, but I'm not sure. Here's their website, in Brazilian Portuguese: https://www.daikin.com.br/conectividade-app-smart-ac Edit: my model also works with Google Assistant and Alexa, and the response is so fast that I assume that they're sending commands via the network, but I'm not sure. |
I'm also available anytime to debug something if needed, chat or have a call, just ping me here. |
@edgarfroes I think a separate issue is the best to not mix stuff. In general we would need a mobile app trace. This could e done by "Charles Proxy". Set that up on your PC, register and activate the right SSL Root Cert in the phone (see https://www.charlesproxy.com/documentation/using-charles/ssl-certificates/), download from there, set up proxy in your phone to point to charles. then ideally uninstall the app and install again. Then activate the proxy and startup the app, login into your account and interact with your devices ... in chalres you should see GET and POST calls ... if you only see CONNECT then ssl is not setup correctly - fix that and repeat!! Then save that session and send me the file to [email protected] and I can have a nlook to see if it is the same but just different servers or if it is something completely new |
Is there no local API for these controllers at all? Or have we just not figured out how it works? |
I'm a Hubitat user, not HA, but I'd like to try to help you guys. It seems that there's a HA integration - check it out: https://www.home-assistant.io/integrations/daikin/ Hope it helps. |
Hello,
I have a CTXM15R5V1B and FTXM20R5V1B units, the pages called by the plugin doesn't exists on those units:
ERROR: Queued request to http://192.168.1.147/common/basic_info returned error Error: Not Found
at Request.callback (/homebridge/node_modules/homebridge-daikin-local/node_modules/superagent/src/node/index.js:879:15)
at IncomingMessage. (/homebridge/node_modules/homebridge-daikin-local/node_modules/superagent/src/node/index.js:1130:18)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
status: 404,
response: [Response],
retries: 0
I tried the url http://192.168.1.147/aircon/get_model_info and I got this message :
Page Not Found
/aircon/get_model_info
And with http://192.168.1.147/skyfi/aircon/get_model_info :
Page Not Found
/skyfi/aircon/get_model_info
I have another unit (FTXA50A2V1BW) that is working well with the plugin.
The wifi controler is new, the BRP069C4x, It looks like there is a full new api to discuss with it.
I started to catch https calls from the Daikin Residential Controler : from France, we need to discuss with https://api.prod.unicloud.edc.dknadmin.be 4
First request on https://api.prod.unicloud.edc.dknadmin.be/v1/info 6
Second request on ***/v1/gateway-devices
Dont know yet how is done the authentication, I don’t know if there is a way to connect locally to each Daikin units ..
That would be great if we could get the compatibility of new units with homebridge, I will help if my skills are enough on this topic !
The text was updated successfully, but these errors were encountered: