prasad-edlabadka / homebridge-tuya-ir

Allows homebridge to control Tuya Smart IR based devices
Apache License 2.0
50 stars 22 forks source link

“Sign invalid” #6

Closed genteel0 closed 2 years ago

genteel0 commented 2 years ago

Unfortunately, I all time get "sign invalid". I've checked my IDs and secret many times, but doesn't work.

jcwlim commented 2 years ago

Can you paste the log file... else it is hard to know... but at least you need to make sure you subscribe to IR Control Hub Open Service in the Tuya API

genteel0 commented 2 years ago

`[Homebridge UI] Starting terminal session [15/07/2021, 01:02:10] [Homebridge UI] Starting terminal session [15/07/2021, 01:02:25] Loaded plugin: homebridge-config-ui-x@4.41.1 [15/07/2021, 01:02:25] Registering platform 'homebridge-config-ui-x.config' [15/07/2021, 01:02:25] --- [15/07/2021, 01:02:31] Loaded plugin: homebridge-roomba2@1.2.0 [15/07/2021, 01:02:31] Registering accessory 'homebridge-roomba2.Roomba2' [15/07/2021, 01:02:31] --- [15/07/2021, 01:02:34] Loaded plugin: homebridge-tuya-ir@0.0.8 [15/07/2021, 01:02:34] Registering platform 'homebridge-tuya-ir.TuyaIR' [15/07/2021, 01:02:34] --- [15/07/2021, 01:02:35] Loading 4 platforms... [15/07/2021, 01:02:35] [Config] Initializing config platform... [15/07/2021, 01:02:35] [Config] Running in Service Mode [15/07/2021, 01:02:35] [MiPhilipsLightPlatform] Initializing MiPhilipsLightPlatform platform... [15/07/2021, 01:02:35] [MiPhilipsLightPlatform] [MiPhilipsLightPlatform][INFO]**** [15/07/2021, 01:02:35] [TuyaIR] Initializing TuyaIR platform...

Знімок екрана 2021-07-15 о 00 56 29

[15/07/2021, 01:02:35] Loading 1 accessories... [15/07/2021, 01:02:35] [Roomba Cleaner] Initializing Roomba2 accessory... [15/07/2021, 01:02:35] [Roomba Cleaner] Enabling keepAlive [15/07/2021, 01:02:40] [TuyaIR] Starting discovery... [15/07/2021, 01:02:40] [TuyaIR] Trying to login... [15/07/2021, 01:02:40] [TuyaIR] Logging in to the the server https://openapi.tuyaeu.com... Preparing Advertiser for 'Homebridge 1757 146D' using bonjour-hap backend! Setup Payload: X-HM://0024ET45GAIQY [15/07/2021, 01:02:40] Homebridge v1.3.4 (Homebridge 1757) is running on port 51577. [15/07/2021, 01:02:41] [TuyaIR] Failed to login due to error 'sign invalid'. Retying after 1 minute...`

jcwlim commented 2 years ago

Is the country of the server select correctly?

genteel0 commented 2 years ago

If you mean Device region so they checked correctly (in Europe) in application (Germany), in homebridge and in Tuya IoT

Знімок екрана 2021-07-15 о 16 27 27 Знімок екрана 2021-07-15 о 16 25 26
prasad-edlabadka commented 2 years ago

Other reasons could be your key and passwords are incorrect. Can you please check those?

genteel0 commented 2 years ago

Unfortunately, it still doesn't work. But I think I have some guesses. Most likely "Tuya IoT" changed the authorization algorithm for new projects. It's interesting to hear your opinion. Link to Tuya post: https://developer.tuya.com/en/docs/iot/singnature?id=Ka43a5mtx1gsc

Знімок екрана 2021-07-16 о 16 45 34
prasad-edlabadka commented 2 years ago

I think that's issue. Good catch. Working on updating the signing algorithm. It's quite complex now.

genteel0 commented 2 years ago

Thanks a lot!

prasad-edlabadka commented 2 years ago

Updated version 0.0.9 with new signing method. It should work now.