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

Always record datapoints, even if they haven't changed value #239

Closed
wants to merge 2 commits into from

Conversation

jmason
Copy link
Collaborator

@jmason jmason commented Dec 21, 2022

I noticed that I was missing some large chunks of data overnight on some graphs -- on investigating, it appears that if the data value hasn't changed, the sensor's value isn't recorded. (Since I use Graphite downstream from my Home Assistant to display graphs, it highlights missing data like this, whereas HA's own graphs are more lenient.) I also think it's useful to record the datapoints if we were successfully able to measure them, to differentiate from cases where the datapoint was unmeasureable due to a bug or other issue (which unfortunately tends to happen to me a fair bit due to wifi issues).

Is there any reason the original code skipped recording identical datapoints?

@hultenvp
Copy link
Owner

Yes there are reasons not to update:

  • It keeps the last update more or less in sync with the inverter. If the logger in the inverter stops updating the server, then you'll also notice in HA
  • Every update is recorded, the recorder database is notorious for wearing out HA instances running from SD on RPi's. The recommendation is to only write when there's an update (can't find the blog anymore, was already quite a while ago).

I do get your usecase however. We could add it as a config to the workarounds.yaml. Default current solution, and if enabled always update? Soliscloud_api uses the workarounds.yaml as well.

@hultenvp
Copy link
Owner

Oh, the workarounds.yaml is planned to go to the UI options (#234) in the future, so will become more user friendly ;-)

@jmason
Copy link
Collaborator Author

jmason commented Dec 26, 2022

great, that works for me :) Thanks!

@hultenvp
Copy link
Owner

This code was still accidentally in PR #240 and caused regression in the fix for late reset of energy today, specifically
https://github.com/hultenvp/solis-sensor/blob/master/custom_components/solis/service.py#L178:L179
I reverted it in 3.3.1.

Needs more rework before it can be integrated

jmason pushed a commit to jmason/solis-sensor that referenced this pull request Jul 9, 2024
@jmason
Copy link
Collaborator Author

jmason commented Dec 29, 2024

I think this could be abandoned, tbh -- I've discarded it from my fork and revamped the Graphite stuff to cope with strings of missing datapoints, and it works ok. So this can be closed!

@jmason jmason closed this Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants