fatyogi / epever-upower-tracer

Linux/Raspberry monitoring scripts for EPsolar UPower hybrid invertors and EPever Tracer charge controllers
Apache License 2.0
28 stars 14 forks source link

Strange dependency #12

Open Tamila-2017 opened 3 months ago

Tamila-2017 commented 3 months ago

Hi, Please, one more question:

I am using a battery voltage widget for current data. I noticed that when I set "last 30 days" or other value, the "Relative time ranges", the current readings change. This should happen? What do you think about it?

screen1

fatyogi commented 3 months ago

This is to do with how Grafana works - if you look at the query in that widget - you will see that it uses some statistical calculation over a set of time-based values in the query to display a single value over a particular period.

I can’t recall which function is it in that widget right now - probably MEAN(), which takes average over time. Hence - the value will change depending on the period.

You can play with it, change it to LAST(not null) for example to always show the latest value from the database.

See more here - https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/calculation-types/

On Mon, 29 Jul 2024 at 08:50, Tamila-2017 @.***> wrote:

Hi, Please, one more question:

I am using a battery voltage widget for current data. I noticed that when I set "last 30 days" or other value, the "Relative time ranges", the current readings change. This should not happen.

What do you think about it?

screen1.jpg (view on web) https://github.com/user-attachments/assets/4affae8f-bbbe-401f-b628-fe40fcff65c8

— Reply to this email directly, view it on GitHub https://github.com/fatyogi/epever-upower-tracer/issues/12, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE4YYOYGRY2F7RU7FGWTNX3ZO2FHVAVCNFSM6AAAAABLU3CCJCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQZTMMJRGIYTKMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Tamila-2017 commented 3 months ago

I was stunned :-( It turned out that your widgets requests use the 'mean' parameter - why??? Imho, this is a big mistake! These widgets should show parameter readings in real time and not depend on the time interval

Widgets

I changed the 'mean' to 'last' everywhere, and now these widgets show current parameters correctly! :-)

I've spent a lot of time on this annoying oddity :-(

Tamila-2017 commented 3 months ago

Another problem. This time it's fatal.

If this line is in the crontab:

* * * * * cd /home/pi/epever-upower-tracer && python3 logtracer.py > /dev/null

then the project is working steadily

If add this line:

* * * * * cd /home/pi/epever-upower-tracer && ./logtracerstats.py > /dev/null

Then after a while the charts stop updating and stop. Time stops on the charts too. Why?

fatyogi commented 3 months ago

Please go into the directory and run this manually:

cd /home/pi/epever-upower-tracer ./logtracerstats.py

What is the output?

// Laconic style, sent from my phone

On Thu, 1 Aug 2024 at 02:01, Tamila-2017 @.***> wrote:

Another problem. This time it's fatal.

If this line is in the crontab:

          • cd /home/pi/epever-upower-tracer && python3 logtracer.py > /dev/null

then the project is working steadily

If add this line:

          • cd /home/pi/epever-upower-tracer && ./logtracerstats.py > /dev/null

Then after a while the charts stop updating and stop. Time stops on the charts too. Why?

— Reply to this email directly, view it on GitHub https://github.com/fatyogi/epever-upower-tracer/issues/12#issuecomment-2260599162, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE4YYO4425LDIWVCXDSXYTLZPDU2NAVCNFSM6AAAAABLU3CCJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRQGU4TSMJWGI . You are receiving this because you commented.Message ID: @.***>

Tamila-2017 commented 3 months ago

Please:

/epever-upower-tracer $ ./logtracerstats.py 
[{'measurement': 'solar_stats', 'time': datetime.datetime(2024, 7, 31, 19, 32, 31, 396170), 'fields': {'DCkwh2d': 0.71, 'DCkwhTm': 22.29, 'DCkwhTY': 57.33, 'DCkwhTT': 84.73, 'PVkwh2d': 0.88, 'PVkwhTm': 16.5, 'PVkwhTY': 67.79, 'PVkwhTT': 119.71}}]
fatyogi commented 3 months ago

The measurements seem to be correct.

Next - verify these measurements in Influxdb,

run influx from the console, use solar database, then run select * from solar_stats;

If you see the measurements there - then check your Grafana queries and how do you select from these measurements.

I’m sorry Tamila, I think I cannot help you any further- we don’t provide a customer support within this project. It is a hobby project, not a job for me - please understand.

Study the basics of influx and Grafana, then go through the steps I outlined. I think the measurements are coming from the controller well now, just make sure you display them correctly.

// Laconic style, sent from my phone

On Thu, 1 Aug 2024 at 07:34, Tamila-2017 @.***> wrote:

Please:

/epever-upower-tracer $ ./logtracerstats.py [{'measurement': 'solar_stats', 'time': datetime.datetime(2024, 7, 31, 19, 32, 31, 396170), 'fields': {'DCkwh2d': 0.71, 'DCkwhTm': 22.29, 'DCkwhTY': 57.33, 'DCkwhTT': 84.73, 'PVkwh2d': 0.88, 'PVkwhTm': 16.5, 'PVkwhTY': 67.79, 'PVkwhTT': 119.71}}]

— Reply to this email directly, view it on GitHub https://github.com/fatyogi/epever-upower-tracer/issues/12#issuecomment-2261283875, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE4YYO6TWOWRIJLZJHXMHSTZPE32ZAVCNFSM6AAAAABLU3CCJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRRGI4DGOBXGU . You are receiving this because you commented.Message ID: @.***>

Tamila-2017 commented 3 months ago

Cute fatyogi, I will still continue to torment you more because you are the author :)

It seems to me that if these 2 lines are used together, then requests from them to Epever arrive at the same time. Epever is not able to correctly process 2 requests received by it at the same time. How do you assess this assumption? It also handles requests poorly, reporting a checksum failure.

Perhaps these requests need to be spaced in time?

fatyogi commented 3 months ago

Very well, however don’t be offended if I don’t answer.

In this case try to space the two commands out in your crontab.

Run the first command every minute, and the other command every hour.

Or put a sleep 30 in front of the second command

// Laconic style, sent from my phone

On Thu, 1 Aug 2024 at 11:56, Tamila-2017 @.***> wrote:

Cute fatyogi, I will still continue to torment you more because you are the author :)

It seems to me that if these 2 lines are used together, then requests from them to Epever arrive at the same time. Epever is not able to correctly process 2 requests received by it at the same time. How do you assess this assumption? It also handles requests poorly, reporting a checksum failure.

Perhaps these requests need to be spaced in time?

— Reply to this email directly, view it on GitHub https://github.com/fatyogi/epever-upower-tracer/issues/12#issuecomment-2261677424, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE4YYO6USV75HTHARH4TNMDZPF2S7AVCNFSM6AAAAABLU3CCJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRRGY3TONBSGQ . You are receiving this because you commented.Message ID: @.***>

Tamila-2017 commented 3 months ago

fatyogi you are very kind, thank you very much :-)