Hi forum
I have struggling finding a way to show bars (chartjs) for hourly rainfall.
I'm retrieve the daily report from ecowitt API into my database.
This is the answer I've got from ecowitt support, does it make senses?
"Hourly rainfall is reset at each hour on the hour. The rainfall for one hour is calculated by subtracting the accumulated annual rainfall at the previous hour from the accumulated annual rainfall at the current hour."
Anyone who can tell me how to build my Mariadb query based on this?
I quess I have to build a php script storing the hourly rainfall (current anual rainfall for one hour ago- current rainfall) running once per hour from a cron script, or having a wait loop to get the difference and store it in an array for chartjs.