Be Smart, Go Local.

How to Reset Smart Plugs Energy Total in Zigbee2MQTT and ZHA

In this quick tip post, learn how to reset the energy total sum of any smart plug, socket or meter in Home Assistant, integrated through Zigbee2MQTT or ZHA.

If you have any energy metering smart plugs or other clamp meters scattered around your smart home, you might want to know how to reset their energy total. This is useful for when you decide to move them around, replace the attached device/appliance or simply start the counter from zero.

Reset Device Energy Meter in Zigbee2MQTT and ZHA for Plugs, Sockets, Clamp Meters - Featured Image

Even if you decide to repair a device to your coordinator, the energy meter total will remain saved. In this quick tip post, I am sharing how to reset the energy total sum of any meter in Home Assistant, integrated through Zigbee2MQTT or ZHA.

Reset Energy Zigbee2MQTT

In Zigbee2MQTT, you can reset an energy meter of a device by sending a reset payload through the MQTT broker. Since most people use Mosquitto, here’s what you need to do:

  1. Navigate to Settings > Devices & Services
  2. Click MQTT
  3. Click Configure
  4. In the Topic field, input the following:
    • zigbee2mqtt/<device_name>/set
  5. In the Payload field, input the following:
    • {"reset":""}
  6. Click Publish
  7. Example:
Reset Device Energy Meter Zigbee2MQTT
Resetting Moes Smart Plug Energy Meter in Zigbee2MQTT

I have a smart socket on hand for benchmarking purposes that I need to constantly reset, the BSEED 16A Smart Socket. It read 3.75kWh before sending the payload, droping the total to 0kWh after:

Reset Device Energy Meter Zigbee2MQTT Smart Socket - Before Reset
Before Energy Sum Reset Zigbee2MQTT
Reset Device Energy Meter Zigbee2MQTT Smart Socket - After Reset
After Energy Sum Reset Zigbee2MQTT

Reset Energy ZHA

You can reset the device energy meter in ZHA as well, although the process is a bit different. You need to get the device IEEE instead of its name and use it to execute a service call, resetting the meter.

  1. Navigate to Settings > Devices & Services > Zigbee Home Automation
  2. Click (X) Devices
  3. Click the Device name
  4. Expand the Zigbee info dropdown
  5. Copy the IEEE Address and save it
  6. An image for illustration:

    Getting ZHA IEEE Address

Now, to reset the energy meter, or Summation Delivered as its named in ZHA do the following:

  1. Navigate to Developer Tools > Services
  2. Execute the following Service Call, changing the IEEE Address:
service: zha.issue_zigbee_cluster_command
data:
  ieee: a4:c1:38:0e:f5:46:1f:74
  endpoint_id: 1
  cluster_id: 0
  command: 0
  command_type: server
  args: []
Reset Device Energy Meter ZHA Smart Socket - Before Reset
Before Summation Delivered Reset ZHA
Reset Device Energy Meter ZHA Smart Socket - After Reset
After Summation Delivered Reset ZHA

That’s it! You’ve successfully reset the energy total sum of a Zigbee smart plug, smart socket or clamp meter. This should work on all device with an energy meter, although it largely depends on the device model. Tuya plugs and meters can definitely be reset this way, e.g. Moes Smart Plug, Girier 16A Smart Plug or BSEED Smart Sockets.

3 thoughts on “How to Reset Smart Plugs Energy Total in Zigbee2MQTT and ZHA”

Leave a Comment