dmontesinos
(Diego Montesinos)
March 18, 2021, 2:27pm
1
Hello everyone!
I’ve been reading this forum for a long time and I found a lot of help here, but at the moment I don’t find what I’m looking for.
My set up is like that:
RPi 4B 4GB
ConBee II USB Stick
ZHA
Some Zigbee devices
One of those devices is Xiaomi Mi Smart Plug and once I add it, ZHA creates 3 entities: one switch and 2 sensors called analog_input and analog_input2.
I realized those sensors show the current power and the consumed energy historically, but my problem is that the switch and the sensor that shows current power are working fine, but the one that shows the consumed energy does not update its value until I reload ZHA integration.
I used to have all the infrastructure running with Phoscon Addon, and it worked fine but I had another problems that made me to move to ZHA.
I tried to integrate unity meter for daily and monthly consumptions and I only got 0 values, and when I started playing with unity meter it stopped reporting data.
What could be wrong with it? As it was working for some time.
Thanks a lot
Hedda
(Hedda)
September 8, 2021, 12:33pm
2
dmontesinos:
My set up is like that:
RPi 4B 4GB
ConBee II USB Stick
ZHA
Some Zigbee devices
FYI, when specifially talking about the ZHA integration component for Home Assistant there are loads of related discussions/explainations here about this and the current ZHA limitation of 1 sensor per cluster:
opened 03:25PM - 26 Dec 20 UTC
closed 12:10PM - 05 Oct 21 UTC
integration: zha
<!-- READ THIS FIRST:
- If you need additional help with this template, pleas… e refer to https://www.home-assistant.io/help/reporting_issues/
- Make sure you are running the latest version of Home Assistant before reporting an issue: https://github.com/home-assistant/core/releases
- Do not report issues for integrations if you are using custom components or integrations.
- Provide as many details as possible. Paste logs, configuration samples and code into the backticks.
DO NOT DELETE ANY TEXT from this template! Otherwise, your issue may be closed without comment.
-->
## The problem
In ZHA smart plugs are not showing value for used energy counter. I have tested 4 different types of plugs and all of them show:
smartenergy_metering - 'unknown'
When I use Manage Clusters I can see that all those plugs report used energy value in cluster 0x702, attrid 0 as current_summ_delivered
So it seems that instead of smartenergy_metering ( I don't know from which cluster it comes in existing integration)
should be used cluster: **Metering (Endpoint id: 1, Id: 0x0702, Type: in)**, attribute: **current_summ_delivered (id: 0x0000)**
I have checked with:
BlitzWolf BW-SHP13, Innr SP 120, Schwaiger ZHS15, Lonsonho 16A Energy Monitoring Plug and all of them report used energy counter in cluster:0x702, attrid:0
Same problem reported also by other users:
(https://github.com/home-assistant/core/issues/34090#issuecomment-745948613)
## Environment
<!--
Provide details about the versions you are using, which helps us to reproduce
and find the issue quicker. Version information is found in the
Home Assistant frontend: Configuration -> Info.
-->
- Home Assistant Core release with the issue: 2020.12.1
- Last working Home Assistant Core release (if known): N/A
- Operating environment (OS/Container/Supervised/Core): Home Assistant OS 5.9 on RPi4
- Integration causing this issue: ZHA
- Link to integration documentation on our website: [ZHA](https://www.home-assistant.io/integrations/zha/)
## Problem-relevant `configuration.yaml`
N/A
```yaml
```
## Traceback/Error logs
N/A
```txt
```
## Additional information
![Lovlace](https://user-images.githubusercontent.com/12792066/103154061-d68e0000-479d-11eb-945b-b6568c10496e.png)
BlitzWolf
![BlitzWolf](https://user-images.githubusercontent.com/12792066/103154111-1ce35f00-479e-11eb-819f-5f5f1a49c60e.png)
Innr120
![Innr120](https://user-images.githubusercontent.com/12792066/103154140-53b97500-479e-11eb-88ac-ca2564ce2e75.png)
and here
opened 12:12PM - 12 Apr 20 UTC
closed 02:42AM - 20 Jul 20 UTC
integration: zha
stale
<!-- READ THIS FIRST:
- If you need additional help with this template, pleas… e refer to https://www.home-assistant.io/help/reporting_issues/
- Make sure you are running the latest version of Home Assistant before reporting an issue: https://github.com/home-assistant/core/releases
- Do not report issues for integrations if you are using custom components or integrations.
- Provide as many details as possible. Paste logs, configuration samples and code into the backticks.
DO NOT DELETE ANY TEXT from this template! Otherwise, your issue may be closed without comment.
-->
## I have Innr smart plug SP120 which can measure power consumption in kwh, but in HA integration only electrical_measurement and on_off are working. Smartenergy_metering shows 'unknown'
<!--
-->
## Home Assistant release with the issue:
0.108.3
Last working Home Assistant release (if known):
n/a
Operating environment (Hass.io/Docker/Windows/etc.):
Hass.io (32bit)
Raspberry PI 4 (4 GB version)
Aeotec stick Zigbee adapter
Integration:
https://www.home-assistant.io/integrations/zha/-->
<!--
## Problem-relevant `configuration.yaml`
<!--
n/a
-->
```yaml
```
## Traceback/Error logs
<!--
If you come across any trace or error logs, please provide them.
-->
```txt
```
## Additional information
I have also Schwaiger ZHS15 plug with same behavior - no power consumption reading
![screen](https://user-images.githubusercontent.com/12792066/79068457-a239e880-7ccf-11ea-983e-7350ee8fea0d.png)
There is also an issue posted to the HA core about ZHA energy consumption sensors not showing up:
opened 03:43AM - 15 Aug 21 UTC
closed 04:35PM - 29 Sep 21 UTC
integration: zha
energy
### The problem
I've got some Sercomm ESW01 switches / power meters, and they a… ren't appearing in the sensor list in the new energy consumption tab.
The smartenergy_metering entity captures a nice graph of the power usage, so it seems like that side of the integration is working for this switch.
Any pointers on how to hook them up would be appreciated.
### What is version of Home Assistant Core has the issue?
core-2021.8.6
### What was the last working version of Home Assistant Core?
_No response_
### What type of installation are you running?
Home Assistant Supervised
### Integration causing the issue
ZHA
### Link to integration documentation on our website
_No response_
### Example YAML snippet
_No response_
### Anything in the logs that might be useful for us?
_No response_
### Additional information
_No response_
All those applies to most Zigbee power plugs or other Zigbee devices with integrated energy meters:
Tuya TS0121 → [Device Support Request] BlitzWolf BW-SHP13 smart plug (aka Tuya TS0121) · Issue #605 · zigpy/zha-device-handlers · GitHub
BlitzWolf BW-SHP13 (OEM version of Tuya TS0121) → [Device Support Request] BlitzWolf BW-SHP13 smart plug (aka Tuya TS0121) · Issue #605 · zigpy/zha-device-handlers · GitHub
Develco Norwegian HAN Adapter (Develco EMIZB-132) → Add support for Develco Products A/S EMIZB-132 Norwegian HAN adapter · Issue #267 · zigpy/zha-device-handlers · GitHub
Develco Prosumer Meter (Develco SMMZB-310101)
Develco Smart Plug Mini (Develco Frient SPLZB-131) → [Device Support Request] Develco Frient SPLZB-131 Smart Plug Mini · Issue #857 · zigpy/zha-device-handlers · GitHub
Immax Plug-230V-ZB3.0 Smart Plug
Innr SP 120 (a.k.a. Innr SP120) → No power consumption readings from Innr smart plug SP120? · Issue #34090 · home-assistant/core · GitHub
Lonsonho 16A Energy Monitoring Plug (OEM version of Tuya TS0121) → [Device Support Request] BlitzWolf BW-SHP13 smart plug (aka Tuya TS0121) · Issue #605 · zigpy/zha-device-handlers · GitHub
SmartThings Smart Plug (UK)
Schwaiger ZHS15 → ZHA plugs - smartenergy_metering > wrong cluster · Issue #44539 · home-assistant/core · GitHub
Rehentele 16A Energy Monitoring Plug (OEM version of Tuya TS0121) → [Device Support Request] BlitzWolf BW-SHP13 smart plug (aka Tuya TS0121) · Issue #605 · zigpy/zha-device-handlers · GitHub
Aqara LUMI lumi.plug → ZHA plugs - smartenergy_metering > wrong cluster #44539
and a possible workaround being working on here
home-assistant:dev
← stattin42:use-current_summ_delivered
opened 05:24PM - 11 May 21 UTC
Use the 'current_summ_delivered' attrib (id: 0x0000) on the 'smartenergy_meterin… g' cluster (id: 0x0702); don't use the 'instantaneous_demand' attr (id: 0x0400).
<!--
You are amazing! Thanks for contributing to our project!
Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->
## Breaking change
ZHA Smart energy channel no longer reports attribute 'instantaneous_demand', but
attribute 'current_summ_delivered'.
## Proposed change
As reported in issue #44539 "ZHA plugs - smartenergy_metering > wrong cluster"
many (most?) energy metering capable devices support reporting energy
consumption with attribute 'current_summ_delivered'; not with attribute
'instantaneous_demand'.
Furthermore, Page 215/16 of the zigbee smart energy profile says that cluster
0x702 attribute 0x0 is "CurrentSummationDelivered represents the most recent
summed value of Energy, Gas, or Water delivered and consumed in the premises.
CurrentSummationDelivered is mandatory and must be provided as part of the
minimum data set to be provided by the metering device"
## Type of change
<!--
What type of change does your PR introduce to Home Assistant?
NOTE: Please, check only 1! box!
If your PR requires multiple boxes to be checked, you'll most likely need to
split it into multiple PRs. This makes things easier and faster to code review.
-->
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [ ] New feature (which adds functionality to an existing integration)
- [x] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
## Additional information
<!--
Details are important, and help maintainers processing your PR.
Please be sure to fill out additional details, if applicable.
-->
- This PR fixes or closes issue: fixes #44539
- This PR is related to issue: #44539
- Link to documentation pull request:
## Checklist
<!--
Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code.
-->
- [x] The code change is tested and works locally.
- [ ] Local tests pass. **Your PR cannot be merged unless tests pass**
- [x] There is no commented out code in this PR.
- [x] I have followed the [development checklist][dev-checklist]
- [x] The code has been formatted using Black (`black --fast homeassistant tests`)
- [ ] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]
If the code communicates with devices, web services, or third-party tools:
- [ ] The [manifest file][manifest-docs] has all fields filled out correctly.
Updated and included derived files by running: `python3 -m script.hassfest`.
- [ ] New or updated dependencies have been added to `requirements_all.txt`.
Updated by running `python3 -m script.gen_requirements_all`.
- [ ] Untested files have been added to `.coveragerc`.
The integration reached or maintains the following [Integration Quality Scale][quality-scale]:
<!--
The Integration Quality Scale scores an integration on the code quality
and user experience. Each level of the quality scale consists of a list
of requirements. We highly recommend getting your integration scored!
-->
- [ ] No score or internal
- [ ] 🥈 Silver
- [ ] 🥇 Gold
- [ ] 🏆 Platinum
<!--
This project is very active and we have a high turnover of pull requests.
Unfortunately, the number of incoming pull requests is higher than what our
reviewers can review and merge so there is a long backlog of pull requests
waiting for review. You can help here!
By reviewing another pull request, you will help raise the code quality of
that pull request and the final review will be faster. This way the general
pace of pull request reviews will go up and your wait time will go down.
When picking a pull request to review, try to choose one that hasn't yet
been reviewed.
Thanks for helping out!
-->
To help with the load of incoming pull requests:
- [ ] I have reviewed two other [open pull requests][prs] in this repository.
[prs]: https://github.com/home-assistant/core/pulls?q=is%3Aopen+is%3Apr+-author%3A%40me+-draft%3Atrue+-label%3Awaiting-for-upstream+sort%3Acreated-desc+review%3Anone
<!--
Thank you for contributing <3
Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/en/development_checklist.html
[manifest-docs]: https://developers.home-assistant.io/docs/en/creating_integration_manifest.html
[quality-scale]: https://developers.home-assistant.io/docs/en/next/integration_quality_scale_index.html
[docs-repository]: https://github.com/home-assistant/home-assistant.io