zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

SONOFF S60ZBTPF reports wrong scaling (factor 1000 / Wh instead of kWh) for sum of energy

Open Manlycookiebear opened this issue 2 weeks ago • 3 comments

What happened?

The SONOFF S60ZBTPF smart plug (running firmware 2.1.3 / 8451) reports the wrong scaling factor for the sum of consumed energy (energy) in Zigbee2MQTT.

While energy_this_month, energy_today, and energy_yesterday are properly scaled in kWh, the total energy entity is off by a factor of 1000 (it appears to report the raw Wh value with the unit kWh).

Current exposed values from the same device:

  • Energy (Sum of consumed energy): 233 kWh (should be ~0.233 kWh)
  • Energy this month: 0.232 kWh
  • Energy today: 0.015 kWh
  • Energy yesterday: 0.012 kWh
  • Power: 5.29 W
  • Voltage: 231.55 V
  • Current: 0.05 A

Device details

  • Zigbee Model: S60ZBTPF
  • Manufacturer: SONOFF
  • Definition (Zigbee2MQTT): S60ZBTPF (v0.0.1)
  • Firmware ID: 2.1.3 (20260907)
  • Firmware Version: 8451 (App: 0.0 build 0 | Stack: 2.1 build 3)
  • OUI: Telink Semiconductor (Taipei) Co. Ltd.

What did you expect to happen?

Energy (Sum of consumed energy) should be divided by 1000 to match kWh (0.233 kWh), consistent with energy_this_month (0.232 kWh).

How to reproduce it (minimal and precise)

  1. Pair the SONOFF S60ZBTPF smart plug with firmware 2.1.3 (20260907) to Zigbee2MQTT.
  2. Let a load consume some energy (e.g., ~5.3 W).
  3. Compare energy (Sum of consumed energy) with energy_this_month in the Exposes tab.
  4. Observe that energy displays 233 kWh while energy_this_month displays 0.232 kWh.

Zigbee2MQTT version

2.14.3 (zigbee-herdsman-converters: 26.125.0, zigbee-herdsman: 11.2.0, Frontend: 2.15.1)

Adapter firmware version

0x26720700

Adapter

ConBee2/RaspBee2

Setup

Home Assistant OS (6.18.58-haos - arm64, Node v24.22.1)

Device database.db entry

No response

Debug log

No response

Notes

No response

Manlycookiebear avatar Nov 17 '26 12:11 Manlycookiebear

@cubez2mdeveloper could you check this?

Koenkk avatar Nov 18 '26 20:11 Koenkk

@Manlycookiebear We apologize for the inconvenience. Our test team was unable to reproduce the issue on an S60ZBTPF running firmware 2.1.3 (date code 20260907). On our test unit, endpoint 1’s seMetering attributes showed multiplier: 1 and divisor: 1000, which correctly convert the raw reading to kWh.

One possible cause is a missing or incorrect scaling value in Zigbee2MQTT’s cache. If either scaling attribute is missing, Zigbee2MQTT can publish the raw reading as kWh, which would explain the 1,000-fold difference.

  1. Save the current metering data. Before reconfiguring, please copy and share the seMetering attributes from endpoint 1 of your plug’s database.db entry. We’d like to compare currentSummDelivered, multiplier, and divisor with our test unit.
  2. Reconfigure the plug. While the plug is online, open its device page in Zigbee2MQTT and click Reconfigure. This reruns device configuration, including reading the metering multiplier and divisor.
  3. Check the next energy report. Please let us know whether the next energy value is correct. If the issue persists or reconfiguration fails, please share the debug log from the reconfiguration attempt.

Thank you again for bringing this issue to our attention.

CubeZ2mDeveloper avatar Nov 24 '26 06:11 CubeZ2mDeveloper

Thank you for looking into this and your help!

  1. seMetering from database.db (endpoint 1), saved before reconfiguring:
"seMetering":{"attributes":{"currentSummDelivered":636,"multiplier":1,"divisor":1000}}
  1. I think just reading the values from the development console tab in the device configuration already fixed it. It's now shown as 0.64 kWh.

Manlycookiebear avatar Nov 24 '26 11:11 Manlycookiebear