jasonacox / tinytuya

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

Tuya Cloud "Trial remaining usage is 0.00%"! #230

Open dgilbert2 opened 1 year ago

dgilbert2 commented 1 year ago

I'm using tinytuya with the "cloud" and just received this email from TUYA after using for only a few hours:

"Your subscription IoT Core, Cloud Develop Base Resource Trial remaining usage is 0.00%. Once the quota limit is exceeded, the service will be suspended. If you want to raise the limit, you can click the link below to upgrade your plan. https://www.tuya.com/vas/commodity/IOT_CORE_V2"

The upgrade is 20000 Euros!!!!!

Any advice on this would be appreciated as it would be a real shame if I cannot use the Cloud services anymore?

dgilbert2 commented 1 year ago

Just read this from the Tuya website:

"Trial resource pack: about 26 thousand API calls plus 68 thousand message subscriptions. When developers exceed the limit, Tuya will stop the service." https://developer.tuya.com/en/docs/iot/membership-service?id=K9m8k45jwvg9j

So assuming a 6 months trial, there is a maximum of around 6 API calls for every hour. Is that how Tinytuya "cloud" should be used?

jasonacox commented 1 year ago

Hi @dgilbert2

Unfortunately, that is correct. Keep in mind that the Tuya IoT platform is a commercial product made for other businesses to build and integrate IoT devices and their fees reflect they. They don't have a plan or approach for home hobbyist like us, other than the "free" version with the rate limit. However, it's possible to stay within the limit. I've never exceeded the limits in the many years I have had the free tier account, but then I rarely use the Cloud API.

TinyTuya can access your devices directly on your local network so you can avoid the Cloud limits. The setup wizard (python -m tinytuya wizard) uses the cloud to fetch your local keys but then you can use those keys to control and monitor most devices locally. All of my home automation uses that. To be fair, battery powered Tuya devices won't be on the network long enough to pull or change, so you will still need to use the Cloud API for those.

I hope this help.

dgilbert2 commented 1 year ago

Thank you @jasonacox for your reply. I'm disappointed about the cloud limits but not surprised having read up on it now on the Tuya website.

uzlonewolf commented 1 year ago

@dgilbert2 How many calls per day/month were you doing?

The documentation is about as clear as mud. Although that one page says you get "about 26,000 API calls," if you go to the IOT_CORE_V2 page, select "Trial Addition," and click the "View More" pop-up it then says Cloud API calls are "Free of charge within monthly usage limits of $ 0.20." I suspect that "about 26,000" number is per month.

dgilbert2 commented 1 year ago

Normally its well under 100 a month, but in the last week I was testing some code which took it over 69,000. My account still works but I'm now VERY careful! It soon adds up if you start monitoring cloud devices!