Get local key tuya since June 2022

My answer might not be warranted here, but try to explore custom firmware flashing. I used to work with localTuya but it became a headache after a while and i decided to use tuya-cloudcutter for beken chips or TuyaConvert for other chips (ESPs etc). These methods are solder-free, meaning that its done wirelessly. It might be an advanced method but its worth the effort. All my tuya devices are now running ESPHome/Tasmota.

2 Likes

Hello thank you for the tutorial.I have managed to add some devices but some of them in the smart life app in the bluestacks only says “bluetooth is off” the devices are not working and I can not see the key in the xml file either, anyone have an idea why is that?

I opened the folder with the files, but the preferences_global_key.xml file is missing (in both applications: Tuya Smart and Smart life). I found another file with the same name in the /files/thingmmkv/preferences_global_key folder, but it has unreadable content, I suspect it is encoded. I used to get the key through the API explorer, but now there is no such possibility, it gives an error - “No permissions. Your subscription to cloud development plan has expired.” It’s simple, Tuya uses all available ways to block our WIFI devices from receiving the key to force us to allow them to work through their Chinese server and receive our data. It’s good that I only have 2 Tuya devices that work via WIFI. In the future, I will avoid them and buy only zigbee devices that work locally and do not leak data to China.

1 Like

Hi my friend. I try this method but it give me only this
"{
“code”: 1010,
“msg”: “token invalid”,
“success”: false,
“t”: 1699957304033,
“tid”: “9be76a6f82d711eea7ba0a96cea2b375”
} "
how can I do ? I try it mor. can you help me ? please.

Have you logged into the Tuya IOT site and setup your Cloud project and can see all your devices? That is the first step before you can use the API explorer to retrieve the local keys and DP values for each device.

1 Like

None of the method worked for me. Luckily I found Getting Tuya Device ID, Local Key and DP ID using Tuya Smart Home Basic Service. It worked for me.

That just results in the same "“No permissions. Your subscription to cloud development plan has expired.”

You have to extend the subscription, it is not in service anymore. Just apply for it in the iot tool. You’ll have to do this once in a while.

  1. go to https://iot.tuya.com/
  2. left pane choose [Cloud] > [Cloud Services]

I think the “Smart Home Basic Service” is the only one you need.

OUTSTANDING - Accurate - Concise - Added to my notes. This is awesome

1 Like

Some sort of unrelated question here.
Is there any way we could extract the device MAC address on TuyaIOT site?
On the Smart Thing mobile app, it does not show MAC address of my device anymore.

This works for me for the Smart Life app, I have only 1 device as a test, so all good. BUT historically, I installed all my devices on the Tuya app. As the Tuya app is not discussed in the video ,but only the Smart Life app, I can not reach my devices to get the Local Keys. Has anyone a good advice how I get to see my Tuya installed devices in the Smartlife app? OR Has anyone a trick to get the Tuya app installed in BS tweaker and Bluestack?
thanks

nope, this one doesn’t help

you go to Cloud → Cloud services. Click on Iot Basics, there going to be Iot Core. Its gonna say that “there are problems but its working” you click on Subscribe to resource pack. Got through the process, it will tell you that you already have this service and then you gonna see the button to Extend. Then you fill out the form and wait for “manual review” for extension approval.

2 Likes

Thanks, it works.
I can extend the cloud service for free and get the local key

So I had Local Tuya working with many devices. I got new devices and I see these new devices are reporting there is no local_key.

I have taken your advice and refreshed my trial to IoT Core. Still not able to pull a local_key.

Could it be this device just has no local key? The local tuya integration forces me to input the local_key value.

local_key seems to be empty, sorry I haven’t seen this happen before so I can’t help. Maybe someone else has more experience with this issue.

it seems this isnt a new issue either. Looking like local tuya is dead, they killed it.

https://www.reddit.com/r/homeassistant/comments/15uspii/comment/jwu3vcs/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

{
“code”: 40001900,
“msg”: “No space permission”,
“success”: false,
“t”: 1719246162375,
“tid”: “fb5c44de324511ef9e3b1acebe103cd3”
}

And what is this in relation to?
This is a public forum and not a help desk.

If the Tuya links from my original post don’t work anymore, then please state that in your post and maybe look for the working ones and post that here to help others.

1 Like

f you have signed up for [iot.tuya.com] (https://iot.tuya.com/) to get your local key, you should also have access to the API Explorer under “Cloud”. Under “Device Control” there is a function called “Query Device Details in Bulk”. Enter the device ID

For anyone struggling with permissions/expired trial, the solution is to simply use API explorer from “smart home basic service”, NOT iot core. You don’t need to extend IoT core trial. The select field for that is at the top left of the page in API explorer. You can then get device details from smart home device management section.