Flashing Tasmota used to involve the arduous process of soldering fine wires to microscopic contact pads and using a USB to serial programmer board. With the advent of a growing home automation community and the development of tools such as Tuya-convert and Tasmota, DIY smart home enthusiasts have been given the tools to cut the cord and ditch cloud services for their privacy and security issues.
All home automation devices on my network run open-source firmware that works locally without sending data to cloud services. Not only does this result in very low latency and fast response times, but it also stops companies from recording massive amounts of usage data for their benefit.
I’ve blogged before about how to Flash Tasmota firmware to Brilliant Smart bulbs with Tuya Convert, this post aims to simplify the process and remove the dependency on a Raspberry Pi.
Advertisement Begins
Advertisement End
Tuya Convert: This is a firmware flashing tool to hack common IoT devices such as light bulbs and power plugs. It tricks the IoT device into thinking the proprietary mobile app is talking to it. This works for tuya based devices. In all likelihood, your device will work. My light bulb was not on the support device list, but I managed to figure out how to write a custom template for it (see the end of this post).
Tasmota: This is excellent firmware for IoT devices. Some 20 devices on my network run on this firmware and it is very responsive and above all — reliable. I dabbled with ESPYaml in the past (post embedded below), but can no longer recommend it since the Tasmota firmware is much more stable, feature-rich and reliable. Not to mention, firmware upgrades can be handled in bulk using TasmoAdmin.
What you’ll need:
- Access to a Linux machine or ability to boot to a Linux live iso (use Ventoy and copy the ISO file onto the thumb drive)
- External Wifi USB dongle – must support access point (AP) mode. Cheap Wifi dongles cause problems.
- A Tasmota-compatible device such as the one I am using or another device from their compatibility database
Most Brilliant devices use a compatible ESP8266 chip that can be easily flashed using Tuya Convert and compatibility increases as more devices are added by the community.
The “Brilliant Smart WiFi Plug with USB Charger (Model 20676/05)” pictured right is very affordable at AU$16 and features a built-in USB charging port, but it is bulky and does take up extra space on a power board.
Another model I personally use is “Brilliant Wifi Single Plug with Electricity Monitoring (Model 20925)”. It comes with power monitoring and it’s small form factor saves space. At AU$19 it is still a very good value.
Advertisement Begins
Advertisement End
Initial setup for Tuya Convert
Plug in a USB wifi dongle into your machine. I tried using the built-in wifi adapter on my laptop, but for some reason, Tuya Convert was unable to use it in access point mode. This is most likely because the Wifi chip in my laptop does not support AP mode. The USB Wifi dongle I am using is a refurbished Netgear A2610 Wifi USB Adaptor.
The video belows walks through the following steps:
- Download and extract the latest release of Tuya Convert
- Edit the config.txt file by updating the
WLAN=
line with the correct ID number of your wifi adapter. You can find this ID using the commandsudo ifconfig
- Install dependencies by running the provided
./install_prereq.sh
script
Start the flashing Process
The video below shows how to navigate the whole process from start to finish.
- Tuya Convert needs port 1883 and I’ve had issues with it. Better to stop it before starting the flash process.
- Start
tuya-convert
sudo bash ./start_flash.sh
- Accept the terms
yes + ENTER
- On your phone, connect to trust-vflash network. This step is essential to trick the stock firmware into allowing the flash process.
- Activate setup/flash mode on your device (See next section below for Brilliant specific instructions)
- When device is in flash mode, tuya-convert will eventually connect to it and send a series of commands. Leave it alone until process is done.
- The device may restart multiple times, click on and off and the LED may change colour. Don’t interfere with this process. It’s confusing but perfectly normal.
- Tuya Convert automatically takes a backup of the stock firmware that came with your device.
- It prompts you for a firmware to install. Simply select Tasmota by typing 2 and then confirm by typing the letter y.
- The flashing process takes a few seconds and tuya-convert lets you know that it is done.
- You can flash another device or exit out of the program by typing y.
On the next page we will continue with activating flash mode on the smart plug.