Difference between pages "Templates/de" and "Templates/en"

From meteoplug
(Difference between pages)
Jump to: navigation, search
(Updating to match new version of source page)
 
(Updating to match new version of source page)
 
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages /><br />Meteobridge stellt einen sehr flexiblen Ersetzungsmechanismus zur Verfügung, mit dem definierte Variable durch konkrete Sensorwerte ersetzt werden. Dies ermöglich Meteobridge in beliebige Zeichenketten Variable "einzuschmuggeln", seien es E-Mail, HTML-Seiten, Alarmbedingungen, etc.
+
<languages /><br />Meteobridge provides a very flexible mechanism to smuggle sensor data of different kinds into strings to be used by Meteobrdge push services like Twitter, HTTP GET uploads or MSQL database insert requests.
Die Variable werden in dem Moment, in dem die Zeichenkette an den Upload zum Zieldienst übergeben wird surch reale Werte ersetzte. Kann das Datenpaket nicht zugestellt werden, wird die Zustellung gegebenenfalls wiederholt, jedoch mit den bei der Erstbeauftragung eingesetzten Daten.
+
Simply type in the text you want to upload and represent the pieces of sensor data by so called variables. When data gets uploaded, these variables will be replaced by current sensor data and so a string filled with the data you intended will be uploaded.
  
Jede Variable beginnt und endet mit einer eckigen Klammer "[" und "]". Die Variable in diesen Klammern zeigt die folgende Struktur: <pre>Sensor-Selektor=Konverter.Dezimalstellen:Ersatzzeichenkette</pre>
+
Each variable starts with an opening square bracket "[" and is terminated by a closing square bracket "]". The structure of the variable name between these brackets is as follows: <pre>sensor-selector=converter.decimals:replacement</pre>
"Konverter", "Dezimalstellen" und "Ersatzzeichenkette" kann weggelassen werden, "Sensor" und "Selektor" müssen angegeben werden.
+
"converter", "decimals" and "replacement" can be omitted, "sensor" and "type" are mandatory.
Während "Sensor" festlegt, um welchen Sensor es sich handelt und welcher Sensorwert verwendten werden soll, gibt "Selektor" an, welche Zeitperiode ausgewertet werden soll. Mit "Konverter" kann optional eine Umrechnung in andere Maßeinheiten realisiert werden. Die "Dezimalstellen"-Angabe bestimmt die numerische Auflösung der Daten und die "Ersatzzeichenkette" bestimmt den Wert, der ausgegeben wird, wenn kein Sensorwert für den definierten Zeitraum vorliegt.
+
While "sensor" tells what sensor and what piece of information of the sensor to use, "selector" decides data from what time period should be taken into account and "converter" does convert data into measurement units the user likes most. "Decimals" decides about precision the result should be shown in and "replacement" gives the string to be returned when there is no data for defined sensor available.
  
<span class="mw-translate-fuzzy">
+
==Sensors==
==Sensoren==  
+
These sensors are defined in Meteobridge.
Diese Sensoren sind in Meteobridge definiert:
+
* '''th0temp''': outdoor temperature in degrees Celsius
* '''th0temp''': Außentemperatur in Grad Celsius
+
* '''th0hum''': relative outdoor humidity as percentage
* '''th0hum''': Relative Außenluftfeuchte in Prozent
+
* '''th0dew''': outdoor dew point in degrees Celsius
* '''th0dew''': Außentaupunkttemperatur in Grad Celsius
+
* '''thb0temp''': indoor temperature in degrees Celsius
* '''thb0temp''': Innentemperatur in Grad Celsius
+
* '''thb0hum''': indoor humidity as percentage
* '''thb0hum''': Innenluftfeuchte in Prozent
+
* '''thb0dew''': indoor dewpoint in degrees Celsius
* '''thb0dew''': Innentaupunkttemperatur in Grad Celsius
+
* '''thb0press''': station pressure in hPa
* '''thb0press''': Stationsluftdruck in hPa
+
* '''thb0seapress''': normalized pressure (computed to sea level) in hPa
* '''thb0seapress''': auf Meeresspiegelhöhe berechneter Luftdruck in hPa
+
* '''wind0wind''': wind speed in m/s
* '''wind0wind''': ungemittelte Windgeschindigkeit in m/s
+
* '''wind0avgwind''': average windspeed in m/s (time used for average depends on station)
* '''wind0avgwind''': gemittelte Windgeschindigkeit in m/s
+
* '''wind0dir''': wind direction in degress (0° is North)
* '''wind0dir''': Windrichtung in Grad (0° ist Norden)
+
* '''wind0chill''': wind chill temperature in degrees Celsius
* '''wind0chill''': Windchill-Temperatur in Grad Celsius
+
* '''rain0rate''': rain rate in mm/h
* '''rain0rate''': Regenrate in mm/h
+
* '''rain0total''': rain fall in mm
* '''rain0total''': gefallene Regenmenge in mm
+
* '''uv0index''': uv index
* '''uv0index''': UV-Index
+
* '''sol0rad''': solar radiation in W/m^2
* '''sol0rad''': Solarstrahlung in W/m^2
+
If a sensor is not there or data of sensor has passed the "tolerated data age" interval, Meteobridge will not provide data for it and will present the value defined as "replacement". If no replacement is given, variable will not be converted into data but will stay as is.
Wenn ein Sensor nicht existiert oder seine Daten älter als das maximal tolerierte Sensordatenalter sind, wird Meteohub keine Daten einsetzen und sofern definiert, stattdessen die Ersatzzeichenkette einsetzen. Falls keine Ersatzzeichenkette definiert ist, bleibt die Variable unersetzt als Zeichenkette stehen.
+
</span>
+
  
