Templates/de
<languages />
Meteobridge stellt einen sehr flexiblen Ersetzungsmechanismus zur Verfügung, mit dem definierte Variable durch konkrete Sensorwerte ersetzt werden. Dies erlaubt in beliebigen Zeichenketten Meteobridge Variable "einzuschmuggeln", seien es E-Mail, HTML-Seiten, Alarmbedingungen, etc.
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.
Sensor-Selektor=Konverter.Dezimalstellen:Ersatzzeichenkette
"Konverter", "Dezimalstellen" und "Ersatzzeichenkette" kann weggelassen werden, "Sensor" und "Selektor" müssen angegeben werden. 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.
Sensoren
Diese Sensoren sind in Meteobridge definiert:
- th0temp: Außentemperatur in Grad Celsius
- th0hum: Relative Außenluftfeuchte in Prozent
- th0dew: Außentaupunkttemperatur in Grad Celsius
- thb0temp: Innentemperatur in Grad Celsius
- thb0hum: Innenluftfeuchte in Prozent
- thb0dew: Innentaupunkttemperatur in Grad Celsius
- thb0press: Stationsluftdruck in hPa
- thb0seapress: auf Meeresspiegelhöhe berechneter Luftdruck in hPa
- wind0wind: ungemittelte Windgeschindigkeit in m/s
- wind0avgwind: gemittelte Windgeschindigkeit in m/s
- wind0dir: Windrichtung in Grad (0° ist Norden)
- wind0chill: Windchill-Temperatur in Grad Celsius
- rain0rate: Regenrate in mm/h
- rain0total: gefallene Regenmenge in mm
- uv0index: UV-Index
- sol0rad: Solarstrahlung in W/m^2
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.
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
- hmin: minimum value of this year
- hmax: maximum value of this year
- hmin: minimum value of all time
- hmax: maximum value of all time
- daysum, monthsum, yearsum, allsum, ydaysum: selects summerized delta values from today, this month, this year, all time or yesterday: "rain0total-sumday" is todays rain fall.
Apart from selectors that use absolute, predefined time slots there are also selectors that look for a certain amount of time into the past.
- 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.
If an unknown conversion string is used, no conversion will take place, no error message will appear.
Special Variables
There are a couple of variables that 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.
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.
- 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.
- Template Local time is [hh]:[mm] will be converted into 09:27.
- 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.