Wanted to thank you guys for Tuya local and give my experience.
Mostly, I followed the instructions from post 3 of this thread.
I have android rooted phone I donât use anymore. Doesnât have a SIM card, but works fine on wifi, so I pulled it out of the closet, and powered it up.
Searched, and found smartlife 3.3.0 apk, then downloaded it, then installed.
Started it up, entered my smartlife login, and app showed my tuya devices.
Made sure I could turn them on and off, then quit the program.
Brought up a root explorer, went to the directory from the post 3 instructions
/data/data/com.tuya.smartlife/shared_prefs
Need to select root first in my explorer to get there. Tried to copy the file to my google drive. That kept failing, so I gave up and edited the file on my phone with a root editor app.
Searched for âlocalâ with the editor, and when I found it, scrolled to the right a little bit and found a local key. Its 16 digits long. Then if you go to the left some, you have to go past the position info, you will find the id for that local key.
Keep searching for âlocalâ to find all your local keys.
I had three tuya smart plugs installed, and it gave me all three keys.
I have a supervisor version of HA running in docker. I have Samba, used it to copy tuya local from github into my custom_components directory.
Once it was copied over, I went to the integrations page in HA, and push the + icon to install tuya local. Tuya local shows you all the tuya devices you have running. Select one based on the id. Id should match one from file, I just use the last 4 digits of the id and that was fine.
Added the local key and did the other config stuff from the instructions.
After than, I added the tuya local switch names to HA, and could control the switches from HA locally instead of through the cloud.
At this point I messed up and removed the plugs from the smartlife app, so the plugs stopped working. Should read instructions lol.
Added them back to smartlife, but for some reason only two showed up. Could not get it to show the third one, and at some point smartlife upgraded itself, so I had to remove it and reinstall 3.3.0.
IMPORTANT trick for Smartlife app.
To find all the local keys, in Smartlife, I selected âprofileâ on the bottom, then âSettingâ then âclear cacheâ.
After that, I made sure I could turn on all the switches, exited the program. Then used my root editor to find the local keys, all three of them.
I added a couple more tuya plugs, and had to clear cache again so I could get the local keys, but since I knew this trick it was easy.
Havenât tried power monitoring yet, I have a monoprice plug with tasmota installed that I use power monitoring on, these plugs just need to turn on and off.
Randy