Page 1 of 1

Meteobridge Pro Raw Sensor Data export

Posted: Sat Aug 20, 2022 11:37 am
by Udo
Hi,
Is it possible to export the raw sensor data to a data base as they come in from the sensors ?

I would like to integrate the live wind data into my web site.

Thanks
Udo

Re: Meteobridge Pro Raw Sensor Data export

Posted: Sat Aug 20, 2022 11:03 pm
by Gyvate
yes, you need to create a http post delivering the data defined by the template notation (--> WiKi --> Expert Corner --> Templates) and post it via a http event where you choose the posting interval (e.g. 5 seconds, 10 seconds, 15 seconds ...).
However posting this data more often than the sensors provide a data update will not make much sense.
If e.g. your weather station provides data every 16 seconds, posting every 5 seconds will be useless - then you should maybe choose every 15 or 20 seconds.
Of course, at the web site end the data will have to be picked up and processed.
an example for sending a http post to a web site hosting Meteotemplate would be:
http://domain/template/api.php?U=[epoch.1:]&T=[th0temp-lastval.1:]&TMX=[th0temp-max5:]&TMN=[th0temp-min5:]&H=[th0hum-lastval.1:]&P=[thb0seapress-lastval:1]&W=.....
where the letters U, T, TMX etc. represent identifiers which are processed by the script api.php at the website. the variable descriptor inside the [] will provide the respective value.
For details, again, see (--> WiKi --> Expert Corner --> Templates) at www.meteobridge.com

the notation inside the [ ] follows the scheme
"sensor-selector=converter.decimals:replacement"

e.g. [th0temp-lastval.1:] (that's the outdoor temperature with the last received value with one place after the decimal point (e.g. 15.1): nothing behind the : means that nothing will be written if no value is available. The result (when no value is available) in the above example would be: T=, If you write [th0temp-lastval.1:4711] and no value has been received inside the posting interval, then T=4711.0 would be written. If there is a value, the value will be written with one decimal place after the decimal point e.g. 15.1.
by the way, [epoch.1:] provides the date-time in EPOCH notation (UNIX time = seconds passed since 1.1.1970)
the [ ] are the delimiters for the values of the variables/sensors