Overview

Skill Level: Intermediate

Intermediate

This recipe shows how you can integrate IBM¬ģ Predictive Maintenance and Quality with Watson IoT Platform to receive data from remote sources. Analyze the data in realtime, create work orders in Maximo and send recommendation back to Watson IoT Platform.

Ingredients

  • IBM Predictive Maintenance and Quality(PMQ)
  • IBM Watson IoT Platform Service
  • IBM Maximo Asset Management System(Optional)
  • Node-RED Application

Step-by-step

  1. Introduction

    Asset-intensive industries, such as oil and gas, mining, and energy and utilities, use complex equipment such as compressors, haul trucks, and turbines, in their day-to-day operation. Any unplanned downtime or major unforeseen failure of this equipment has a direct impact on production downtime, which affects the financial performance of the organization. Potential component and equipment failure, plus machine health of in-service equipment needs to be monitored by identifying early signs of possible downtime. The goal is to maximize the uptime of the component/equipment.

    The IBM Predictive Maintenance and Quality (PMQ) solution helps you monitor, analyze, and report on information that is gathered from high-value assets and recommend maintenance activities for them. With this integrated solution, you can:

    • Predict the failure of a monitored asset in order to fix it and avoid costly downtime.
    • Search stored maintenance logs to determine the best repair procedures and cycles.
    • Identify the root causes of asset failure to take corrective actions.

    The integration bus layer(IIB) within PMQ helps to transform external events (received from monitored high-value assets) into the format that is required by the PMQ analytics solution’s data model. One way to receive external low-level events, such as the discharge pressure of a compressor or the inlet temperature of compressor, is to use the Watson IoT Platform.¬†

    IBM¬ģ Watson‚ĄĘ IoT Platform provides powerful application access to IoT devices and data to help you rapidly compose analytics applications, visualization dashboards, and mobile IoT apps. Also, it¬†allows you to perform powerful device management operations, and store and access device data, connect a wide variety of devices and gateway devices. Watson IoT Platform provides secure communication to and from your devices by using MQTT and TLS.

    This recipe explains how to onboard the temperature data from an IoT device to Watson IoT Platform, send it to PMQ to perform analytics on the asset data. In PMQ, the readings are aggregated and a health score is calculated using a predictive model that was trained with samples of historical failures. If the health score is too low, a work order for an inspection is created in an IBM Maximo asset management system.

    Deploy relevant services on Bluemix

    The IoT Recipe discussed here, makes use of the Create Toolchain button to help deploy the necessary services on to Bluemix. Click on the Create Toolchain button provided below, provide a Custom Name to your application and choose to click on Create button, to quickly deploy the Watson IoT Platform, Node-RED application and Cloudant NoSQL DB, as part of the Bluemix starter app. Post successful deployment, you shall have all three of the above mentioned services, up & running in your Bluemix environment.

    Toolchain-8

    Note: If you are a User using the United Kingdom Region in your Bluemix environment, then please make use of the steps mentioned in the IoT Recipe Deploy Internet of Things Platform Starter service on Bluemix to deploy the setup. Alternatively, you can also try using the Deploy to Bluemix button, to deploy the setup under your United Kingdom Region, provided your Jazzhub account is validated. Users of US South Region can ignore this step.

    deploy

  2. Solution Architecture

    Figure 1 shows the integration of Watson IoT Platform with IBM Predictive Maintenance and Quality system,

    archi

    1. A device with, a temperature sensor, keeps publishing the events in the IBM Watson IoT Platform. In absence of an actual device, we have provided a simulator which keep pumping in the events.
    2. A Node-RED application running in Bluemix or in IBM Integration Bus(IIB) Node of PMQ or any other external system subscribes to the temperature event in real-time, converts the temperature data into the form expected by the custom IIB flow and invokes the REST service. A solution can use IBM Streams or use realtime MQTT application to pull the device events in realtime and places into PMQ input queue.
    3. Custom IIB flow created in IIB node provides the actual integration between the Watson IoT Platform and PMQ system. The flow exposes a REST interface such that the Node-RED application can send the IoT device event (asset data) to PMQ, convert the data into the form expected by the PMQ (XML format) and places the event on the PMQ event input queue (PMQ.EVENT.IN).
    4. In addition to sensor events that originate from the device and are delivered through the Watson IoT Platform, contextual data such as weather data may be sent as events to PMQ and be included in the profile for a device. A Node-RED flow could be used to retrieve weather data from an API and then send it to PMQ using the exposed REST interface.
    5. Event data that is received from Node-RED is converted to the format expected by PMQ, which is eventually populated in the analytical datastore. This onboarded data is realtime data and includes key performance indicator (KPI) and profile information.
    6. IBM SPSS¬ģ executes pre-built analytical models, resulting in scores. KPI’s are analyzed by the system on a continuous basis. In response to the scores and the current KPI values, SPSS generates recommendations by using the pre-configured business rules.
    7. PMQ sends the profile information, the health score, and the recommendation for the device back to the Watson IoT platform, such that the user can view the recommendation in the Watson IoT Platform in realtime along with the device events. Also, PMQ creates work order in IBM Maximo Asset Management System when it detects a problem and that needs an inspection.
    8. Watson IoT Platform invokes the configured action, for example notify the user through e-mail, SMS alert and etc.. The System can also be configured to send a command back to the device to shutdown or autocorrect when the anomaly is detected. This can be achieved by sending commands to the device.
  3. Register your Device(s) In Watson IoT Platform

    In order to send the temperature data (IoT sensor data), we need to register the device(s) first, in the IBM Watson IoT Platform. This section guides you in the same.

    Open the Bluemix Dashboard and click on the Application service that you have currently deployed (using the Create Toolchain button), if you have already moved away from it. You should see the Watson IoT Platform listed under the Connections. Click on the WIoTP service and choose the click on Launch button to launch the WIoTP Dashboard.

    Carry out the steps present in this recipe to register your device(s) in IBM Watson IoT Platform. When the device is registered, you will be provided with the registration details shown below. Make a note of them, we need these details to connect the device to Watson IoT Platform later.

    Generate API Key and Token of Watson IoT Platform

    In order to connect Node-RED application to IBM Watson IoT Platform to receive device events, we need to generate the API key and token first. This can be achieved by carrying out steps present in this section ‚Äď Generate API Key in Watson IoT Platform.

    Note down the Key and Token, we need these later to Node-RED and PMQ to Watson IoT Platform.

    At this step, we have successfully created the IBM Watson IoT Platform service, registered the device(s) in it and generated the API Key.

  4. IoT-PMQ Device List Integration

    Create a custom flow in IBM Integration Bus node to receive Master data

    The IBM Predictive Maintenance and Quality (PMQ) solution refers to the list of devices (resources) and their attributes as ‚ÄúMaster Data‚ÄĚ. Master data can be loaded from a file but it is useful to have an integration that updates the master data automatically. This section will describe how to create a REST API to add and update devices from the Watson Internet of Things platform.¬†

    The file format used to load device information is defined using a DFDL (Data Format and Definition Language) file. This file is named resource.xsd and is located in the PMQMasterDataLibrary project. The file contains the following definition.
    PMQMasterDataLibrary

    Each device must have a unique set of values for RESOURCE_CD1 and RESOURCE_CD2 (ex. Serial number and Model) that are used to identify the device. Each device must also have a value for RESOURCE_TYPE_CD which identifies what kind of device it is (but this is not used to identify the device). The other values are optional. 

    The goal of this section is to create a new flow using IBM Integration Toolkit that exposes a REST service to accept similar device information and place it on the queue for processing.

    • Begin by creating a new Application called PMQRESTMasterDataLoad (referencing the PMQMasterDataLibrary) and a flow called restmasterdata. Note: You can import the application (already created) from this github location¬†incase if you want to skip the details.
      pmq-master-iib-project
    • Add a HTTPInputNode and specify /pmq/masterdata for its URL and JSON for the parser as shown below,
      master-http-node
    • Add a compute node to transform the JSON message into a message using the DFDL parser to allow the message to be processed as a csv (comma separated value) file. Specify a filename to allow an error file to be created by PMQ if there is a problem processing the message. Optionally this filename could also be used to allow a file output node to create a log of all the messages received.
      master-compute-node
    • Enter the following snippet of the code into the Main function,
      CREATE FUNCTION Main() RETURNS BOOLEAN
      BEGIN
      -- Copy the message contents other than the JSON tree
      SET OutputRoot.Properties = InputRoot.Properties;
      CREATE NEXTSIBLING OF "OutputRoot"."Properties" DOMAIN 'MQMD' NAME 'MQMD';
      CREATE NEXTSIBLING OF "OutputRoot"."MQMD" DOMAIN 'MQRFH2' NAME 'MQRFH2';
      CREATE NEXTSIBLING OF "OutputRoot"."MQRFH2" DOMAIN 'DFDL' NAME 'DFDL';

      -- Create a file name for use in logging and error handling
      DECLARE modelName CHAR;
      SET modelName = FIELDNAME(InputRoot.JSON.Data.*[1]);
      SET OutputLocalEnvironment.Destination.File.Name = modelName || '_upsert' || '_RESTAPI_' || CAST(CURRENT_TIMESTAMP AS CHARACTER FORMAT 'YYYYMMdd') ||'.csv';
      SET OutputRoot.MQRFH2.usr.FileName=OutputLocalEnvironment.Destination.File.Name;
      SET OutputRoot.MQRFH2.usr.Record=1;

      -- Transform the JSON tree to a DFDL (csv) tree
      SET OutputRoot.DFDL = InputRoot.JSON.Data;

      RETURN TRUE;
      END;
    • Add a Reset Content Descriptor node to set the message type to binary (BLOB). This is the format expected by the master data processing queue. The master data processing with reset the parser to DFDL using the message type included in the file name.
      master-Reset-node
    • As shown below, select the domain¬†as BLOB and check the Reset message domain box.
      blob-format
    • Add an MQ output node to place the message on to the PMQ.MASTER.IN queue for processing.
      mq-output-node
    • Set the Queue name as¬†PMQ.MASTER.IN.
    • Add another compute node to create an empty message for the HTTP reply.
      post-compute-node
    • Double click and¬†define the main function as follows,
      CREATE FUNCTION Main() RETURNS BOOLEAN
      BEGIN
      -- CALL CopyMessageHeaders();
      -- CALL CopyEntireMessage();
      SET OutputRoot.Properties = InputRoot.Properties;
      RETURN TRUE;
      END;
    • Add a¬†HTTPReply node finally to send the response back to the caller,
      http-reply-node
    • Add a compute node to send a ‚Äú400‚ÄĚ reply code when an error occurs. Typically, an error occurs when there is a problem with the format of the JSON.master-flow
    • Double click on the ErrorCompute node and define the Main function as follows,
      CREATE FUNCTION Main() RETURNS BOOLEAN
      BEGIN
      CALL CopyMessageHeaders();
      SET OutputRoot.HTTPReplyHeader."Content-Type" = 'application/json';
      SET OutputRoot.JSON = InputRoot.JSON;
      -- Return a "bad request" error code
      SET OutputRoot.HTTPReplyHeader."X-Original-HTTP-Status-Code"=400;
      RETURN TRUE;
      END;
    • The flow is complete now, Once this application is deployed, a HTTP message can be sent with the following JSON payload to insert new devices or update the information for existing devices.
      {"resource" :
        {"MASTER_RESOURCE" :
          {"RESOURCE_CD1" : "Device01",
           "RESOURCE_CD2" : "iotsample-deviceType",
           "RESOURCE_NAME" : "Device 1",
           "RESOURCE_TYPE_CD" : "ASSET",
           "RESOURCE_SUB_TYPE" : "iot-device"
          }
        }
      }
    • Note that in the above message¬†RESOURCE_CD1 maps¬†to¬†the device Id and¬†RESOURCE_CD2 maps to¬†the device type.
    • Note that a message entry will be added to¬†the PMQ error folder when there is an error in processing the master data,
      error

    In this step, we exposed a REST interface to add or update the IoT device information to PMQ, in the next step we will create a Node-RED flow to send the device information to PMQ.

  5. Configure Node-RED to send Device List to PMQ

    In this step, we will create a Node-RED flow to send the device list to PMQ. The idea is to register the device to PMQ whenever any device connects to the Watson IoT Platform.

    Node-RED is a tool for wiring together the Internet of Things in new and interesting ways, including hardware devices, APIs, and online services. It is built on top of Node.js and takes advantage of the huge node module ecosystem to provide a tool that is capable of integrating many different systems.

    1. You have deployed the Node-RED service on to the Bluemix by clicking on the Create Toolchain button in Introduction section. Access your Node-RED application by clicking on View App link and then choosing the option Go to you Node-RED flow editor, to access the editor.
    2. Parallelly, you can also access the Node-RED editor directly by accessing the following URL
        http://<your-application-name>.mybluemix.net/red
    3. Open the Node-RED flow editor and Import the master data flow by navigating to the menu at the top right of the screen and select Import from Clipboard. Copy the JSON string from the github location and paste it into the dialog box in Node-RED and select OK.
    4. Observe the following flow that connects the Node-RED application to Watson IoT Platform, subscribes to device connectivity status, converts it to the form expected by the REST interface in IIB and then sends it to PMQ.
      node-red-master-flow
    5. Note that the flow is not complete.¬†we need to configure the “Device connectivity status” node with the Watson IoT Platform API Key and Token that you generated earlier in this step to get the device connect events. Configure the node as shown below,
      api-key-master-flow01
    6. Also, double click on the ‚ÄúInvoke PMQ‚ÄĚ node to modify the HTTP URL that we exposed¬†in the earlier step,
      pmq-master-invoke
    7. Select OK and Deploy.

    In this step, we have successfully configured a Node-RED flow to listen for device connect event and register the corresponding device to PMQ automatically. In the next step, we will connect the temperature simulator to Watson IoT Platform.

  6. Start Temperature simulator

    In this step, we will connect the temperature simulator to IBM Watson IoT Platform and publish the temperatures.

    1. Open the following link in a new tab: http://watson-iot-sensor-simulator.mybluemix.net/.¬†This is a simulated sensor that is capable of sending temperature, humidity, and object temperature data. The value being sent can be changed by interacting with the web UI of the simulator. This sensor connects to the IoT Platform and sends an ‚Äėiotsensor‚Äô event every 2 seconds while active. Keep the tab or window open with the sensor to continue sending data.
      Note!
      Though this simulator sends temperature, humidity, and object temperature, the Node-RED application will filter the temperature event and send it across to PMQ system.
    2. Fill in the required information. The device token is your device‚Äôs unique authentication token. Click ‚ÄúSave changes‚ÄĚ.
      enterdata
    3. Observe that the device is connected to the Platform and starts sending the events. Also, observe in Node-RED window that this device details are sent to the PMQ as a Master data.
    4. You can increase/decrease the temperature readings using the web ui. Leave this tab open to continuously send data
    5. Go through the recipe Visualizing Data in Watson IoT Platform, if you want to view the events in Watson IoT Platform dashboard.

    In this step, we have successfully connected the temperature simulator device to Watson IoT Platform and registered the device to PMQ. One can start multiple simulators by registering multiple devices into the Watson IoT Platform and configure the simulator http://watson-iot-sensor-simulator.mybluemix.net/ using those details.

  7. Create a custom flow in IBM Integration Bus node to receive Event data

    Event data is the temperature data (in this example) produced by the IoT device and it must be transformed into a format that can be used by PMQ system. In this step, we will see how to expose a HTTP interface in IBM Integration Bus node to consume the events from Watson IoT Platform. Once the event is received, the IIB node transforms the data into a format that can be interpreted by other components, such as the SPSS engine and scoring services, to obtain the predictive scores and recommended maintenance actions that stem from the received events.

    The file format used to load device information is defined using a DFDL (Data Format and Definition Language) file. This file is named resource.xsd and is located in the PMQEventDataLibrary project. The file contains the following definition,
    event-schema

    The goal of this section is to create a new flow using IBM Integration Toolkit that exposes a REST service to accept the temperature device events and place it on the PMQ.EVENT.IN queue for processing.

    • Begin by creating a new Application called PMQRESTEventLoad and a flow called RestEventIn. Note: You can import the application (already created) from this github location incase if you want to skip the details.
      event-project
    • Add a HTTPInputNode and specify “/pmq/eventin” as the URL and JSON as¬†the parser.
    • Add a Java Compute node to transform the JSON message into a message using the DFDL parser to allow the message to be processed as a csv (comma separated value) file. Define the node by using the¬†code from this github link.
    • Add an MQ output node to place the message on to the PMQ.EVENT.IN queue for processing.
    • Add another Java Compute node to get the response. Define the node by using the code from this github link.
    • As a last step, add a HTTPReply node to send the response back to the caller, Also connect the catch block of HTTP Input node to the reply node to notify the user incase of any error.¬†Typically, an error occurs when there is a problem with the format of the JSON.
      event-flow
    • The flow is complete now, Once this application is deployed, a HTTP message can be sent with the following JSON payload to insert new devices or update the information for existing devices.
      {"event": {"event_type_cd": "IOTDEVICE","event_start_time": "2016-08-19T10:41:51.415Z","serial_no": "Device01","model": "iotsample-deviceType","observation": [{"measurement_type_cd": "TEMPERATURE","measurement": 28,"observation_timestamp": "2016-08-19T10:41:51.415Z"}]}}

    In this step, we showed how to create a custom IIB flow in PMQ System to expose a REST interface to send the temperature event from Watson IoT Platform.

  8. Configure Node-RED to send temperature events to PMQ

    In this step, we will create a Node-RED flow to send the temperature event to PMQ.

    • Import the event flow by navigating to the menu at the top right of the screen and select Import from Clipboard. Copy the JSON string from the github location and paste it into the dialog box in Node-RED and select OK.
    • Observe the following flow that connects the Node-RED application to Watson IoT Platform, retrieves the temperature¬†event, converts it to the form expected by the REST interface in IIB and then sends it to PMQ.Node-RED-event-flow
    • Note that the flow is not complete, we need to configure the “Receive IoT Device events” node with the Watson IoT Platform API Key and Token that you generated earlier in this step,configure-watson-node01
    • Also, double click on the “Send to Custom IIB Flow” node to modify the HTTP URL that we configured in the earlier step,
      http-node01
    • Select OK and Deploy. Observe that the temperature events are sent to the PMQ system every 2 seconds and the response is printed in the Node-RED debug console. The sample event that is sent to the custom IIB flow is shown below,
      {"event": {"event_type_cd": "IOTDEVICE","event_start_time": "2016-08-19T10:41:51.415Z","serial_no": "Device01","model": "iotsample-deviceType","observation": [{"measurement_type_cd": "TEMPERATURE","measurement": 28,"observation_timestamp": "2016-08-19T10:41:51.415Z"}]}}

    In this step, we have successfully sent the temperature event to PMQ.

  9. Configure PMQ to process temperature events

    Event processing in PMQ is customized using an XML orchestration document and using custom Java code when required. An orchestration consists of a series of steps. Each step is performed by a specific kind of ‚Äúadapter‚ÄĚ. For example, determining if an event is an anomaly, and recording that it occurred, are tasks that could be performed by a Profile Adapter.

    • An orchestration starts with the type of event the orchestration will process. This first involves a mapping from an event code to the appropriate orchestration. event-orchestration-mapping
    • The first step of an event orchestration typically stores the event in a database. This is performed by the Event Store Adapter. This Adapter does not require any configuration.event-store-db
    • The next step is the Profile adapter. The Profile Adapter is configured to perform profile updates. Each profile update selects the events that are appropriate (ex. events that include a temperature observation). The update then selects the profile row to update and uses a Calculation to perform the update.profile-orchs
    • Using an event from a temperature sensor as an example, an observation selector is defined to select temperature readings (observations with a measurement type of ‚ÄúTEMP‚ÄĚ).temp-orch
    • To update a profile in the RESOURCE_KPI table, a profile row selector is added. This will update a row in the profile that contains a PROFILE_VARIABLE_CD value such as ‚ÄúDAILIY_AVERAGE_TEMPERATURE‚ÄĚ. In addition to this specific PROFILE_VARIABLE_CD value, the profile row must be selected using key values as defined by the ‚Äúshared selector‚ÄĚ RESOURCE_KPI. This shared selector contains additional data mappings for the other keys of the RESOURCE_KPI table. The shared selector is defined in the solution definition file PMQ_solution_definition.xml,
      kpi-orch
    • The combination of the key values specified in the shared selector and the key value for PROFILE_VARIABLE_CD allow a single row to be selected from the the RESOURCE_KPI table. The values come mostly from the event and selected observation that are being processed.
    • Next a calculation is specified to perform a calculation to update values in the profile row.update-orch
    • This calculation is called MEASUREMENT_ABOVE_LIMIT and it takes as one of its input a threshold value. This threshold value can be supplied directly in the orchestration definition as shown above or alternatively it can be supplied dynamically by adding it as a variable to the context of the orchestration. In the latter case the value is accessed by referencing the context variable to provide input to the calculation.Threshold-mapping-orch
    • The remaining details needed for the calculation to update the profile are the measurement value from the observation, and the current count of ‚Äúanomalies‚ÄĚ (values that exceeded the threshold) from the profile. The later value is updated if the threshold is exceeded by the current event.

    In this step, we saw how to customize the event processing using the XML orchestration and in the next step, we will add adapters to determine the health score.

  10. Configure PMQ to invoke SPSS and score

    In this step we will see how to configure PMQ to invoke SPSS model and determine the health score.

    • Continuing from the previous step, use the scoring adapter. This adapter calls out to an SPSS model to determine a health score for the device. The values passed to the model can come from the event being processed and from the device profile.¬†A service definition is created to define the inputs required for the SPSS model and the health score that it will return,
      Hs-orch
    • The scoring adapter is configured to indicate what service definition to use. It is also configured with the connection details for the SPSS server. The configuration also includes how to obtain the data required to call the scoring service and what to do with the results.
    • The first part of the scoring adapter configuration retrieves any profile rows (aggregations) required to provide input values. An alias is used to subsequently reference the profile row.KPI
    • Next values from the selected profile rows are mapped to the inputs of the scoring service.pro-map-orch
    • Scoring service input values may also be mapped from the event being processed or from values in the orchestration context. Output values from the scoring service may be mapped into the orchestration context or into an event in the context. An advantage to mapping the output values into an event is that this event may itself be processed with its own orchestration to record and aggregate the score.
    • After the health score is obtained, another scoring step performs a call to an SPSS decision management model to obtain a recommended action. And in this case the recommended action is mapped both to an event (so it can be recorded) and into the orchestration context (so it can be used when creating a work order in the next step).
      recommendation

    In this step we saw how to configure PMQ to invoke SPSS models and compute the profile scores.

  11. Configure PMQ to create Work Order in Maximo

    IBM Maximo Asset Management is a comprehensive solution for managing enterprise assets on an extensible platform. It offers ‚Äúbuilt in‚ÄĚ mobile access, out-of-the box mapping, crew management, extensive reporting and analytical insight.¬†When the decision model recommends an action, a generic service step can be used to trigger a call to Maximo to create a work order. PMQ has the ability to send work order creation requests to Maximo via a web service call.

    • Custom work order creation step just needs to create and send a message with the required information (asset id, site id, and work order details).Maximo-code
    • Deploy the flow and observe that a work order is created when the temperature crosses the threshold,work-order

    In this step, we saw how to create a work-order in Maximo Asset Management System when PMQ detects a problem.

  12. Send PMQ analysis to Watson IoT Platform

    Apart from raising work orders in Maximo, generic service step may also be used to send the profile information, the health score, and the recommendation for the device back to the Watson IoT platform. Again a message is prepared with the data from profiles and the orchestration context. An outbound interface must be added to send this message to the IoT platform via HTTP.

    • Import the application PMQIOTIntegration from this github location¬†and observe a following flow. Note: You need to edit the file “RecommendationCreation_Compute.esql” with the Watson IoT Platform API Key and token.
      PMQIoTIntegration
    • As shown the flow reads the profile, score and recommendation from the PMQ.IOT.IN queue (a custom queue where the results are pushed), convert the scores into the JSON format and use¬†the Watson IoT Platform API to send the result¬†back to the Watson IoT Platform.
      -- Assemble the URLSET url = 'https://';SET url = url || InputRoot.JSON.Data.orgId;SET url = url || '.internetofthings.ibmcloud.com/api/v0002/application/types/';SET url = url || InputRoot.JSON.Data.typeId;SET url = url || '/devices/';SET url = url || InputRoot.JSON.Data.deviceId;SET url = url || '/events/';SET url = url || InputRoot.JSON.Data.eventId;SET OutputLocalEnvironment.Destination.HTTP.RequestURL = url;-- Send the payloadSET OutputRoot.JSON.Data = InputRoot.JSON.Data.payload;D
    • Deploy the flow in IIB and observe the following message in the Watson IoT Platform containing the analysis report,
      pmq-analysis

    As shown the profiles, score and recommendations are sent to Watson IoT Platform. One can create rules in Watson IoT Platform to alert the concern person when the health score is not in acceptable range.

  13. Observe results in Watson IoT Platform

    Realtime charting

    With the new cards in the Watson Internet of Things platform, one can build their own custom Dashboard to create visualization charts for the real time data that are coming in from the devices. Refer to this recipe for detailed information about creating visualization charts. 

    Carry out the following steps to visualize the device temperature and the recommendation from PMQ.

    1. In the dashboard, select the Boards tab.
    2. Click + Create New Board to create board for visualization. 
    3. Specify a name and create the dashboard.
    4. Open the new board and Click + Add New Card button,
    5. In the Devices section, select Realtime Chart,card-00
    6. Select a device.
    7. Now, define the data set for the visualization. Click Connect new data set.
      • Enter the name for your data set
      • Select the event
      • Select the property of the event as temperature
      • Optionally, you can select the unit of the data set as wellcard-01
    8. Click Next
    9. Preview the card. You can select the size of the card now. By default Small is selected.
    10. Enter the title for the card and click Submit.
    11. Similarly, create appropriate charts for the different parameters of the result from the PMQ System, such that the results can be viewed in realtime in Watson IoT Platform dashboard.pmq-normal-dashboard
    12. Increase the temperature from the sensor and observe the changes in recommendation. For example, changing the temperature above 65 requires an urgent inspection as shown below,dashboard_1

     

  14. Conclusion and Next step

    This recipe showed how to integrate IBM Watson IoT Platform with IBM Predictive Maintenance and Quality solution to monitor, analyze, provide valuable insights and recommend proactive actions to reduce device failures and lost productivity. This analysis can be implemented in the IBM Predictive Maintenance and Quality solution as a series of steps in an orchestration pipeline.

    complete-orch-profile-steps

    Developers can take a look at the code made available in the github repository that¬†exposes REST interface on IIB node to understand what’s happening under the hood. Developers can consider this recipe as a template for integrating PMQ with IBM Watson IoT Platform. They can modify the existing code, as well as, the Node-RED flow, depending upon the use case.¬†

    As a next step, look at the list of analytical and cognitive recipes published around Watson IoT Platform to analyze the IoT events.

  15. About the authors

    Randy Giffen is an Analytic Solutions Architect with IBM Canada. He was formerly with Object Technology International in Ottawa which was acquired by IBM. Randy has been involved in a number of software projects at IBM including the Eclipse Project, Business Process Management, Healthcare Analytics, and Predictive Maintenance and Quality. He is an Adjunct Professor at the University of Ottawa and is a member of the Telfer Health Transformation Exchange.

    Sathiskumar Palaniappan is a senior developer with IBM India and responsible for Watson IoT Platform recipes and Client Libraries. He has been involved in a number of software projects at IBM including IBM version of Java development, ORB Performance engineering and Watson IoT. He enjoys working with Performance and IoT.

1 comment on"Integrate IBM Watson IoT Platform with Predictive Maintenance and Quality(PMQ) System"

  1. I got lost on step 4. You say:
    “Begin by creating a new Application called PMQRESTMasterDataLoad (referencing the PMQMasterDataLibrary) and a flow called restmasterdata.”
    Create where? and how? there must be a step missing here. The rest of the instructions are no better. You guys must be assuming some background knowledge that I am missing, and you don’t even bother to state what this is.
    Not a useful recipe at all.

Join The Discussion