[ZV9380A (SR-ZG9042MP) / Sunricher] report the phases B and C power, current, voltage and energy
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.7k
- Forks
- 2k
- Avg merge
- 18h 55m
- Merged PRs (30d)
- 35
Description
What happened?
Hi,
The device has 3 power meters which are independant, but with the current configuration, only one phase is reported (power, current, voltage, energy).
If I look in the state reported by zigbee2MQTT, here is what you can see:
{
"ac_frequency": 49.96,
"current": 0.44,
"current_neutral": 0.03,
"current_phase_b": 1.85,
"current_phase_c": 0,
"energy": 299.7,
"linkquality": 180,
"power": 89,
"power_apparent": 95,
"power_apparent_phase_b": 354,
"power_apparent_phase_c": 0,
"power_factor": 0.92,
"power_factor_phase_b": 0.97,
"power_factor_phase_c": 0,
"power_phase_b": 384,
"power_phase_c": 0,
"power_reactive": 38,
"power_reactive_phase_b": 83,
"power_reactive_phase_c": 0,
"voltage": 231.2,
"voltage_phase_b": 230.5,
"voltage_phase_c": 228.4
}
Clearly, the current, voltage, power, energy are the one for phase A, and I'd like to have the same quadruplets for phase B and C.
The values should be taken from the values with the _phase_b and _phase_c suffixes.
I tryed to add a configuration in configuration.yaml in home assistant to get the value, but is doesn't work.
Can you help me to display the 3 phases ?
I attach the manual: Sunricher SR-ZG9042MP manual.pdf
I can see in endpoints that many values for "PhB" and "PhC" are available, I have tried to add them in the endpoint list, but I don't know what it should do (sorry, I don't master zigbee2MQTT... yet...)
What did you expect to happen?
Instead of :
- power
- current
- energy
- voltage
I'd like to see the reported values: - power_phase_a
- current_phase_a
- energy_phase_a
- voltage_phase_a
- power_phase_b
- current_phase_b
- energy_phase_b
- voltage_phase_b
- power_phase_c
- current_phase_c
- energy_phase_c
- voltage_phase_c
Thanks a lot
How to reproduce it (minimal and precise)
No response
Zigbee2MQTT version
2.12.1 (unknown)
Adapter firmware version
{"build":397,"ezsp":14,"major":8,"minor":0,"patch":2,"revision":"8.0.2 [GA]","special":0,"type":170}
Adapter
EmberZNet
Setup
os: #1 SMP PREEMPT Wed Jul 1 07:39:06 UTC 2026 - 6.18.37-haos - arm64
node: v22.23.0
ha: true
Device database.db entry
No response
Debug log
A few logs from the activity where you can see the device reporting. As you can see, all the necessary values are correctly reported in the json payload:
[18/07/2026 17:58:18] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/compteur_electrique', payload '{"ac_frequency":50.01,"current":0.44,"current_neutral":0.04,"current_phase_b":2.94,"current_phase_c":0,"energy":300,"linkquality":180,"power":89,"power_apparent":95,"power_apparent_phase_b":677,"power_apparent_phase_c":0,"power_factor":0.92,"power_factor_phase_b":0.97,"power_factor_phase_c":0,"power_phase_b":665,"power_phase_c":0,"power_reactive":38,"power_reactive_phase_b":191,"power_reactive_phase_c":0,"voltage":231.2,"voltage_phase_b":230.5,"voltage_phase_c":229.4}'
[18/07/2026 17:58:21] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/compteur_electrique', payload '{"ac_frequency":50.01,"current":0.44,"current_neutral":0.04,"current_phase_b":2.94,"current_phase_c":0,"energy":300,"linkquality":176,"power":89,"power_apparent":95,"power_apparent_phase_b":671,"power_apparent_phase_c":0,"power_factor":0.92,"power_factor_phase_b":0.97,"power_factor_phase_c":0,"power_phase_b":665,"power_phase_c":0,"power_reactive":38,"power_reactive_phase_b":184,"power_reactive_phase_c":0,"voltage":231.2,"voltage_phase_b":230.5,"voltage_phase_c":229.4}'
[18/07/2026 17:58:21] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/compteur_electrique', payload '{"ac_frequency":50.01,"current":0.44,"current_neutral":0.04,"current_phase_b":2.94,"current_phase_c":0,"energy":300,"linkquality":180,"power":89,"power_apparent":95,"power_apparent_phase_b":671,"power_apparent_phase_c":0,"power_factor":0.92,"power_factor_phase_b":0.97,"power_factor_phase_c":0,"power_phase_b":645,"power_phase_c":0,"power_reactive":38,"power_reactive_phase_b":184,"power_reactive_phase_c":0,"voltage":231.2,"voltage_phase_b":230.5,"voltage_phase_c":229.4}'
Notes
Device
definition: SR-ZG9042MP - Sunricher (v0.0.0)
software_build_id: 6.10.3.0
date_code: NULL
endpoints:
{"1":{"bindings":[{"cluster":"haElectricalMeasurement","target":{"endpoint":1,"ieee_address":"0xe0798dfffe77c476","type":"endpoint"}},{"cluster":"seMetering","target":{"endpoint":1,"ieee_address":"0xe0798dfffe77c476","type":"endpoint"}}],"clusters":{"input":["genBasic","genIdentify","seMetering","haElectricalMeasurement"],"output":["genOta"]},"configured_reportings":[{"attribute":"activePower","cluster":"haElectricalMeasurement","maximum_report_interval":65000,"minimum_report_interval":10,"reportable_change":5},{"attribute":"rmsCurrent","cluster":"haElectricalMeasurement","maximum_report_interval":65000,"minimum_report_interval":10,"reportable_change":5},{"attribute":"rmsVoltage","cluster":"haElectricalMeasurement","maximum_report_interval":65000,"minimum_report_interval":10,"reportable_change":50},{"attribute":"currentSummDelivered","cluster":"seMetering","maximum_report_interval":65000,"minimum_report_interval":10,"reportable_change":1},{"attribute":"activePowerPhB","cluster":"haElectricalMeasurement","maximum_report_interval":65000,"minimum_report_interval":10,"reportable_change":5},{"attribute":"activePowerPhC","cluster":"haElectricalMeasurement","maximum_report_interval":65000,"minimum_report_interval":10,"reportable_change":5},{"attribute":"rmsVoltagePhB","cluster":"haElectricalMeasurement","maximum_report_interval":65000,"minimum_report_interval":10,"reportable_change":50},{"attribute":"rmsCurrentPhB","cluster":"haElectricalMeasurement","maximum_report_interval":65000,"minimum_report_interval":10,"reportable_change":5},{"attribute":"rmsVoltagePhC","cluster":"haElectricalMeasurement","maximum_report_interval":65000,"minimum_report_interval":10,"reportable_change":5}],"scenes":[]},"242":{"bindings":[],"clusters":{"input":[],"output":["greenPower"]},"configured_reportings":[],"scenes":[]}}
Health
time: Sat Jul 18 2026 17:32:24 GMT+0200 (heure d’été d’Europe centrale)
os.load_average: 0.04, 0.17, 0.17
os.memory_percent: 44.2074
process.memory_percent: 3.3035
process.uptime_sec: 660619
{"leave_count":0,"messages":224528,"messages_per_sec":0.3399,"network_address_changes":0}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the SR-ZG9042MP device definition and endpoint 1's haElectricalMeasurement and seMetering attributes, especially the activePowerPhB/PhC, rmsCurrentPhB/PhC, rmsVoltagePhB/PhC, and metering values shown in the issue. Confirm how the existing phase-A values are exposed, then verify that phase B and C power, current, voltage, and energy appear in the reported payload with the requested names.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100