How To Guides

Flashing any Smart bulb, plug or switch with Tuya-Convert

Closeup of smart light switch circuit board for use with Tuya-convert

I wrote last year about over the air flashing of smart bulbs using the Tuya-convert procedure. However, back then there was no current way to bypass a firmware that Tuya started loading onto newer devices to block this flashing.

Why would you want to do this in the first place? Well the smart bulbs, plugs and switches that have flooded Amazon the past couple of years are almost all Tuya based, the problem with this is that they have a reliance on sending data out to the Chinese cloud where we aren’t exactly sure what data they are storing. It also means you lose local access, if your internet goes down you won’t be able to use these. We would like to take back control using something like Home Assistant.

Thankfully for us all, the guys working on the Tuya-convert project managed to figure out how to solve this problem and released a new version of Tuya-convert.

There have also been a couple of changes to the messages you get and how things work, so I figured I’d do an updated guide to show you step by step how it works. It’s now easier than ever to take back control of your smart bulbs, plugs and switches and free yourself from the cloud!



There are a few things you will need to flash your Tuya based device:

  • A laptop/Raspberry Pi with WiFi running some form of Linux (you can use a live CD) – I’d recommend Debian/a Debian based distro like Ubuntu or Kali, but it does work with others with some minor modifications like Fedora which is what I’m using here.
  • A secondary device with WiFi like a Smartphone.
  • A Tuya based smart device – bulb, plug or switch. A good way to check if the device is Tuya based is if it uses the “Smart Home”, “Smart Life” or other Tuya smart app.

Once again, I’d suggest as soon as you receive your smart device that you do not connect it to the Smart Life/Smart Home App. If you do this, your device may automatically update to a new firmware that makes this process not work.


With your Linux environment running and booted, we need to grab the latest copy of Tuya-convert with a few commands:

# Debian/Ubuntu/Kali/
sudo apt install git
git clone https://github.com/ct-Open-Source/tuya-convert
cd tuya-convert

sudo dnf install git
git clone https://github.com/ct-Open-Source/tuya-convert
cd tuya-convert

Next, we run the script to install the prerequisite software:

# Debian/Ubuntu/Kali

#Fedora - Modify the two lines in the install_prereq.sh file from this:
sudo apt-get update
sudo apt-get install -y git iw dnsmasq hostapd screen curl build-essential python3-pip python3-setuptools python3-wheel python3-dev mosquitto haveged net-tools libssl-dev

#To this:
sudo dnf check-update
sudo dnf install -y git iw dnsmasq hostapd screen curl kernel-devel python3-pip python3-setuptools python3-wheel python3-devel mosquitto haveged net-tools openssl-devel

Once complete, you should have “Ready to start upgrade” message.

Inside this directory there is a config.txt file, edit this with your WiFi adapter name. Use the “iwconfig” command to list all wireless adapters and get the name.

Then we are ready to start the flash with:


Type “yes” at the prompt to confirm you know what you are doing. Then you will see the following message:

Do not press anything yet. Connect your phone or secondary device to the the “vtrust-flash” access point. Make sure to accept any prompts that there is no internet access and you want to stay connected.

Next, put your smart device into pairing mode. You do this using the following methods:

  • Bulbs – physically switch the bulb on-off-on-off-on in semi quick succession. The bulb will start to flash quickly.
  • Plugs – Using the wall switch, turn the plug on-off-on-off-on in semi quick succession. The LED on the button will begin to flash quickly.
  • Switches – Press and hold the primary button on the switch until the indicator LED flashes quickly.

Once in pairing mode, press enter to start the process. The Tuya-convert process will start and it takes about 60 seconds or so, it will display information about the smart device once it is detected.

You will then be asked to make a choice, flash ESPurna, flash Tasmota or return to stock:

Go ahead and choose which firmware you want (the stock firmware is backed up) and the procedure will complete. I am using Tasmota for this example but once you have any of the custom firmware on there, you can change to another at any point.

Finally, Tuya-convert will complete and will ask if you want to flash another device, which you can do so if you wish:


If you are using a live CD for this, you don’t need to do anything further, just reboot and everything will be working.

However, if you used your main Linux distro, you might have issues with the network card not appearing, this is because sometimes it is left in monitor mode by Tuya-convert, luckily should be easily resolved:

ifconfig wlanX down
iwconfig wlanX mode managed
ifconfig wlanX up
service NetworkManager restart

WiFi should start working again.


Thanks to the amazing guys behind the Tuya-Convert project we can unlock all of our smart devices and integrate them into Home Assistant, OpenHAB, Domoticz or any other Home Automation software and remove the need for these devices to have cloud communication.

I would recommend flashing as many of your devices as you can with this procedure, this is a constant battle to stay ahead of any firmware updates that might mitigate this procedure!

As always, leave your thoughts/feedback below, let me know anything you want to see in the future and don’t forget to subscribe to be instantly alerted of the latest posts.

  1. Pat

    Followed this to flash a smart bulb. The process successfully completed but now my bulb does not turn on, is there something else I need to do?

  2. Pat

    Yes I recycled the power but no joy. Initially, when you turned on the bulb it went into pair mode ie flashing rapidly but now it is dead. I tried doing the ” on off three times ” as well but it refuses to turn on. Looks like it’s destined for the bin ☹️

  3. Simon

    Thank you for this very well written tutorial. Following your tutorial I have successfully freed Swisstone SH 330 (CCT) and Swisstone SH 340 (RGB) wifi bulbs from the cloud constraints.

    Greetings from Slovenia

  4. Will

    Pat’s results make me reticent to do this with my devices. I’ve invested a lot of money in these devices and I’m not going to change their firmware unless I I am assured beforehand that it won’t break my devices.

  5. Antonio

    Hello Pat,
    do you know a way of reviving a “dead” plug?
    I followed your tutorial to flash a neo coolcam plug and all went smooth.. but in the end the plug would not switch on and off (not much of use) but I would see it with the web browser and connected it to mqtt as well, but it completely died when I tried to config a different module (a switch, not neo coolcam) .
    and I believe the reason why it would not toggle on/off was due to I had it setup once with tuya app but I did not remember, so I flashed it with Tasmota.
    is there any fix, even if I need to weld something..
    thank you!

  6. David

    i keep getting an error

    Failed to connect to generic netlink.
    AP mode not supported!
    Please attach a WiFi card that supports AP mode.

  7. Youness Moundafie

    Plz a have a fcmila bulb, that work only with cloud inteligent app, can this tutorial make it work with tuya and how?

  8. youness

    plz i have a smart bulb working with cloud inteligent, is it possible to make it work with tuya with this solution

Leave a Reply

Your email address will not be published. Required fields are marked *