-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API 190 Error #234
Comments
@Danielhiversen do you think you can look into this? :) |
Same here. Maybe it's related to changes in the API? |
Same for me. tried to make a new bluetooth proxy and moved it nearby but still the same error.... |
@NdK73 @Jeffnl98 Hey, I've opened a ticket in SwitchBot's API Repository (OpenWonderLabs/SwitchBotAPI#296). Maybe give them a heads-up, too, so they can fix this issue asap. |
Hi Folks, it seems that this 190 error is thrown in response to request in following method: https://github.com/Danielhiversen/pySwitchbot/blob/343f6ccecb357245316aa3d7508372e8f8010006/switchbot/devices/lock.py#L90 If i understand correctly, code is not using Switchbot Api from @Shirotaku comment but rather tries to communicate with Switchbot servers with same request app would do. Unfortunately i don't have idea, how we could figure out what changed in their internal API, that throws error 190 now. |
Hi @Jaheiro the creator of the Switchbot MQTT service for HA (https://github.com/hsakoh) advised there was a new API URL however I am currently still getting error 190 (the example code he gave me elaborates on this saying I am not the device owner). I've been back and forth with Switchbot for the last week and they removed my lock from all accounts I believe. I've just re-registered and recalibrated and still get the same error! @Shirotaku linked to the API repo chat above which may, or may not help? |
+1 one this issue. Initially error 190 through home assistant and also through pySwitchbot now. |
Howdy @micaelp, i'm guessing that along with that url change for API, something else had to change as well. I suspect, they might have changed way that Switchbot application authorizes itself to get encryption keys of lock device, to send commands directly to the lock through bluetooth so we're sending request to proper place, but server can't confirm that we're actual owner of that specific lock. |
The cognito pool has changed, and the new pool has SRP auth. I have tried implementing an SRP authentification into the new pool, but so far I could not get it to work (using my APP ID credentials). Maybe there is some caveat to the credentials to be used to identify to the AWS cognito pool.
|
So the assumption that the identification has changed was somewhat correct.
The client id is found in "resources\assets\switchbot_config.json".
Find below a minimal working example attached.
` |
@alexschultze Thanks for tagging me, I missed this issue. I've looked into this a little bit as well and at least for me just updating the PoolId to the new one ( |
@alexschultze also the authentication flow you posted unfortunately doesn't work for my account and returns the 190 error, so it would seem to me that there is some kind of divide in SwitchBot accounts that we'd need to figure out. One option that comes to mind is just try both auth methods and one should succeed. |
@alexschultze your code worked perfectly for me, thanks! |
I have implemented some additional ideas. (This is a cross-post)
Whether the botRegion obtained in Step 2's UserInfo is wonderlabs.{botRegion} will require verification by various users. If these steps are implemented in PySwitchbot, it might make the setup process easier for everyone. |
Hello,
When running the get_encryption_key script, I get API 190 error. That's the same error that I get when logging into HAs Bluetooth integration. Any ideas?
pySwitchbot-0.45.0>get_encryption_key.py MAC EMAIL Password: Unexpected status code returned by SwitchBot API: 190
The text was updated successfully, but these errors were encountered: