Troy Hunt Profile picture
Creator of @haveibeenpwned. Microsoft Regional Director. Pluralsight author. Online security, technology and “The Cloud”. Australian.

Jun 6, 2021, 10 tweets

For my next IoT mission: I want to use Local Tuya to control lights without cloud. I don't want to solder stuff or pull lights out of the ceiling, you can no longer pull keys from the Tuya IoT portal (see descripting of vid) and I don't have a rooted Android. What's left?

All of this is just different levels of pain. BlueStacks and the Smart Life APK? My Tuya creds don't work. So screw it, just setup a dedicate Pi and use Tuya Convert to flash firmware. Nope, that won't work either:

I'm trying to find a "happy path" here, one that's not only happy for me, but one I can encourage others to follow. So far, that path remains having a cloud dependency and using the Tuya integration in @home_assistant. That's the least terrible of all the terrible options.

Because I don’t know when to give up, I went back to BlueStacks to work out what went wrong. There are **2** Tuya apps, one is TuyaSmart which I’ve paired dozens of lights through. The other is Smart Life which is the one used in the demos where the keys are pulled from it.

Totally different accounts used on both, so do I unpair every single light from TuyaSmart and manually repair them all to Smart Life? Let's check this all works first so I pair a test light to Smart Life and successfully extract the keys per this vid

The Local Tuya integration finds it on the network by device ID, I fill in the local key, submit and...

FFS. Ok, so let's check the log for some meaningful messaging about what went wrong...

Still swearing. Change of approach - grab the TuyaSmart APK, log in to that within BlueStacks then it has all my existing devices in it. Now all I need to do is pull out the preferences file with the keys... apkmirror.com/apk/tuya-inc/t…

But no, there's a reason you're meant to pull down an **old** Smart Life APK from years ago because it seems like the newer software doesn't store the keys in the clear. And even then, the keys aren't working in the Local Tuya integration anyway!

Don't get me wrong, I've loved toying with IoT, but this shit is just insanely hacky and a lot of people are trying to beat the technology into submission to do stuff it simply wasn't designed to do creating constant problems. I'm about ready to go back to candles at this rate 🕯

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling