A couple of weeks ago, I wrote about flashing Tasmota firmware onto some old Tuya smart plugs, using a USB to UART converter and some Dupont jumper cables. I also flashed Tasmota onto a Sonoff RF Bridge, which I’d bought to listen to doorbell presses. This meant that the RF Bridge would work with Home Assistant without needing a HACS integration or addon, and wouldn’t need to rely on cloud services to run.
However, inside every Sonoff RF Bridge there are two wolves chips with firmware. There’s an ESP8266 chip, which handles the Wi-Fi side of things, and an OBS38S003 chip which handles RF communication. I have the latest R2 v2.2 model; older ones have a different RF chip.
The default iTead firmware on the RF chip has been locked down to only support a limited number of RF messages. That’s fine if your device is supported, but my doorbell isn’t. So even with Tasmota installed, pressing the button my doorbell didn’t do anything as the RF firmware was programmed to ignore it.
Portisch RF fimrware
The OBS38S003 RF chip can be flashed with ‘Portisch’ firmware, which allows all RF messages to be received and decoded. However, whereas the ESP9266 chip has UART pins that don’t require any soldering to access, the OBS38S003 doesn’t support a UART bus. There are therefore two ways to get around this:
Modify the board using additional soldered cables and cutting some lines on the board
Using another circuit board, flashing firmware onto that, and then using the flashing board to flash the chip.
I went with option 2 – I don’t have a soldering iron to hand, and didn’t want to make a mistake and damage the board beyond repair. Instead, I bought this AZDelivery D1 NodeMCU Wi-Fi Development Board(sponsored link). There are a number of ‘D1’ boards out there – Wemos make the most well-known – but this was £7 and available from Amazon. Ironically this board also contains an ESP8266 chip.
Flashing the development board
To flash the D1 board, I needed to install two things:
I installed both, and then followed the instructions that came with the AZDelivery D1 board to set it up as a board in the Ardunio IDE. Next, I loaded the OnbrightFlasher into the Ardunio IDE and flashed it onto the D1 board. Make sure that use a micro-USB cable that supports both data and charging – a charging-only cable will power the device, but you won’t be able to connect to the D1.
Once the firmware is flashed, you can disconnect everything, put your Sonoff RF Bridge back together.
Testing the Portisch firmware
In Tasmota, open the Console and type in ‘rfraw 1‘ and press enter to enable Portisch. Then type ‘rfraw 192‘, and the device should beep. You can then type ‘rfraw 177′ and the Sonoff RF Bridge will go into ‘bucket sniffing’ mode – this will display the various codes being broadcast on the 433 MHz band. There’s more guidance on the Tasmota device page and RF commands section.
So, is my doorbell smart now?
The bad news is that, despite all this work, I haven’t been able to use the RF Bridge to capture my doorbell’s signals to turn them into actions in Home Assistant. The codes being sent by my doorbell seem to rotate, presumably so that only the receivers in my house respond and not someone else’s. And, the 433 MHz channel is also very noisy – there are lots of codes being sent by other devices like a frustrating game of Numberwang.
Basically, if I want to have a smart doorbell, I’m going to need to just buy an actual smart doorbell, aren’t I? At least I have an ESP development board to play with now.
Time for the fourth post about our journey towards an electric car. Part one, in May, introduced the series, and part two last month answered the questions ‘why’ and ‘why now’. Meanwhile, part three talked about choosing a home electric car charger. Today, I’m going to talk about the charger that we had fitted.
We decided to buy our car charger first, before buying an electric car, so that we would be able to charge it at home from day one. So, back in May, we had a new Rolec EVO charger installed on the outside of our house, by a local electrical firm.
It’s an untethered charger, as the charger is located in quite an exposed place. That means that we can put the cable away when not in use, and it’s at less risk of being stolen. It connects over Wi-Fi and Bluetooth; we chose a Wi-Fi model as it’s (just) in signal range of our router.
Around the charger socket is a ring light, which changes colour based on its status. As there’s no car plugged in, but it’s ready to charge, it’s flashing blue. It’ll turn green once a car is plugged in and charging.
The Rolec EVO app and OCPP
By default, the Rolec EVO uses its own app, which is fine. Within the app, you can start and stop charging sessions, and select the level of current to charge slower or faster. There are also the ‘Eco’ charging modes, which I’ll explain further down.
You can manage the Wi-Fi network that the charger is connected to (whilst connected via Bluetooth of course) and perform firmware updates – since we had this installed in May, there’s been a couple of updates released.
The Rolec EVO also supports OCPP, and so I could switch it over to a different platform. For older Rolec devices, the default platform is Monta (there’s a guide here) but others are available.
I may well consider switching to Monta, as there’s a Monta integration in HACS for Home Assistant. As yet, the backend for the Rolec EVO app doesn’t appear to have a public API. That means it’s not currently possible to add it to Home Assistant, other smart home platforms, or other electric car charging apps, unless you change to Monta.
Eco modes and schedules
As well as the big chonky electric cable that runs from your charger to your consumer unit (what most people call a fusebox), there’s a smaller cable attached. This connects to a CT clamp, that monitors your household electricity usage. If you put the charger in ‘Eco’ mode, then it’ll adjust the charging rate depending on how much power is being used elsewhere in the home. For example, if your oven is on, it might lower the current.
Eco+ mode is there for solar panel users, and so ensures that charging takes place when the sun is shining. That should save you money over using grid energy.
You can also set a charging schedule. This is helpful if you have an EV electricity tariff, which offers lower energy prices at set times of the day. That way, you can plug your car in, and then it’ll wait until the cheaper times kick in before it starts charging. We’re with Octopus (here’s my referral link), and they have two dedicated EV tariffs. One, ‘Intelligent Octopus Go’ requires you to have a certain model of car and a certain charger. It supports a lot of chargers, including other, older Rolec chargers, but not the newer EVO model that we have. The other, Octopus Go, simply offers cheaper electricity in the early hours of the morning. We’ll need to look into these once our smart meter is working again – you’ll need a working smart meter for both tariffs.
Future-proofing
I’ve mentioned that the Rolec EVO charger supports OCPP, so I can change to a different back-end system or run my own OCPP server. But it looks like it uses an Espressif ESP chip for Wi-Fi and Bluetooth, based on how it presents itself to my router. So it might be possible to put custom firmware on it in future. Having spent a four figure sum getting installed, I don’t think I’ll be looking at this anytime soon, but it should mean I’m in a good place if Rolec were ever to go out of business.
We just need a car now
So that’s the charger that we’ve had installed. Now we just need a car to plug into it. The good news is that we put a deposit down on a new electric car on Saturday, and will be picking it up at the end of the week. I’ll conclude the series once we’ve got it.
For my Zigbee devices, I use Zigbee2MQTT and a Sonoff USB Zigbee dongle as my co-ordinator. As I came quite late to the Zigbee party, I didn’t pick up a proprietary Zigbee bridge, but if I had, I wouldn’t use one. Today, I’m going to go through a few reasons why.
Examples of proprietary Zigbee bridges include the Philips Hue Bridge, the Ikea Dirigera Hub and the Tuya Zigbee gateway, but there are others. Here are my reasons why it’s best to go with a more open system, like Zigbee2MQTT or Home Assistant’s Zigbee integration. I’ve previously compared the two.
Having all your devices on one Zigbee network
Zigbee is a mesh network. That means that, as more devices are added, the network actually gets stronger, as each device can communicate with each other. This is especially true with mains powered Zigbee devices like smart plugs and light bulbs. Therefore, if all of your Zigbee devices are on the same network, the connection between each device should be stronger. I’ve included a diagram of my network above, and you can see the multiple mesh connections between devices.
If you have multiple Zigbee bridges – say one for your Hue lights and another for your Ikea smart plugs – you risk causing interference between networks. Furthermore, Zigbee runs on the same 2.4 GHz frequency band as Wi-Fi, Bluetooth and your microwave oven. Having everyone on one network should reduce interference.
Better device support
Some Zigbee bridges are better than others, when it comes to supporting third-party devices. For example, you might be able to add an Ikea Tradfri bulb to a Philips Hue bridge, but possibly not another kind of device. Zigbee2MQTT has, arguably, the best device support and will work with just about any Zigbee device, regardless of manufacturer. You can check the Zigbee Device Compatibility Repository to see which devices work with which platform.
My Zigbee devices are a mixture of Tuya and Ikea, and they co-exist well within Zigbee2MQTT.
Cheaper
Most proprietary Zigbee bridges cost around £60. Meanwhile you can plug a USB Zigbee dongle into a spare PC, or a low-powered Raspberry Pi device that you may already have. The USB dongles typically cost £20-30 each (my Sonoff ZBDongle-E costs £27 at Amazon at present [sponsored link]), and you’ll only need one dongle and one computer rather than multiple bridges.
Easier to troubleshoot
With both Home Assistant’s ZHA and Zigbee2MQTT, you can look at the logs to see what’s going on inside your Zigbee network. Hopefully, that’ll help with troubleshooting any devices that aren’t working the way they should. As shown above, you can also get a diagrammatic representation of your network. This lets you see how your devices connect to each other and whether there are any weak spots on your mesh.
Not reliant on cloud services
There’s a risk that your proprietary Zigbee bridges could become expensive paperweights, if their manufacturers decide they’re no longer going to support them and turn off the cloud servers. They may continue to work locally, but if their cloud servers go dark, you may find that you can’t control your devices remotely any-more. By hosting your own Zigbee bridge, you can still have remote access but on your own terms. I use Homeway for remote access to Home Assistant, but you can also set up your own reverse proxy, for example.
Proprietary bridges may offer some convenience and a nice app, But, if you’re willing to put a bit of effort in to manage your Zigbee devices yourself on one single network, I think there are more advantages of going down the route of using Zigbee2MQTT or ZHA.
Time for part three of my series of posts about our journey towards buying an electric car. Part one, in May, introduced the series, and part two earlier this month answered the questions ‘why’ and ‘why now’.
Today, I’m going to focus more on point one from my ‘why’ post – being able to charge a car at home.
Granny chargers
When you buy an electric car, it’ll probably come with what is colloquially known as a ‘granny charger‘. This allows you to charge your car from a standard 3-pin socket, and gets its name for when you’re visiting your grandma’s house – the implication being that she doesn’t have a proper electric car charge at her house.
Granny chargers are okay to use occasionally when there’s no better option, but there are good reasons not to use them regularly:
The maximum power output is about 2.3 kW, which means your car will charge very slowly.
They must be plugged directly into a wall socket without using an extension lead, which may be awkward if you don’t have a plug within reach of your car. You may also need to have a window open to get the cable outside.
I’ve seen photos of plug sockets that have melted due to continual use with a granny charger.
Waterproof outdoor 3 pin sockets
You can alleviate some of these issues by having a waterproof outdoor 3 pin plug socket installed, which you can also then use for powering lawnmowers, for example. If installed correctly, and in the right place, there shouldn’t be any risks of melting/fire or the cables not being long enough. Indeed, my neighbour has chosen to go down this route for their hybrid car. Make sure that you get the socket professionally installed, of course.
However, this solution doesn’t alleviate the first issue, which is the slow charging. If you’re going to regularly charge an electric car at home, then you should invest in a dedicated electric car charging socket.
Electric car chargers
If you want to be able to charge your car more quickly and safely, then you’ll need to get an electric car charger socket installed. This is a box fitted to the outside of your home, that has a cable that you can plug into your car to charge it. Where it differs to a 3 pin socket is that it will have its own fuse in your consumer unit (fusebox) and will be rated for much higher energy use – up to around 7 kW. That means your car will charge more than three times faster with a dedicated home charger, than using a 3 pin socket. It’ll still be slower than some of the fast public chargers, but it will be cheaper.
Getting an electric car charger fitted can be quite expensive. When I’ve looked, the cheapest prices have been around £800, with £1000 to £1300 being the typical cost. This includes the cost of the charger unit and installation.
What to look for in an electric car charger
There are a number of different chargers available, from companies like Rolec, Ohme, Myenergi and Hypervolt that you may not have previously heard of. I’m not going to recommend one particular manufacturer, but here are a few points that I considered when choosing one:
Tethered or untethered
Some chargers are ‘tethered’ – in other words, they come with a permanently connected charger cable that you can coil up out of the way when not in use. The advantage of this is that the cable is included in the cost of the charger, and you don’t need to store it somewhere.
Untethered chargers have a socket for you to plug in your own cable, which typically isn’t provided and needs to be purchased at an extra cost. However, this does mean that you can put the cable away securely when not in use – I’ve heard of a couple of instances where tethered cables have been cut and stolen. If your charger will be in a more exposed place, maybe consider an untethered charger.
Wi-Fi or mobile data
Just about all electric car chargers include an app to manage charging. This allows you to monitor the charging process, and authenticate cars that are plugged in. After all, you probably don’t want any random car charging using your electricity that you pay for.
This means that the charger needs to connect to the internet. If your charger will be located some way away from your house, then you may wish to consider one that includes a mobile data SIM to connect to a cloud service. Otherwise, you can have one that connects to your home Wi-Fi network – but make sure that it’ll have a good signal before it’s installed. Some also come with Ethernet, if you have this available and want a physical network connection.
Some chargers also work via Bluetooth, which is fine over a short range, but not the most convenient.
OCPP compliance
I would recommend buying a charger that supports the Open Charge Point Protocol (OCPP). This is a common protocol for communicating between your charger and the cloud API. It’s an open standard, and means that you can potentially connect to different back-end servers if the one provided by your charger’s manufacturer is no longer available. Considering that chargers typically cost a low four figure sum and need to be professionally installed, you don’t want to be in a position where you have to replace a perfectly good charger simply because its manufacturer has gone bust.
I know I bang on about having solar panels, but it’s a key reason why we’re considering an electric car, as it’ll essentially allow us to charge for free at home. However, the maximum output of our solar panels is 4.8 kW, which is less than the maximum output of a typical charger. So ideally, you want one where you can set it to charge more slowly, so that you only use your own solar energy and not additional electricity from the grid that you have to pay for.
Some chargers will also use a CT clamp to measure home energy use and vary the rate of charging to match. If there are lots of high load devices running, such as ovens or electric showers, then the car charger can automatically lower the power draw and charge more slowly.
Chargers for on-street parking
If your house has a drive, where you can park your car away from a public road, then you shouldn’t have any issues getting a charger installed at home. If you don’t, and you park your car on a public road, then you’ll need to check with your local authority regarding their rules. Some may insist on a groove being cut in the pavement to fit the cable in, so that it isn’t a trip hazard. Others will flat out refuse, and insist that you use public charging points.
Companies like Edion will sell you a cable protector for around £50 which should ensure that your cable isn’t a trip hazard, and there are also plenty available from Amazon(sponsored link) too. As someone who is quite passionate about accessibility, I would urge you to consider one of these if you have to lay a cable across a public right of way.
Good news, we’re already halfway through 2025. Time for another month ahead post, although I am writing this more than two weeks ago during a period of hyper-focus. Here’s the one from last month.
Christine is once again away for work, this time in the West Midlands. She tends to get to travel more for work than I do, but then last month’s trip to Athens does rather trump her short trips for conferences and things.
I suppose the big thing about July will be our annual summer holiday. We’re off to North Wales for a week; seeing as we can get there in around two hours of driving, I’m hoping it’ll be a less stressful holiday. We have some ideas of what we want to do, but at this stage we don’t have any firm plans. I will, of course, blog more about it nearer the time. I also plan to write about our 2018 summer holiday, which I haven’t really blogged about before – last year, I covered 2019, 2021, 2022 and 2023.
There’ll be more about our electric car journey to come, although as I write this we still haven’t bought one yet. We’re likely to buy one this month or the next, as our current car’s MOT expires in September.
Regular readers may be relieved to know that I’m done writing about my trip to Athens, and are back to the occasional series of ‘Neil reviews cheap Zigbee devices from AliExpress’.
Earlier this month, I reviewed Zigbee window sensors, and this time I’m reviewing a Zigbee PIR motion sensor. PIR stands for ‘passive infrared’, and senses changes in infrared light to detect motion. It’s used in most motion detectors for burglar alarm systems, but you can buy sensors such as these for home automation too. In my case, I’ve fitted one to the top of our cellar stairs, to turn on a light in the cellar when motion is detected.
It’s pretty small – about an inch across – and runs on a single CR2450 battery (provided). You also get a sticky pad to attach to surfaces, and a couple of tools for opening the battery flap and for resetting and pairing it. It’s compatible with Zigbee2MQTT.
In terms of configurability, you can adjust its sensitivity, and its keep time. The keep time means that it remains in the ‘occupied’ (i.e. motion detected) state for a given number of seconds after motion was last detected. If you have a motion activated light, this prevents the light constantly flashing on and off.
As with the window sensors, you can also buy these devices from Amazon(sponsored link) if you need them quickly, but again they’re significantly more expensive than AliExpress.
To make the light turn on and off, I have automations set up in Home Assistant. I also bought a Zigbee smart light bulb for the motion sensor. Ideally I would have just bought one that switches on and off, but the cheapest one I could find is a colour changing dimmable one. Which is overkill for a cellar light, but hey, it was cheap. Indeed, the motion sensor and light bulb collectively cost less than £9.
‘A Little Less Conversation’ by Elvis Presley & JXL. This was originally the B side to Elvis’ single ‘Almost in Love’ in 1968 and was a mere two and a bit minutes long. Junkie XL (credited as ‘JXL’ on this release) remixed in 2022, and the remix is now more well-known.
‘Sun is Shining’ by Bob Marley vs Funkstar De Luxe. Again, during Marley’s lifetime, this wasn’t such a well-known song, having been first recorded in 1971 and then again 1978. Funkstar De Luxe released a new version in 1999 which reached number 3 in the UK singles chart – higher than any other Bob Marley song.
‘Power of Love (Rob Searle Remix)’ by Frankie Goes To Hollywood. The original version of ‘Power of Love’ is occasionally considered to be a Christmas song, especially since a cover by Gabrielle Aplin was featured on the John Lewis Christmas advert in 2012. Rob Searle’s remix turns it into a banging trance tune and it was given its own single release and music video in 2001. Searle went on to also remix ‘Two Tribes’, another Frankie Goes To Hollywood song, and N-Trance’s ‘Set You Free’, both of which were released as singles in their own right. I’ve included the full club mix on the playlist, so that you can hear how the song is layered.
‘Heartbreaker (Remix)’ by Mariah Carey, Missy Elliot and Da Brat. This remix was included in the original single release, rather than years later, but it was given its own music video.
’19-2000 (Soulchild Remix) by Gorillaz. This was included on the single release, and is superior to the original in my opinion. Daman Albarn’s singing is speeded up and it’s a much more upbeat song.
‘Protect Your Mind (For The Love Of A Princess) (Lange Remix)’ by DJ Sakin and Friends. Good grief, what a mouthful. You may know this better as the theme from the Mel Gibson film ‘Braveheart’. I believe this was Lange’s first remix, and it’s a corker with both classical and synthesised elements. Again, I’ve included the full nine minute version here.
‘Silence (DJ Tiësto’s In Search of Sunrise Remix)’ by Delerium featuring Sarah McLachlan. I think Delerium are more well-known for the remixes of their songs than the originals. This is an early Tiësto remix from when he still used the ‘DJ’ prefix, and it’s another long one at over eleven minutes. You need to listen to the whole thing though. For the UK release, an alternative remix by Airscape was chosen for the radio edit, which is also very good but not as groundbreaking as this.
‘Tequila (Mint Royal Chaser)’ by Terrorvision. Terrorvision’s most popular single to date was a remix by Mint Royale. They’re probably best known for their remix of ‘Singing in the Rain’ which was used in a Volkswagen advert and in a winning Britain’s Got Talent entry. Again, I’ve included the extended version as you can hear how the elements of the song were put together.
‘Brimful of Asha (Norman Cook Remix) by Cornershop. There’s a story of someone who went to a Cornershop gig on the basis of this remix, which was used for the single release, and being disappointed to find that the original was a slower indie song – as were all of their other songs. Norman Cook is, of course, better known as Fatboy Slim and this is typical of his style. He also did a good remix of ‘Renegade Master’ by Wildchild.
Building on last week’s post about flashing smart plugs Tasmota, today I’m going to talk about other custom firmware that you can install on devices with an Espressif ESP chip. Tasmota is the most well-known, but whilst researching how to do the flashing, I’ve come across some others.
Tasmota
Obviously the first one I should mention is Tasmota. It seems to be the most well-used, with active development and lots of features. It’s designed to be used only on ESP32 and ESP8266 boards. Tasmota incidentally is an acronym which stands for Theo-Arends-Sonoff-MQTT-OTA and to this day Theo Arends remains the primary developer.
Recent Tasmota releases have included Matter support, albeit only on ESP32 chips which have more storage than ESP8266.
Notably, ESPurna only works on ESP8265 and ESP8266 chips, whereas Tasmota and ESPEasy also work on ESP32 chips, such as the one in the m5stack Atom Lite that I turned into a Bluetooth Proxy. Both ESPurna and ESPEasy use MQTT to communicate with other devices.
ESPHome
ESPHome is part of the Open Home Foundation, along with Home Assistant, and as such integrates well with Home Assistant. Unlike the other firmware tools here, ESPHome doesn’t use MQTT by default, although if you build your own firmware with ESPHome then you can add it as an optional extra. Instead, it communicates via Home Assistant’s API. This offers some advantages – it allows Home Assistant to install firmware updates for ESPHome devices. But if you were to switch from Home Assistant to another smart home platform, then you would either need to recompile the ESPHome firmware to add MQTT, or switch to one of the other firmware platforms listed here.
Another thing I’m less keen on about ESPHome is that you use a YAML configuration file to configure devices. I found Tasmota’s web-based interface much more user-friendly.
It’s worth noting that, as well as Espressif chips, ESPHome also works on RealTek RTL8710 and Beken BK7231 series chips too.
OpenMQTTGateway
OpenMQTTGateway is a more specialised firmware designed to make existing non-smart products work over MQTT. It’s best used with BLE (Bluetooth Low Energy), RD, Infrared and old fashioned Serial (RS232) devices. You can buy devices from Theengs which have the OpenMQTTGateway firmware already flashed.
As far as I can tell, OpenMQTTGateway just works on ESP32 chips.
OpenBeken
OpenBeken started out as a way of implementing a Tasmota-like experience on Beken BK7231 chips, but now supports a huge range of chips including ESP32 (but not some other Espressif chips like ESP8826) and RealTek RTL8710. It apparently works in a similar way to Tasmota, but I’ve yet to try it. I have one Tuya device with a BK7231 chip, but I haven’t yet been brave enough to try to flash it. Again, it uses MQTT to communicate with other devices.
I’m a little over 18 months into my Home Assistant journey, and now have 54 integrations set up. This includes standard integrations set up in the Home Assistant interface, some added using YAML, and custom integrations added via HACS.
When I first set Home Assistant, I went out of my way to set up as many integrations as possible, regardless of whether I needed them. Home Assistant scales quite well, but some integrations take longer to load than others. If you’ve ever logged in whilst Home Assistant is restarting to see a dashboard with many missing entities, you’ll know what I mean.
There’s a panel hidden away in Home Assistant’s Lovelace interface that tells you how long each integration takes to load. Open Settings, scroll down to System, and select Repairs. Then, click on the three vertical dots at the top right, and choose ‘Integration Startup Times’.
The list will be sorted with those taking the longest at the top. The vast majority of mine take less than a second to load, but there are some outliers. My worst offenders are:
Google Nest (24 seconds). Taking three seconds longer than a famous So Solid Crew song, this is the integration for my Nest Thermostat. I use this quite a bit in Home Assistant, so I’m stuck with it.
Wyoming Protocol (21.5 seconds). This is the bridge between Home Assistant’s Assist chat bot, and Homeway Sage. To be honest, I don’t use this, so this is an easy one to turn off. It’s an auto-discovered integration.
Meross LAN (21 seconds). This is a custom integration from HACS for my Meross smart plugs, and I need this for energy monitoring. Whilst the smart plugs also support Matter, the energy monitoring is only available via this integration. Theoretically, I can convince the smart plugs to use MQTT and that might negate the need for this integration, but I haven’t fully investigated it.
DLNA Digital Media Server (17 seconds). Another auto-discovered integration, courtesy of my router. I’m not using this, so this is another good candidate to disable.
Spotify (15 seconds). This allows me to control Spotify playback in Home Assistant. In reality, I don’t really use it, but it is on my dashboard.
Home Connect (14 seconds). This is for my smart Bosch dishwasher. I use this for a dashboard badge to see if the dishwasher is on at a glance. Our dishwasher is built-in and almost silent so this is useful.
Fitbit (14 seconds). Another dashboard badge to see how much charge is left in my Fitbit Versa 3.
Of these, there were two obvious candidates to remove – Wyoming and DLNA, saving a combined 30 seconds of startup time.
Ignored integrations
As they’re both integrations which are auto-discovered, I have had to tell Home Assistant to ignore them. On the Integrations Settings page, if you click the filter icon on the top right, you can then show the integrations that are ignored. I’ve added Wyoming Protocol there; it joins Philips Hue (since I’m using Bifrost) and ZHA (since I’m using Zigbee2MQTT)
Last year, I wrote about using a tool called tuya-convert to replace the firmware on my Tuya smart plugs. The firmware in question is Tasmota, which is an open source replacement firmware for devices with Espressif ESP chips. All my Tuya smart plugs have an ESP8266 chip, which can take custom firmware.
There are two ways of flashing Tasmota onto Tuya devices – an easy way, and a harder way.
There’s also a kind-of third ‘super-easy’ way, that I’ll mention towards the end.
tuya-convert – the easy way
I mentioned tuya-convert, which is a command line tool that exploits a vulnerability in older Tuya firmware to install Tasmota. You’ll need a computer such as a Raspberry Pi that has both Wi-Fi and Ethernet, and a smartphone. The tuya-convert tool then creates a hotspot that your Tuya devices can connect to when in pairing mode, and deploys the firmware wirelessly.
The key thing to emphasise here is that it only works with older firmware. Tuya patched the vulnerability in an update that came out some years ago, and indeed I’d already installed this on my smart plugs. That meant that tuya-convert could see the smart plugs, but couldn’t deploy the Tasmota firmware. So, I had to do it the hard way.
Using a UART converter – the hard way
As you may have guessed from the photo above, the only way I was able to flash Tasmota onto these smart plugs was by taking one apart, and using a USB to UART converter with some jumper cables. If tuya-convert doesn’t work, then this is what you’ll need to do. You’ll need the following:
Some Dupont Jumper cables – again, I bought these from AliExpress for £2.40. I picked up a big bag of male-male, female-female and male-female cables, but you only really need male-female cables if you want to save a few pence.
A computer with a USB port
I would also recommend the following:
Some electrical tape to hold things down
A USB extension cable
For the plugs that I was working with, I didn’t need a soldering iron, but some others may require it.
Disassembly and what’s inside
Firstly, it is very, very important that your smart plugs are not plugged into the mains while you do this, unless you want to burn yourself and/or your house down. We’ll be providing power via a different method, so make sure your device is not plugged in via the usual method. With my smart plugs, the positioning of the screws means it’s impossible for them to be plugged into the mains anyway.
Next, remove the screws from the plug. There were five on mine – the central one had to be removed first, and then the remaining four. Once that was done, I carefully separated the top and bottom of the housing.
The bottom part includes the high voltage AC circuitry. We’re not concerned with this and can leave it alone. What we’re interested in is the ancillary circuit board in the top part. It’s held in place by two small screws – you can remove these if you wish, but you can easily access the five pin holes that we need with the board still screwed in place.
The pin holes are as follows, with the first closest to the edge:
RX – data in
TX – data out
GND – ground
GPI00 – the pin hole that puts the smart plug into flashing mode
5V – the 5 volt power input pin hole
Normally, ESP chips work at 3.3 volts, but there’s a converter chip elsewhere on the circuit board for these specific smart plug. Yours may be different, so check first to see if it’s 3.3 volts or 5 volts. The UART to USB converter that I have offers both, so we’ll use five volts for this.
Connecting the wires
Firstly, make sure your USB to UART converter is not plugged in to the computer. You’ll need to get your Dupont cables and connect them from your converter to the board. The pins on the converter should be labelled, so you need to connect them as follows:
From RX on the board to TXD on the converter
From TX on the board to RXD on the converter
From 5V on the board to 5V on the converter
From bothGND and GPI00 on the board to GND on the converter
For this last one, I used three cables – two male-male cable from each of the GND and GPI00 ports on the board, and one female-male cable from the GND port on the converter – and then taped the pins at the end of the wires together. If it helps, there’s a standard wiring diagram on the Tasmota Getting Started page – although we’re connecting one additional wire (GPI00).
Getting read to flash Tasmota
Now that we’ve linked the converter to board, we can do the fun bit – flashing the device. There are several ways you can do this, of which I would recommend two:
Tasmotizer – this is a simple Windows program for flashing. The key advantage is that it can optionally download and backup the previous firmware, just in case you want to restore it later.
Tasmota Web Installer – this allows you to install Tasmota through your web browser, using WebSerial. As it stands, only desktop versions of Chrome, Edge and Opera support it, so you can’t use Firefox or Safari.
Personally, I had a better experience with the Web Installer, so this is what I used. Once you’ve opened your flashing tool, plug the USB to UART converter into your computer and then click ‘Connect’. Your browser will ask for your permission to link the web page with the COM port created by the converter, so you’ll need to grant permission.
Note: sometimes the COM port wouldn’t show for me in the browser. If this happens to you, try opening Device Manager, if using Windows, to ensure that the driver has installed correctly. If not, asking Device Manager to simply update the drivers should be enough. I had the most success if I opened the web page, connected the USB to UART converter and then clicked ‘Connect’ in that order.
If all is well, the web flasher will connect to your device, erase the existing firmware and then upload Tasmota. It’s a quick process – the binary file for Tasmota version 15 is only 655 kilobytes, so it’ll only take a couple of minutes at most.
If you get a connection error, try swapping the RX and TX cables over and then try again, and make sure that the light on the circuit board isn’t on or flashing. If the light is on, it’s a sign that you’ve not connected the GPI00 pin correctly.
Assuming that the flashing worked, you can take the jumper cables out and reassemble your device and plug it back in to the mains.
Configuring Tasmota
So, now that your device has been flashed, you need to configure Tasmota on the device. Get your phone out, and go to Wi-Fi settings. You should see a new Wi-Fi hotspot called ‘tasmota-something-something’, where the somethings are an alphanumeric string – connect to it. A hotspot login box should appear – if not, go to http://192.168.4.1/ in your phone’s web browser.
The first step is to connect Tasmota to your Wi-Fi network. Choose the network, or type it in, and provide the password. Tasmota will then connect, and, if successful, will redirect to its new IP address which it’ll display on screen. I suggest making a note of this.
You’ll now need to navigate to Tasmota’s new IP address in a web browser – you can do this on any device, not just your phone. The first thing we need to do is tell Tasmota what kind of device it has been installed on. The easiest way to do this is with a Template, and there are a huge range of templates listed here. I couldn’t find an exact match for mine, but the closest was this one, which gave me the following template code:
To paste this template into Tasmota, I used this guide. From the Tasmota home screen, I clicked ‘Configuration’, then ‘Configure Other’, and pasted the whole string into the ‘Template’ field at the top. Tick the box that says ‘Activate’, and then the green Save button at the bottom. Tasmota will restart, and then you’ll find that your smart plug now works. Huzzah!
Integrating Tasmota with Home Assistant
If you want your newly Tasmotised smart plug to appear in Home Assistant, then there are a couple more steps that we need to take. Tasmota communicated with other devices using MQTT, so if you don’t already have MQTT set up in Home Assistant, you’ll need to do this. The easiest way is to install the Mosquitto addon; this will then suggest the MQTT integration for you.
Next, we need to create a user account for Tasmota to use with MQTT. In Home Assistant, open Settings, and then People. At the top, select ‘Users’, and then click the blue ‘add user’ button. Give them a username and password, and then save these details somewhere safe for the next step.
Back to Tasmota. Firstly, we need to change a setting to allow Home Assistant to automatically discover your new Tasmota device. From the Tasmota home screen, choose ‘Console’, and input the following command:
SetOption19 0
Press enter. Next, go back to the Tasmota home screen, and into ‘Configuration’ again. Select the ‘Configure MQTT’ option. In the first box, you’ll need to enter the IP address or local hostname for your Home Assistant installation. If you use Home Assistant OS, this is most likely to be ‘homeassistant.local’.
Next, we’ll need to enter the username and password for the MQTT account we created earlier. The rest of the fields can be left with their default values, unless you want to customise the name.
Back to Home Assistant. If this is your first Tasmota device, then you should receive a notification that a new Tasmota device was found, and that you need to install the Tasmota integration. Do this, and your device will now be available. If you add any further devices, these will automatically appear in the Tasmota integration once their MQTT settings have been configured.
And that’s it. You should now be able to control your devices without needing to use Tuya’s cloud services.
The super-easy way – pre-flashed Tasmota devices
If you don’t already own a suitable smart plug, but want to use Tasmota, my advice would be to buy a smart plug with Tasmota already flashed. Local Bytes sell pre-flashed Tasmota smart plugs, so you can skip the disassembly and flashing sections of this guide. Alternatively, try eBay, where these plugs can also be bought pre-flashed.
That being said, I’m pleased to have been able to flash Tasmota on these smart plugs. I’m currently only using one of them, but I’ve been able to give them a new lease of life with about £5 of materials and an hour or so of my time. Indeed, the spare ones may well end up on eBay in due course for someone else to use. It’s far better than letting them become yet more e-waste.
What’s next
Last year I bought a Sonoff Wi-Fi RF Bridge, but was disappointed that it wouldn’t work the way that I expected it to. And getting it to work with Home Assistant was a bit of a pain, requiring a custom integration from HACS or an addon. I’ve already installed Tasmota on it, so it too has local control, and I’m looking at flashing the RF chip with a different custom firmware to make it more useful. That will probably require soldering and is for another future blog post, however.