Weather Tags for Template Files

Not all tags apply to all stations. If you ask for a weather tag that a station doesn't support the string "---" will be returned.

The format of the tag is..

<­!-- wxdata station= STATION NAME type=TAG TYPE unit=UNIT THAT APPLIES TO TAG TYPE format=FORMAT OF DATA -->

An actual example tag looks like this...

<­!-- wxdata type=otemp unit=c format="-##0.0" -->

This tag will get the outside temperature in Celsius and format the result with an optional negative sign in front of the value if the temperature is negative and with three digits before the decimal and one digit after the decimal. The "#" means to only show that digit if it is non-zero or is significant. For a more detailed description of format click here.

The "Station" section of the tag is optional and only useful if you have multiple weather stations.

Setting "Station" once applies to all tags until the station is set in a subsequent tag.

In fact putting the tag "<­!-- station="My Station" -->" at the top of the template file makes all tags  in that file get their data from the station called "My Station"

This is the complete list of tags available and the units that can be applied to them.

Everything is case insensitive and quotes arounds values are options.

Tag

Description

Valid Units

otemp

Outdoor Temperature

C F

itemp

Indoor Temperature

C F

tempe1 ... tempe9

Extra Temperature Sensors 1-9

C F

wchi

Wind Chill

C F L *

hidx

Heat Index

C F L *

ihum

Indoor Humidity


ohum

Outdoor Humidity


hume1 ... hume9

Extra Humidity Sensors 1-9


idew

Indoor Dewpoint

C F

odew

Outdoor Dewpoint

C F

dewe1 ... dewe9

Extra Dewpoint Sensors 1-9

C F

baro

Station Barometer

inHg mmHg kPa hPa mb

barosl

Sea Level Barometer

inHg mmHg kPa hPa mb

barot

Barometer Trend


wspd

Wind Speed

mph kphr kts mps

wdir

Wind Direction

D S L *

wgspd

Wind Gust Speed

mph kphr kts mps

wgdir

Wind Gust Direction

D S L *

wspdavg

Wind Speed Average

mph kphr kts mps

wpdir

Prevailing Wind Direction

D S L *

rainr

Rain Rate

in mm

raind

Rain Day

in mm

rainm

Rain Month

in mm

rainyr

Rain Year

in mm

raint

Rain Total (Since reset date)

in mm

rainrsetdt

Rain Reset Date


rainy

Rain Yesterday

in mm

rains

Storm Rain

in mm

rainsdt

Date/Time when Storm Started


etod

ETo Day

in mm

etom

ETo Month

in mm

etoy

ETo Year

in mm

templ1 ... templ4

Leaf Temp Sensor 1-4

C F

wetl1 ... wetl4

Leaf Wetness Sensor 1-4


temps1 ... temps4

Soil Temperature Sensor 1-4

C F

wets1 ... wets4

Soil Wetness Sensor 1-4


solar

Solar Radiation


uv1 ... uv3

UV Sensor 1-3


sname

Station Name


dtnow

Current Date


dtnows

Current Date - Short Format


tmnow

Current Time


tmnows

Current Time - Short Format


updt

Last Data Update Date


updts

Last Data Update Date - Short Format


uptm

Last Data Update Time


uptms

Last Data Update Time - Short Format


srisedt

Sunrise Date


ssetdt

Sunset Date


fcsticon

Forecast Icon Code


fcsttxt

Forecast Text


batt

Battery Level


battstat

Battery Status



* Wind Chill Units - WCHI and HIDX are really the same tag since you can't have a wind chill and heat index at the same time. 

The "L" for the unit stands for "Label" and when there is a wind chill the tag returns the string "Wind Chill" but if there is a heat index the tag returns the string "Heat Index".

Using the unit "L" with the wind chill tag you can craft a template that auto switchs between wind chill and heat index.

<­!-- wxdata type=wchi unit=l -->: <­!-- wxdata type="wchi" unit=f --> F

Would display...

Wind Chill: 31 F

or

Heat Index: 92 F

depending on if a Wind Chill or Heat Index were being shown.


The labels "D" "S" or "L" for wind directions stand for "Direction", "Short" and "Long"

Direction - Gives the degrees direction 0-359

Short - Gives the abbreviated closest cardinal direction to the nearest 22.5 degrees. i.e. N,NW,SSE etc...

Long - Give the full description of the closest cardinal direction to the nearest 22.5 degrees. i.e. North ,North Northwest, South Southeast etc...



All text and images copyright 2023 AfterTen Software - Terms & Conditions