Easily get your Localkeys to control Tuya devices locally.
Simple python script, portable and easy to use.
If you already have a preferences.xml file, skip to step 7
- Download Bluestacks and Bluestacks Tweaker
- Install Smart Life 3.6.1 (version is important!) onto the Bluestacks emulator. APK Link
- Sign up or Login to Smart Life and pair Tuya devices to an account (this is only needed temporarily, and can be deleted later).
- Once devices are associated, load Blue Stacks Tweaker and select the running Bluestacks instance
- Open File Mananger and navigate to data/data/com.tuya.smartlife/shared_prefs
- Locate the file preferences_global_key<account id>.xml. (E.g. preferences_global_keyag4622356265159tBQwp.xml) and copy it somewhere onto your computer
- Run the python script LocalTuyaKeys.py and select the preferences file that you just copied.
- Done! A CSV file with devices and keys will be generated in the same directory as the python script.