Esphome vs Original Tuya firmware accuracy with power monitoring plugs

Hey guys,

Just ordered some Tuya compatible power sockets with power/energy monitoring and I’m planning on converting them to Esphome (to get rid of the cloud stuff obviously).

How accurate is Esphome to manage power/energy consumption? how does it behave on power outage? does it loose all data, or can it get saved data from hass/mqtt?

1 Like

You need to calibrate them.

1 Like
1 Like

Kind of depends of your update frequency and for sure of the power measuring hardware.

Do you know which one you got? Hopefully not something based on the hlw8012…

Depends all how you want them to behave…

Not much to loose actually - but you could even save sensor data to flash if you like

How “accurate” is the tuya firmware? You got any insights? Guess would need to de-compile and reveres engineer their firmware to get something…

In the end (if we say the hardware is identical and even take the assumption they use equal libraries etc.) it all comes down to the update frequency. With esphome you can go all the way the hardware supports, for example I used a 0.1 second update frequency on a pzem004t v3 which worked without troubles.

But will it be more accurate because it polls the hardware more often?

Not for power, voltage and so on but definitely for the energy usage over time :bulb:

I have no idea if the tuya firmware even supports this on the device? Maybe it’s just sends a snapshot of the current power usage (only) every 10 seconds to other people computers :cloud: and they accumulate it for you.

With esphome it’s also possible to have a very high internal update frequency for the power hardware to get accurate total energy accumulation but at the same time “limit” the frequency home assistant get’s the data.

Well thank you all for the comments, I hope these can be flashed to esphome at the first place as I just saw a recent comment on aliexpress from another buyer that these don’t support EZ Mode, which compromises the flashing, but worst case I’ll set them up using the official Tuya integration.

Many of the tuya stuff is replacing the mcu from esp (supports custom firmware and literally unbrickable :brick:) to other modules which are not supported by esphome, tasmota and so on.

other peoples computers :cloud:

Better go down the drain and retro fit the hardware with a esp module (around $1-2) in case you got hardware without it:

Quick update

Got my tyua plugs today, and all of them run a recent firmware version which blocks the tuya-convert exploit.

Integrated them with the official home assistant tuya integration and they show up as regular switches without the energy consumption info. Hopefully this will be fixed in a future update of home assistant.

I think that’s down to the Tuya integration, which is “officially maintained by the company”. So far it has not included any energy consumption features (see docs).

Not yet in 2021.11

For what I know, power metering is supported in localtuya

1 Like