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

Sensor regions

The sensor regions solution – sensor and weather station keys, the six limit attributes, critical and warning rules, the floor plan and every board page.

The sensor regions solution watches temperature and humidity sensors spread over the regions of a site, for example the greenhouse, orchard and cold store of a farm. Each sensor has its own limits; each region has a floor plan with its sensors on it, coloured by their alarm state. One weather station completes the picture.

The model

PartIn the full installation
SiteFarm (asset kind Site)
RegionsGreenhouse, Orchard and Storage hall (kind Region) under the farm. Each region has the attribute floorPlan with the address of its plan image.
DevicesFive sensors per region, placed in their region, and one weather station placed in the orchard

The weather station is recognised on the board by its label, Weather station: its rows and markers open the Weather page instead of the Sensor page. Give your own station that label.

Profile: Sensor regions · Sensor

KeyLabelUnit
air_tempTemperature°C
air_humHumidity%
batteryBattery%
plan_x, plan_yPlan position x, ypx
lat, lngLatitude, Longitude

Profile: Sensor regions · Weather station

KeyLabelUnit
air_tempTemperature°C
air_humHumidity%
acc_rainfallRainfallmm
pressurePressurehPa
lightLightlx
wind_dirWind direction°
wind_speedWind speedm/s
lat, lngLatitude, Longitude

The limit attributes

Every sensor and the weather station have six limits as server attributes:

AttributeDefaultMeaning
maxTempThreshold32Critical above
minTempThreshold4Critical below
warnTempThreshold27Warning above, up to the maximum
maxHumThreshold88Critical above
minHumThreshold30Critical below
warnHumThreshold78Warning above, up to the maximum

In the full installation each region’s sensors get their own warning temperature (24 °C in the greenhouse, 26 °C in the orchard) and the storage hall’s sensors are set as a cold room (maximum 8 °C, minimum 0 °C, humidity 40 to 95 %).

A device without one of these attributes is not checked by the rule that reads it. Change limits on the device’s Attributes tab, or write them from another system with the attributes API (POST …/attributes/server); see Telemetry and attributes API.

Alarm rules

Both profiles have the threshold rules; the sensor also has the battery rule.

TypeSeverityConditionDebounceHysteresis
high_temperatureCriticalair_temp > maxTempThreshold2 readings to raise, 2 to clear0.5
low_temperatureCriticalair_temp < minTempThreshold2 / 20.5
high_humidityCriticalair_hum > maxHumThreshold2 / 22
low_humidityCriticalair_hum < minHumThreshold2 / 22
temperature_warningWarningair_temp > warnTempThreshold and ≤ maxTempThreshold2 / 2
humidity_warningWarningair_hum > warnHumThreshold and ≤ maxHumThreshold2 / 2
battery_low (sensor)Warningbattery < 20 %1 / 12
device_offlineWarningNo message for 1,800 seconds (30 minutes)

Each rule opens and clears on its own. A sensor above its maximum has a Critical high_temperature alarm; the warning band ends at the maximum, so the temperature_warning alarm clears after two readings above the maximum, while the critical one stays open. For the design of such bands see Alarm rule cookbook.

The board

The board Sensor regions opens on the last day.

PageCards
Regions (main)Regions table: the regions A to Z with their sensor count, ten a page; a row opens the region. Sensors on the map: every sensor and the station, named by label and coloured by alarm state. Alarm count: the open alarms of the board’s devices, with an All alarms button. Weather station: its latest readings. Active alarms
AlarmsAlarms of the sensors: the open alarms of every device, newest first, ten a page, search, export; a row or its Open button opens the alarm’s page
Region (hidden)Region record (name, code, sensor count, use); Sensors of the region with online dot, temperature, humidity and battery; Floor plan; Alarms of this region
Sensor (hidden)Temperature and Humidity with their lines; Alarm state; Battery (red below 25 %, amber below 50 %); Temperature and humidity on two axes; Alarms of this sensor; Readings
Weather (hidden)The station’s readings with their lines, Wind on the compass, Temperature, humidity and rain, Alarms of the station, its readings

Colours on the maps and the floor plan

ColourMeaning
RedThe device has an open Critical or Major alarm
AmberIt has another open alarm
GreyIt is offline
GreenNo open alarm

The Alarm state tile of a sensor shows the worst of its open alarms: Alarm, Warning, Notice or Normal.

These colours come from compute scripts on the board. A board made from the template, or an organisation without alarms, colours the map by temperature instead: Cold below 4 °C, Normal 4 to 27 °C, Hot above 27 °C.

The floor plan

The Floor plan card of a region page draws the region’s plan image and places each sensor on it.

WhatWhere it comes from
The imageThe region asset’s attribute floorPlan: an internal path or an https address of the image. Without it, a sample plan is shown.
A sensor’s positionThe latest values of the sensor’s telemetry keys plan_x and plan_y, in pixels from the top-left corner of a 1,200 × 800 plan

Most real sensors do not send plan_x and plan_y. To place them:

  1. Prepare the plan image at 1,200 × 800 pixels (or scale your coordinates to that size) and set its address as the region’s floorPlan attribute on Sites & Assets.
  2. Give each sensor its position as two server attributes, for example planX and planY.
  3. In the sensor profile’s root flow, before Save telemetry, add a Device details block that reads those two attributes and writes them into the message as plan_x and plan_y (target under msg.payload). See IoT data blocks.

Each stored message then carries the position too, which adds two data points per message. Markers cannot be dragged on the plan.

Notifications

The flow Sensor regions: alarm notifications tells the Admin role when an alarm of a sensor or the weather station opens or clears. It is stored switched off: turn it on in Automation. The role is reached in the app, by push where set up and in linked chat apps, not by e-mail or SMS; add address or phone rows for those. See Flow templates.

Known limits

NeedStatus
An alarm count per region in the regions tableNot available: open a region to see its alarms, or read the map
A form on the board to edit a sensor’s limitsNot available: use the Attributes tab or the API
Default limits for a sensor that has noneNot available: a sensor without a limit is not checked for it. Set the attributes when you add sensors.
Hiding spare sensors on the boardEvery device placed in a region is shown. Move spare sensors out of the region.