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
71.01k stars 29.65k forks source link

Nibe Integration is reporting numerical values as strings #103975

Open EenerNL opened 9 months ago

EenerNL commented 9 months ago

The problem

Hi,

I've enabled a lot of sensor from my Nibe Heatpump. A few of them are interesting to plot as a graph. I can make a helper to convert these values to floats or integers. But the best way would be to change this on the integration side.

Below I've added some screenshots of wrong sensor types. Just look at the log-graph.

Currently I'm using the modbus (NibeGW) connection. Previously I used the Nibe Uplink integration (through Hacs). The problem didn't exist in the uplink integration.

smart_price_adaption_heating_offset_44896 smart_price_adaption_heating_offset_44896

compressor_starts_eb100_ep14_43416 compressor_starts_eb100_ep14_43416

smart_price_adaption_price_41928 smart_price_adaption_price_41928

smart_price_adaption_price_level_41929 smart_price_adaption_price_level_41929

What version of Home Assistant Core has the issue?

core-2023.11.2

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 9 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.

(message by CodeOwnersMention)


nibe_heatpump documentation nibe_heatpump source (message by IssueLinks)

runevad commented 9 months ago

I agree, this integration is great and can be even greater with some small fixes. As @EenerNL writes, a value like compressor_starts_eb100_ep14_43416 should be regarded as a numerical value similar to that of an energy meters total value with a state class: total_increasing. Then we can (even easier) make stuff like "number of starts per week" etc. which is great for monitoring if the heat pump is somewhat correctly set up or not.

issue-triage-workflows[bot] commented 6 months ago

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.

elupus commented 6 months ago

Still valid. Will ponder a solution.

EenerNL commented 6 months ago

This issue is still valid. Would like to see a fix.

issue-triage-workflows[bot] commented 3 months ago

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.

SilentNomad7 commented 3 months ago

It would be great if someone parsed these strings to floats or integers.

EenerNL commented 3 months ago

Agree, i would like to see a fix for this as well

KptnHaddock commented 2 months ago

Great initiative to raise this integration issue. Still valid. Another example is the entity sensor.reversing_valve_hot_water_qn10_32197 (Nibe s1256) that would be better integrated as binary instead of sensor.

elupus commented 2 months ago

@KptnHaddock you can help fix that by making sure there is a value map for on/off for that sensor in the upstream repo: https://github.com/yozik04/nibe same goes for other numeric values that is missing a unit but should have a unit. (unitless things are hard)

KptnHaddock commented 2 months ago

@elupus would very much like to contribute, challange is I have zero experience from Github processes. Had a look at the files and my first guess is that the file nibe/data/s1155_s1255.json is also valid for the Nibe s1256 that I have successfully integrated in HA, as I did not find a specific file for s1256.

If so, my next quess is to have the code: " "32197": { "title": "Reversing valve hot water (QN10)", "factor": 1, "size": "u8", "name": "reversing-valve-hot-water-qn10-32197" },"

Replaced by: " "32197": { "title": "Reversing valve hot water (QN10)", "factor": 1, "size": "u8", "name": "reversing-valve-hot-water-qn10-32197", "mappings": { "0": "Off", "1": "On" } },"

I may be totally off track here so further guidance would be neccessary.

elupus commented 2 months ago

Yes that is correct. The data file should match what you selected in HA when you installed it.

You however cant modify the data file directly, you need to add you adjustments to the extensions file and run the python script to update the real json files. See readme (a bit terse i know)

KptnHaddock commented 2 months ago

Thanks. I'll give it a go. Will take some time though, with midsummer vacation coming up next ☀️

KptnHaddock commented 1 month ago

@elupus, so I finally made the changes for 32179 in the extension file, successfully run the python script and comitted. Looking at the files would it not be an even better solution to create a new set of .csv/.json files for Nibe s1156/s1256 according to the readme?

elupus commented 1 month ago

@elupus, so I finally made the changes for 32179 in the extension file, successfully run the python script and comitted. Looking at the files would it not be an even better solution to create a new set of .csv/.json files for Nibe s1156/s1256 according to the readme?

Maybe if they differ by alot.

KptnHaddock commented 1 month ago

The do look very similar. Considering the .csv file from my s1256 has about 200 less rows than the one on GitHub for s1155/s1255 I guess it would be ok to stick to the existing ones.