In this post I will document my solution for getting the data out of Efergy E2 Classic power consumption meter in real time. Basically it consists from a meter that transmits the data to a receiving display, which then displays the data.

When I first started planning, two options came to mind:

  1. The display part has some kind of data history that can be pulled out using USB and Efergy provided proprietary software. Maybe I can hack that somehow.
  2. Simply sniff the traffic between the display and the meter.

Since I didn’t know if the USB option even supported reading real time data, I resulted to option 2. I found this post about hacking a very similar product (Elite instead of Classic), and they also resulted to sniffing but I found it odd that they decided to attach the sniffer to the display. I figured the signal would be the same anyway, so I decided to attach my sniffer to the meter and just yeet their code to my solution.

For the sniffing I used NodeMCU and relayed the data to HA using MQTT.


Attaching the sniffer

Note: Enjoy premium graphics as i forgor 💀 to take pictures.

Pin that sends data to transmitter circuit.

Locate the largest chip on the meter, that is the processor. It’s second pin from top left relays the data to transmitter circuit. Now simply connect any NodeMCU pin to that pin. Remember to connect grounds as well.

Cooding the sniffer

Based on the Elite hack post I wrote a simple algorithm that just outputs the raw data to MQTT server. Basically a packet begins with ~500µs high pulse, and then every ~60µs pulse is ‘0’ and every ~140µs pulse is ‘1’.

My algorithm is available here.

Installing to HA

Append to your configuration.yaml:

mqtt:
  sensor:
    - name: "Electricity consumption now"
      unique_id: "electricity_consumption_now"
      state_topic: "home/electricity/total-raw"
      unit_of_measurement: "W"
      device_class: "power"
      expire_after: 60
      value_template: >
        {{ ( value[32:48] | int(base=2) ) / 32768 * ( 2 ** ( value[48:56] | int(base=2) ) ) * 230 }}        

⚠️ Note: If your outlet voltage isn’t 230, change the last multiplier to your voltage.

The logic behind this Jinja magic can be found here. Reload configuration.yaml and you should have a working system.