Avatar Smart Plug and ESHome

I got 4 Smart Plug from Avatar at Amazon, 4 for 40€. I saw they use the Smart Life App so should work with Tuya_convert, and they did. I could flash ESPhome home onto them. But I can only get the blue LED and Button working, not the energy measuring. I thing the GPIO Config is wrong.

I used this tutorial to flash them and bring them to ESPHome, some gaps in the tutorial but I could solve it. But I can not get the GPIO config working.

Maybe anyone here uses this devices or similar or has a hint what GPIO ports to use for the power.

Here is the ESPHome config for the energy sensor, I also tried to write it with GPIO12 or GPIO05 or GPIO5. But I have now idea what could be correct. The ESP Documentation for hlw8012 shows the config without anything, just the number. So I think that should be correct.

sensor:
  - platform: hlw8012
    sel_pin:
      number: 12
      inverted: True
    cf_pin: 4
    cf1_pin: 5
    current_resistor: ${current_res}
    voltage_divider: ${voltage_div}
    current:
      name: "${plug_name}_Amperage"
      unit_of_measurement: A
    voltage:
      name: "${plug_name}_Voltage"
      unit_of_measurement: V
    power:
      name: "${plug_name}_Wattage"
      unit_of_measurement: W
      id: "${plug_name}_Wattage"
    change_mode_every: 8
    update_interval: 10s
  - platform: total_daily_energy
    name: "${plug_name}_Total Daily Energy"
    power_id: "${plug_name}_Wattage"
    filters:
        # Multiplication factor from W to kW is 0.001
        - multiply: 0.001
    unit_of_measurement: kWh

Hope anyone can help.

according to the specs it does not support energy monitoring
http://www.avatarcontrols.com/index.php?ac=article&at=read&did=191\

still a good deal and product

Shit think you are right, thought that because of something I saw in a screenshot. Thanks

Hi @skycryer can you help me out on an issue with those plugs? You are German right?

I run into issue during flashing, maybe you already know how to? This is my thread

Will this work with these as well?

It shows up as ESP D11062 but I have no idea where the number part came from…

Could you share your ESPHome config? I recently got one of these Avatar switches from Amazon and still able to use tuya-convert to flash them OTA.

This tutorial says they support energy metering. How you ended with them? Have you managed to measure energy consumption? Or have they produced new version of the plugs?
https://tasmota.github.io/docs/devices/SmartPlug-with-POW/#device

I ended with them not using them anymore. I switch to shelly plugs. Out of the box cloud free, with energy meter any If I want I could flash them with esphome. But they work great for me. And on Amazon you get 2 for around 40€

I have one plug for years from vocolinc that is connected to HA through local apple homekit bridge. I am surprised that this approach is not used by more vendors as it is the easiest way. They use apple api and do not need to invest into any useless proprietary interface. I guess apple homekit api cost money. Vocolinc devices also cost around 20eur per piece and are smaller than shellies. I use shellies in every switch on the wall but the plugs seem to me to be too tall to be pluged in the wall.