IoT

Maximo real-time meter data from IoT device

Maximo real time meters data
Maximo real time meters data

Maximo real-time meter data from IoT device

In my previous article I shown how automate meter reading from an IoT sensor device. I used the sensorTag to monitor my room’s temperature, so I created a Maximo location associated to my room.

In this article I’m showing you how to display in Maximo the real time meters data feeds by an IoT device. The sensor data related to a Maximo’s location are used to update the meters, moreover the data are shown in real time in Maximo location application by an embedded web dashboard.

Watch the demo video here:

 

To implement the Maximo real-time meter data from IoT device scenario I used node-RED on Bluemix, here the complete flow:

complete Maximo meter data scenario updated by IoT sensor
complete Maximo meter data scenario updated by IoT sensor

There are two logic blocks in the flow, the first one – input section – that receive events sent by IoT devices, set the sample rate limits and show real time data on Maximo thanks to an embedded dashboard. The second one – meter update section – where Maximo’s meters are updated by rest-APIs.

In details:

 

Input section:

Input section, receive events sent from devices
Input section, receive events sent from devices

SensorTag : this node receives data sent by IoT device using the open, lightweight MQTT messaging protocol. The input node receives events sent from devices, receive commands sent to devices, or receive status updates concerning devices or applications. It produces an object called msg and sets msg.payload to be a string containing the payload of the incoming message.

MaximoDashboard: I wired the input node with a freeboard node to send real-time data from my device on Maximo application. I installed the custom freeboard node as shown in my previous post.

Temperature sample rate: Also I wired the input node with a delay/rate limit node. The node introduces a rate limits messages to limit the number of Temperature data readings, because if I have a big number of sensors, I don’t want the Maximo database swamped with meter readings.

delay sample – Light sample rate: Also I wired the input node with rate limit node plus a delay node . The rate limit node introduces a rate limits messages to limit the number of Light data readings and the delay node introduce a delay against the temperature sample to avoid a concurrent Maximo rest-APIs invocation.

 

Meter update section

rest APIs to update Maximo meters
rest APIs to update Maximo meters

get ambient temperature – get ambient light: this function nodes fetch the single json element from the structure sent by device:

update meterdata sample date: this function nodes assembly the URL before to invoke the rest-API. The URL is composed by the temperature msg.payload (or light) plus the current system date. For example:

Maximo Meterdata rest-api: http request nodes invoke the API to update the meters. By a http post I update the METERDATA object structure.

 

The dashboard

freeboard a web dashboard for the internet of things
freeboard a web dashboard for the internet of things

Freeboard it’s cloud simple dashboard for your IoT device. Build real-time, interactive dashboards and visualizations in minutes using the intuitive drag & drop interface. It’s Open Source you can go to Git-hub repository and join the community of open source developers building new Freeboard capabilities and sharing innovative new features. You can install a custom freeboard node in your node-RED environment. Using this node you can transmit information to freeboard. Just send some JSON msgs (for example using a function node) to this node and receive them in freeboard.

So I added an IFrame to my Maximo location application with a Freeboard web dashboard and add the data-source that is named like the Freeboard Node in node-RED.

web dashboard as iframe in Maximo application
web dashboard as iframe in Maximo application

With this customization Maximo receive the real-time meter data from my IoT device, you could use the GIS coordinate to visualize you location (or asset) on Google map:

Maximo real time meters data
Maximo real time meters data

the location’s meters are updated:

Maximo meters update
Maximo meters update

This mash-up of cloud, Watson IoT, services and Maximo becomes more and more funny. Thanks for reading.

Your Feedback is Welcome.

 

Tags
Show More

Related Articles

8 Comments

  1. Hello Mario,

    I having difficulty creating a meter reading using REST. When I use the following POST:
    http://localhost:7001/maxrest/rest/os/MXMETERDATA?_lid=maxadmin&_lpwd=******&location=BASIN-W1&_action=AddChange&siteid=BEDFORD&metername=O-PRESSUR&NewReading=999

    I get the error:
    BMXAA1407E – The LOCATIONMETER object cannot be added because it already exists in the application. An integration message cannot create an object that already exists.

    I examined the code in com.ibm.tivoli.maximo.rest.OSResourceRequestHandler
    and it appears that if maxobj is an instance of an MboSetRemote, then the messageType will always be “Create”.

    Which version of Maximo are you using?
    Can you print the entire http POST? Your example is truncated.

    Thank you,
    – David

  2. How do you make the iframe link dynamic can you post the xml / javascript? if i have 100 devices I want the iframe to look at the correct dashboard when the record is initiated
    Rgds Ian

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Back to top button
HTML Snippets Powered By : XYZScripts.com