Page 1 of 1

Sonoff S60ZBTPF daily/yesterday/month kWh counters

Posted: Tuesday 30 September 2025 14:11
by gbonny
Hi I recently bought Sonoff S60ZBTPF Zigbee wall plugs. These plugs have daily/yesterday/month kWh counters which reset to 0 after a while (daily/monthly). (I would like to ignore yesterday and month).

I have Zigbee2MQTT running which posts into Mosquitto and have Home Assistant and Domoticz read Zigbee2MQTT in Mosquitto.
In general this works perfectly fine.

Unfortunately I'm not sure how to let Domoticz cope with the resetting kWh counters. When I set the kWh counter to "read from device", when the next day starts it says "-x kWh", where "x" is the kWh from the other day. During the day -x kWh increases but it doesn't depict the real kWh from this day though. This doesn't work.

Now I've tried to set the "kWh Today" device to "computed", which seem to work a bit better however it is less accurate unfortunately.
Zigbee2MQTT reports "0.01kWh" for instance, while Domoticz reports "0,048kWh".
This seems to be a little bit although this is for just half a day, what would be the difference for a complete year and or for devices that consume much more?!

Is there another way to "read from device" but increase the counter continuously (on a daily basis) as a work around?

And/or can we have a permanent easy feature build in Domoticz where there'll be an extra option: "read from device (daily counter)" / "read from device (total counter)" / "computed"

Re: Sonoff S60ZBTPF daily/yesterday/month kWh counters

Posted: Tuesday 30 September 2025 14:47
by waltervl
You are sure the device has no running total counter as most devices have so.

Re: Sonoff S60ZBTPF daily/yesterday/month kWh counters

Posted: Tuesday 30 September 2025 15:44
by gbonny
waltervl wrote: Tuesday 30 September 2025 14:47 You are sure the device has no running total counter as most devices have so.
Unfortunately no..:

Code: Select all

status 
{
    "current": 0.08,
    "energy_month": 3.72,
    "energy_today": 0.42,
    "energy_yesterday": 1.26,
    "linkquality": 69,
    "outlet_control_protect": false,
    "overload_protection": {
        "enable_max_voltage": "ENABLE",
        "enable_min_current": "DISABLE",
        "enable_min_power": "DISABLE",
        "enable_min_voltage": "DISABLE",
        "max_current": 922550.528,
        "max_power": 0,
        "max_voltage": -45088.768,
        "min_current": 0,
        "min_power": 0,
        "min_voltage": 0.049
    },
    "power": 0,
    "power_on_behavior": "previous",
    "state": "ON",
    "update": {
        "installed_version": 4098,
        "latest_version": 4098,
        "state": "idle"
    },
    "voltage": 237.68
}

Re: Sonoff S60ZBTPF daily/yesterday/month kWh counters

Posted: Tuesday 30 September 2025 17:23
by waltervl
Then currently the only easy way is to use the compute function. That function is in 2025.1 working correctly but using an average on readings it receives. But who is doing the correct measurement, Domoticz or the device? What are the normal expected power ratings you will get on this device? Some watts or 100+ Watts.

Re: Sonoff S60ZBTPF daily/yesterday/month kWh counters

Posted: Tuesday 30 September 2025 17:37
by gbonny
Thanks, I'll investigate in the next couple of days. Will plug the sonoff S60zbtpf in a Fibaro zwave wallplug which has a total counter for comparison (or the other way around). Meanwhile I've requested Sonoff to add a energy_total counter in a new firmware release. For now the "compute" will do.