Apollon77 / daikin-controller-cloud

Connect and Control Daikin Cloud devices
MIT License
99 stars 26 forks source link

Daikin Cloud API Syncing #159

Open Jedden19 opened 2 months ago

Jedden19 commented 2 months ago

Hello,

since one week following error occurred: [DaikinCloud] [API Syncing] Failed to get cloud devices from Daikin Cloud: invalid_grant (The provided authorization code or refresh token is revoked.)

I set up the Plugin again with new token, but the same result.

All updated.

nightsha-de commented 2 months ago

Same here. Getting a new token by logging in at Daikin again via instance configuration works, but this new token seems to be valid for about a day and is not automatically refreshed (noticed it the first time yesterday and had to renew manually again today).

Apollon77 commented 2 months ago

Which Client ID you used? The temporary one from the last weeks or an own client id from the portal? What happens if yopu do auth process from scratch? Does it work then?

Jedden19 commented 2 months ago

An own Client ID. Same result after starting from scratch (new Client ID, new Secret)Mit freundlichen Grüßen Jesco Nirrnheim Am 06.09.2024 um 18:46 schrieb Ingo Fischer @.***>: Which Client ID you used? The temporary one from the last weeks or an own client id from the portal? What happens if yopu do auth process from scratch? Does it work then?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

Apollon77 commented 2 months ago

The API and library did not changed ... maybe Daikin changed something?

Jedden19 commented 2 months ago

Seems like that if you don't change anything.

Apollon77 commented 2 months ago

And you really did a full retry with auth and login on daikin side via admin of the adapter and such?

Jedden19 commented 2 months ago

No, I set an new App at Daikin Cloud with Client ID and Secret. This I entered in the Adapter.

Apollon77 commented 2 months ago

If you change client id and secret you also need to re-do the auth flow in admin ... else this can not work because the tokens are created for the entered client id ... so with this the "invalid grant" outcome is 1000% to be expected

Jedden19 commented 2 months ago

So now I uninstalled the Adapter created a new App at Daikin Cloud with new Client and Secret, this I entered at the Adapter. Still the same result.

Apollon77 commented 2 months ago

And after entering client id and client secret you also did the "Login with Daikin" process ending in an "ok" page? Please enable debug logging and show the log of this process please

sergmal commented 2 months ago

I have similar issue.. I have created token but it expires too quickly.. How long it is valid? Does it needs to be refreshed periodically? Looks like refresh token is not working

Apollon77 commented 2 months ago

The adapter does all this ... so if you have issues please post debug log and make sure to use the most current version

jacoscaz commented 2 months ago

@Jedden19 @nightsha-de as we just saw in #160 , limitations to FS access might play a role. Could you confirm whether the library is actually able to write data to the file at the oidcTokenSetFilePath path and whether this file is persisted across restarts of your system (which might not be the case if, for example, you're running this library within a Docker container and without mounted volumes)?