New: the AI firewall watches every module and explains each incident in plain words. See how it works

Weather stations

The weather stations solution – station keys and units, the offline rule, the Stations and Station pages, month-so-far cards and the rain counter reset.

The weather stations solution shows a network of automatic weather stations on a map and in a table, and gives each station a page with its month-so-far readings, the wind on a compass, its raw readings and a button that resets the rain counter. It is the simplest of the five solutions: one profile, two pages and one alarm rule.

The model

PartIn the full installation
NetworkWeather network (asset kind Area)
DevicesEight stations, each placed in the network, each with a fixed position

Profile: Weather stations · Station

Each station reports the average, minimum and maximum of its reporting period for wind, and the current values for the rest.

KeyLabelUnitRange
air_tempAir temperature°C−20 to 50
air_humAir humidity%0 to 100
baro_pressurePressurehPa950 to 1,050
rain_intensityRain intensitymm/h0 to 50
acc_rainfallAccumulated rainmm0 to 400
wind_speed_avgWind speed (average)m/s0 to 40
wind_speed_minWind speed (minimum)m/s0 to 40
wind_speed_maxWind speed (gust)m/s0 to 60
wind_dir_avgWind direction (average)°0 to 360
wind_dir_minWind direction (minimum)°0 to 360
wind_dir_maxWind direction (maximum)°0 to 360
rain_resetReset the rain counterThe time the counter was last reset
lat, lngLatitude, Longitude

Units, decimals and ranges come from the profile’s telemetry keys, not from the cards. A station that reports other units (for example pressure in pascals or speeds in mm/s) should be converted once in the profile’s root flow, not card by card. See Derived values.

Alarm rule: one, device_offline (“name stopped reporting”), Warning, after 3,600 seconds (one hour) without a message. Add threshold rules yourself if you need them, for example a gust warning on wind_speed_max; see Alarm rules on device profiles.

Command: Reset the rain counter (method scada.set_value, tier Basic). It zeroes the station’s accumulated rain and rain duration counters, which cannot be restored. The station answers and reports the time of the reset in rain_reset.

The readings are stored by your organisation’s default root flow. The solution has no flow of its own.

The board

The board Weather stations opens on the last day.

Stations (main page)

CardShows
StationsStation, temperature, humidity, wind, rain total and last reading. Sorted A to Z, ten a page, search, columns, export. A row or its Open button opens the station.
Stations on the mapEach station coloured by temperature: Cold below 5 °C, Mild 5 to 30 °C, Hot above 30 °C. A marker opens the station.

Station (hidden page)

CardShows
Eight “this month so far” cardsAir humidity, Wind speed (average), Air temperature, Pressure, Wind speed (gust) (green to 10.8 m/s, amber to 17.2, red above), Wind speed (minimum), Rain intensity, Accumulated rain. Each shows the line of the readings’ averages since the start of the month, the latest average, its change and when it was updated.
Wind directionThe compass symbol on the average direction, with the average speed
Wind direction rangeAverage, minimum and maximum direction
Reset the rain counterThe reset button
Last reset“Rain counter last reset”: the time the station reported in rain_reset
ReadingsThe station’s readings over the board window: a row per time stamp, newest first, ten a page, search, columns, export
Alarms of this stationThe station’s alarms

The month-so-far cards read hourly figures, because a month is longer than the raw window. A card keeps its newest 500 points; its span text says which period it covers. See Aggregates and rollups.

The readings table turns the series into rows with a compute script and keeps at most 2,000 rows, newest first. For a longer export use the history API; see Exporting data.

Reset the rain counter

  1. Open the station’s page.
  2. Select Reset the rain counter.
  3. Confirm: “Reset the accumulated rain of this station? It cannot be restored.” Select Reset.

The board says Reset sent to the station once the command is queued, or The reset did not reach the station with the reason. An offline station fails at once: the command is not kept for later. When the station has done it, Last reset shows the new time.

Who may press it is decided by the basic command permission (iot_rpc.send.basic, User by default). To keep viewers from resetting, give them a group without that permission. See Groups and permissions.

What to check with your own stations

CheckWhy
Your stations send the keys above, in these unitsThe cards and the map read these exact keys
A station sends lat and lng once, or you set themWithout a position it is not on the map
Your station understands scada.set_value with key: rain_resetOtherwise the reset button cannot work: change the command to one your station knows, or remove the button
Text in a key (for example a direction as "SW")Text has no chart history; send degrees. See Numbers, text and true/false values