<span class="mw-translate-fuzzy">
+
==Selectors==
==Selektor==
+
Sensors are followed by a selector (syntactically separated by a dash) that specifies what period in time should be used for evaluation. Valid selectors are:
Den "Sensoren" folgt eine Selektorbezeichnung (durch ein "-" getrennt) mit der der auszuwertende Zeitraum oder Zeitpunkt angegeben wird. Die folgenden Selektoren sind definiert:
+
* '''act''': most recent data
* '''act''': aktuelle Daten
+
* '''hmin''': minimum value of this hour
* '''hmin''': Minimum der aktuellen Stunde
+
* '''hmax''': maximum value of this hour
* '''hmax''': Maximum der aktuellen Stunde
+
* '''dmin''': minimum value of today
* '''dmin''': Minimum von Heute
+
* '''dmax''': maximum value of today
* '''dmax''': Maximum von Heute
+
* '''ydmin''': minimum value of yesterday
* '''ydmin''': Minimum von Gestern
+
* '''ydmax''': maximum value of yesterday
* '''ydmax''': Maximum von Gestern
+
* '''mmin''': minimum value of this month
* '''mmin''': Minimum dieses Monats
+
* '''mmax''': maximum value of this month
* '''mmax''': Maximum dieses Monats
+
* '''ymin''': minimum value of this year
* '''ymin''': Minimum dieses Jahres
+
* '''ymax''': maximum value of this year
* '''ymax''': Maximum dieses Jahres
+
* '''amin''': minimum value of all time
* '''amin''': Minimum des gesamten Aufzeichnungszeitraumes
+
* '''amax''': maximum value of all time
* '''amax''': Maximum des gesamten Aufzeichnungszeitraumes
+
* '''daysum or sumday''', '''monthsum''', '''yearsum''', '''allsum''', '''ydaysum''': selects summerized delta values from today, this month, this year, all time or yesterday: "rain0total-sumday" is todays rain fall.
* '''daysum oder sumday''', '''ydaysum''', '''monthsum''', '''yearsum''', '''allsum''', '''ydaysum''': selektiert die Summe an Inkremente für Heute, Gestern, diesen Monat, dieses Jahr, gesamten Aufzeichnungszeitraum. Beispiel: "rain0total-sumday" ist die heutige Regenmenge.
+
</span>
+
  
<span class="mw-translate-fuzzy">
+
When you are interested in timestamps of min/max values, you can make use of these selectors:
Wenn man an den Zeitstempeln der Min/Max-Werte interessiert ist, könnten diese Selektoren ineressant sein:
+
* '''hmintime''': timestamp of minimum value of this hour
* '''hmintime''': Zeitstempel des Minimums der aktuellen Stunde
+
* '''hmaxtime''': timestamp of maximum value of this hour
* '''hmaxtime''': Zeitstempel des Maximums der aktuellen Stunde
+
* '''dmintime''': timestamp of minimum value of today
* '''dmintime''': Zeitstempel des Minimums von Heute
+
* '''dmaxtime''': timestamp of maximum value of today
* '''dmaxtime''': Zeitstempel des Maximums von Heute
+
* '''ydmintime''': timestamp of minimum value of yesterday
* '''ydmintime''': Zeitstempel des Minimums von Gestern
+
* '''ydmaxtime''': timestamp of maximum value of yesterday
* '''ydmaxtime''': Zeitstempel des Maximums von Gestern
+
* '''mmintime''': timestamp of minimum value of this month
* '''mmintime''': Zeitstempel des Minimums dieses Monats
+
* '''mmaxtime''': timestamp of maximum value of this month
* '''mmaxtime''': Zeitstempel des Maximums dieses Monats
+
* '''ymintime''': timestamp of minimum value of this year
* '''ymintime''': Zeitstempel des Minimums dieses Jahres
+
* '''ymaxtime''': timestamp of maximum value of this year
* '''ymaxtime''': Zeitstempel des Maximums dieses Jahres
+
* '''amintime''': timestamp of minimum value of all time
* '''amintime''': Zeitstempel des Minimums des gesamten Aufzeichnungszeitraumes
+
* '''amaxtime''': timestamp of maximum value of all time
* '''amaxtime''': Zeitstempel des Maximums des gesamten Aufzeichnungszeitraumes
+
* '''starttime''': timestamp of first recorded value
Die Zeitstempel sind im Format "JJJJMMTThhmmss". das Jahr "JJJJ" wird mit 4 Stellen, alle anderen Angabe (Monat "MM", Tag "TT", Stunde "hh", minute "mm", Sekunde "ss") werden mit 2 Stellen berichtet. Führende Nullen werden nicht unterdrückt.
+
Timestamps are strings of format "YYYYMMDDhhmmss". Year "YYYY" is reported in 4 digits, all other values (month "MM", day "DD", hour "hh", minute "mm", second "ss") come with 2 digits, leading zeros are not supressed.  
</span>
+
  
Neben obigen Selektoren, die fest definierte Zeitfenster selektieren, kann mit den folgenden Selektoren eine Auswertung für einen relativen Zeitraum in die Vergangenheit durchgeführt werden. Die Rückschau reicht wegen der begrenzten Speicherausstattung der Meteobridge nur bis zu 60 Minuten in die Vergangenheit.
+
Apart from selectors that use absolute, predefined time slots there are also selectors that look for a certain amount of time into the past.
* '''val2''', '''val5''', '''val10''', '''val15''', '''val30''', '''val60''': selektiert den Sensorwert vor 2, 5, 10, 15, 30 oder 60 Minuten
+
* '''val2''', '''val5''', '''val10''', '''val15''', '''val30''', '''val60''': selects the value the sensor has shown 2, 5, 10, 15, 30 or 60 minutes ago
* '''max2''', '''max5''', '''max10''', '''max15''', '''max30''', '''max60''': selektiert das Maximum der letzten 2, 5, 10, 15, 30 oder 60 Minuten
+
* '''max2''', '''max5''', '''max10''', '''max15''', '''max30''', '''max60''': selects the maximum value from the last 2, 5, 10, 15, 30 or 60 minutes
* '''min2''', '''min5''', '''min10''', '''min15''', '''min30''', '''min60''': selektiert das Minimum der letzten 2, 5, 10, 15, 30 oder 60 Minuten
+
* '''min2''', '''min5''', '''min10''', '''min15''', '''min30''', '''min60''': selects the minimum value from the last 2, 5, 10, 15, 30 or 60 minutes
* '''avg2''', '''avg5''', '''avg10''', '''avg15''', '''avg30''', '''avg60''': selektiert den Durchschnitt der letzten 2, 5, 10, 15, 30 oder 60 Minuten
+
* '''avg2''', '''avg5''', '''avg10''', '''avg15''', '''avg30''', '''avg60''': selects average value from the last 2, 5, 10, 15, 30 or 60 minutes
* '''sum2''', '''sum5''', '''sum10''', '''sum15''', '''sum30''', '''sum60''': selektiert zusammengerechnete Deltawerte der letzten 2, 5, 10, 15, 30 oder 60 Minuten, welches zum Berechnen der gefallenen Regenmenge im definierten Zeitraum erforderlich ist. Beispiel: "rain0total-sum60" ergebit die gefallene Regenmenge in mm der letzten 60 Minuten.
+
* '''sum2''', '''sum5''', '''sum10''', '''sum15''', '''sum30''', '''sum60''': selects summerized delta values from the last 2, 5, 10, 15, 30 or 60 minutes, which is useful to get amount of total rain in a certain time frame: "rain0total-sum60" is rainfall im mm of last 60 minutes.
  
<span class="mw-translate-fuzzy">
+
==Converters==
==Konverter==
+
Sensor data is reported in ISO units (°C, hPa, mm, m/s) by default, but can be converted into non-ISO units (imperial) by adding a conversion token. Defined tokens are:
Die Sensordaten werden als Voreinstellung in ISO Einheiten berichtet (°C, hPa, mm, m/s). Durch den Einsatz von Konvertern können die Einheiten auf non-ISO Einheiten umgerechnet werden. Definierte Konverter sind:
+
* '''F''' converts temperature from Celsius to Fahrenheit.
* '''F''' wandelt die Temperature von Celsius in Fahrenheit um.
+
* '''psi''' converts pressure from hPa (equivalent to mbar) to psi.
* '''psi''' wandelt Luftdruck von hPa (entspricht auch mbar) in psi um.
+
* '''mmHg''' converts pressure from hPa to millimeters of mercury.
* '''mmHg''' wandelt Luftdruck von hPa in Millimeter Quecksilbersäule um.
+
* '''inHg''' converts pressure from hPa to inches of mercury.
* '''inHg''' wandelt Luftdruck von hPa in Inch Quecksilbersäule um.
+
* '''kmh''' converts wind speed from meters per second to kilometers per hour.
* '''kmh''' wandelt Windgeschwindigkeit von m/s in Kilometer pro Stunde um.
+
* '''mph''' converts wind speed from meters per second to miles per hour.
* '''mph''' wandelt Windgeschwindigkeit von m/s in Meilen pro Stunde um.
+
* '''kn''' converts wind speed from meters per second to knots.
* '''kn''' wandelt Windgeschwindigkeit von m/s in Knoten um.
+
* '''bft''' converts wind speed from meters per second to Beaufort scale.
* '''bft''' wandelt Windgeschwindigkeit von m/s in die Beaufort-Skala um.
+
* '''in''' converts millimeters to inches.
* '''in''' wandelt der Regenmenge von mm in Inch um.
+
* '''ft''' converts meters to feet.
Wird eine unbekannte Konvertierung gewählt, findet keine Umrechnung statt un es erfolgt keine Fehlermeldung.
+
If an unknown conversion string is used, no conversion will take place, no error message will appear.
</span>
+
  
Wenn Variable einen Zeitstempel liefern, kann dieser von lokaler Zeit (Voreinstellung) auf Weltzeit (UTC) umgerechnet weden:
+
When variable returns a timestamp, then this converter can be applied:
* '''utc''' gibt den Zeitstempel nicht in lokaler Zeit (Voreinstellung) sondern in Weltzeit aus.
+
* '''utc''' reports timestamp in UTC instead of localtime, which is default.
  
 
==System Variables==
 
==System Variables==
Line 112: Line 106:
 
* '''moonset''': time of moonset in local time. Can be converterd to UTC by applying "=utc" to the variable. Please notice that not every day has a moonset time, therefore, variable can be non-existent on certain days (example: "17:00", resp. "16:00")
 
* '''moonset''': time of moonset in local time. Can be converterd to UTC by applying "=utc" to the variable. Please notice that not every day has a moonset time, therefore, variable can be non-existent on certain days (example: "17:00", resp. "16:00")
  
<span class="mw-translate-fuzzy">
+
==Time/Date Variables==
==Spezialvariable==
+
Variables representing current date/time don't come as "sensor-selector=converter" chains but have a distinct meaning by themselves.
Es sind eine Reihe von Spezialvariable definiert, die nicht dem Schema "Sensor-Selektor=Konverter" entsprechen, sondern einer Sonderbedeutung haben.
+
</span>
+
  
