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

Aperta
#941 1 commento 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
embedded-iot, python
Ambito
embedded-iot

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
96
Fork
84
Merge medio
2g 4h
PR unite (30g)
30

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di zigpy/zha

Tutte le issue di zigpy/zha

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.