Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datek Eva Meter Reader is not listed among sources for Grid Consumption #68616

Closed
staspika opened this issue Mar 24, 2022 · 11 comments
Closed

Datek Eva Meter Reader is not listed among sources for Grid Consumption #68616

staspika opened this issue Mar 24, 2022 · 11 comments

Comments

@staspika
Copy link

The problem

Datek Eva Meter Reader is not listed among sources for Grid Consumption in Energy dashboard. The device itself is otherwise healthy and seems to otherwise be working with ZHA, providing entities such as "rms_current", "rms_voltage", "smartenergy_metering" and "smartenergy_metering summation_delivered".

Following is shown in device info:

  • Firmware: 0x04006550
  • IEEE: 08:6b:d7:ff:fe:b6:c5:e9
  • Nwk: 0x4e66
  • Device Type: EndDevice
  • LQI: 175
  • RSSI: -72
  • Last Seen: 2022-03-24T13:07:31
  • Power Source: Battery or Unknown

From the logs (below) it sounds like there is something wrong with the unit of energy measurement, and indeed it looks like while rms_current and rms_voltage are measured in ampere and volt, the energy measurement is unitless. Is there any way I can fix that?

What version of Home Assistant Core has the issue?

core-2022.3.7

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ZHA

Link to integration documentation on our website

https://www.home-assistant.io/integrations/zha/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.sensor.recorder
Source: components/sensor/recorder.py:259
Integration: Sensor (documentation, issues)
First occurred: 12:45:47 PM (2 occurrences)
Last logged: 12:45:47 PM

sensor.eva_meter_reader_e9c5b6fe_smartenergy_metering has unit None which is unsupported for device_class power
sensor.eva_meter_reader_e9c5b6fe_smartenergy_metering_summation_delivered has unit None which is unsupported for device_class energy

Additional information

bilde

@probot-home-assistant
Copy link

Hey there @dmulcahey, @Adminiuga, mind taking a look at this issue as it has been labeled with an integration (zha) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)


zha documentation
zha source
(message by IssueLinks)

@Adminiuga
Copy link
Contributor

Is this a battery operated device?
Are there any buttons on the device to keep it awake during the pairing?

  1. Remove the device from zha
  2. Enable debug logging
  3. Re-pair the device and keep device awake during configuration and initialization
  4. Post the logs

@staspika
Copy link
Author

staspika commented Mar 24, 2022

The device is battery-operated (and the battery gets charged from M-BUS). Here are some data about the device, I hope it's useful:

@staspika
Copy link
Author

staspika commented Mar 24, 2022

Here is the log for you, @Adminiuga :)
home-assistant.log. Does anything look suspicious?

@staspika
Copy link
Author

The problem remains after upgrading to Home Assistant 2022.4.5. @dmulcahey, @Adminiuga, is there any more information I can provide in order to get to the bottom of the issue?

@Hedda
Copy link
Contributor

Hedda commented Apr 25, 2022

FYI, "quirk" issues like this should normally instead be reported as a "Device support request" issue for zha-device-handlers, see:

https://github.com/zigpy/zha-device-handlers/issues/new/choose

But before doing so be sure to search existing issues there as zha-quirks issues with this device might already have been reported:

https://github.com/zigpy/zha-device-handlers/issues

PS: The documentation for the ZHA integration tries to explain what is supported by default and why a quirk might be needed:

https://www.home-assistant.io/integrations/zha#knowing-which-devices-are-supported

https://www.home-assistant.io/integrations/zha#zha-exception-and-deviation-handling

https://www.home-assistant.io/integrations/zha#reporting-issues

https://www.home-assistant.io/integrations/zha#debug-logging

@staspika
Copy link
Author

staspika commented May 10, 2022

@Hedda, is this a "quirk" issue? I have followed your advice and read up on the docs. Zigbee Device Compatibility Repository says Eva Home Meter Reader is confirmed to be supported by ZHA.

@Hedda
Copy link
Contributor

Hedda commented May 10, 2022

@Hedda, is this a "quirk" issue? I have followed your advice and read up on the docs. Zigbee Device Compatibility Repository says Eva Home Meter Reader is confirmed to be supported by ZHA.

Maybe, perhaps, probably.

Just meant that I did not find any issues or pull requests when searching in zha-device-handlers (zha-quirks) repository for your device keywords so that should mean no issues been never been submitted as "device support request" or "bug report" before:

https://github.com/zigpy/zha-device-handlers/issues?q=is%3Aissue

https://github.com/zigpy/zha-device-handlers/pulls?q=is%3Apr

I only searched using these keywords;

Datek, HSE2905E, Eva

PS: Devices being listed on that Zigbee Device Compatibility Repository does not mean anything as it is not an official list and instead only a community-maintained, but for reference you can see that it was Rutrov wrote in his PR that he tested it with ZHA:

blakadder/zigbee#447

blakadder/zigbee@a4e3efc

https://github.com/blakadder/zigbee/blob/master/_zigbee/Datek_HSE2905E.md

@Rutrov
Copy link

Rutrov commented May 10, 2022

@staspika you need to set the unit_of_measurement for the sensors. Ones they have that set and data has been accumulated, you'll be able to add it to the energy dashboard.

Assuming a couple of things:

  • Your sensors still have the same names (from the log you posted)
  • Your configuration.yaml is setup so it includes customize.yaml under the homeassistant domain, docs

Add the following in your customize.yaml

sensor.eva_meter_reader_e9c5b6fe_smartenergy_metering:
  unit_of_measurement: W
sensor.eva_meter_reader_e9c5b6fe_smartenergy_metering_summation_delivered:
  unit_of_measurement: Wh

You can also do this through the UI, but I don't know exactly where they've hidden the UI for that in recent configuration menu updates... Check the docs for reference to customizing devices

If anybody points me towards some resources I could read, maybe I could contribute so that these units of measurement are set automatically. Would this be through a quirk, edit: I guess so, I should read this?

@Hedda
Copy link
Contributor

Hedda commented May 10, 2022

FYI, Energy dashboard only lists energy sensors and the sensor must have a unit of Wh or kWh as unit_of_measurement today.

The quirk for this device in zha-device-handlers needs to get updated to provide the summation attribute for energy consumed.

You could create a quirk for ZHA Device Handlers that represent those attributes as Wh or kWh so HA uses them automatically.

If anybody points me towards some resources I could read, maybe I could contribute so that these units of measurement are set automatically. Would this be through a quirk, edit: I guess so, I should read this?

Not sure but believe probably so. If new quirk contains the signature and replacement then ZHA will use that instead if available:

https://github.com/zigpy/zha-device-handlers/blob/dev/README.md

You can setup the development environment with the script mentioned here:

https://github.com/zigpy/zha-device-handlers/blob/dev/README.md#setting-up-the-development-environment

Custom quirks can be tested locally in Home Assistant by enabling custom_quirks_path and copying the quirk file manually:

https://www.home-assistant.io/integrations/zha#configuration---yaml

For tracking and discussion it best to create a new issue as "device support request" in that repo:

https://github.com/zigpy/zha-device-handlers/issues/new/choose

PS: What is great with the quirks concept is that they should then work for new users out-of-the-box without customizations.

@github-actions
Copy link

github-actions bot commented Aug 8, 2022

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Aug 8, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Sep 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants