Loading...
How To Guides

Tuya-Convert guide – OTA flashing of smart bulbs and plugs

Tuya-Convert guide - OTA flashing of smart bulbs and plugs

There is an updated version of this Tuya-Convert guide, check it out here.

In one of the previous posts we looked at how to flash ESPHome/Tasmota onto a Tuya based smart bulb using the soldering method. I explained that Tuya-Convert is a much easier method assuming you can get a bulb that has not been updated. Well I finally managed to get my hands on a bulb that was on the correct firmware so finally I can show how to use the much easier Tuya-Convert method to flash your bulb!

Tuya-Convert is a very easy method of flashing your esp8266 based smart bulbs with custom firmware, so that you can remove the need for your IoT devices to speak to Chinese cloud servers and allows you to integrate with Home Assistant, OpenHAB or Domoticz.

Prerequisites

For this guide, you need the following:

  • Linux computer with wifi
  • Another wifi compatible device (smartphone or laptop)
  • Smart Wifi bulb or smart plug with compatible firmware

If you have a Raspberry Pi with Wifi this is a valid method to go down, however I used the Kali Linux Live CD on a laptop which worked well for me. I’d highly recommend using Kali Live or a Raspberry Pi for this, other distros might not work properly, I tried Fedora which didn’t work since it does not label the network adapters how Tuya-Convert expects. This is an easy fix but I’d just go for one of the above methods.

Most importantly, for the highest chance of this working, I’d strongly suggest against connecting your Smart Bulb to the Smart Life app. As soon as you do this, it will update the firmware and Tuya-Convert will no longer be an option, meaning you’ll have to go down the solder method.

Finally you might want to check out the compatibility list on the Tuya-Convert GitHub page where the community has kindly posted their results with certain bulbs. It’s located here.

Guide:

Firstly we need to be booted into our Linux environment. Then open a terminal and issue the following commands:

apt install git
git clone https://github.com/ct-Open-Source/tuya-convert
cd tuya-convert
./install_prereq.sh

This will install Git if not already included in your distro, then will download Tuya-Convert. The final step will update your distro and install the required package for Tuya-Convert to run. This can take a few minutes to complete depending on your hardware.

Once complete you can run the following command to start the process:

./start_flash.sh

This will launch the Tuya-Convert flash process, you will be prompted at the first screen, type “yes” and hit enter to proceed:

After proceeding it will then give you a couple of steps to complete:

  1. Connect your smart phone or second laptop to the new wifi device, with the password being “flashmeifyoucan”.
  2. Put your smart bulb or plug into pairing mode, this is important. To do this, you physically turn the device on, off, on, off, on. Then wait a few seconds and the light should begin to flash.

Once both these steps are done, you can hit enter and wait. This can take a minute or two to complete. Your device should stop flashing and the light should be on constant. Your terminal window should look similar to this which will indicate a success:

Now run the following command to flash Sonoff-Tasmota onto the device:

curl http://10.42.42.42/flash3

If successful, the device should now have a Sonoff-Tasmota 6.5.0 firmware on it.

Connect to the new device by searching for its SSID and connecting, it will look like “sonoff-xxx”. Once done, you can then connect to the web page of your device to continue setup. It should hopefully be on http://192.168.4.1

Congratulations, you just successfully flashed your smart bulb or plug! You have a ton of options now for integrations and are free to flash any firmware you desire!

A backup of the original firmware is automatically saved so keep this safe incase you ever want to go back for some reason. You will find it in the tuya-convert folder. If you are using a Live CD ensure you copy this to a USB stick or similar before shutting down!

Troubleshooting:

The most common issue you will run into is that your device has a new firmware on it which prevents this procedure. You know if this is the case if when you start the flash procedure, your device exists pairing mode and stops flashing, but nothing happens in your terminal window. Unfortunately the guys behind the tuya-convert project have been unable so far to get around this, hopefully they can in the future. Please consider creating an issue on github in order to help the community know which ones to avoid!

Your only option at this point is to follow our other guide and solder directly.

The other common issues are not joining a secondary device to the vtrust-flash SSID first, or not putting your device in pairing mode before pressing enter. Make sure to follow these steps carefully!

Let me know in the comments if you run into any issues and I can try to assist!

Want to support me?

If you like the content I put out and would like to support me, you can do so using the options below.

