Sonoff S60ZBTPF daily/yesterday/month kWh counters

Moderator: leecollings

Post Reply
gbonny
Posts: 35
Joined: Friday 27 October 2017 22:08
Target OS: Linux
Domoticz version:
Contact:

Sonoff S60ZBTPF daily/yesterday/month kWh counters

Post 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"
Domoticz 2025.2 on Ubuntu 24.04 LTS VM (ESXi 7u3s)
SolarEdge/webAPI, SE2MQTT/modbus IP, Zigbee2MQTT/Sonoff ZB3.0+, ZWave-JS-UI/ZMEEUZB1, MQTT AD Client Gw, P1 mtr, RFXCOM433E, Philips Hue v2, Kodi, Panasonic TV, BuienRadar & Watermtr/HTTP/HTTPS poll
User avatar
waltervl
Posts: 6678
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Sonoff S60ZBTPF daily/yesterday/month kWh counters

Post by waltervl »

You are sure the device has no running total counter as most devices have so.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
gbonny
Posts: 35
Joined: Friday 27 October 2017 22:08
Target OS: Linux
Domoticz version:
Contact:

Re: Sonoff S60ZBTPF daily/yesterday/month kWh counters

Post 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
}
Domoticz 2025.2 on Ubuntu 24.04 LTS VM (ESXi 7u3s)
SolarEdge/webAPI, SE2MQTT/modbus IP, Zigbee2MQTT/Sonoff ZB3.0+, ZWave-JS-UI/ZMEEUZB1, MQTT AD Client Gw, P1 mtr, RFXCOM433E, Philips Hue v2, Kodi, Panasonic TV, BuienRadar & Watermtr/HTTP/HTTPS poll
User avatar
waltervl
Posts: 6678
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Sonoff S60ZBTPF daily/yesterday/month kWh counters

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
gbonny
Posts: 35
Joined: Friday 27 October 2017 22:08
Target OS: Linux
Domoticz version:
Contact:

Re: Sonoff S60ZBTPF daily/yesterday/month kWh counters

Post 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.
Domoticz 2025.2 on Ubuntu 24.04 LTS VM (ESXi 7u3s)
SolarEdge/webAPI, SE2MQTT/modbus IP, Zigbee2MQTT/Sonoff ZB3.0+, ZWave-JS-UI/ZMEEUZB1, MQTT AD Client Gw, P1 mtr, RFXCOM433E, Philips Hue v2, Kodi, Panasonic TV, BuienRadar & Watermtr/HTTP/HTTPS poll
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest