I have been working on setting up my Meteobridge over the last few weeks and learning a lot on the way which is all goodness .
I have been searching for a way to create a weather records page and have done so for various data elements using the min and max selectors. I would like to work out the wettist day (the day with the most rain ever) but the amax selector and dmax selector do not provide the values I am looking for.
[rain0total-amax=mm.2:—]mm
[rain0total-dmax=mm.2:—]mm
Has anybody worked out a way to achieve what I am after.
Thanks
Mark.
Last edited by MGS on Wed Apr 05, 2023 6:19 pm, edited 3 times in total.
My Weather Website http:\\www.harpendenweatherstation.co.uk
As rain is a cumulative value the typical Selectors (such as amax, dmax etc) do not work with such Sensors such as rain0total, sol0evo, sun0total etc. The only Selectors which support cumulative totals are hoursum, daysum, monthsum, yearsum, allsum and ydaysum as well as sumx, sumxh and delta variants which have up to 24 hour time frames.
You would have to conditionally script what you require which gets a bit more complicated over and above the standard sensor-selector mechanism etc
rain0rate will work with the standard selectors but of course the highest rain rates don't necessarily equate to the wettest day. With rain0rate you can determine the maximum value, date, time occurred over defined time frames.
I'd say the easiest way to do this would be to do the calculation/processing at your website.
You could have MB create every day an array of data (date and raintotal for each day ever since your recording started) as an export and post this array every day at midnight (or a minute after midnight) to your website e.g. via FTP.
Then create a PHP script which runs at your website with a sorting function for this array (= a two dimensional array or an array of records with two fields) in descending sequence for the rainfall, and once the sorting is complete, pick the first element in your array: that will be the day with the biggest amount of rainfall or your wettest day - and this doublet of data you can display on your web page
WH4000SE 1.6.6/1 x DP1500/4 x GW1000 1.7.7/GW1100 2.3.0/HP1000SE Pro 1.9.3//2 x WH2650 1.7.7/GW2000 3.1.0
2xMeteobridge Pro [B+R] 15161, 2xRPi4B-2GB/16/32 3139,VM128 1704
Weather Landing page: https://meshka.eu
Ecowitt WiKi: https://meshka.eu/Ecowitt/dokuwiki
which is of course a questionably reasonable restriction by the software.
On the one hand it is said that you can keep data for up to 10 years, on the other hand you lose access to it after 1-2 years, depending where in the current year you are, because the time frame "last two years" shows only the current and the past year. At least for the normal non-IT-savvy user, that is not very user friendly..
(you can of course use a backup of your database, execute SQL statements and extract also data from earlier years, but that's far beyond the skills of the average MB user.)
@admin:
Imho it would be very helpful to allow a free time frame selection with the resolution "days" - for being able to export related data and for being able to have related graphs.You may want toview and present history beyond 1-2 years ....
(or is there a "hidden" option which I haven't discovered yet ?)
WH4000SE 1.6.6/1 x DP1500/4 x GW1000 1.7.7/GW1100 2.3.0/HP1000SE Pro 1.9.3//2 x WH2650 1.7.7/GW2000 3.1.0
2xMeteobridge Pro [B+R] 15161, 2xRPi4B-2GB/16/32 3139,VM128 1704
Weather Landing page: https://meshka.eu
Ecowitt WiKi: https://meshka.eu/Ecowitt/dokuwiki
Thanks Gyvate & Mattk for your pointers I have implemented a MB event that sends data to an API page on my Website that puts the data in to a .CSV file. This has the added benefit that I can manually add historic non MB recorded Record values to the CSV file and just post daily maximum values just before the start of a new day. I have then incorporated some PHP script to pick the largest value for rainfall out of this CSV file and am presenting it on my test Website all looks to be working ok. will move it to my live site over the weekend when I get a bit more time. I may well expand this to other min and max values when I have the time. I now have a new problem! I have now used the last of the 20 Events you are allowed to configure on MB. Is there a way of setting up more events? or scripting more events in some way?
My Weather Website http:\\www.harpendenweatherstation.co.uk
MGS wrote: ↑Wed Apr 05, 2023 6:19 pm
Is there a way of setting up more events? or scripting more events in some way?
This would depend on the events. Some of them might be "outsourced" from the list into one or more scripts which could be run via the MB cronjob table, especially when they are sort of "trivial" scripts not involving template language. This cronjob table will, however, be overwritten at each reboot (maybe only at each reboot which includes an update - to be found out). So some manual action would be needed (saving the file to the "user area" which is not overwritten and copy it back after a reboot).
WH4000SE 1.6.6/1 x DP1500/4 x GW1000 1.7.7/GW1100 2.3.0/HP1000SE Pro 1.9.3//2 x WH2650 1.7.7/GW2000 3.1.0
2xMeteobridge Pro [B+R] 15161, 2xRPi4B-2GB/16/32 3139,VM128 1704
Weather Landing page: https://meshka.eu
Ecowitt WiKi: https://meshka.eu/Ecowitt/dokuwiki
Gyvate wrote: ↑Tue Apr 04, 2023 10:06 am
@admin:
Imho it would be very helpful to allow a free time frame selection with the resolution "days" - for being able to export related data and for being able to have related graphs.You may want toview and present history beyond 1-2 years ....
(or is there a "hidden" option which I haven't discovered yet ?)
Are looking for larger time frames in regard to graphs or exports or an individual template request?
Gyvate wrote: ↑Tue Apr 04, 2023 10:06 am
@admin:
Imho it would be very helpful to allow a free time frame selection with the resolution "days" - for being able to export related data and for being able to have related graphs.You may want toview and present history beyond 1-2 years ....
(or is there a "hidden" option which I haven't discovered yet ?)
Are looking for larger time frames in regard to graphs or exports or an individual template request?
for exports and graphs - where with the graphs I can manipulate manually the URL string as long as I don't have more than 500.000 data points - found that out through trial and error; there I suppose I can go 57 years back with an hourly resolution {500.000/24/365 = 57] (so far I managed three and 1/2 years back - that's until when I have data starting Sep 2020 with MB on my RPi4 - when I re-import earlier data from my MB Pro I should end up with 5 years, but so far I haven't invested the time yet for that procedure ... )
but exports I can't go back so far (or don't know how to do), so at least for exports a free time frame and resolution within the 500.000 data point limitation (now that it worked with the graphs also with hours, the selection shoukld also allow for a resolution of either hours or days )
WH4000SE 1.6.6/1 x DP1500/4 x GW1000 1.7.7/GW1100 2.3.0/HP1000SE Pro 1.9.3//2 x WH2650 1.7.7/GW2000 3.1.0
2xMeteobridge Pro [B+R] 15161, 2xRPi4B-2GB/16/32 3139,VM128 1704
Weather Landing page: https://meshka.eu
Ecowitt WiKi: https://meshka.eu/Ecowitt/dokuwiki
This was for individual individual template requests.
I have input manually historic high and low values and wanted to template them out on to a records page on my website I could request all the values I was after apart from the maximum rain on an individual day ever. so what I looking for was an all-time dmax value, none of the template I could files got me the data I was after.
In the end I have implementer a data push/post from my PB PRO2 to my website in to a CSV file. Then I have implemented some PHP script to pull the highest daily value and display it on my web page along with the other templated values. So in a roundabout way I have got to where I wanted to be.
Is there a way of getting more than 20 Events? as I am starting to run out
Thanks
Mark.
My Weather Website http:\\www.harpendenweatherstation.co.uk