Datum und Uhrzeit ist wie folgt definiert:
+
Date und time variables are defined as follows:
* '''YYYY''': Jahr, vierstellig
+
* '''YYYY''': year as four digit number
* '''YY''': Jahr, zweistellig
+
* '''YY''': year as two digit number
* '''MM''': Monat, zweistellig (ggf mit führender Null)
+
* '''MM''': month as two digit number, if only one digit neede a zero will be used as first digit
* '''M''': Monat (ohne führende Null)
+
* '''M''': month as one or two digit number, no leading zeros
* '''DD''': Tag, zweistellig (ggf mit führender Null)
+
* '''DD''': day of month as two digit number, if only one digit neede a zero will be used as first digit
* '''D''': Tag (ohne führende Null)
+
* '''D''': day of month as one or two digit number, no leading zeros
* '''hh''': Stunde, zweistellig (ggf mit führende Null)
+
* '''hh''': hour as two digit number, if only one digit neede a zero will be used as first digit
* '''h''': Stunde (ohne führende Null)
+
* '''h''': hour as one or two digit number, no leading zeros
* '''mm''': Minuten, zweistellig (ggf mit führender Null)
+
* '''mm''': minute as two digit number, if only one digit neede a zero will be used as first digit
* '''m''': Minuten (ohne führende Null)
+
* '''m''': minute as one or two digit number, no leading zeros
* '''ss''': Sekunden, zweistellig (ggf mit führender Null)
+
* '''ss''': seconds as two digit number, if only one digit neede a zero will be used as first digit
* '''s''': Sekunden (ohne führende NuLL)
+
* '''s''': seconds as one or two digit number, no leading zeros
Wenn ein großes "U" vorangestellt ist, wird mit Weltzeit gearbeitet (UTC), ansonsten mit lokaler Zeit. Beispiel: "[Uhh]:[Umm]:[Uss] UTC" wird zu einer Zeichenkette der Art "16:03:33 UTC" übersetzt
+
When a capital "U" preceeds a date/time variable name, UTC is used instead of local time ("[Uhh]:[Umm]:[Uss] UTC" is evaluated to a string like "16:03:33 UTC")
  
==Nachkommastellen==
+
==Decimals==
Sofern nicht anders definiert werden Zahlen mit einer Dezimalstelle berichtet. Durch Setzen des Wertes für die Nachkommastellen kann die Anzahl der bei der Ausgabe verwendten Dezimalstellen bestimmt werden.
+
Unless otherwise defined numbers are reported with one decimal. By specifying a value for "decimals" you can determine resolution of presented values.
  
Wenn die Variable einen Zeichenkette anstelle einer Zahl zurückliefert - wie beispielsweise bei Zeitstempeln -, dann hat die "Nachkommastellen"-Definition eine andere Form und Bedeutung. Die Angabe enthält dann zwei Positionszeichen, die die Start- und eine Endeposition des herausuzulösenden Sub-Strings bezeichnen. Die Positionszeichen sind Kleinbuchstaben. Der erste gibt die Startposition an. "a" steht für das erste Zeichen der Zeichenkette, "b" für das zweite, etc. Das zweite Positionszeichen hat dieselbe Form und gibt das letzte Zeichen der herauszulösdenden Zeichenkette an. Beispiel: Aus dem Zeitstempel "20130303121055" werde mit den Positionszeichen ".ad" die ersten vier Zeichen selektiert. Wenn man die zeit der tiefsten Außentempratur des heutigen Tages erhalten möchte, kann man das Template <font face="Courier"><span style="background-color:lightgrey;">[th0temp-dmintime.ij:--]:[th0temp-dmintime.kl:--]</span></font face> verwenden. "ij" selektieren den Stundenwert an Position 9-10 und "kl" den Minutenwert an Position 11-12 des Zeitstempels.
+
When variable returns a string instead of a number (in case of a timestamp for example), "decimal" specification does have a different format and meaning, which allows to select a substring. Specification of the substring consists of two lower-case letters. The first one specifies start point of the substring, second leter the position of last character of the string to be reported. For example, when string is timestamp "20130303121055" a specification of ".ad" selects a substring from first character (position code "a") until fourth character (position code "d"). When you want to grab the time for lowest outdoor temperature of today the template for that will be <font face="Courier"><span style="background-color:lightgrey;">[th0temp-dmintime.ij:--]:[th0temp-dmintime.kl:--]</span></font face>. "ij" selects the hour part at position 9-10 and "kl" selects minute part at position 11-12 of the timestamp.
  
