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 , ,
27 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 🙂

  9. Stephen

    I tried to flash a Tuya SM-SO306E Smart Power Bar without success. The blue flashing light occurs to show it is in AP-mode. I followed your guide, unfortunately without success.

    1. Lewis Barclay

      Hi Stephen,

      That’s unfortunate, perhaps there is a new firmware on your device. Perhaps if you post some of the logs from the flashing process I might be able to help?

  10. Stephen

    Hi Lewis, I figure out that the device’s model is TS0115, its from Tuya. It is a Zigbee enabled device. Is it possible to put Tasmota on this device?

    https://www.zigbee2mqtt.io/devices/TS0115.html

    I use Domoticz, the latest version.
    I checked the Tuya-convert folder, I don’t see any log folder/file.

    I also checked the device it self regarding the blue flashing. It won’t stop flashing so in my humble opinion there’s no successful handshake, right?

  11. Stephen

    1597059346: mosquitto version 1.5.7 starting
    1597059346: Using default config.
    1597059346: Opening ipv4 listen socket on port 1883.
    1597059346: Opening ipv6 listen socket on port 1883.
    1597059346: New connection from 192.168.1.105 on port 1883.
    1597059346: New client connected from 192.168.1.105 as mqtt-explorer-2d2b31ec (c1, k60).
    1597059346: No will message specified.
    1597059346: Sending CONNACK to mqtt-explorer-2d2b31ec (0, 0)
    1597059346: Received SUBSCRIBE from mqtt-explorer-2d2b31ec
    1597059346: # (QoS 0)
    1597059346: mqtt-explorer-2d2b31ec 0 #
    1597059346: Sending SUBACK to mqtt-explorer-2d2b31ec
    1597059346: Received SUBSCRIBE from mqtt-explorer-2d2b31ec
    1597059346: $SYS/# (QoS 0)
    1597059346: mqtt-explorer-2d2b31ec 0 $SYS/#
    1597059346: Sending SUBACK to mqtt-explorer-2d2b31ec
    1597059346: Sending PUBLISH to mqtt-explorer-2d2b31ec (d0, q0, r1, m0, ‘$SYS/broker/version’, … (23 bytes))
    1597059346: Sending PUBLISH to mqtt-explorer-2d2b31ec (d0, q0, r1, m0, ‘$SYS/broker/uptime’, … (9 bytes))
    1597059346: Sending PUBLISH to mqtt-explorer-2d2b31ec (d0, q0, r1, m0, ‘$SYS/broker/clients/total’, … (1 bytes))
    1597059346: Sending PUBLISH to mqtt-explorer-2d2b31ec (d0, q0, r1, m0, ‘$SYS/broker/clients/inactive’, … (1 bytes))
    1597059346: Sending PUBLISH to mqtt-explorer-2d2b31ec (d0, q0, r1, m0, ‘$SYS/broker/clients/disconnected’, … (1 byte
    s))
    1597059346: Sending PUBLISH to mqtt-explorer-2d2b31ec (d0, q0, r1, m0, ‘$SYS/broker/clients/active’, … (1 bytes))
    1597059346: Sending PUBLISH to mqtt-explorer-2d2b31ec (d0, q0, r1, m0, ‘$SYS/broker/clients/connected’, … (1 bytes))

    1597059346: Sending PUBLISH to mqtt-explorer-2d2b31ec (d0, q0, r1, m0, ‘$SYS/broker/clients/expired’, … (1 bytes))
    1597059346: Sending PUBLISH to mqtt-explorer-2d2b31ec (d0, q0, r1, m0, ‘$SYS/broker/load/messages/received/1min’, …
    (4 bytes))
    1597059346: Sending PUBLISH to mqtt-explorer-2d2b31ec (d0, q0, r1, m0, ‘$SYS/broker/load/messages/received/5min’, …
    (4 bytes))
    1597059346: Sending PUBLISH to mqtt-explorer-2d2b31ec (d0, q0, r1, m0, ‘$SYS/broker/load/messages/received/15min’, …
    (4 bytes))
    1597059346: Sending PUBLISH to mqtt-explorer-2d2b31ec (d0, q0, r1, m0, ‘$SYS/broker/load/messages/sent/1min’, … (4 b
    ytes))
    1597059346: Sending PUBLISH to mqtt-explorer-2d2b31ec (d0, q0, r1, m0, ‘$SYS/broker/load/messages/sent/5min’, … (4 b
    ytes))
    1597059346: Sending PUBLISH to mqtt-explorer-2d2b31ec (d0, q0, r1, m0, ‘$SYS/broker/load/messages/sent/15min’, … (4
    bytes))
    1597059346: Sending PUBLISH to mqtt-explorer-2d2b31ec (d0, q0, r1, m0, ‘$SYS/broker/load/publish/dropped/1min’, … (4
    bytes))
    1597059346: Sending PUBLISH to mqtt-explorer-2d2b31ec (d0, q0, r1, m0, ‘$SYS/broker/load/publish/dropped/5min’, … (4
    bytes))
    1597059346: Sending PUBLISH to mqtt-explorer-2d2b31ec (d0, q0, r1, m0, ‘$SYS/broker/load/publish/dropped/15min’, … (
    4 bytes))
    1597059346: Sending PUBLISH to mqtt-explorer-2d2b31ec (d0, q0, r1, m0, ‘$SYS/broker/load/publish/received/1min’, … (
    4 bytes))
    1597059346: Sending PUBLISH to mqtt-explorer-2d2b31ec (d0, q0, r1, m0, ‘$SYS/broker/load/publish/received/5min’, … (
    4 bytes))
    1597059346: Sending PUBLISH to mqtt-explorer-2d2b31ec (d0, q0, r1, m0, ‘$SYS/broker/load/publish/received/15min’, …
    (4 bytes))
    1597059346: Sending PUBLISH to mqtt-explorer-2d2b31ec (d0, q0, r1, m0, ‘$SYS/broker/load/publish/sent/1min’, … (4 by
    tes))
    –More–

  12. Guillermo

    Hey! i have a wifi controller for a led strip but it works with magic home instead of smart life. I want to install a Tuya firmware instead of the one it is working with to be able to use it with the smart life app.

    Is it possible with this method you described?

    Thank you!

  13. Ted Hovis

    First, thank you so much for putting all this effort in to help us try and flash our devices.

    Regrettably, the described process has not worked for me using either the latest tuya-convert or the previous development version suggested.

    On the command line I get a continual loop of “SmartConfig complete. >> Resending SmartConfig Packets ……..” until the program gives up with “Device did not appear with the intermediate firmware.” (multiple runs have also been tried)

    Before purchasing my two different kinds of Tuya bulbs, I made sure to check the blackadder depository for the devices listed, and selected those available to buy from me locally: with this specific goal in mind (local non-cloud control with Home Assistant).

    Unfortunately with the first type of bulb I couldn’t help but connect to the official app likely resulting in a firmware upgrade. (having popped the top there’s no way of accessing the pins: everything below an external plate of LEDs is sealed within an aluminium body) With the second bulb type, however, just now, I followed all the instructions here to the letter to get the same result — their first WiFi contact was from vtrust-flash — giving identical messages from tuya-convert!

    The bulb itself is put into rapid-flashing EZ pairing mode before I hit ENTER after having connected my mobile to the vtrust-flash Access Point also, and received a connection confirmation on the ‘phone screen… What happens is that very soon after, prior to the continual SmartConfig looping, the bulbs drop out into a solid light: so obviously they *have* been communicated to, in some way, by tuya-convert but are resistant to being flashed.

    The only feasible conclusions are either that, against how they’re advertised on Amazon, these bulbs have different chipsets or more likely as the blackadder pages indicate these bulbs were *already* shipped with updated firmware resistant to tuya-convert flashing and later Tasmotizing.

    So, if anyone’s read this far: my question is, what is the best way of checking when the latest version of tuya-convert might come out — is there a simple link or email alert accessible — which may stand a chance of outflanking this latest stock firmware (I’m a relative noob on GitHub and don’t have the time to check through multiple message threads having already exhausted the time I’d allocated to trying to re-flash this tech as it is)?

  14. Dimitri

    Lewis hi, Thanks for your detailed instructions according to which I flashed my BW-SHP2 Blitzwolf/
    I have an academic question. If I need for any reason e.g. new firmware , to reflash my device which iis currently flashed , can I do it for a second or third time etc …. using the same exactly instructions ?
    I heard that second time around it must be flashed with soldering . What is your opinion please?

Leave a Reply

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