home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.72k stars 30.84k forks source link

Nibe: Data retrieval interval is inconsistent #113159

Closed KlausHans closed 8 months ago

KlausHans commented 8 months ago

The problem

I get inconsistent graphs while using the Nibe integration with Grafana and InfluxDB. Take a look: grafik As you can see the lines for calculated supply line (green dashed) and compressor frequency (purple) are partly missing because of long periods without any data point. Also you can see that the graph lines for supply line (orange), return line (yellow) and outdoor temp (blue) are starting late because of missing data. The graphs also should end nearly at the same point in time, that is not the case.

I think this is a bug. How is the data retrieval interval determined? Why is it so different for different modbus addresses and not, say, every 60 seconds for every modbus address?

What version of Home Assistant Core has the issue?

core-2024.3.0

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

nibe_heatpump

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 8 months ago

Hey there @elupus, mind taking a look at this issue as it has been labeled with an integration (nibe_heatpump) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `nibe_heatpump` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign nibe_heatpump` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


nibe_heatpump documentation nibe_heatpump source (message by IssueLinks)

elupus commented 8 months ago

All data is read cyclically. Every x minutes (dont remember exactly). Some values are feed out of band from pump at a higher rate (they will be skipped by cyclic update).

  1. If errors occur on read. Many sensors can end up missing. Check for errors in log.
  2. Reads are slow (one per second or so). If you have very many sensors active The cyclic reads could be delayed.
KlausHans commented 8 months ago

Thank you for the response. I have around 20 entities active. I've used Node Red before to read via modbus, for the same addresses. I've never had any issues there with a 60 second interval. I didn't found any errors from the Nibe integration in the HA log.

elupus commented 8 months ago

Oh right. This was S series with modbus. Those should be quicker to read. Then im not sure why it would show as unavailable. Can you see the sensors going unavailable in home assistant?

Note, unchanged values will not trigger an recorder event in HA normally.

KlausHans commented 8 months ago

The entities were always available. At least at the times I've checked. Yes, it is a S1255.

Note, unchanged values will not trigger an recorder event in HA normally.

Hm, this could be indeed the culprit. Is there a way to circumvent this?

elupus commented 8 months ago

No, its by design at the moment. But being discussed here: https://github.com/home-assistant/architecture/discussions/1062

KlausHans commented 8 months ago

Thanks. The force_update flag can't be used?

elupus commented 8 months ago

No it would bloat history database. Its reserved only for event like sensors and is a hack.

KlausHans commented 8 months ago

Ok, thank you for the answers. Should this issue be closed? It technically is still an issue but can't be solved right now.

elupus commented 8 months ago

Yes. Technically it moves to a feature request. So goes mainly on forum. Do watch that arch discussion though.