UPDATE 2022: It looks like there is a direct WB2S replacement module, the ESP-02S
It is getting more and more common to get smart devices that have chips other than ESP8266 in them, and these chips are usually not flashable with the likes of Tasmota, ESPHome etc.
Many of these used to have ESP8266 processors/modules, so if you bought one later you are a bit stuffed if, like myself you prefer not to use cloud connected services such as Tuya for your home automation.
A sensible way to solve it, but one that requires a bit of work is to hardware replace the chip module. This is doable provided:
- You have enough room in the device to swap swap it out, especially if the old module is a bit smaller, as with this device below (and I guarantee this device is generic enough that there will be other badged products almost identical)
- It isn’t a surface mount device, directly soldered to the main board (good luck with that)
- The device is easy enough to pull apart and access the board (some lightbulbs etc can be a bit fiddly)
I highly recommend you buy products like Athom (which are preflashed with Tasmota, ESPHome and others), or Sonoff and Zemismart (which aren’t too hard to flash yourself). That will save you a lot of hassle. Sometimes though… you find other products that are just soooo cheap, you have to try them out!
I have also managed to flash a few Arlec bulbs with Tasmota, (not sure if they still have ESP8266s) and have swapped out a WB3S chip on a smart LED controller (Powertech, from Jaycar). Which initially came with ESP8266 chips, and I’ve flashed them in the past with no hardware mods.
- Model KASPEMHA
- Kogan Smart Plug with Energy Monitor
- 10A Max Load
- Link: https://www.kogan.com/nz/buy/kogan-smarterhome-smart-plug-with-energy-meter-pack-of-4-kogan/
- Bought for about NZ$50 for 4 units. As of writing this, the 4 packs were already sold out.
To be honest, most of the power monitoring I do is built in, either at the DB or in the device. I am not really a fan of the plug in monitors as it annoys me when they get switched off, and they visibly take up a power socket. However, I had a couple of dishwashers to monitor, and these were perfect.
Unfortunately as soon as I opened it I found it had a WB2S chip in it, not the ESP8266/8285 or equivalent. Runs Tuya, but no known way to flash this with something like Tasmota at this stage.
There is a fair bit of room in the housing, so I knew it shouldn’t be hard to swap the daughterboard for an ESP12F or similar.
Not much to these WB2Ss really.
I next had to find out what setup the smart plug used for power monitoring. A good look at the board found what looked to be a HLW8012 power monitoring chip, similar to what is used on the Sonoff Pow R2, which needs three I/O pins. One for a pulsed output to the micro giving active power, and one for current/voltage… and a 3rd pin is the output from the micro to select whether you are reading either current or voltage on the output (you can’t do both at the same time).
I used this to help trace the I/O I’d need on the ESP8266, and match it to the I/O in Tasmota that the Sonoff Pow R2 would use.
I used Tasmota for this project, but if you are using ESPHome, there is info on the HLW802 here: https://esphome.io/components/sensor/hlw8012.html
I sketched out a diagram of what I’d need to connect where, and it looked like this on the back of an envelope…
D1 Mini Pro replacement
My method of replacing this was pretty crude and was intended to be a proof of concept before I replaced one permanently.
I had a bunch of D1 mini pro boards, and because there was plenty of space in there that is what I went with. You are probably unlikely to get away with that with other devices, and will need at least an ESP12F or similar (which is what I have used since, for other devices)
As is more often usual though… once it worked I left it as is! It all fitted nicely back in the enclosure. Later chip replacements I did were a lot tidier.
This unit does power monitoring, and it definitely needed calibration. The HLW802 outputs a frequency for power, so you want to set the value correctly (it was way off). My favourite way to do this is with a Tungsten filament bulb or two, that have a known wattage (these are usually pretty accurate) and I have a couple set aside for this purpose.
Follow the power calibration instructions on the Tasmota site, using the offset valu with the PowerCal command, eg:
Related projects of mine
WB3S replacement for Home Automation devices (with an ESP12F)
Flashing an Arlec ‘grid connect’ lightbulb
Power monitoring, completion notification and logging (Various power monitoring methods)
ESPHome PEM-004T Power Monitoring (Oven reminders with Node Red)
Replacement Chip Options
UPDATE 2022: Refer first paragraph for the most sensible replacement, the ESP-02S.
There are similar style boards in a zigbee module too. I bought a few for other purposes, but there is probably something that slots right in with the correct i/o (let me know if you find something).
The zigbee modules I bought only have a single input and one output, so only useful for simple smart switches: https://www.aliexpress.com/item/1005003295743076.html
Other relevant links
Tuya’s datasheet for the WB2S
A dimmer with the same chip
More swaps by blackadder