Daikin AC Integration BRP069C4x

I would be happy to include this into the pydaikin library.

This should be stored in ha’s internal storage.

Yes, I think it might be useful but the procedure he put in place is quite working fine and it’s a one-time operation. I did not integrate that, I assume the user already has obtained his tokenset.

The integration is not yet ready for prime time, give me a couple of weeks and I’ll share it on Github.

2 Likes

Hey guys I bought some BRP069C4x models but when I try to integrate I get this:

Is there anyway to overcome this issue? I know that Daikin is not opening the API code but is there hope to control the AC from Home Assistant?

Thanks

OK guys I have something working but I also need some help because I’m not so familiar with async calls in HA. So, you can find the integration here:

Now, it works in my test environment (using VENV), but in my official environment (docked HASSIO with supervisor) it does not, and I get this error in my GET requests:
REQUEST FAILED: I/O must be done in the executor; Use await hass.async_add_executor_job() at custom_components/daikin_residential/__init__.py, line 147: res = requests.get(resourceUrl, headers=headers)
So, I tried to use the add_executor_job for calling requests.get and it seems to work but if I try it also on the requests.post call needed to refresh the token it fails, and I can’t seem to understand why.
I tried several things with no luck: can anybody help me with this? Once we pass through this, the integration should work quite fine.
Let me know thanks,
rospogrigio

3 Likes

I fixed something similar in the Miele integration:

1 Like

Thank you @gigatexel but it’s still not working.
What I cannot understand is that if I just change that line introducing the async_add_executor_job, the config flow does not even start showing the error “Config flow could not be loaded” in the interface, without any further error in the logs. What is shocking is that the changed line was not even called yet, so I can’t understand why it is breaking the config flow. I seriously need some help here because I really don’t know how to proceed…

Did you try your chances on Discord? I’m far from a Python or HA-dev expert unfortunately.

Why not… which room?

Maybe try the dev-room?

Getting responses might be tricky due to timezones :slight_smile:

Hello guys,

Is there any update on how to make the integration of Daikin Residential Controller work with HA?

Thanks

OK I seem to have fixed the issue, probably it was some kind of syntax error… now everything is working to me. Feel free to use the integration and report feedbacks thank you!
@jorgeelima give it a try!
Enjoy!

5 Likes

I can confirm that @rospogrigio way works!

1 Like

I can confirm too that integration works!
Thank you @rospogrigio and @Apollon77

1 Like

guys can you please help on how to get the cloud token? I try to run the nodejs example.js but I get the message that nodejs: comand not found.

This is the ssh terminal inside the HA. I have a raspberry pie4 running the HA

Tried to run the node comand in the Mac but the result was this

code: ‘MODULE_NOT_FOUND’,
requireStack: [
‘/Users/jorgelima/Downloads/daikin-controller-cloud-main/index.js’,
‘/Users/jorgelima/Downloads/daikin-controller-cloud-main/example/example.js’
]

Can anyone please help?

I’m using Linux aarch64

1 Like

Here is my walkthrough. I used a windows computer to get the token.

  1. Download the repo from apollon77 and unpack (GitHub - Apollon77/daikin-controller-cloud: Connect and Control Daikin Cloud devices)
  2. Install node-js for windows (Download | Node.js)
  3. Open a command shell and ‘cd’ to where the example.js file is. (your path/daikin-controller-cloud-main\example)
  4. Enter the following: npm install openid-client This will install openid-client which is needed for the example file.
  5. Enter the following: node example.js
  6. You should get a prompt that asked if it’s okay to start it. Press Accept.
  7. Close your Chrome, reopen it and clear your cache.
  8. In Chrome go to your proxy settings and enter your IP port of your device you are using and the 8888 port.
  9. Then go to youripadress:8889 and then follow those instructions.
  10. In the folder where your example.js, you will have a file called tokenset.json. Place that file in your configuration folder of home assistant like @rospogrigio states in his instructions.

All of this information comes from the PROXY.MD in the github from apollon77/gigatexel (daikin-controller-cloud/PROXY.md at main · Apollon77/daikin-controller-cloud · GitHub)

From this point follow his instructions to install the custom component.

This is how I go the Token file using a windows pc!

5 Likes

Issue solved. Thanks a lot @stefdewilde

Kudos to @rospogrigio, working brilliantly.

I have been trying to follow some of the other conversations on Github about the initial token retrieval (surely you shouldn’t need to use a browser if you have the username and password?) but I can vouch for how smooth the proxy-based process was, particularly with @stefdewilde’s instructions.

I do not get the file tokenset.json unfortunately, tried in 3 different browsers. Is there a way to retreive it from the url? or otherwise?

That’s not how it works :sweat_smile:… just follow the procedure described in appollo’s repo. Works perfectly :blush:

Thanks for your nice work! Glad to have this temporary workaround (using cloud). :facepunch:

1 Like