For large fixed-position based fleet owners, monitoring all the devices becomes a heavy operational task. While the Events engine is built to alert when unusual conditions are met on a per device basis, it is also important to, at a glance, know if your fleet’s health is within accepted boundaries. This is what the Map widget’s zones are for: plot colorful zones that join together a group of devices (or all of them), perform aggregations across the last value of a variable in the devices, and respond to a color logic based on those aggregation results.
Requirements
An active Ubidots account.
1. What are zones?
A zone is a defined area within the map that visually encloses the devices in a Marker group. Zones act as second layer that sits on top the map, they can have a fixed color or color-react based on either a fixed variable value or a Zone metric, compute Metrics across variables in the Marker group’s devices or even act upon Actions such click or double click, giving you not only visual feedback about your fleet, but also allowing you to interact with the widget.
Follow on to the below sections to learn how to set up a Marker group’s Zone, its metrics, color and actions.
2. Setting up a zone
To find the Zones settings modal and set it up, follow these steps:
Step 1: Create or Edit a Map widget as described here.
Step 2: Create or edit a Marker group. You’ll need at least to have selected the devices of the marker group.
Step 3: Click on the Marker group’s Zone option. A new modal window will open.
When the modal opens, you’ll be prompted to allow the browser to access your location, it is recommendable to accept it so it centers the map in your current position. By default, it will also open in the Settings tab which contains the map where the zone is to be drawn. For guiding reference, the Map in that view will load the devices in the Marker group, easing the drawing process of the zone around the devices.
To draw the Zone, you have 2 options: polygon o centered-circle.
2.1. Polygon: A collection of points forming a closed area
2.2. Centered-circle:
At this point you can either save the zone, and see it reflected on the map itself, or continue configuring the other tabs: Metrics, color, and actions.
3. Zone Metrics
Metrics is the next tab in the Map zones modal after the basic and mandatory configurations at the Setting tab. Metrics allow you to compute aggregated values based on a fixed variable or on one common to all devices in the Marker group.
To set up Metrics, follow theses steps:
Step 1: Click on Add Metric.
Step 2: Name the Metric in the Display name field.
Step 3: Select the Source type, and fill the option based on the below table The options are:
Source type | Device label | Variable label | Aggregation |
Marker Group | NA | Variable label common to all the devices in the Marker group from which data will be retrieve to compute the aggregated value for the Metric. | Average, Minimum, Maximum, Sum or Count of the Last values of the variable label common to all devices in the Marker group. For the time being, the Metrics value aggregation for Marker Group won’t respond to the selected date time range in the dashboard. |
Single Device | Fixed device |
|
|
Marker Group [default]: It will use all the devices in the Marker group to compute the metric.
Single device: The Metric will be computed put of a fixed device and variable
Step 4: Based on the selection in Step 3:
Marker Group: Enter the Variable label common to all the devices in the Marker group from which data will be retrieve to compute the aggregated value for the Metric.
Single device: Enter the fixed Device and Variable label from which data will be retrieve to compute the aggregated value for the Metric.
Step 5: Select the aggregation to perform over the data as instructed by the previous selections:
Marker Group: Average, Min, Max, Sum or Count of the Last values of the variable label common to all devices in the Marker group. For the time being, the Metrics value aggregation for Marker Group won’t respond to the selected date time range in the dashboard.
Single Device: Last value, Average, Min, Max, Sum or Count of the fixed Device and Variable over the span selected in the dashboard date time picker.
4. Zone Color
The Zone can operate in 2 different color modes: Set by zone or Color logic. To set this up, go to the Color tab and follow these steps:
Step 1: Select the Color mode to Set by zone or Color logic.
Step 2: Based on the selection in the Step 1:
– Set by zone: Fixed Color and opacity for the Zone.
– Color logic: range of values mapped to specific colors. By default, the input value for the Color logic is that of the first Metric in the list.
NOTE: the left text field in the first row and the right text field in the last row can left empty to denote minus infinite and plus infinite, respectively.
5. Zone Actions
There are 4 different types of Actions triggers:
On load
On hover
On click
On Double click
All of them can render any of the below Actions:
– Do nothing [default]: the Action trigger won’t have any affect
– Display metrics: it will open a pop-up in the dashboard showing the Metric configured for the Zone.
– Go to Device: it will ask you to enter the Device label to where you want to be redirected upon executing the Action trigger.
– Go to Dashboard: it will ask you to enter the Dashboard to which you want to be redirected upon executing the Action trigger.