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:
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.
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.
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
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:
var maximoRestAPI = "http://126.96.36.199/maxrest/rest/os/MXMETERDATA?_action=AddChange&location=MYHOME&siteid=FIDENZA&metername=LIGHT&newreading=" + msg.payload + "&newreadingdate=" + dateNow + "&_lid=maxadmin&_lpwd=XXXXXX";
Maximo Meterdata rest-api: http request nodes invoke the API to update the meters. By a http post I update the METERDATA object structure.
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.
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:
the location’s meters are updated:
This mash-up of cloud, Watson IoT, services and Maximo becomes more and more funny. Thanks for reading.
Your Feedback is Welcome.