Hello, someone knows about how to get the local key from IOT Tuya for every single device since June 2022?
I’m not able to get the 4 ultimate digit of my local key i.e : “local_key”: “9bf919751d59****”
When querying the details of this device, the localKey field will be reported. For more details you can see: Device Management-Cloud Services API Reference-Tuya Developer. If you still cannot get the localKey of your device according to the manual, this is because we have temporarily stopped providing the localKey for personal use in order to maintain the security of such devices (the leaked localKey will make it easy for hackers to hack into it. And it will cause great loss to your privacy and security), thank you for your understanding and support.
Not sure if you’re still looking, but this video worked for me.
I set it up manually myself (only 4 devices to add) so I didn’t use the script.
The messages in the API told me that the account was expired and I ended up just setting up a new trial account, adding the tuya account again, and waiting 24 hours to get the local keys.
The easiest method to get the device local key is to log into TuyaIOT and go to API Explorer and use Device Management > ‘Query device details’ and enter in your device ID. The local key is in the response returned.
And your can get the valid values for each setting from here:
Device Control (Standard Instruction Set) > Get the specifications and properties of the device
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.
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.
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.
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.