Sinopé TH1124ZB configure fails for haElectricalMeasurement (UNREPORTABLE_ATTRIBUTE), so energy is never reported

Aperta Adatta ai principianti
#33,756 0 commenti 0 reazioni 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
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
backend

Direzione di ricerca

Inizia da src/devices/sinope.ts e confronta la definizione di TH1124ZB con quella di TH1123ZB, che, secondo quanto indicato nell’issue, gestisce già la misurazione e gli attributi di misurazione non supportati. Il convertitore esterno del segnalante fornisce una riproduzione del comportamento proposto. Il lavoro è terminato quando TH1124ZB viene configurato senza interrompere la procedura in presenza di report di misurazione elettrica non supportati e viene configurata la segnalazione dell’energia.

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

Descrizione

What happened?

All five of my Sinopé TH1124ZB thermostats fail to configure. Each start retries 3 times and fails on the haElectricalMeasurement reporting with UNREPORTABLE_ATTRIBUTE:

error: z2m: Failed to configure 'Thermostat Sous-sol Nord', attempt 1 (Error: ZCL command <ieee>/1 haElectricalMeasurement.configReport([{"minimumReportInterval":10,"maximumReportInterval":65000,"reportableChange":5,"attribute":"activePower"},{"minimumReportInterval":10,"maximumReportInterval":65000,"reportableChange":50,"attribute":"rmsCurrent"},{"minimumReportInterval":10,"maximumReportInterval":65000,"reportableChange":50,"attribute":"rmsVoltage"}], {...}) failed (Status 'UNREPORTABLE_ATTRIBUTE')

Because configure aborts there, the energy (seMetering) reporting is never set up, so energy stays empty/unknown for all TH1124ZB. My nine TH1123ZB thermostats on the same network report energy fine.

This looks like the TH1124ZB counterpart of #32734. That issue was fixed for the TH1123ZB only, in zigbee-herdsman-converters 26.119.0. Its definition now uses m.electricityMeter({configureReporting: false}) and a configure that binds seMetering/haElectricalMeasurement, sets up currentSummDelivered, and wraps activePower/rmsCurrent/rmsVoltage in utils.ignoreUnsupportedAttribute. The TH1124ZB definition (still the same on master today) uses plain m.electricityMeter() with default reporting and a configure without the metering part.

It's not only an old-firmware issue: my TH1124ZBs on swBuildId 2051 / dateCode 20200330 fail, while my TH1123ZBs on the same 2051 build configure fine. (In #32734, Sinopé support said they don't publish standalone OTA files, so updating isn't an option without their hub.)

What did you expect to happen?

TH1124ZB configures successfully and reports energy, like the TH1123ZB since 26.119.0.

How to reproduce it (minimal and precise)
  1. Pair a TH1124ZB (mine: appVersion 65, swBuildId 2051, dateCode 20200330, and also one on swBuildId 2007).
  2. Start Zigbee2MQTT: configure fails with the error above, and energy is never reported.

Workaround / proposed fix: I gave the TH1124ZB the TH1123ZB behaviour with an external converter. After that, all five configured on the first attempt and started reporting energy:

import {definitions} from "zigbee-herdsman-converters/devices/sinope";
import * as m from "zigbee-herdsman-converters/lib/modernExtend";

const th1124 = definitions.find((d) => d.model === "TH1124ZB");
const th1123 = definitions.find((d) => d.model === "TH1123ZB");

export default {
    ...th1124,
    extend: [th1124.extend[0], th1124.extend[1], m.electricityMeter({configureReporting: false})],
    configure: th1123.configure,
};

In src/devices/sinope.ts, the equivalent would be to use m.electricityMeter({configureReporting: false}) for TH1124ZB and give it the same configure as TH1123ZB (the TH1123ZB configure is the TH1124ZB one plus the metering/electrical-measurement part).

Zigbee2MQTT version

2.14.3 (zigbee-herdsman-converters 26.125.0)

Adapter firmware version

EmberZNet 7.5.1 [GA]

Adapter

Home Assistant SkyConnect (ember driver)

Setup

Docker on a Raspberry Pi 4 (Raspberry Pi OS Trixie)

Device database.db entry
{"id": "<redacted>", "type": "Router", "ieeeAddr": "<redacted>", "nwkAddr": "<redacted>", "manufId": 4508, "manufName": "Sinope Technologies\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", "powerSource": "Mains (single phase)", "modelId": "TH1124ZB\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", "epList": [1], "endpoints": {"1": {"profId": 260, "epId": 1, "devId": 769, "inClusterList": [0, 3, 4, 5, 513, 516, 1026, 1794, 2820, 2821, 65281], "outClusterList": [10, 65281, 25], "clusters": {"genBasic": {"attributes": {"modelId": "TH1124ZB\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", "manufacturerName": "Sinope Technologies\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", "powerSource": 1, "zclVersion": 2, "appVersion": 65, "stackVersion": 2, "hwVersion": 2, "dateCode": "20200330\u0000\u0000\u0000\u0000\u0000\u0000\u0000", "swBuildId": "2051\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"}}, "haElectricalMeasurement": {"attributes": {"1361": 2769800, "acPowerDivisor": 1, "acPowerMultiplier": 1, "acCurrentDivisor": 1000, "acCurrentMultiplier": 1, "acVoltageDivisor": 10, "acVoltageMultiplier": 1, "rmsVoltage": 2339, "rmsCurrent": 0}}, "hvacThermostat": {"attributes": {"localTemp": 1784, "occupiedHeatingSetpoint": 1500, "pIHeatingDemand": 0, "systemMode": 4}}, "manuSpecificSinope": {"attributes": {"512": 0, "currentLoad": 0}}, "seMetering": {"attributes": {"multiplier": 1, "divisor": 1000}}}, "binds": [{"cluster": 0, "type": "endpoint", "deviceIeeeAddress": "<redacted>", "endpointID": 1}, {"cluster": 3, "type": "endpoint", "deviceIeeeAddress": "<redacted>", "endpointID": 1}, {"cluster": 4, "type": "endpoint", "deviceIeeeAddress": "<redacted>", "endpointID": 1}, {"cluster": 513, "type": "endpoint", "deviceIeeeAddress": "<redacted>", "endpointID": 1}, {"cluster": 516, "type": "endpoint", "deviceIeeeAddress": "<redacted>", "endpointID": 1}, {"cluster": 1026, "type": "endpoint", "deviceIeeeAddress": "<redacted>", "endpointID": 1}, {"cluster": 65281, "type": "endpoint", "deviceIeeeAddress": "<redacted>", "endpointID": 1}, {"cluster": 2820, "type": "endpoint", "deviceIeeeAddress": "<redacted>", "endpointID": 1}, {"cluster": 1794, "type": "endpoint", "deviceIeeeAddress": "<redacted>", "endpointID": 1}], "meta": {}}}, "appVersion": 65, "stackVersion": 2, "hwVersion": 2, "dateCode": "20200330\u0000\u0000\u0000\u0000\u0000\u0000\u0000", "swBuildId": "2051\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", "zclVersion": 2, "interviewCompleted": true, "interviewState": "SUCCESSFUL", "meta": {"configured": "0.0.0"}, "lastSeen": 1795097379321}
Notes

The Failed to configure errors also repeat 3 times on every Zigbee2MQTT start until the definition is fixed.

Lingua principale
TypeScript
Stelle
15.8k
Fork
2.1k
Merge medio
1g 5h
PR unite (30g)
37

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 Koenkk/zigbee2mqtt

Tutte le issue di Koenkk/zigbee2mqtt

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.