Octoober / tuya-bulb-control

API wrapper for you smart bulbs developed by Tuya 💡
MIT License
31 stars 3 forks source link

tuya_bulb_control.exceptions.AuthorizedError: 1004 -> Sign invalid #5

Open GabrielSil46 opened 2 months ago

GabrielSil46 commented 2 months ago

Hello!

This error happens immediately upon running the example code. Region is set to US, and client ID, client secret and device ID are all OK. PC is also connected to the same network as the bulb, if that is relevant.

Full error log: Traceback (most recent call last): File "c:\Users\XXX\Documents\CodingStudies\playground\python\smart-light-piano\main.py", line 9, in bulb = Bulb( ^^^^^ File "C:\Users\XXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\tuya_bulb_control\bulb.py", line 23, in init super().init( File "C:\Users\XXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\tuya_bulb_control_tuya_api.py", line 25, in init self.__access_token = self.token() ^^^^^^^^^^^^^^ File "C:\Users\XXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\tuya_bulb_control_tuya_api.py", line 102, in token raise AuthorizedError( tuya_bulb_control.exceptions.AuthorizedError: 1004 -> Sign invalid

Octoober commented 3 weeks ago

I no longer have any Tuya devices and have no way to fully test performance. If someone finds a solution, I would appreciate a Pull Request.😔