tuya / tuya-homebridge

Homebridge custom plugin for controlling Powered by Tuya (PBT) devices in HomeKit. This plugin is officially maintained by the Tuya Developer Team.
MIT License
332 stars 168 forks source link

Plugin suddenly stopped working - can't get devices #353

Closed easterncoder closed 1 year ago

easterncoder commented 1 year ago

Describe the bug All was good for a couple weeks then it suddenly stopped working.

Expected behavior Devices should be controllable from homebridge

Here's the error I get from the logs TuyaOpenAPI response: {"code":1106,"msg":"permission deny","success":false,"t":1681571643631,"tid":"2854a834dba011eda449a670cd33099a"} path = /v1.0/iot-01/associated-users/devices

Nothing else follows.

I verified that the username, password, country code and end point are all good.

Appreciate your help!

github-actions[bot] commented 1 year ago

Thank you for your feedback, we will solve this issue soon

easterncoder commented 1 year ago

Realized I didn't paste the full error. Here goes:

TuyaOpenAPI response: {"code":1106,"msg":"permission deny","success":false,"t":1681572066373,"tid":"244a9ceddba111edba7a66ce777607ab"} path = /v1.0/iot-01/associated-users/devices Failed to get device information. Please check if the config.json is correct.

syed-alizain commented 1 year ago

Getting the same error.

asander85 commented 1 year ago

I’ve been having the same issue since yesterday. But I haven’t had a chance to turn on debug log to see the error. Homebridge and by extension Homekit refuse to control any of my devices

aljorhythm commented 1 year ago

Same here

tonyqiu1019 commented 1 year ago

Same here, also getting code 1106 with permission denied error. Detailed relevant logs right after homebridge restart:

TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaus.com, path = /v1.0/iot-01/associated-users/actions/authorized-login, params = null, body = {"country_code":1,"username":"<omitted>","password":"<omitted>","schema":"tuyaSmart"}, headers = {"t":"1681623130669","client_id":"<omitted>","nonce":"<omitted>","Signature-Headers":"client_id","sign":"<omitted>","sign_method":"HMAC-SHA256","access_token":"","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.5.0"}
TuyaOpenAPI response: {"result":{"access_token":"<omitted>","expire_time":7200,"platform_url":"https://openapi.tuyaus.com","refresh_token":"<omitted>","uid":"<omitted>"},"success":true,"t":1681623130881,"tid":"0918036edc1811edb3aad2d41d5e3422"} path = /v1.0/iot-01/associated-users/actions/authorized-login
TuyaOpenAPI request: method = get, endpoint = https://openapi.tuyaus.com, path = /v1.0/iot-01/associated-users/devices, params = {"size":100}, body = null, headers = {"t":"1681623130880","client_id":"<omitted>","nonce":"<omitted>","Signature-Headers":"client_id","sign":"<omitted>","sign_method":"HMAC-SHA256","access_token":"<omitted>","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.5.0"}
TuyaOpenAPI response: {"code":1106,"msg":"permission deny","success":false,"t":1681623130922,"tid":"0925c8d4dc1811eda449a670cd33099a"} path = /v1.0/iot-01/associated-users/devices
Failed to get device information. Please check if the config.json is correct.
shannonio commented 1 year ago

I also suddenly started getting this same error:

Initializing TuyaPlatform...
TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaus.com, path = /v1.0/iot-01/associated-users/actions/authorized-login, params = null, body = {"country_code":1,"username":"<OMITTED>","password":"<OMITTED>","schema":"tuyaSmart"}, headers = {"t":"1681632661707","client_id":"<OMITTED>","nonce":"<OMITTED>","Signature-Headers":"client_id","sign":"<OMITTED>","sign_method":"HMAC-SHA256","access_token":"","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.5.0"}
[4/16/2023, 1:11:01 AM] Homebridge v1.6.0 (HAP v0.11.0) (TuyaPlatformFeitShopLight) is running on port 43310.
TuyaOpenAPI response: {"result":{"access_token":"<OMITTED>","expire_time":7200,"platform_url":"https://openapi.tuyaus.com","refresh_token":"<OMITTED>","uid":"<OMITTED>"},"success":true,"t":1681632662650,"tid":"3a78ced5dc2e11eda449a670cd33099a"} path = /v1.0/iot-01/associated-users/actions/authorized-login
TuyaOpenAPI request: method = get, endpoint = https://openapi.tuyaus.com, path = /v1.0/iot-01/associated-users/devices, params = {"size":100}, body = null, headers = {"t":"1681632662325","client_id":"nkjc7uy8rhshetaw3q3v","nonce":"<OMITTED>","Signature-Headers":"client_id","sign":"03889C30E5B92731906BE5F3DC2422202D15DB2E98252CE4C48B638D74CF98AF","sign_method":"HMAC-SHA256","access_token":"<OMITTED>","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.5.0"}
TuyaOpenAPI response: {"code":1106,"msg":"permission deny","success":false,"t":1681632663025,"tid":"3ab61524dc2e11edb3aad2d41d5e3422"} path = /v1.0/iot-01/associated-users/devices
Failed to get device information. Please check if the config.json is correct.
mynameisbrendan commented 1 year ago

I get the same error if I try and access https://openapi.tuyaeu.com/v1.0/iot-01/associated-users/device in the Tuya IoT debug platform.

image

NicksonYap commented 1 year ago

I'm also facing issues getting devices from Tuya. Even after reinstalling and reconfiguring It was working yesterday and just stopped today when I woke up.

image

ThisIsQasim commented 1 year ago

Running into the same error since moring

amrishraje commented 1 year ago

Yep, same issue as everyone else.

[16/04/2023, 11:08:28] Homebridge v1.6.0 (HAP v0.11.0) (TuyaPlatform) is running on port 37491.
TuyaOpenAPI response: {"result":{"access_token":"redacted","expire_time":7200,"platform_url":"https://openapi.tuyaus.com","refresh_token":"redacted","uid":"redacted"},"success":true,"t":1681657708339,"tid":"redacted"} path = /v1.0/iot-01/associated-users/actions/authorized-login
TuyaOpenAPI request: method = get, endpoint = https://openapi.tuyaus.com, path = /v1.0/iot-01/associated-users/devices, params = {"size":100}, body = null, headers = {"t":"1681657708380","client_id":"redacted","nonce":"8redacted","Signature-Headers":"client_id","sign":"redacted","sign_method":"HMAC-SHA256","access_token":"redacted","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.5.0"}
TuyaOpenAPI response: {"code":1106,"msg":"permission deny","success":false,"t":1681657708672,"tid":"redacted"} path = /v1.0/iot-01/associated-users/devices
Failed to get device information. Please check if the config.json is correct.

Verified that credentials and keys are correct. I am able to login to Tuya IOT platform and control my devices from there.

syed-alizain commented 1 year ago

It started working for me itself without any change.

NicksonYap commented 1 year ago

Same here, working now

tonyqiu1019 commented 1 year ago

Thanks for the comments above, can confirm it’s working again. First I got an error code 1108 (URL path invalid) but restarting Homebridge made it go away.

easterncoder commented 1 year ago

Started working again for me too. Guess it's a thing on their end.

github-actions[bot] commented 1 year ago

Stale issue. we will close the issue soon. If this issue has not been resolved, please update the issue and contact us in time.