jasonacox / tinytuya

Python API for Tuya WiFi smart devices using a direct local area network (LAN) connection or the cloud (TuyaCloud API).
MIT License
867 stars 157 forks source link

Tuya Third-patry authorization management #465

Open Xenomes opened 4 months ago

Xenomes commented 4 months ago

Hi jasonacox, I noticed that Home Assistant has a 'Third-party authorization management' feature with a user code that is provided in the Tuya-based app. Do you think this could be possible for your project to bypass the 6-month renewal? afbeelding

jasonacox commented 4 months ago

Is that for cloud access? I suspect it is and wouldn't help with those wanting local access. But may be worth exploring.

What is the HA plugin called?

Xenomes commented 4 months ago

Yes is for cloud access at HA, If users add a new device after 6 months of the last dump of the json they need to extend the subscription to get the 'key' of the new device. Here is the location https://github.com/home-assistant/core/tree/dev/homeassistant/components/tuya

uzlonewolf commented 4 months ago

It looks to have been added in https://github.com/home-assistant/core/pull/104767 and is using https://github.com/tuya/tuya-device-sharing-sdk to implement. Unfortunately the issue asking about the client_id is unanswered https://github.com/tuya/tuya-device-sharing-sdk/issues/4

Xenomes commented 4 months ago

I hope they answer, but I am afraid not.