JeroenVdb / homebridge-daikin-cloud

This Homebrige plugin connects to the Daikin Cloud and loads all your devices to be controled via Homebridge and Homekit.
https://www.npmjs.com/package/homebridge-daikin-cloud
Apache License 2.0
40 stars 11 forks source link

Token is revoked #85

Closed anthouny closed 1 month ago

anthouny commented 2 months ago

[API Syncing] Failed to get cloud devices from Daikin Cloud: invalid_grant (The provided authorization code or refresh token is revoked.)

Key and ClientID are good, but I have this error

BrunoBernardini commented 2 months ago

Hello, I'm experiencing the same issue too. I tried to downgrade to the latest stable version (2.5.0), thinking it was an issue of the latest beta I was using, but it didn't solve anything. Is there any way or "workaround" that could be used to temporarly fix the problem, while we wait for the definitive fix to come?

JeroenVdb commented 2 months ago

This should fix it: https://github.com/JeroenVdb/homebridge-daikin-cloud?tab=readme-ov-file#access-token-or-refresh-token-is-revoked

anthouny commented 2 months ago

I can't find this file, in which folder is it? What is the way?

gerbenvandijk commented 2 months ago

This should fix it: https://github.com/JeroenVdb/homebridge-daikin-cloud?tab=readme-ov-file#access-token-or-refresh-token-is-revoked

@JeroenVdbFYI, I've done this several times (although the file was called daikincontrollercloudtokenset so without dashes, docs say daikin-controller-cloud-tokenset). Afterwards restarted HomeBridge or even the entire machine several times and still the message in the homebridge logs persists. The units still appear in HomeKit and the commands arrive in HomeBridge - I can see them going on and off upon interaction in Apple Home. However the commands never reach the physical devices, they sit idle. On v2.6.0-beta.5. Let me know if I can debug or so.

ScraggyMcRaggy commented 2 months ago

Once the file is deleted you must visit the authorisation login again.

anthouny commented 2 months ago

This should fix it: https://github.com/JeroenVdb/homebridge-daikin-cloud?tab=readme-ov-file#access-token-or-refresh-token-is-revoked

I can't find this file, in which folder is it? What is the way?

ScraggyMcRaggy commented 2 months ago

To find the file, access Homebridge and look at the nightside panel. You will see something like "Storage Path: /var/lib/homebridge"

This is where your .daikin-controller-cloud-tokenset can be found.

Accessing it will vary depending on the device your running Homebridge. But try this.

On the homebridge Home Screen select the top left option icon (three vertical dots) and then select terminal.

Run the command cd /var/lib/homebridge (directory is an example, you should use the one you found when looking at 'Storage Path' earlier.

Run the command ls -a

Run the command rm -f .daikin-controller-cloud-tokenset

This would have then deleted the file. You then need to run the URL authorisation process as described in the GitHub description.

anthouny commented 2 months ago

Thanks a lot

To find the file, access Homebridge and look at the nightside panel. You will see something like "Storage Path: /var/lib/homebridge"

This is where your .daikin-controller-cloud-tokenset can be found.

Accessing it will vary depending on the device your running Homebridge. But try this.

On the homebridge Home Screen select the top left option icon (three vertical dots) and then select terminal.

Run the command cd /var/lib/homebridge (directory is an example, you should use the one you found when looking at 'Storage Path' earlier.

Run the command ls -a

Run the command rm -f .daikin-controller-cloud-tokenset

This would have then deleted the file. You then need to run the URL authorisation process as described in the GitHub description.

Thanks a lot

anthouny commented 1 month ago

1 week later, issue come back again

hcancelik commented 1 month ago

I was also able to resolve the issue with following the instructions above but it just happened again.

ScraggyMcRaggy commented 1 month ago

Yeah, the token is often revoked. I presume this is a Daikin thing. Either that, or the plugin is making too many calls to the API. I've tried increasing the time it makes a pull, and it has improved things a little, but the error still crops up from time to time.

eco2delta commented 1 month ago

Hi there!

What can i do if i just deleted the token ".daikin-controller-cloud-tokenset" from homebridge and trying to reauthenticate by accessing thge authorization url with the "grant permission hint" But if i agree it can not reach my page saying only something went wrong?

I also tried to get a new accesstoken or refreshtoken but it always says thefollowing: { "message": "no Route matched with those values", "request_id": "fc6fa06ae874a407e3aebc024f9d5305" }

and homebridge tells me

[07/10/2024, 19:12:40] [DaikinCloud] [API Syncing] Failed to get cloud devices from Daikin Cloud: invalid_grant (The provided authorization code or refresh token is revoked.)

2024-10-07_19h20_33 2024-10-07_19h21_14

Sorry i have no clue :(

Have a great start into the week guys!

DenDeXTeR51 commented 1 month ago

Same problem, after 1-2 week and several reboots - I get this error again

hcancelik commented 1 month ago

@DenDeXTeR51 Setting the time interval to 30 minutes seems to work.

Screenshot 2024-10-17 at 01 08 59

ScraggyMcRaggy commented 1 month ago

@DenDeXTeR51 Setting the time interval to 30 minutes seems to work.

Screenshot 2024-10-17 at 01 08 59

I did the same 2 weeks ago and haven't had this issue since.

anthouny commented 2 weeks ago

The problem is still there, despite this setting

@DenDeXTeR51 Setting the time interval to 30 minutes seems to work. Screenshot 2024-10-17 at 01 08 59

I did the same 2 weeks ago and haven't had this issue since.

hcancelik commented 2 weeks ago

Yeah, it's no longer working.

Daikin Developers are trying harder for devs to refrain from using their API.