Local Tuya and cloud account expiring

I had local tuya setup for several switches and outlets for about a month and suddenly they went unavailable and the entities disappeared in HA. When I went to add them back in which involves getting the local id from the Tuya cloud account I then discovered that the Tuya IoT plan had expired which means I can’t get the local id.

I had thought that the point of using local Tuya was to get off the cloud so I’m confused at this point. I’ve tried to extend the trial period but seems like this is just going to keep happening.

Appreciate any help

Welcome to Tuyas much vaunted support for local control.

1 Like

You can use Local Tuya without connecting it to the cloud, so all the communication between Home Assistant and the devices is local, with no use of cloud.
However, the devices requires any request to be using those device_id and local_key. If you have those, you are good to go totally local, otherwise you have to use the Tuya IoT portal to get those keys, and this can be done manually or using the cloud connectivity in the Local Tuya integration.

Tuya don’t wanna let you go totally local, so the is as local as a Tuya wifi device can be.

Yes…I’m aware. Just didn’t expect the devices to disappear in HA because the Tuya IoT trial cloud account expired. They are the only one that makes a light/fan dimmer switch combo that I’ve found otherwise I’d go elsewhere.

Thanks for the feedback

Then I fully agree with you. This shouldn’t happen.

Something weird is definitely going on. My Tuya IoT account I setup in November (for my Roborock) ‘expired’. Found out when I tried to onboard some spotlights a couple hours ago and grab the keys. I thought these lasted 6 months?

Ive applied for the extension. Let’s see what happens.

1 Like

Interesting… got one Tuya SmartSwitch (Thermostat) via localTuya. Set it up a few weeks ago. If that account expires then to hell with it. Getting the keys was a PITA, which I will not repeat. Instead I will control IR-heater panel with a Shelly.

Guess in the future I stay away from TUYA devices like the Devil from the holy water.

Right there with you…what a pita to deal with.

Once my Tuya expires I will try this:

EDIT: Unlikely to work since tuya patched that vulnerability years ago

It is unlikely to work, tuya patched that vulnerability years ago.

1 Like

My account also expired before I could get the local key. Now it fails when I try to view it through their UI. Has anyone figure out a workaround to get the local key? What a PITA!!! Sorry I bought tookya.

Ok…there.is another route to get the local key using a rooted android phone…I have.managed to get this to work…

BUT

Now I can’t get the local TUYA to accept it when adding a new device…it seems to still want to query the TUYA API site…

I will be looking to see if I can manually add new devices via YAML or some other way…

Has there been any update on the local control implementation?
Tuya V2 was supposed to offer some kind of local support.

If not, which route is the route to go nowadays? HACS or standard integration?

Also, does anyone know if dehumidifiers are compatible?
Currently have one from Rohan (air & me).

Avoid Tuya WiFi based devices is the only way to go. I went away by replacing those Tuya devices step by step with Zigbee devices and don’t regret it.

1 Like

I have a Tuya based dehumidifier. It for sure is my first and last Tuya device. Luckily I stored the local_key before my IoT plan expired.

I now want to switch to another Wi-Fi. According to the manual, I have to press the Timer button 3s (to put it in hotspot mode) and then re-add the device via the Tuya Smart app. My question now is what happens to the device_id and the local_key in this case? Do they change? The latter can only be retrieved from the IoT platform with a valid plan…

I can switch WiFi via Tuya Smart app but the WPA passphrase is synced via cloud which probably also happens when setting up a new device though. I have zero trust in the Tuya platform.

Guess I found the answer here and here

When a device is readded to an account, a new localkey is generated for it each time. You need to specify a new localkey for the device in the tuya local.

Note that each time you pair the device, the local key changes, so if you obtained the local key using the instructions below, then re-paired with your manufacturer’s app, then the key will have changed already.

So you basically can’t change your Wi-Fi or WPA passphrase without implicitly changing the local_key unless you sync it via Tuya cloud, hence not resetting/readding the device.

OK, I could renew the Tuya IoT Core services for another 6 months. So I can retrieve the local_key via Tuya IoT platform again.

I am still not sure whether it is worth it as I am not sure whether Tuya syncs the WPA passphrase with the cloud anyway.

And be prepared to repeat this every 6 month to come … :nerd_face:

I am.

The device still worked with LocalTuya after IoT Core services expired. So I only need this to retrieve the local_key, right?

Unfortunaterly I’ve had different experiences. Although also using LocalTuya not too long after those “Trials” expired Tuya WiFi based devices started to act inconsistent one after another. Only after extending the trial period again they worked without issues. This happend soon after every trial period has ended.