Page 1 of 1
Tag for trend table.
Posted: Sat Jun 27, 2020 11:34 am
by masgio69
Hello everyone, I need your knowledge of the meteobridge, I would like to create a table with the comparison of the current value (for example the outside temperature) with the same value as yesterday, last month and last year but I can't find the right tags to create the table. Who can help me? Thanks so much.
Re: Tag for trend table.
Posted: Sat Jun 27, 2020 12:52 pm
by Mattk
What MB are you running? Have you checked the template page? Meteobridge PRO Additions?
https://www.meteobridge.com/wiki/index.php/Templates
Re: Tag for trend table.
Posted: Sat Jun 27, 2020 1:00 pm
by wvdkuil
masgio69 wrote: ↑Sat Jun 27, 2020 11:34 am
Hello everyone, I need your knowledge of the meteobridge, I would like to create a table with the comparison of the current value (for example the outside temperature) with the same value as yesterday, last month and last year but I can't find the right tags to create the table. Who can help me? Thanks so much.
You can compare current values with high-lows of other periods.
How to define those historical values =>
https://www.meteobridge.com/wiki/index.php/Templates
Some examples:
Code: Select all
|tempMaxToday|[th0temp-dmax.1:--]|!
|tempMaxTodayTime|[th0temp-dmaxtime:--]|!
|tempMaxYday|[th0temp-ydmax.1:--]|!
|tempMaxYdayTime|[th0temp-ydmaxtime:--]|!
|tempMaxMonth|[th0temp-mmax.1:--]|!
|tempMaxMonthTime|[th0temp-mmaxtime:--]|!
|tempMaxYear|[th0temp-ymax.1:--]|!
|tempMaxYearTime|[th0temp-ymaxtime:--]|!
when processed and uploaded by your Meteobridge
Code: Select all
|tempMaxToday|16.9|!
|tempMaxTodayTime|20180922133508|!
|tempMaxYday|20.2|!
|tempMaxYdayTime|20180921041544|!
|tempMaxMonth|29.8|!
|tempMaxMonthTime|20180918160643|!
|tempMaxYear|37.8|!
|tempMaxYearTime|20180726171913|!
Succes, Wim
Re: Tag for trend table.
Posted: Sat Jun 27, 2020 1:39 pm
by masgio69
Re: Tag for trend table.
Posted: Sat Jun 27, 2020 5:04 pm
by wvdkuil
OK But when I check the NaNo database (AFAIK similar to the Pro database) the values have a resolution of 1 hour and contain average/max/min values. So if you want to compare "current" values it should
comparing the average value of the current hour
https://www.meteobridge.com/wiki/index.php/Templates => Meteobridge PRO Additions
Using "[uv0index-avg@2015110316]" in a template will report average UV index on November 3, 2015 between 16:00 and 16:59.
If you want to compare current ( it is now 202006271730 ) outside temp [th0temp-val60] with yesterdays the tag needs to be [th0temp-avg@202006
2617]
So the template file must be generated every hour to adjust for the @parts. That is doable.
But what to do on leap years with February 29? Or with months with 31 days -> compare it with this month first day or last month last day? Also switching into / or out of daylight saving time needs some programming effort.
Nice programming job.
Wim
Re: Tag for trend table.
Posted: Sat Jun 27, 2020 6:20 pm
by masgio69
Ok. Thank you so much.
Re: Tag for trend table.
Posted: Sun Jun 28, 2020 9:01 am
by masgio69
It's not really what I wanted to do, but I'll use the tags you recommended me. Thank you all for the help you have given me.