Skip to content

2. System description

Peter F. Jorgensen edited this page Mar 28, 2016 · 7 revisions

The "I'm Fine" project is an IoT system, based on cheap but advanced device hardware sending and receiving messages over the Internet to a cloud based backend system. The backend system takes care of all business logic including storage and processing of device messages and sending out alerts in form of emails.

ImFine overview

The project consists of 4 parts.

  1. The "I'm Fine" button device

  2. A Cloud based backend monitor and communication system.

  3. Azure Device Explorer for IoT Hub devices Tool

  4. A Windows 10 Universal Windows Platform (UWP) application for system configuration

The "I'm Fine" button device

This part is built using the Arduino MKR1000 device, which has builtin wifi communication and security features to make a secure SSL connection to the cloud. Provided with a simple button, an LED for visual indication and a buzzer for audible indication, the extra hardware needed can hardly be more simple. The MKR1000 device can be powered by a 3.7V LiPo battery, which can be charged from the device USB connector.

ImFine device

Go to the Arduino MKR1000 device page to read more about the technical implementation of the device.

A Cloud based backend monitor and communication system.

Microsoft Azure cloud services is the heart of the system business logic, utilizing features like IoTHub, WebJob and SQL Server database.

The business logic application is programmed in C# and implemented as a traditional console application. This console application is then configured to run as a WebJob in the Azure cloud system. This makes it easy to develop, test and deploy.

Backend Console Application

Running the console application as a Azure WebJob, is almost as running a traditional Windows Service application in the background. For this to work, you must have at least a "Basic App Service Plan" and activate the "Always On" option in Azure.

Visual Studio 2015 makes it extremely easy to deploy your console application to Azure and set it up to run as a WebJob. You can also do it manually from Azure, if you prefer this - all you need is to make a ZIP compressed file containing all your application files.

Using a standard email account from Google Gmail, Emails can be sent out easily.

Go to the Azure and IoTHub page to read more about the Azure IoTHub.

Go to the ImFine C# Application page to read more about the "I'm Fine" application itself.

Azure Device Explorer for IoT Hub devices Tool

This is an application provided by Microsoft and is a great demo- and test tool for configuring your devices and test that your device can actually send and receive messages to/from your IoTHub. This Azure Device Explorer article describes in detail how to use the tool and how to configure your device. You also use this tool to get a device specific authorization token to use in your Arduino code. This is a very important feature of the system in order to POST data to your IoTHub and prevent unauthorized devices to send data to your system.

This tool is available from GitHub and you can download the source code as well as a compiled version.

In a more finished product than this competition project, your own configuration application should contain similar functionality as found in this tool as you need some way to provision and maintain devices in your Azure IoTHub. Also this tool only contains the minimum set of properties defining your device.

Using this tool instead of making my own, does not make any differences to the "ImFine" concept, as I could use this tool to get up and running (thanks Microsoft).

A Windows 10 Universal Windows Platform (UWP) application for system configuration

This application has been rescheduled and is now planned for version 2!

Comments: When I started on making this project I thought I would also have time to make my own UWP application to define and configure the devices, but alas I ran out of time!

Other functionality I should also have implemented in this UWP application, was setup/configuration of names and address data for the users of the "ImFine device". The database should hold information regarding how often the user should press the device button to report back to the backend in order to prevent sending alert emails to other people.

There is a set of features missing to make this look like a finished product which is flexible and easy to use for setting up new devices and defining the business rules on how the system must handle messages (both existing and missing).