-
Notifications
You must be signed in to change notification settings - Fork 117
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
No data sent to InfluxDB when PVOutput refuses request #450
Comments
Please look at grott.ini variable {pvoutput] section. You can limit the pvoutput processing with: pvuplimit = 5 I have to rethink this one while stopp Grott processing if an update does not work is not a very bad thing. The inverter / datalogger will buffer and resend the data at a later moment (hopefullly) when everything works well again. I know here are holes in this thought (and the way it is worked out in the code) but at least changing it might need some additional rethinking. |
I think it would help if the Meanwhile, I'm running a fork of the repo with this pr-change in it, and now it works as expected: Only send data to PVOutput every 5 min, but it will send all datapoints to influx. |
I do not want to argue with you about that the code can be more streamlined and efficient, but overal it is (and stay's) my project and my code! I started this project with a reason (to get my inverter information to my own home automation tooling and to learn to write python and use new tools like mqtt, grafana, nodered etc). That is still my goal. With the emphasis on learning/writing python and to understand my own coding (and to support other people). Improvements, remarks, tips etc are welcome, rewriting the code (because of restructuring, better looks) does not help me with achieving my goals. |
Yes of course. However, the goal of my PR is not to impose my opinion on your project, it's to fix a bug. |
Sorry to say that in version 2.7.8 (Grott Proxy) I get this error:
This is the section in grott.ini
This is in the log when I start the software
|
Because you have specified: pvuplimit = 5 Grott will sent only one message per 5 minutes to pvoutput. The message in between will be "refused" (=not send). So probably you will se one successful update per 5 minutes. |
But it is still supposed to send data to InfluxDB, right? |
Oke, now understand this message. Thought it was a refuse of PVoutput.org. But now I remember that sends another message. |
Yes! Isn't that working then? Be aware I haven't wrote the limit part (and maybe haven't test it enough before committed the pr). I will test it this week. |
No, that is the issue the PR attached to this issue will fix... For completeness, here is the link again: #452 If you want to test, try to reproduce this scenario: set the pvoutput limit to a higher value than the Growatt inverter's interval. In my situation, the growatt inverter interval is set to 1 minute, and pvoutput to 5 minutes. |
Hi @johanmeijer any chance you are going to include this in the codebase? Then I can move away from my fork and use the latest greatest version... Thanks! |
Today I've increased the interval on the datalogger to 1 minute. As expected the PVOutput refuses 4 of 5 data points. However, I was surprised that the graphs in Grafana (backed by Influx) didn't show a resolution of 1 minute, but HASS did. When reviewing the code, I think I found the spot where this goes wrong:
https://github.com/johanmeijer/grott/blob/master/grottdata.py#L525C20-L525C20
The return statement causes the method to complete, but the influxDb processing starts at L592 which will never be reached this way.
A way to fix this, is to move everything inside
if conf.pvoutput :
to a different function. The same might also be a good idea for the other output types to prevent these kinds of bugs.Thanks!
Example logs:
one without InfluxDB interaction:
log with influxdb processing:
The text was updated successfully, but these errors were encountered: