Search
  • Elipsa

How To: Implement Predictive Maintenance using Templates

efore you can begin to utilize the Elipsa Rapid Deployment Templates, you must first create the template for your machine.


Stream Data to a Deployment Template



The Elipsa Deployment Template functionality is accessible via the Elipsa API library.




A primary hurdle with implementing AI is the scalability of an AI solution. With outlier detection-based predictive maintenance, it is best to build a single model for each machine that you are monitoring. Automated machine learning tools, such as those found in the Elipsa platform, make it easy to build models. However, when the requirement grows to hundreds or even thousands of machines, you need a more scalable solution. That's where the Elipsa Rapid Deployment Templates come in.


How it Works


Rapid Deployment Templates are designed to enable users to quickly deploy predictive maintenance models to any number of machines of the same type.


When monitoring machines of the same type, attributes such as the features (or sensors) to monitor and the amount of data that is required to build a model do not change. What differs is the unique identifier of a machine (such as serial number) and the operating data itself.


Deployment Templates, therefore, set the attributes that are consistent from machine to machine and ask for the variable data when streaming to the API. When the API is called for a given machine, Elipsa performs the following actions to automate the end-to-end creation and deployment of predictive maintenance models. With Deployment Templates, you no longer need to start with a collection of historical data and instead, Elipsa starts learning from the moment the machine is connected.


  1. Elipsa aggregates streaming data for a machine to build a collection of historical data

  2. Once Elipsa collects enough data it automatically trains an initial model.

  3. Predictions on new streaming data are made against the initial model while still collecting data to re-train off of

  4. Once Elipsa collects enough data, it automatically re-trains the model using the larger dataset to be utilized for predictions on new streaming data


API Details


Details for calling the API endpoint can be found in the Elipsa API Documentation.


When you create a new Deployment Template, you are provided with a unique API key. This

API key is to be appended to the end of the URL utilized to stream new data for model creation and predictions


In addition, the data sent in the post command must include the following:

  • access_key: User's access key found on the profile page of the platform

  • unique_id: Unique ID of the machine/device being monitored. Example: the serial number of the machine/device

  • Data: List of JSON objects consisting of the real-time values of the features associated with the template.

Sample Implementations

The Deployment Templates can be invoked by any programing language, platform, or partner system capable of making a REST API call. Below is a sampling of example implementations, you can find more in the API documentation.



Node.js Axios


var axios = require('axios');
var data = JSON.stringify({
  "access_key": "XYX-123-ABC",
  "unique_id": "SN-123456",
  "Data": {
    "temp": "68",
    "rh": "53",
    "co2": "560"
  }
});

var config = {
  method: 'post',
  url: 'https://api.elipsa.ai:9090/graphdb/api/v1.0/deployments/template/<template_api_key>',
  headers: { 
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

JavaScript jQuery



var settings = {
  "url": "https://api.elipsa.ai:9090/graphdb/api/v1.0/deployments/template/<template_api_key>",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Content-Type": "application/json"
  },
  "data": JSON.stringify({
    "access_key": "XYX-123-ABC",
    "unique_id": "SN-123456",
    "Data": {
      "temp": "68",
      "rh": "53",
      "co2": "560"
    }
  }),
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Python - Requests


import requests
import json

url = "https://api.elipsa.ai:9090/graphdb/api/v1.0/deployments/template/<template_api_key>"

payload = json.dumps({
  "access_key": "XYX-123-ABC",
  "unique_id": "SN-123456",
  "Data": {
      "temp": "68",
      "rh": "53",
      "co2": "560"
   }
})
headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

 

Simple, Fast, and Flexible AI for IoT. Get started today for free!