Introduction: EcoEdison

In this project, made on São Paulo Intel IoT Roadshow we wanted to port an already operational monitoring app base on Arduino platform and DHT22 temperature and humidity sensors to the Edison platform.

The objective is to monitor data from a sensor installed on a Edison board on the Zabbix Server frontend and to gain all the functionalities offered by this monitoring management opensource solution.

Email alerting when an previously defined threshold is reached is one of them, such as as temperature increase or if the Edison stopped to responde to the server.

Normally the IoT apps are more a "personal" kind of control of physical variables.

I'd like to use Zabbix to use the app on a "enterprise" mode of operation.

You will need:

  1. Zabbix monitoring software installed on a server ( could be a desktop or notebook ).
  2. Edison and the arduino breakout board.
  3. Sensors for temperature and/or other physical variables.

We divided the work on 3 phases:

Configuring the Zabbix server - locallly or on the cloud. We used the local version.

Configuring the Edison board using the Arduino IDE and

Monitoring the data on the Zabbix.

You should have basic knwoledge of Linux, Debian or RPM based and shell script as well. We use a samll web server base on Node. js on Edison as part of our solution.

Step 1: Install Zabbix Server

Install the Zabbix software on a computer you use. I installed on a notebook with an Linux OS, OpenSuse version 13.2.

The version used was the one available on the oficial Zabbix site, at here

You have to install the Apache web server along MySql database and PHP scripting language.

You can use the instructions on Zabbix manual page, found at the site, under the documentation tab.

Step 2: Zabbix Installed on the Notebook

After all dependencies were installed you should have this page.

In the installation process you created a user and a password. Use this to conect to the Zabbix frontend.

This concluded the first phase of our tutorial,

Next phase is putting the Edison board to work with the Arduino IDE.

Step 3: Installing Edison

Mount the Edison on the Arduino breakout expansion board as shown in the first picture.

I have a hard time for my Linux OS to recognize the Edison using the original USB mini cables.

The solution was to use a USB Hub between the note and the Edison board. This trick worked!

I followed the instructions at the Intel IoT developers site, Edison Install Start Page.

Along with Edison several sensors came on the Groove Sensor Kit.

Step 4: Installing Arduino IDE on the Notebook

Install the Arduino IDE:

Get the latest version on the Arduino site, here.

Choose the IDE according your environment.

Once installed you should have this page.

Step 5: Getting Temperature on Edison

After Edison and the IDE were installed it is time to create a sketch and to get some temperature measures from the sensor received on the kit.

Before use the board you have to install the Arduino Sensor Shield. Install it folowing the pinout and the correct location. Look at the figure above.

With the shield installed plug the temperature sensor on the analogue input A0 located at the shield.

Step 6: Programming the Temperature Readings on Arduino IDE

The sketches used to get the temperature reading were divided on 2 figures, one above.

Step 7: Programming - Part 2

Above is the second part of the sketch.

Step 8: Temperature on Way...

The figure shows the serial monitor from the Edison board with the temperature readings.

Step 9: Creating a Host on Zabbix

Last phase: Configure the sensors in Edison on Zabbix frontend.

The first step to monitor something on Zabbix is to create a host, or a computer.

I created a class of host called Edison Sensors.

Step 10: Creating an Item on Zabbix

After creating an host, we should create an item on it.

For Zabbix an item is something you want to monitor, in our case the temperature of the sensor.

Step 11: Edison Send the Temperature to a Webpage

In order to get this value, we should use a different approach:
On Edison we created a simple server using the node.js framework and started to upload the temperature on a web page using a local ip number. One way to get this value from Zabbix is to use a kind of item calles "external monitoring". We created a shell script that gets this value and register on Zabbix.

Step 12: Script to Get the Temp From the Webpage

This script gets the temp from tem webpage server on Edison.

We put this script to run on the cron system, on time every minute.

Step 13: Scritp to Get the Value of Temp

With this script we get only the value we want.

We use this script on Zabbix to get the correct value.

Step 14: The Temperature Monitored on Zabbix

The result is this page.

We can define a threshold on Zabbix and to fire a trigger, if this limit is reached.

Step 15: Alerting the Admin by Email

An alert by email is one of the ways to call for action from the admins.

Besides the temperature we also monitored other variables on Edison such as the ICMP ping response time and the HTTP service.

That's it.


Carlos Fabbri Jr

Guilherme de Carvalho Pereira

Leandro Camara Ledel

Fábio Larrea Kalaf