Fixing Tuya integration in Home Assistant after free subscription expires

On February 2nd I noticed that all my Tuya devices and automations in Home Assistant had stopped working. Initially, I thought it was probably a cloud issue because normally the Tuya integration is not local, it connects to a remote server every time.

That led me to the path of trying to use the Home Assistant Community Store (HACS) to install Local Tuya . That didn’t work either because my access to IoT Core (a Tuya Cloud Service) had expired.

I frantically started to search online about what to do, then I ran into this GitHub issue. The TL;DR is that I was not alone, and many people were facing the same issue.

To fix the problem, I had to ask for an extension so that my trial plan was enabled again. First I had to visit Tuya’s site. Then, I proceeded to open my API project, and in the Service API tab, searched for IoT Core.

Finding IoT Core
Finding IoT Core API

On that page, we can click on the View Details link on IoT Core’s row, upon doing that we’ll get additional information about the plan we have. In my case, it was already renewed, but on the GitHub issue I linked, you’ll find out how it looks. You should see a link that says Extend Trial Period.

Requesting extension of IoT Core API
Requesting extension of IoT Core API

My screenshot already says that my application is approved, so you know what to look out for after you send your request. However, just so you get an idea about what to say in your extension request, here’s what I said:

Extension request form
Extension request form

It doesn’t take long for them to respond. In my case, it took less than a day even though I sent my request on a weekend.

After the approval, you might have to unlink your Tuya app account from the project on Tuya’s IoT Platform website, but in my case, it wasn’t necessary.

I didn’t want to risk going through this problem again so I proceeded to configure Local Tuya now that my API integration was working. In retrospect, before Local Tuya commands to devices were laggy, they used to take more than a second. Now, everything turns on and off instantaneously.

To make the migration a bit easier, visit the Devices page to get the Device IDs of all our devices. They should have nice Device Names which are the ones we configured when we linked them to our Tuya app. We need to be careful about selecting the right data center on the top right corner of the screen. In my case, it is Western America Data Center.

Listing our Tuya devices
Listing our Tuya devices

Now that we have our devices, let’s visit the API explorer page to query Device Details. The parameter for that endpoint is our Device ID.

Getting Local Key for Local Tuya
Getting Local Key for Local Tuya

After calling the endpoint with our Device ID, among the response fields we’ll find one called local_key. That and the Device ID are two of the most important fields we’ll need in Local Tuya.

To summarize, it can be annoying when our access to Tuya’s API expires, but luckily they have made it super easy to request an extension. However, I don’t know if in the future they’ll stop granting extensions, so Local Tuya might let us keep using our devices even if the cloud service does not give us access.

Buy Me a Coffee at ko-fi.com

Related Posts

Fixing Asymmetric Routing Issues in a Homelab

Fixing Asymmetric Routing Issues in a Homelab

Discovering the Asymmetric Routing Problem This week I wanted to improve the network monitoring strategy of my homelab.

Read More
Adding Code Highlighting in Blackboard's Question Import Format

Adding Code Highlighting in Blackboard's Question Import Format

Blackboard is a popular learning platform that many universities use to manage content and exams.

Read More
Forensics Beginner Challenges Part 1 of 3

Forensics Beginner Challenges Part 1 of 3

The other day I was looking for some forensics beginner exercises.

Read More