IoT System consists of multiple devices and we expect each of them to work flawlessly. There are many reasons why the service might not work in such complex environment. Starting from physical damage of the device, power outage, up to network failure or software bug. Whatever the issue is, we want to be aware of it as soon as possible.
To achieve this, we must constantly monitor all devices that create the whole IoT system – IoT Gateways, sensors, applications, network devices, etc. This can be performed on multiple levels. We should always start from the bottom – from simple network tests, as ping or nmap, which can detect that device is offline. Then, having connectivity, we can check if the required applications are up and running. This can be achieved using any implemented rest API. Sending simple get request, we can get information about applications health, versions or state. All these tasks can be easily orchestrated by Jenkins, which can forward logs to Elastic Stack, where results can be gathered and visualized.
In the attached video presentation during Poznan SysOps/DevOps Meetup [1] I talk about how we managed to achieve efficient way of monitoring 500 devices in our deployed IoT System in smart dormitory. SysOps/DevOps Poland is the largest IT admins community in Poland, which organizes Meetups, takes part in conferences and provides training.
Another aspect of IoT system is efficient management. During my speech I divided it into two groups – device parameters tweaking and software updates. Both tasks in our case are orchestrated using Jenkins. We can send API requests to multiple devices at once and track progress and outputs in one place. On the other hand, the software updates, are based on docker images and docker repository. On each git tag push, Jenkins job is executed. This job performs docker build and pushes new image to our docker repository. This software is ready to be pushed to development IoT devices, which are used to test new version of software. When software tests are passed, and the release is manually accepted, all production devices can pull new version of containerized software. Flow we are using is presented in the figure below. This way, we achieved easy to repeat process that encourages developers to implement small changes, that are easy to test and validate and deploy them to the production. This flow allows our system to be constantly improving and address new needs either from building owner or our own.
More details about monitoring and management are available either in form of slides or video [2].
Note: video presentation is available only in Polish.
This blogpost is based on our IoT System implementation, namely Souly [3]. Based on Souly, we created Smart Student Dormitory, where students can control temperature in their rooms via Mobile App, Souly verifies tenants presence and can set heating to eco mode and disable cooktop to increase fire safety. To see what else can be done using Souly visit our IoT Engineering page [4].
[1] SysOps/DevOps MeetUp Poznan #7: event
[2] Slides presented during Meetup: slides
[3] Souly webpage
[4] Grandmetric IoT Engineering: webpage
Leave a Reply