==Ersatzzeichenkette==
+
==Replacement==
Wenn eine Variable nicht definiert ist oder keinen gültigen Wert liefern kann, wird die spezifizierte Ersatzzeichenkette ausgegeben, die auch leer sein kann. Fehlt die Angabe der Ersatzzeichenkette bleibt die Variabledefinition unverändert in der Zeichenkette stehen und wird nicht ersetzt.
+
When a variable is not defined or there is no data for a specified sensor, information specified as "replacement" string will be represented instead.
  
==Beispiele==
+
==Examples==
Anbei ein paar Beispiele, die helfen, den Ersetzungsmechanismus besser zu verstehen.
+
Having a look at examples usually helps to understand how easy that is.
  
# Template <font face="Courier"><span style="background-color:lightgrey;">Outdoor temperature is [th0temp-act=F.1:--]°F</span></font face> wird umgewandelt in <font face="Courier"><span style="background-color:lightgrey;">Outdoor temperature is 3.4°F</span></font face>, wenn keine Außentemperatur vorliegt erscheint <font face="Courier"><span style="background-color:lightgrey;">Outdoor temperature is --°F</span></font face>.
+
# Template <font face="Courier"><span style="background-color:lightgrey;">Outdoor temperature is [th0temp-act=F.1:--]°F</span></font face> will be converted into <font face="Courier"><span style="background-color:lightgrey;">Outdoor temperature is 3.4°F</span></font face> when there is outdoor temp data and into <font face="Courier"><span style="background-color:lightgrey;">Outdoor temperature is --°F</span></font face> if outdoor temp sensor does not provide recent data.
# Template <font face="Courier"><span style="background-color:lightgrey;">Local time is [hh]:[mm]</span></font face> wird umgewandelt in <font face="Courier"><span style="background-color:lightgrey;">Local time is 09:27</span></font face>.
+
# Template <font face="Courier"><span style="background-color:lightgrey;">Local time is [hh]:[mm]</span></font face> will be converted into <font face="Courier"><span style="background-color:lightgrey;">Local time is 09:27</span></font face>.
# Template <font face="Courier"><span style="background-color:lightgrey;">Max gust in last 10 minutes was: [wind0wind-max10.1:--]m/s, [wind0wind-max10=mph.1:--]mph, [wind0wind-max10=kn.0:--]kn</span></font face> wird umgewandelt in <font face="Courier"><span style="background-color:lightgrey;">Max gust in last 10 minutes was: 10.5m/s, 23.5mph, 20kn</span></font face>.
+
# Template <font face="Courier"><span style="background-color:lightgrey;">Max gust in last 10 minutes was: [wind0wind-max10.1:--]m/s, [wind0wind-max10=mph.1:--]mph, [wind0wind-max10=kn.0:--]kn</span></font face> will be converted into <font face="Courier"><span style="background-color:lightgrey;">Max gust in last 10 minutes was: 10.5m/s, 23.5mph, 20kn</span></font face>.

Revision as of 14:37, 10 March 2013

Other languages:

Meteobridge provides a very flexible mechanism to smuggle sensor data of different kinds into strings to be used by Meteobrdge push services like Twitter, HTTP GET uploads or MSQL database insert requests.

Simply type in the text you want to upload and represent the pieces of sensor data by so called variables. When data gets uploaded, these variables will be replaced by current sensor data and so a string filled with the data you intended will be uploaded.

Each variable starts with an opening square bracket "[" and is terminated by a closing square bracket "]". The structure of the variable name between these brackets is as follows:
sensor-selector=converter.decimals:replacement

"converter", "decimals" and "replacement" can be omitted, "sensor" and "type" are mandatory. While "sensor" tells what sensor and what piece of information of the sensor to use, "selector" decides data from what time period should be taken into account and "converter" does convert data into measurement units the user likes most. "Decimals" decides about precision the result should be shown in and "replacement" gives the string to be returned when there is no data for defined sensor available.

Sensors

These sensors are defined in Meteobridge.

  • th0temp: outdoor temperature in degrees Celsius
  • th0hum: relative outdoor humidity as percentage
  • th0dew: outdoor dew point in degrees Celsius
  • thb0temp: indoor temperature in degrees Celsius
  • thb0hum: indoor humidity as percentage
  • thb0dew: indoor dewpoint in degrees Celsius
  • thb0press: station pressure in hPa
  • thb0seapress: normalized pressure (computed to sea level) in hPa
  • wind0wind: wind speed in m/s
  • wind0avgwind: average windspeed in m/s (time used for average depends on station)
  • wind0dir: wind direction in degress (0° is North)
  • wind0chill: wind chill temperature in degrees Celsius
  • rain0rate: rain rate in mm/h
  • rain0total: rain fall in mm
  • uv0index: uv index
  • sol0rad: solar radiation in W/m^2

If a sensor is not there or data of sensor has passed the "tolerated data age" interval, Meteobridge will not provide data for it and will present the value defined as "replacement". If no replacement is given, variable will not be converted into data but will stay as is.

Selectors

Sensors are followed by a selector (syntactically separated by a dash) that specifies what period in time should be used for evaluation. Valid selectors are:

  • act: most recent data
  • hmin: minimum value of this hour
  • hmax: maximum value of this hour
  • dmin: minimum value of today
  • dmax: maximum value of today
  • ydmin: minimum value of yesterday
  • ydmax: maximum value of yesterday
  • mmin: minimum value of this month
  • mmax: maximum value of this month
  • ymin: minimum value of this year
  • ymax: maximum value of this year
  • amin: minimum value of all time
  • amax: maximum value of all time
  • daysum or sumday, monthsum, yearsum, allsum, ydaysum: selects summerized delta values from today, this month, this year, all time or yesterday: "rain0total-sumday" is todays rain fall.

When you are interested in timestamps of min/max values, you can make use of these selectors:

  • hmintime: timestamp of minimum value of this hour
  • hmaxtime: timestamp of maximum value of this hour
  • dmintime: timestamp of minimum value of today
  • dmaxtime: timestamp of maximum value of today
  • ydmintime: timestamp of minimum value of yesterday
  • ydmaxtime: timestamp of maximum value of yesterday
  • mmintime: timestamp of minimum value of this month
  • mmaxtime: timestamp of maximum value of this month
  • ymintime: timestamp of minimum value of this year
  • ymaxtime: timestamp of maximum value of this year
  • amintime: timestamp of minimum value of all time
  • amaxtime: timestamp of maximum value of all time
  • starttime: timestamp of first recorded value

Timestamps are strings of format "YYYYMMDDhhmmss". Year "YYYY" is reported in 4 digits, all other values (month "MM", day "DD", hour "hh", minute "mm", second "ss") come with 2 digits, leading zeros are not supressed.

Apart from selectors that use absolute, predefined time slots there are also selectors that look for a certain amount of time into the past.

  • val2, val5, val10, val15, val30, val60: selects the value the sensor has shown 2, 5, 10, 15, 30 or 60 minutes ago
  • max2, max5, max10, max15, max30, max60: selects the maximum value from the last 2, 5, 10, 15, 30 or 60 minutes
  • min2, min5, min10, min15, min30, min60: selects the minimum value from the last 2, 5, 10, 15, 30 or 60 minutes
  • avg2, avg5, avg10, avg15, avg30, avg60: selects average value from the last 2, 5, 10, 15, 30 or 60 minutes
  • sum2, sum5, sum10, sum15, sum30, sum60: selects summerized delta values from the last 2, 5, 10, 15, 30 or 60 minutes, which is useful to get amount of total rain in a certain time frame: "rain0total-sum60" is rainfall im mm of last 60 minutes.

Converters

Sensor data is reported in ISO units (°C, hPa, mm, m/s) by default, but can be converted into non-ISO units (imperial) by adding a conversion token. Defined tokens are:

  • F converts temperature from Celsius to Fahrenheit.
  • psi converts pressure from hPa (equivalent to mbar) to psi.
  • mmHg converts pressure from hPa to millimeters of mercury.
  • inHg converts pressure from hPa to inches of mercury.
  • kmh converts wind speed from meters per second to kilometers per hour.
  • mph converts wind speed from meters per second to miles per hour.
  • kn converts wind speed from meters per second to knots.
  • bft converts wind speed from meters per second to Beaufort scale.
  • in converts millimeters to inches.
  • ft converts meters to feet.

If an unknown conversion string is used, no conversion will take place, no error message will appear.

When variable returns a timestamp, then this converter can be applied:

  • utc reports timestamp in UTC instead of localtime, which is default.

System Variables

