Sorting by

×

Kogan Smart Plug: No Esp8266? (Tuya WB2S)

Summary

UPDATE 2022: It looks like there is a direct WB2S replacement module, the ESP-02S
https://templates.blakadder.com/ESP-02S.html
https://www.aliexpress.com/item/1005003690674591.html

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.

Kogan Model

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.

Internals

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.

 (image: https://zorruno.com/wp-content/uploads/2021/05/IMG_20210527_121835-COLLAGE.jpg)
Some pictures of the inside of the smartplug before anything was removed.
The Kogan Smartplug
A couple of WB2S chips, removed. The top one I just cut out and used the remains to solder to (see photos below)

WB2S Pinout

 (image: https://zorruno.com/wp-content/uploads/2021/05/3d81b32f3aa2cd29029b7eaf6e7dd6ae94738496.png)
WB2S Pinout

Not much to these WB2Ss really.

The HLW802 chip I traced

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.

It is easier if you just cut off the WB2S board at the base and just solder the leads to the existing solder connections.
Not as dangerous as it looks… this is on my testbench which is switched on and off remotely
The template selected was based on Sonoff Pow R2, with the I/O shown in the photo for the HLW802 monitoring and LED, Relay etc
The Tasmota web interface main screen

Calibration

I used a 100W bulb for calibration

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:

PowerCal 10000

Related projects of mine

WB3S replacement for Home Automation devices (with an ESP12F)
https://zorruno.com/2022/wb3s-replacement-for-home-automation-devices/

Flashing an Arlec ‘grid connect’ lightbulb
https://zorruno.com/2020/tasmota-flash-of-gld110ha-smart-globe/

Power monitoring, completion notification and logging (Various power monitoring methods)
https://zorruno.com/2021/nodered-appliance-completion-notification/

ESPHome PEM-004T Power Monitoring (Oven reminders with Node Red)
https://zorruno.com/2022/nodered-oven-notifications/

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
https://developer.tuya.com/en/docs/iot/wb2s-module-datasheet?id=K9ghecl7kc479

A dimmer with the same chip
https://community.home-assistant.io/t/unkown-tuya-chip/153591/55

More swaps by blackadder
https://blakadder.com/frankenstein-saturday-3/

Leave a Reply

Your email address will not be published.

Post comment