You are on page 1of 24

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
Building energy monitoring use-case
Customer pain of a facility manager with multiple buildings

Energy monitoring via paper bills

Unknown energy utilization, efficiency, wastage


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
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!
1) Low cost yet reliable smart meters
(modbus)
2) Connect them...
IoT Middleware ?

????
3) … to a cloud platform …like... ThingsBoard.io
IoT Middleware ?

????

????
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?
Original vendor hardware gateway + custom parser

CSV parser
to
MQTT
HTTP periodic
publisher
export

MODBUS polling

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)
Alternative hardware gateway with OSS IoT middleware

MODBUS
to
MQTT publisher
MODBUS polling
???

NO LIMITS
Many open-source options
NO obvious solution
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
Ex Machina Lightweight TB GW as a Kura OSGi
bundle
https://github.com/exmgr/Kura-Thingsboard-Bundle
Setting up a Gateway &
T●B 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
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.
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.
Thingsboard
devices

Kura Assets appear automatically as devices in Thingsboard.


Visualization in
Thingsboard

● Device telemetry is added to UI widgets


● Data is visualized as soon as it is received
Ex Machina TB-GW service, managed by Kura OSGi
bundle
https://github.com/exmgr/Kura-Tb-Gateway-Manager
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
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.
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.
agile-iot.eu

exm.gr
Thank you!
Manolis Nikiforakis
Ex Machina, CEO

e-mail·manolis@exm.gr
twitter·@nikil511
linkedin.com/in/mnikiforakis
website·exm.gr

You might also like