A presentation on how to setup a powerful industrial IoT solution for a typical energy monitoring use-case, built on open source technologies* and elaborate on various architecture approaches and challenges. (*Eclipse Kura/Kapua/Hawkbit, Thingsboard.io, AgileIoT, Resin.io, NodeRED, OpenHAB, RPi, ESP8266/32, Modbus, MQTT), by Manolis Nikiforakis of Ex Machina
Athens IoT meetup #7 - Open Source Industrial IoT - Manolis Nikiforakis (Ex Machina)
1. Open Source Industrial IoT
Middleware for a modbus energy monitoring solution
(Athens IoT meetup - May 2018)
e-mail·manolis@exm.gr
twitter·@nikil511
linkedin.com/in/mnikiforakis
website·exm.gr
2. Building energy monitoring use-case
Customer pain of a facility manager with multiple buildings
Energy monitoring via paper bills
Unknown energy utilization, efficiency, wastage
3. Building energy monitoring use-case
Monitoring (commercial) building energy is a typical IoT use-case, yet an optimum
solution is still not obvious.
Assuming the two far ends of the IoT value chain fixed
(modbus meters & thingsboard)
- What are some architecture / open source software options for middleware?
- Pros and cons
4. IoT to the rescue
1) Deploy low-cost yet reliable smart meters (modbus)
2) Connect them to a cloud platform, via the internet
3) Enjoy energy analytics and actionable insights!
7. 3) … to a cloud platform …like... ThingsBoard.io
IoT Middleware ?
????
????
8. Considerations for middleware architecture
a. Cost & Risk
Open source vs closed ?
b. Reliability
Tried before?
c. Ease of deployment / maintenance
Developers required for configuration / debugging ?
d. Scalability
Handle more than a few devices?
e. Flexibility
Multivendor?
f. Security
By design?
9. Connected to smart-meters via modbus
Entire solution inherits the characteristics/limitations of the gateway
(e.g. robust, plug n play, not real time, summarized aggregate figures)
HTTP periodic
export
MODBUS polling
Original vendor hardware gateway + custom parser
CSV parser
to
MQTT publisher
10. NO LIMITS
Many open-source options
NO obvious solution
MODBUS polling
Alternative hardware gateway with OSS IoT middleware
MODBUS
to
MQTT publisher
???
11. IoT middleware open-source options for modbus to mqtt
● ESP8266/ESP32
○ Arduino modbus libs
○ M5Stack - MS Azure & Amazon AWS IOT certified
● RPi / Linux gateways
● NodeRED
● OpenHab
● Eclipse Kura
○ Eclipse AGAIL
○ Eclipse Kapua
○ Eclipse Hawkbit
12.
13. Ex Machina Lightweight TB GW as a Kura OSGi bundlehttps://github.com/exmgr/Kura-Thingsboard-Bundle
14. Setting up a Gateway & TB
● Requirements
○ Raspberry Pi
○ Agile Raspbian Image with Agile-Kura
docker container
○ ESF ModBus driver from Kura
Marketplace
● Install EXM Kura Thingsboard
Bundle
○ Easy installation by uploading a single
deployment package from Kura’s web
ui.
● Configure Thingsboard gateway
device access token
15. Setting up Assets and Channels
● Devices in Kura are called
“Assets” and their data objects
(coils, holding registers etc) are
“Channels”
● Assets/Channels are
abstractions for the underlying
driver-device communications
making the low-level
communication transparent for
the bundle.
16. Configuring the EXM Kura Thingsboard Bundle
● After installing the bundle, a
configuration section is added to
Kura’s web ui..
● Easy configuration, only 2 fields
required:
○ Thingsboard URI
○ Thingsboard gateway token
● The Bundle starts forwarding
telemetry immediately.
19. Ex Machina TB-GW service, managed by Kura OSGi bundle
https://github.com/exmgr/Kura-Tb-Gateway-Manager
20. Kura Tb-Gateway Manager
● Tb-Gateway is installed normally, as
a service and configured
● A custom manager bundle is used
to start/stop it on demand
● Artemis MQTT Broker is enabled
with default settings
● A Kura Cloud Service is set up and
configured to publish to Artemis
MQTT
● Assets/Channels set up as usual
21. Kura Tb-Gateway Manager
As a last step, a simple Kura wire graph is set up to read assets at regular
intervals and publish the readings.
22. More power with Eclipse IoT
hawkBit is a domain independent back-end framework for rolling out software updates to constrained edge devices as well
as more powerful controllers and gateways connected to IP based networking infrastructure.
Kapua is a modular platform providing the services required to manage IoT gateways and smart edge devices. Kapua
provides a core integration framework and an initial set of core IoT services including a device registry, device management
services, messaging services, data management, and application enablement.