lukasroegner / homebridge-dyson-pure-cool

Plugin for using the Dyson Pure Cool fans in homebridge.
MIT License
291 stars 52 forks source link

Does not work anymore error 401 #159

Closed henkied closed 3 years ago

henkied commented 3 years ago

Hello both my dysons are not working in homebridge anymore

I have 2 hombridge running both are not working. Any one know how to solved it

[DysonPureCoolPlatform] Error while signing in. Status Code: 401 [DysonPureCoolPlatform] API could not be reached. Retry is disabled.

GoTeslaGo commented 3 years ago

seeing the same error. App is working so assume the API is still working but something may have changed

knedd commented 3 years ago

I am seeing the same error as well. App is working, but receiving the sign-on error in the log.

Stewart06 commented 3 years ago

J'ai exactement le même problème actuellement. Il est possible que cela vienne d'une mise à jour du plugin pour correspondre à l'API. Ou alors cela vient des serveurs de chez Dyson.

I have the exact same problem now. It is possible that this came from a plugin update to match the API. Or it comes from Dyson servers.

henkied commented 3 years ago

Does the dyson work for you with Homekit?

Stewart06 commented 3 years ago

Yes !

krharrison1 commented 3 years ago

I have been seeing the 401 error in HB logs since yesterday. Restarting HB has no effect. I’m able to login to the Dyson website, my credentials are still good. Guessing that the API has changed again...

jyjourdain commented 3 years ago

Hi! Also here:

[2/12/2021, 14:22:57] [DysonPureCoolPlatform] Error while signing in. Status Code: 401

How can I help?

Stewart06 commented 3 years ago

Se qui est bizarre c’est que parfois le plugin arrive à se connecter !

patowod commented 3 years ago

Chiming in (Dyson login on their site via credentials (as in config) is working). Following Log entry:

[2/12/2021, 3:05:04 PM] [DysonPureCoolPlatform] Error while signing in. Status Code: 429 [2/12/2021, 3:05:04 PM] [DysonPureCoolPlatform] API could not be reached. Retry is disabled.

Stewart06 commented 3 years ago

F7419D68-427F-4D59-9A1B-444AD576B98D

J’ai remarqué que si je suis en wifi impossible de me connecter à mon compte Dyson. Alors que si je suis en 4G ça fonctionne.

ndornquast commented 3 years ago

I get same error. This worked for last couple weeks great.. this week not so much. I did installed the latest release which mention API fix.. but still fails.

Last success: (though worked for days later.. didn't re-auth) [1/26/2021, 10:37:05 PM] [DysonPureCoolPlatform] Signing in. [1/26/2021, 10:37:06 PM] [DysonPureCoolPlatform] Signed in.

Initial failure: [2/11/2021, 1:09:44 PM] [DysonPureCoolPlatform] Signing in. [2/11/2021, 1:09:45 PM] [DysonPureCoolPlatform] Error while signing in. Status Code: 403 [2/11/2021, 1:09:45 PM] [DysonPureCoolPlatform] API could not be reached. Retry is disabled.

Failure after latest update: [2/11/2021, 9:13:29 PM] [DysonPureCoolPlatform] Signing in. [2/11/2021, 9:13:30 PM] [DysonPureCoolPlatform] Error while signing in. Status Code: 401 [2/11/2021, 9:13:30 PM] [DysonPureCoolPlatform] API could not be reached. Retry is disabled.

Validated authentication username and pass at dyson.com.

professoruss commented 3 years ago

Having the same issue both with this plugin and a couple others. I suspect Dyson change something on their end

townsmcp commented 3 years ago

Dyson seem to change this roughly every 6 months 😢

KibosJ commented 3 years ago

Over at https://github.com/etheralm/libpurecool/issues/37 they have found that making a GET request to the URL below, before authenticating it works :)

/v1/userregistration/userstatus?country=GB&email=YOUR_EMAIL_ADDRESS

I've tested it here and it works :)

Soldiiier commented 3 years ago

I’m getting 429 error, “too many attempts”

Soldiiier commented 3 years ago

Over at etheralm/libpurecool#37 they have found that making a GET request to the URL below, before authenticating it works :)

/v1/userregistration/userstatus?country=GB&email=YOUR_EMAIL_ADDRESS

I've tested it here and it works :)

What’s the base URL to send the get request to?

KibosJ commented 3 years ago

I’m getting 429 error, “too many attempts”

It looks like they've added rate limiting to the API too, so too many requests will have you blocked for a while.

What’s the base URL to send the get request to?

The full URL is https://appapi.cp.dyson.com/v1/userregistration/userstatus?country={{countrycode}}&email={{emailaddress}}

Stewart06 commented 3 years ago

Ca ne fonctionne pas pour moi l'URL depuis safari en modifiant le country code et @mail.

jyjourdain commented 3 years ago

Ca ne fonctionne pas pour moi l'URL depuis safari en modifiant le country code et @mail.

Idem pour moi…

Stewart06 commented 3 years ago

Le plugin Dyson Pure Cool a réussi d’un coup à se connecter, sans rien que je fasse de particulier. Je vais éviter pendant un moment de le faire redémarrer...

Stewart06 commented 3 years ago

![Uploading 9562BB3C-432C-43B9-9BE4-C16488864885.jpeg…]()

Soldiiier commented 3 years ago

I’m getting 429 error, “too many attempts”

It looks like they've added rate limiting to the API too, so too many requests will have you blocked for a while.

What’s the base URL to send the get request to?

The full URL is https://appapi.cp.dyson.com/v1/userregistration/userstatus?country={{countrycode}}&email={{emailaddress}}

Thanks. This didn’t solve it for me though. Now I am getting 401 error.

KibosJ commented 3 years ago

I’m getting 429 error, “too many attempts”

It looks like they've added rate limiting to the API too, so too many requests will have you blocked for a while.

What’s the base URL to send the get request to?

The full URL is https://appapi.cp.dyson.com/v1/userregistration/userstatus?country={{countrycode}}&email={{emailaddress}}

Thanks. This didn’t solve it for me though. Now I am getting 401 error.

Strange, with that URL

GET /v1/userregistration/userstatus?country=GB&email=fakeuser@fakedomain.com HTTP/1.1
Host: appapi.cp.dyson.com
User-Agent: DysonLink/30794 CFNetwork/1220.1 Darwin/20.3.0

I get the following JSON response:

{"accountStatus":"ACTIVE"}

Then the original authentication request:

POST /v1/userregistration/authenticate?country=GB HTTP/1.1
Host: appapi.cp.dyson.com
User-Agent: DysonLink/30794 CFNetwork/1220.1 Darwin/20.3.0
Content-Type: application/json

{ "Email": "fakeuser@fakedomain.com", "Password": "FaKeP@ssw0rd" }

Returns this JSON

{
    "Account": "fakeaccount",
    "Password": "FaKeP@ssw0rd"
}
lukasroegner commented 3 years ago

I just published a fix (1.8.7) for the issue. Thanks to @KibosJ for providing the solution.

As pointed out in the README, the plugin provides a setting for storing the credentials locally, so that the Dyson API is not called. I would highly recommend to use this setting. This plugin uses an undocumented API, which can change at any time.

Also, please comment in English if you have issues.

sensationunddesign commented 3 years ago

@lukasroegner and where do I get the credentials? Have no idea 🤦‍♂️

jyjourdain commented 3 years ago

@lukasroegner and where do I get the credentials? Have no idea 🤦‍♂️

Hi @sensationunddesign, you export the log, you'll get a text file, and you look for "[DysonPureCoolPlatform] Credentials for device with serial number" for example, there will be a long string for each device…

jyjourdain commented 3 years ago

And thank-you very much @lukasroegner!

sensationunddesign commented 3 years ago

@lukasroegner and where do I get the credentials? Have no idea 🤦‍♂️

Hi @sensationunddesign, you export the log, you'll get a text file, and you look for "[DysonPureCoolPlatform] Credentials for device with serial number" for example, there will be a long string for each device…

How does this go?

jyjourdain commented 3 years ago

@lukasroegner and where do I get the credentials? Have no idea 🤦‍♂️

Hi @sensationunddesign, you export the log, you'll get a text file, and you look for "[DysonPureCoolPlatform] Credentials for device with serial number" for example, there will be a long string for each device…

How does this go?

@sensationunddesign, on HomeBridge, the button on the top right… Capture d’écran 2021-02-14 à 11 24 02 ](url)

asvictory3 commented 3 years ago

For anyone with this current issue, you can download the old logs in the "view logs" tab and hitting the download button. Scroll back in time a bit (while the device was functioning) and the credentials are in the txt document. Pasting this long string into the plugin settings window caused my fan to respond immediately after a HB server restart. Works even if you can't run the API currently.

philipamour commented 3 years ago

The plugin stopped working, getting this: [2/18/2021, 12:31:02] [DysonPureCoolPlatform] Error while signing in. Status Code: 401 [2/18/2021, 12:31:02] [DysonPureCoolPlatform] API could not be reached. Retry is disabled.

philipamour commented 3 years ago

For anyone with this current issue, you can download the old logs in the "view logs" tab and hitting the download button. Scroll back in time a bit (while the device was functioning) and the credentials are in the txt document. Pasting this long string into the plugin settings window caused my fan to respond immediately after a HB server restart. Works even if you can't run the API currently.

Not working for me - the log is not long enough. 🙁

arkku commented 3 years ago

I also have this problem. I may currently be rate limited since I can't login with the Dyson Link app on a new installation (was trying to mitm the connection), but an existing installation of Dyson Link works just fine… Any ideas?

marioschaper commented 3 years ago

same problem here. updated to the newest Version and getting the 401 Error.

The plugin stopped working, getting this: [2/18/2021, 12:31:02] [DysonPureCoolPlatform] Error while signing in. Status Code: 401 [2/18/2021, 12:31:02] [DysonPureCoolPlatform] API could not be reached. Retry is disabled.

Soldiiier commented 3 years ago

As with me now.

marmitol commented 3 years ago

Same error.

I have upgraded to the Hombrige versionv 1.3.2 and it shows this error.

[05/03/2021, 16:49:29] [DysonPureCoolPlatform] Checked user account. [05/03/2021, 16:49:29] [DysonPureCoolPlatform] Signing in. [05/03/2021, 16:49:31] [DysonPureCoolPlatform] Error while signing in. Status Code: 401 [05/03/2021, 16:49:31] [DysonPureCoolPlatform] API could not be reached. Retry is disabled.

With the previous version it worked fine.

markholland commented 3 years ago

https://github.com/lukasroegner/homebridge-dyson-pure-cool/issues/166#issuecomment-790856416

marmitol commented 3 years ago

Thank You. Now working fine. 05/03/2021, 17:10:55] [DysonPureCoolPlatform] Checked user account. [05/03/2021, 17:10:55] [DysonPureCoolPlatform] Signing in. [05/03/2021, 17:10:58] [DysonPureCoolPlatform] Signed in. [05/03/2021, 17:11:00] [DysonPureCoolPlatform] Credentials for device with serial number xxxxxxxxxxxxxxxxxxx are: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [05/03/2021, 17:11:01] [DysonPureCoolPlatform] Got devices from the Dyson API. Thank You.

bondskin commented 3 years ago

See [https://github.com/lukasroegner/homebridge-dyson-pure-cool/issues/166]

lukasroegner commented 3 years ago

See https://github.com/lukasroegner/homebridge-dyson-pure-cool/issues/166#issuecomment-841255154