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

Improve Statistics Counters #2300

Open
broth-itk opened this issue Sep 23, 2024 · 5 comments
Open

Improve Statistics Counters #2300

broth-itk opened this issue Sep 23, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@broth-itk
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Statistics are a great new feature! Thank you for the enhancement!

Unfortunately the stats get "poisoned" by the attempts to reach the inverters in the early morning hours.

These failure counts makes it impossible to justify the link quality between DTU and the inverter.

I was helping myself by rebooting the DTU. Now the values look fine and allow to check if the reachability is fine.

Describe the solution you'd like

Proposal:

The stats already get reset at midnight.
This will collect offline stats.

At the first successful response from the inverter, reset stats and set a flag.

Now we count fresh online stats.


First I like to collect feedback from other users and devs.

I'll be happy to code the required changes and issue a pull request on positive feedback :)

Describe alternatives you've considered

No response

Additional context

No response

@broth-itk broth-itk added the enhancement New feature or request label Sep 23, 2024
@broth-itk broth-itk changed the title Statistics Reset algorithm Improve Statistics Counters Sep 23, 2024
@tbnobody
Copy link
Owner

Good idea. I am just not 100% sure what happens to people with batteries on their inverter.
To be honest, the reset at midnight was just a poor first idea to prevent any kind of overflow of these variables.
I could also imagine that a button in the webapp or a mqtt command topic to reset the radio stats would make sense.

@broth-itk
Copy link
Contributor Author

I like the idea of some automatic mode which results in useful stats for 99% of users.
What I noticed this evening: It's gonna be more difficult to get useful stats when the sun goes down. When is a good moment/trigger to stop counting? No RX could be for any other reason, too :)

Button, MQTT (? are the values even published)... all possible.
Since the stats help to judge the link quality, maybe count only during a window of xx minutes. Then reset.

@tbnobody
Copy link
Owner

tbnobody commented Sep 23, 2024

(? are the values even published)

Yes they are... (And reset via mqtt is already working in my local branch)

@mrueg
Copy link

mrueg commented Oct 11, 2024

Would it be possible to store the counters in a way that you can select by a range, e.g. last 5 min, last hour and last 6 hours?

@stefan123t
Copy link

@mrueg that would require to store them in several round-robin / ring registers for the times / intervals you have given.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants