API

You can make a REST API call to check if there is an AI detected anomaly.

The endpoint is <site>/twin/livevalues?asset=<assetid>.

Performance Notes

The API call takes quite some time to run. This is because the entire neural network (ie. AI) is loaded and unloaded on each call.

If you want regular or live updates about anomalies, we suggest you consider live anomaly detection instead of constantly accessing this API endpoint. This solution is much faster, and provides a wide range of access options.

However if you're only going to need to update the status of the asset a few times an hour, the API is a useful tool.

Payload

The API function returns a JSON payload like the following…

{
    "input": {
        "Machine.Current": 3.107036607311118,
        "Machine.Speed": 64.84798031163642,
    },
    "output": {
        "Machine.Current": 3.0771657387381746,
        "Machine.Speed ": 64.99768750648762,
    },
    "input_norm": [
        0.21,
        0.5,        
    ],
    "summary": {
        "Machine.Current": {
            "min": 0,
            "max": 40,
            "units": " A",
            "decimals": 1,
            "tolerance": "0.4"
        },
        "Machine.Speed": {
            "min": 0,
            "max": 80,
            "units": "m\/min",
            "decimals": 1,
            "tolerance": "0.8"
        }
    },
    "abnormal": false
}
INPUT

The input values are the live values that the AI is basing its predictions on.

INPUT_NORM

These are normalised input values, used when diagnosing issues with the AI and checking to see if the incoming values are within the expected ranges (figures above '1' and below '0' indicate that incoming data is outside the range that the AI has been trained on).

OUTPUT

The output values are the predictions made by the AI model.

SUMMARY

This provides information about the input/output values, such as min & max expected ranges and the tolerance range (the acceptable distance between actual value and prediction before an anomaly is flagged).

Using this summary information combined with the input and output dictionaries will let you determine which specific properties are out of balance.

ABNORMAL

If true, an anomaly has been detected. If false, the values are within the expected range.