Don't poll the Electrical Measurement cluster on SONOFF S60ZBTPF (it supports attribute reporting)

Open
#941 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
embedded-iot, python
Domain
embedded-iot

Research direction

The fix is probably a one-line addition of "S60ZBTPF" to the models list of ElectricalMeasurementReportingDevice in zha/application/platforms/sensor/init.py, but the issue leaves open whether to use that list or a quirk-declared opt-out, so confirm with a maintainer before editing. Read #348 and #885 for the criteria. Done means the S60 is no longer polled by the EM poller while its reporting still works, which a debug capture can confirm.

Written by the indexing model from the issue text.

Description

device specific

Follow-up to #885, which noted that the S60 is still polled by the EM poller every 30–45 s because it isn't in ElectricalMeasurementReportingDevice, and left that as a separate decision. I'd suggest adding it: the plug reports its EM attributes and honours reporting configuration, which was the criterion in #348. Z2M doesn't poll it either, it only configures reporting (sonoff.ts).

Measured on 8 × S60ZBTPF (firmware 0x00002006), HA 2026.10.1, zha 2.3.1, ZNP coordinator, over 5-minute zigpy_znp debug captures:

  • With the #885 reporting config: 113 rms_voltage, 37 active_power and 2 rms_current reports, plus 59 polls, each sent as two Read Attributes requests (118 requests, 119 responses). EM frames from these plugs were 283 of the 392 frames received by the coordinator.
  • After reconfiguring each plug (rms_voltage/rms_current max interval 0xFFFF, active_power 60 s / 900 s / 5 W, checked with Read Reporting Configuration): no voltage reports at all, but still 64 polls, one per plug every 30–45 s.

Proposed change: add "S60ZBTPF" to the models of ElectricalMeasurementReportingDevice in zha/application/platforms/sensor/__init__.py, or use a quirk-declared opt-out as discussed in #348; I can test either. S60ZBTPG is probably the same, but I don't have one. Debug log excerpts available on request.

Dominant language
Python
Stars
96
Forks
84
Avg merge
2d 4h
Merged PRs (30d)
30

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from zigpy/zha

All issues in zigpy/zha

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.