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
| Part | In the full installation |
|---|---|
| Site | Farm (asset kind Site) |
| Regions | Greenhouse, Orchard and Storage hall (kind Region) under the farm. Each region has the attribute floorPlan with the address of its plan image. |
| Devices | Five 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
| Key | Label | Unit |
|---|---|---|
air_temp | Temperature | °C |
air_hum | Humidity | % |
battery | Battery | % |
plan_x, plan_y | Plan position x, y | px |
lat, lng | Latitude, Longitude |
Profile: Sensor regions · Weather station
| Key | Label | Unit |
|---|---|---|
air_temp | Temperature | °C |
air_hum | Humidity | % |
acc_rainfall | Rainfall | mm |
pressure | Pressure | hPa |
light | Light | lx |
wind_dir | Wind direction | ° |
wind_speed | Wind speed | m/s |
lat, lng | Latitude, Longitude |
The limit attributes
Every sensor and the weather station have six limits as server attributes:
| Attribute | Default | Meaning |
|---|---|---|
maxTempThreshold | 32 | Critical above |
minTempThreshold | 4 | Critical below |
warnTempThreshold | 27 | Warning above, up to the maximum |
maxHumThreshold | 88 | Critical above |
minHumThreshold | 30 | Critical below |
warnHumThreshold | 78 | Warning 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.
| Type | Severity | Condition | Debounce | Hysteresis |
|---|---|---|---|---|
high_temperature | Critical | air_temp > maxTempThreshold | 2 readings to raise, 2 to clear | 0.5 |
low_temperature | Critical | air_temp < minTempThreshold | 2 / 2 | 0.5 |
high_humidity | Critical | air_hum > maxHumThreshold | 2 / 2 | 2 |
low_humidity | Critical | air_hum < minHumThreshold | 2 / 2 | 2 |
temperature_warning | Warning | air_temp > warnTempThreshold and ≤ maxTempThreshold | 2 / 2 | |
humidity_warning | Warning | air_hum > warnHumThreshold and ≤ maxHumThreshold | 2 / 2 | |
battery_low (sensor) | Warning | battery < 20 % | 1 / 1 | 2 |
device_offline | Warning | No 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.
| Page | Cards |
|---|---|
| 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 |
| Alarms | Alarms 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
| Colour | Meaning |
|---|---|
| Red | The device has an open Critical or Major alarm |
| Amber | It has another open alarm |
| Grey | It is offline |
| Green | No 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.
| What | Where it comes from |
|---|---|
| The image | The 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 position | The 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:
- Prepare the plan image at 1,200 × 800 pixels (or scale your coordinates to that size) and set its address as the region’s
floorPlanattribute on Sites & Assets. - Give each sensor its position as two server attributes, for example
planXandplanY. - 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_xandplan_y(target undermsg.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
| Need | Status |
|---|---|
| An alarm count per region in the regions table | Not available: open a region to see its alarms, or read the map |
| A form on the board to edit a sensor’s limits | Not available: use the Attributes tab or the API |
| Default limits for a sensor that has none | Not available: a sensor without a limit is not checked for it. Set the attributes when you add sensors. |
| Hiding spare sensors on the board | Every device placed in a region is shown. Move spare sensors out of the region. |