Meteobridge provides some additional variables that tell details not directly related to weather conditions. Sensor name is "mbsystem", defined selectors are:

  • swversion: Meteobridge version string (example: "1.1")
  • buildnum: build number as integer (example: 1673)
  • platform: string that specifies hw platform (example: "TL-MR3020")
  • language: language used on Meteobridge's web interface (example: "English")
  • timezone: defined timezone (example: "Europe/Berlin")
  • latitude: latitude as float (example: 53.875120)
  • longitude: longitude as float (example: 9.885357)
  • lunarage: days passes since new moon as integer (example: 28)
  • lunarpercent: lunarphase given as percentage from 0% (new moon) to 100% (full moon)
  • lunarsegment: lunarpahse segment as integer (expample: 0)
  • daylength: length of day (example: "11:28")
  • civildaylength: alternative method for daylength computation (example: "12:38")
  • nauticaldaylength: alternative method for daylength computation (example: "14:00")
  • sunrise: time of sunrise in local time. Can be converterd to UTC by applying "=utc" to the variable (example: "06:47", resp. "05:47")
  • sunset. time of sunset in local time. Can be converterd to UTC by applying "=utc" to the variable (example: "18:15", resp. "17:15")
  • civilsunrise, civilsunset, nauticalsunrise, nauticalsunset: alternative computations for sunset and sunrise.
  • daynightflag: returns "D" when there is daylight, otherwise "N".
  • moonrise: time of moonrise in local time. Can be converterd to UTC by applying "=utc" to the variable. Please notice that not every day has a moonrise time, therefore, variable can be non-existent on certain days (example: "05:46", resp. "04:46")
  • moonset: time of moonset in local time. Can be converterd to UTC by applying "=utc" to the variable. Please notice that not every day has a moonset time, therefore, variable can be non-existent on certain days (example: "17:00", resp. "16:00")

Time/Date Variables

Variables representing current date/time don't come as "sensor-selector=converter" chains but have a distinct meaning by themselves.

Date und time variables are defined as follows:

  • YYYY: year as four digit number
  • YY: year as two digit number
  • MM: month as two digit number, if only one digit neede a zero will be used as first digit
  • M: month as one or two digit number, no leading zeros
  • DD: day of month as two digit number, if only one digit neede a zero will be used as first digit
  • D: day of month as one or two digit number, no leading zeros
  • hh: hour as two digit number, if only one digit neede a zero will be used as first digit
  • h: hour as one or two digit number, no leading zeros
  • mm: minute as two digit number, if only one digit neede a zero will be used as first digit
  • m: minute as one or two digit number, no leading zeros
  • ss: seconds as two digit number, if only one digit neede a zero will be used as first digit
  • s: seconds as one or two digit number, no leading zeros

When a capital "U" preceeds a date/time variable name, UTC is used instead of local time ("[Uhh]:[Umm]:[Uss] UTC" is evaluated to a string like "16:03:33 UTC")

Decimals

Unless otherwise defined numbers are reported with one decimal. By specifying a value for "decimals" you can determine resolution of presented values.

When variable returns a string instead of a number (in case of a timestamp for example), "decimal" specification does have a different format and meaning, which allows to select a substring. Specification of the substring consists of two lower-case letters. The first one specifies start point of the substring, second leter the position of last character of the string to be reported. For example, when string is timestamp "20130303121055" a specification of ".ad" selects a substring from first character (position code "a") until fourth character (position code "d"). When you want to grab the time for lowest outdoor temperature of today the template for that will be [th0temp-dmintime.ij:--]:[th0temp-dmintime.kl:--]. "ij" selects the hour part at position 9-10 and "kl" selects minute part at position 11-12 of the timestamp.

Replacement

When a variable is not defined or there is no data for a specified sensor, information specified as "replacement" string will be represented instead.

Examples

Having a look at examples usually helps to understand how easy that is.

  1. Template Outdoor temperature is [th0temp-act=F.1:--]°F will be converted into Outdoor temperature is 3.4°F when there is outdoor temp data and into Outdoor temperature is --°F if outdoor temp sensor does not provide recent data.
  2. Template Local time is [hh]:[mm] will be converted into Local time is 09:27.
  3. Template Max gust in last 10 minutes was: [wind0wind-max10.1:--]m/s, [wind0wind-max10=mph.1:--]mph, [wind0wind-max10=kn.0:--]kn will be converted into Max gust in last 10 minutes was: 10.5m/s, 23.5mph, 20kn.