I can't state enough how much any support is greatly appreciated and will go directly back into funding new/bigger projects and website upkeep.

Tagged , ,
17 comments
  1. Gerrit Visser

    hank you for this very clear and concise how-to. Worked great on my Geeni 800WW bulbs. (which if you open them up are not updateable using wires etc.)

  2. J Brandts

    Hallo Lewis,

    I followed your clear instructions, but elas, no windows with actions and no WIFI AP visible, using a wifi scanner on my mobile.
    I do see some failure’s in the AP log file, but no clue what they mean.
    Please send me your e-mail adress, so I can send a screen dump and the log file.
    Thx

  3. 8675309

    Well it seems its a no go as I have a intel pci-e wifi adapter other than vmware vsphere(not free) I doubt hyperv is an option either. so I might give in for now & use a live image on a flash drive when no ones around.

  4. 8675309

    Should be noted that since 2020 builds kali now requires “sudo” before the 1st line. Tried with a boot drive the pci-e adapter doesn’t support ap mode go figure. My have to dig up my old datel WiFiMax or look into getting a rpi

  5. Legend

    I flashed the ce smart plug and it doesn’t come back affer I set the ssid …I set a backup one too (AP2) just incasee but when I hit save….there is no led lit up…I tried to disable hidden ssid to see if that would help but no dice…no led and I tried hitting the power button unplugging and plugging it back in…and I tried to plug in something …a lamp..to the smart plug and it doesn’t turn on…not sure what else to try….happened to 2 device s so far

    Thanks!
    legend

    1. Lewis Barclay

      Hi,

      Is it possible you made a typo? If you got as far as setting Tasmota options then that means that Tuya-convert worked OK so that is great. It’s likely you have an issue with the SSID settings. Did you make sure the SSID was in the correct case (upper and lower case exactly how it appears)? I’ve seen issues with that before. If you can recall exactly what you typed you can try changing your SSID to that just to get it to connect. Another solution is to use something like Aircrack-ng tools to try and sniff out your device over Wifi to see what is broadcasting.

      The reason your plug won’t be working is because you haven’t changed the module within Tasmota so it doesn’t know how to map the buttons yet, it doesn’t mean the plug is dead!

      Hope that helps a little bit and you get it working

  6. mortalmonkey

    Just flashed my first Fiet Electric rgb bulb following your guide. I am able to access the web interface for the bulb and change wifi and hostname settings. That’s as far as I’ve gotten. Trying to decide if this firmware is enough? Is there other firmware out there that would work? I read your soldering post and saw something about Hue? Can they be flashed to Philips hue and added that way.

    I just purchased a Samsung smart things g3 hub (waiting for delivery) and not sure what direction I want to go with these. I have 15 of them ive used for the past year with Alexa.

    1. Lewis Barclay

      Hi there,

      Glad you managed to follow the guide! 🙂

      As far as other firmware’s or integration with Hue, you can integrate them all together using something like Home Assistant which is a central app for all your smart home devices. I don’t think 3rd party devices can be added to Hue, but Hue and Samsung Smart things can be integrated with Home Assistant. Alexa works too.

      Check here if you want a guide on how to get setup with Home Assistant.

      Hope that helps!

  7. mortalmonkey

    Something I wanted to share here for others that want to add these bulbs to Smartthings. It took me most of the day yesterday to flash and program 15 Feit Smart bulbs. I have a mix of the RGBW, 2700k, and 5000k Feit bulbs purchased at Menards so I had to use a couple of different templates to program the bulbs. Using Tasmota (Connect) Smart App through Smartthings, template repository on Github, and finally, my smart home easily accessible through ActionTiles and smart things on a 10′ Android tablet.

    https://community.smartthings.com/t/release-tasmota-connect-for-sonoff-tuya-smartlife-other-esp8266-devices/187553

    https://github.com/blakadder/templates/blob/master/_templates/feit_electric-BR30927CAAG

    I hope this helps out others. I am now free from Chinese spy bulbs. 😀

  8. Rorian

    Thank You for all of this. I successfully convert LSC Smart Connect:
    – 4x power plug
    – 2x filament bulb
    from Action store in Poland,

    unfortunately Smart Motion Sensor is no-go :/ ,but anyway thats so awesome, goodbye China cloud and android app, welcome back Domoticz 🙂

Leave a Reply

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