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.
Activating Flash Mode on Brilliant
Make sure your bulb is in set up mode (fast light flashing at 0.5s intervals). Check your manual for how to achieve this with your device. Below is a video showing the process (very easy if you know what to do).
Affiliate Content Start
HUIFU Wireless Earbuds Bluetooth Ear Buds - 40H Playtime Stereo Bluetooth Headphones LED Display IPX7 Waterproof in-Ear Earphones with Mic Compatible with iPhone Android Phone, Black
$19.99 (as of November 18, 2024 02:39 GMT +08:00 - More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)Apple AirPods 4 Wireless Earbuds, Bluetooth Headphones, with Active Noise Cancellation, Adaptive Audio, Transparency Mode, Personalized Spatial Audio, USB-C Charging Case, Wireless Charging, H2 Chip
$157.83 (as of November 18, 2024 02:39 GMT +08:00 - More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)Apple Watch Series 10 [GPS 46mm case] Smartwatch with Jet Black Aluminium Case with Black Sport Band - M/L. Fitness Tracker, ECG App, Always-On Retina Display, Water Resistant
$363.84 (as of November 18, 2024 02:39 GMT +08:00 - More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)Affiliate Content End
Brilliant Smart WiFi Plug with USB Charger (Model 20676/05)
- Plug in device
- Make sure the device is switched off (solid red led)
- Hold button until red LED blinks rapidly
Brilliant Wifi Single Plug with Electricity Monitoring (Model 20925)
Advertisement Begins
Advertisement End
MY MISSION
This blog started nearly 10 years ago to help me document my technical adventures in home automation and various side projects. Since then, my audience has grown significantly thanks to readers like you.
While blog content can be incredibly valuable to visitors, it’s difficult for bloggers to capture any of that value – and we still have to work for a living too. There are many ways to support my efforts should you choose to do so:
Consider joining my newsletter or shouting a coffee to help with research, drafting, crafting and publishing of new content or the costs of web hosting.
It would mean the world if gave my Android App a go or left a 5-star review on Google Play. You may also participate in feature voting to shape the apps future.
Alternatively, leave the gift of feedback, visit my Etsy Store or share a post you liked with someone who may be interested. All helps spread the word.
BTC network: 32jWFfkMQQ6o4dJMpiWVdZzSwjRsSUMCk6
Smart Home Integration
Tasmota Setup
Once flashed, your device enters the normal Tasmota setup process. Connect to the wifi network starting with tasmota-*
and go to 192.168.4.1 to enter your regular WiFi password.
Tasmota Backlog Command
The backlog command in Tasmota can be used to quickly setup a series of devices
Use the following Backlog command in Tasmota device Admin interface to configure the device. Leave Hostname %s
as is, it will then take the MQTT topic as host name (in my case son_kitchen_bulb
.)
Backlog Hostname %s; FriendlyName Kitchen Bulb; MqttHost serverbox; MqttUser sonoff_user; Topic son_kitchen_bulb;
Home Assistant Integration
All my Tasmota based LED lights are single-color, dimmable lights. The following mqtt
light configuration should make this work well in Home Assistant.
- platform: mqtt
name: Bedroom Light
state_topic: "stat/son_bedroom_light/RESULT"
command_topic: "cmnd/son_bedroom_light/POWER"
state_value_template: ""
brightness_state_topic: "stat/son_bedroom_light/RESULT"
brightness_command_topic: "cmnd/son_bedroom_light/Dimmer"
brightness_value_template: ""
brightness_scale: 100
payload_on: "ON"
payload_off: "OFF"
Conclusion
Tasmota is my favourite home automation project. All my lights and switches have been setup with this firmware. Brilliant smart switches (due to their security flaws) are easy to flash with Tasmota.
Please help me keep this post updated by leaving a comment when instructions change.