Esphome flashing possible?

So I picked up two of these LAP 13amp plugs with energy monitoring… I will only be using them to monitor the energy draw, but after getting them home I realised that they are not Tuya or something that is easily flash able.

Do the greater brains of this forum think this is hackable? Ideally onto esphome - I have a number of devices running it already, but would be happy with an MQTT approach as well.

I took the device apart to enable people to see it (see images)

Btw if this is the wrong forum, or if there is a better place to point this, please comment so I can learn.

Thanks

While it looks like it might be compatible, it also looks like no one has done the reverse engineering to figure exactly what needs to be done.

It depends on how much of a challenge you are willing to accept. I would probably just get something that is KNOWN to be compatible with good instructions already available.

I save my reverse engineering for those things that don’t have an easier solution. There are MANY supported choices for esphome and/or Tasmota. Now, if you really want a challenge it could be fun.

Search on tasmota.blakadder.com and devices.esphome.io. Also Google every part number of chip number you can find on it.

Also, please link to the device you bought. No idea what it is!

it is a sengled board. They have used esp chips in other ones. This one is currently unknown. It might be easy or it could be really hard. It will require some research and likely removing some stickers to see what is below. Depending on what you find, it might be mostly supported. You would just need to figure what is hooked up to which pins. This is fairly straightforward reverse engineering, but very challenging if you have never done it before.

If it uses a new chip and new sensors, it could be really hard to make it work with something else or if it has encryption and/or flash protection. It doesn’t look that sophisticated, so it probably doesn’t.

Hey, thanks I’ll try those links shortly.
To answer you question on the product link: https://www.diy.com/departments/lap-myko-compact-smart-plug-with-energy-monitoring-240v/5059340973845_BQ.prd

Hey,
Thanks for the reply, yeah understood on the could be easy / hard.
I’ve never done reverse engineering, but willing to give it a go, as these are really cheap (£7.50 per plug as buy one get one free at the moment).

Will have a look through the links someone else shared and see what I can see under the sticker as well
Cheers

Well, one option is the way i did: i once bought a couple of cheap wifi switches, which were Zigbee, but they were like under 5€ per piece. Then i removed original zigbee chip and inserted ESP01. Problem solved.
So, check if power monitor chip is separately installed and it’s readable which chip is (sometimes marking is brushed off), then check if esphome/tasmota supports it. If so, insert suitable esp32.

I’ve taken it a little more apart this morning

I am going to have a search for the main chip etc and see what that is and what functionality it offers

So a short google later
https://www.reddit.com/r/Esphome/s/tHWZChmWkD

This to me just says its a dead end :frowning:
Which is a shame, but the device still works, just using a cloud service etc :frowning:

Thanks for support guys and guidance on steps, much appreciated

What’s that chip …HLW… or something? Is it perhaps HLW8012 ? If so it’s supported in esphome and you only need to replace esp32.

It is an ESP chip, as confirmed from Reddit, but it appears to be encrypted, so they have up

No, i mean this on the picture … is that power monitor chip?

Hey, sorry I misunderstood.

I just opened it up : HLW8110

So are you suggesting desoldering the chip on there(the esp chip) and soldering on a esp01 chip?

To be honest that’s most likely above my soldering levels, but could be a workaround for some

datasheet for the power monitor IC
https://redmine.laas.fr/attachments/download/3444/DS_HLW8110_HLW8112_EN_Rev1.01%20.pdf

The 10 version looks like it supports SPI, but appears the same/very similar otherwise, so should be possible to add support.

This is clearly a NOT easy project. You would need to desolder the esp32 chip and replace it with a blank one and then add support for the HLW8110 and figure out the buttons and relay.

I once purchased a thermostat like that. I returned it and got a Zigbee one, so I didn’t need to do so much work.

Sadly i can’t find any info about esphome or tasmota supporting hlw8110. If it would be, then yes, all you’d need to to is remove existing esp32, insert blank new one and program it. But since it’s not supported i guess it’s a waste… perhaps some days it will be supported… (i guess you can open a support request on esphoem github pages). Hlw8012 is supported, but if i’ve read correctly it’s different, ao that code won’t work.

I would try flashing it. Odds are not good, but for the price, it’s worth a try.
You need five wires soldered as shown below.
Connect them to a UART. Make sure it is set to 3.3 Volts.

Use ESPHome Builder to make a binary from a simple configuration.
Ground IO0 when you apply power to the chip (3.3V). This puts it into the flash mode.

From here it gets a bit into the weeds. I prefer using esphome.py to flash new devices while others use ESPHome flasher (or Balena Etcher), or right from ESPHome Builder in Home Assistant.

If nothing works, swap TX0 and RX0.

If you get the chip flashed and connecting by WiFi, then the rest is just some experimentation to figure out the GPIOs used for the functions of the switch. Once you have WiFi to the chip you can remove the wires and do everything else wirelessly.

Hm…the problem is …flashing with what? As said, i didn’t find any support for this energy chip. Ok, i guess you could use it as relay only, without energy measuring. At least until/when/if support for esphome or tasmota emerges…

Better news… when I have pulled it apart

The jumpers are on the back and have pads already.

As I said, use ESPHome Builder to make a basic configuration that you generate a binary file from. (Install → Manual). [If asked, select “factory” model].

This is the binary file that you flash to the chip.

If you get a connection by WiFi, then experiment with different GPIOs to determine which controls the relay. I have never cared about power use since I turn off anything I am not currently using (lights, computers, etc). Knowing how much power each outlet is consuming is irrelevant. It won’t change the monthly power bill.

At any rate, I would look at A0 for the power data. You would have to develop your own calibration.

1 Like

@stevemann you might not care about power monitoring, but it is the whole point for @Pbathuk