FEATURED

The How To Series: Monitoring Weatherproof Enclosures

blog

The Esprida IoT platform lets companies monitor electronic and mechanical devices using embedded boards, sensors, and a dashboard.  These network-connected, IoT devices transmit information about their health (e.g., temperature, vibration), metrics unique to the application (e.g., humidity, screen brightness, air quality) to the Esprida dashboard (called Esprida LiveControl), and engage with the customer’s back end application (e.g., air quality monitoring, preventive maintenance, kiosk, or digital signage).

Here we explain how all of this works.  In this example, we use the BeagleBone embedded board (computer) with plugin-in sensors from AdaFruit and Esprida.   This example is an electronic device housed in an outdoor enclosure.  It could be any kind of electronic device.

In summary, we cover:

Part One: The Tools
Requirements for Monitoring Electronics in an Outdoor Enclosure
Embedded Boards
Plugin-in Sensors
Esprida LiveControl Dashboard
Part Two: The Technique
Install Esprida Agent on BeagleBone
Configure the Sensor XML File
Configure Rules
Summary

Part One: The Tools

In part one of this two part document we explain the components needed to make this monitoring work.  In part two. we explain how the user does the configuration and installation.

Requirements for Monitoring Electronics in an Outdoor Enclosure

Digital signage, preventive maintenance sensors, scientific and agricultural monitoring stations, and other electronics have special requirements for monitoring when they are deployed outdoors.

The items to monitor depend on what the device is intended to do.  For example, if it is station that monitors air quality it is necessary to ensure that the ozone, particulate matter, and other sensors are working and identify when re-calibration is needed.  If the device is a digital sign, such as display at an outdoor subway platform, then it is necessary to make sure that the screen remains bright and crisp.  In both cases, these devices are also computers, so it is also necessary to use monitoring to make sure that their basic computing functions are working within tolerances, e.g., , network latency, etc.

The harsh climate in which outdoor electronic devices are deployed subjects them to unique problems. So, considering the impact of weather, what the device is used for, and its basic function as a computer, some items that need to be monitored and things that can go wrong include:

  • The computer runs out of memory or disk space or the CPU is spiked.
  • Humidity and salt water spray corrode components
  • For an airtight enclosure, the difference between external and internal air pressure can cause a seal to fail thus letting in rain
  • The battery runs down
  • Someone/something bumps the device
  • Condensation builds up

To monitor these metrics, in the case of Esprida, the user sets the sensor alarm levels in XML configuration files and configures notifications rules.  These drive the data shown on the dashboard. The dashboard lets the user drill down into the status of devices, gather diagnostic information, view historical data, reboot the device, take it offline, or determine that a technician needs to go service the device.

Below we discuss the hardware needed to make this work and how to configure sensor settings and notification rules with Esprida.

Embedded Boards

blog 2

In order for the IoT device gather data, it needs to have an onboard computer, network connection, and sensors.  To do that at the minimum cost, without requiring custom engineering, the customer installs an embedded board into their device and plugs in required sensors.  Then they connect that device to either a wireless, wired, or cellular network.

Embedded boards are low cost (< $55) boards such as the Raspberry Pi or BeagleBone.  The BeagleBone, first developed by Texas Instruments, uses the open-source BeagleBoard hardware standard. It is powered by the Debian Linux distribution.  The customer plugs in the sensors they require for their IoT application, e.g., temperature, accelerometer, magnetometer, and installs the Esprida agent software.

Below is a picture of the BeagleBone. This one has an Ethernet adapter.

Here is the BeagleBone M2M Cape, which has a cellular modem.

Plugin-in Sensors

The customer picks the sensors they need and plugs them into the BeagleBone or has the manufacturer do that if the device is built to customer specifications.  This plug-and-play approach does away with the need for any custom electrical engineering.

Some of the available sensors include

blog 3

Esprida LiveControl Dashboard

The Dashboard provides a geographical view of devices with a color-coded status.  The color is correlated to temperature, voltage, brightness of the display, or any combination of metrics that would indicate device status as measured against set thresholds.  The user clicks
on the icon to read the current and historical device metrics and do diagnostics and maintenance.

blog 4

The example below is taking from a digital signage application.  The device shown below has several problems:  a cooling fan is not working, and, because of that, the device is running hot.

blog 5

Part Two: The Technique

Here we explain how to install the Esprida agent, configure rules, and connect the device to the LiveControl platform.

Install Esprida Agent on BeagleBone

To connect the device to the Esprida LiveControl dashboard, the user installs an agent on the BeagleBone then registers the device with LiveControl.

Here is the software download screen.  The BeagleBone CPU is 32 bit and runs Linux.  So it is necessary to download the 32 bit Linux Esprida Agent for Linux.

blog 6

The user executes these two commands to install the agent:

Chmod + Esprida_LiveControl_Agent_Linux64_7_6_3_LA_HF9.bin

./Esprida_LiveControl_Agent_Linux64_7_6_3_LA_HF9.bin

Then follow the default steps to assign a unique identifier to the agent (device) and register it with the Esprida LiveControl platform .  The customer provides a unique identifier for the unit, a server URL at livecontrol.esprida.com, and an organization code (company-name).

Configure the Sensor XML File

The customer installs RS232 sensor libraries.  These are pre-programmed to communicate with sensors and parse sensor data, which is in XML format.  The customer picks the metrics they want to monitor and sets the thresholds by modifying the log-configuration.xml config file.

The user configures polling and scanning frequency and sets the threshold for normal, warning, or error.  That causes the sensor to show up on the color coded dashboard with either a green, yellow, or red icon to provide a high-level view of the device’s health.  The user clicks on the icons to see the metadata returned by the device.

Here is an example configuration file:

 <?xml version=”1.0″ encoding=”utf-8″ standalone=”yes”?>

<components>

            <component logColumnName=”external-temp”

                    columnDataType=”com.esprida.monitor.configuration.columndatatype.regexp.RegExpColumnDataType”

                        code=”comp.rs232.external-temp”>

                        <!– NORMAL state when temperature is between 20-59 degrees–>

                        <state

                                 threshold=”[2-5]?”

                                    code=”comp.rs232.display.state.normal”>

                                    <parameter value=”${voltage}” code=”Voltage” />

                                    <parameter value=”${screen-mute} ” code=”Screen.Mute” />

                        </state>

                        <!– WARNING above state when temperature is above 60 degrees–>

                        <state

                                    threshold=”[6-7]?”

                                    code=”comp.rs232.display.state.warning”>

                                    <parameter value=”${voltage}” code=”Voltage” />

                                    <parameter value=”${screen-status} ” code=”Screen.Status” />

                        </state>

                        <!– CRITICAL above state when temperature is above 80 degrees–>

                        <state

                                    threshold=”[8-9]1?”

                                    code=”comp.rs232.display.state.critical”>

                                    <parameter value=”${voltage}” code=”Voltage” />

                                    <parameter value=”${screen-status} ” code=”Screen.Status” />

                        </state>

            </component>

</components>

The parse maps sensor data to a column (field).  The general format of the XML file is:

\components\component\@logColumnName Indicates the metric.  In this example, it is temperature.
\components\component\state@threshold This is an integer or regular expression that establishes the threshold. In this example, the regular expression sets the threshold for normal as the values 2 to 5.
\components\component\state This is the device state metadata.  The value captured in this example is voltage and temperature.  There can be multiple metrics captured here.

Configure Rules

The user configures rules using a graphical interface in the LiveControl dashboard. Rules determine where to send notifications and when.  Rules fire when a metric exceeds the threshold.  Rules include the duration as well. For example, a rule can fire if the temperature exceeds 50C ° for 1 hour.  The system escalates the problem up the chain until someone clicks on the notification thus taking ownership of that. Escalation rules ensures that someone responds to the issue in time to help maintain SLAs.

Below are some example maintenance and error-handling rules.

blog 7Summary

The IoT device and Esprida Live Control does not exist only to monitor itself.  The device, after all, exists to support some function, like checking air quality in an industrial setting or working as a digital sign.  The sensors gather metrics such as those used in preventive maintenance or any other kind of application, like a kiosk, and to monitor the device itself.  The IoT device also communicates with a backend application. This typically uses a REST API and web services to upload and download information and run transactions over the internet.  Those business applications are typically hosting with a cloud service like Rackspace.