Thanks, just tried it but when using the binary files your command doesn’t work.
I might lack the right knowledge, but this is how it worked for me.
So when people use for example the Windows version you open a command prompt and you CD to your folder where the .exe file is stored (for example ‘cd C:\Daikin’ assuming that’s where tokensaver-win.exe is stored).
Then use the command tokensaver-win.exe "daikin-login" "daikin-password". It will then give a success output in the command prompt and have stored our token.
Nice that it works this way. Just have to find a nice way to automate it on my server, so it will just update every month or so through a cron job.
@rospogrigio do you think the custom component would be able to implement the username/password method, for those of us that don’t login to Daikin via Google/Facebook?
I don’t know how much of the token saver code you have ported to Python already.
Hi guys, again thanks for all the work, recently the integration stopped functioning. I am wondering whether I’m doing something wrong or this is known already…
I’ve pasted the logs of Home Assistant;
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 293, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/config/custom_components/daikin_residential/__init__.py", line 56, in async_setup_entry
await daikin_api.getCloudDeviceDetails()
File "/config/custom_components/daikin_residential/daikin_api.py", line 147, in getCloudDeviceDetails
return await self.doBearerRequest("/v1/gateway-devices")
File "/config/custom_components/daikin_residential/daikin_api.py", line 88, in doBearerRequest
await self.refreshAccessToken()
File "/config/custom_components/daikin_residential/daikin_api.py", line 119, in refreshAccessToken
res_json["AuthenticationResult"] is not None
KeyError: 'AuthenticationResult'
I could test this one of these days. Is it correct to say that the echonet lite protocol allows for direct (local) communication with the units? Could you also share some config you made for your units?
Great! Yes, it looks like the Echonet Lite protocol is completely handled locally within the LAN network. I followed the instructions for the custom component linked below. It says its for Mitsubishi systems, but the underlying protocol is shared so I guess it works for any Echonet Lite enabled systems. Instructions state that for Mitsubishi systems, Echonet Lite had to be manually enabled, but it seems that it is on by default for Daikin (at least for the model I tried). The only thing you’ll need to test it out besides the custom component is the IP address of your specific aircon.
Guys, I have big news. I have ported @Apollon77 's tokensaver code into python, and now the integration is able to login autonomously and retrieve the access TokenSet. Moreover, it retrieves a new TokenSet when it expires. Finally, I made it so that you just have to provide Daikin Cloud credentials in the integration, so the tokenset.json is no longer used and can be removed (all data is stored in in HA config_entries structure).
It should be ready for prime time but before I release it publicly I would like some people to test it and provide feedbacks, just in case something goes wrong. For anybody who would like to try, here is the PR:
Before you install it, remember to delete the integration, it has to be added again (with YAML or config flow, as desired). @intrinseca and @jorgeelima , you might be interested in trying this PR, I think.
Let me have your feedbacks, bye!
Then lets hope the “direct login logic” works for a longer time … I see a risk there because Daikin can “break” that anytime … but in fact the tokensaver with Proxy method will stay in my lib at least
Yep, and in case we need to update manually the TokenSet it’s possible to edit the .storage/core.config_entries file and replace it, very easily so the approach is not broken, but using config_entries is a much cleaner way to proceed for storing the integration data.
Let’s see how long this will last!
Invalid config for [daikin_residential]: [email] is an invalid option for [daikin_residential]. Check: daikin_residential->daikin_residential->email. (See ?, line ?).
Ok but with that method the token will eventually expire once per month and you’ll need to retrieve it again. Why don’t you try the PR I was referring to earlier?
I just wonder if this integration might work for the BRP069A62 controller?
I was able to add the integration and it logs in as it should however I get a warning saying “custom_components.daikin_residential.daikin_api] Device ‘None’ is filtered out”