Admin normalizer data stream
Overview
Normalization is the process of converting incoming data into a format compatible with Intelligent Assets (IA). A normalizer is code that performs this conversion and sends the data to IA via MQTT.
Prerequisites
Before normalized messages can be consumed within Intelligent Assets, the following are required:
An Asset Type defining the attributes for any assets that will created or updated by the incoming data.
An MQTT Client to publish this data to a topic that an IA service subscribes to. This client can be:
A code-service that runs within the IA system.
An adapter that runs external to the IA system and publishes messages directly to IA. The adapter would connect to the system as a Device or User with correct permissions.
Topics examples
Default normalizer topic: _monitor/asset/default/data
JSON payload examples
var assetDataObject =
{
“id”: “refrigerator123”, //required; the asset’s unique ID to update
“type”: “Refrigerator”, //required; the asset type which is previously defined in the application with custom data attributes
“last_updated”: “<ISOString>”, //Optional ISO timestamp. If none is provided, we will apply one as we process the message
“latitude”: <valid_latitide>, //optional
“longitude”: <valid_longitude>, //optional
“custom_data”: { // nested objects not allowed, only primitive JS types: string, number, boolean, timestamp string allowed
“Temperature”: 38,
“Door Status”: false,
“Filter Status”: "Replace Soon"
},
"group_ids": ["group1", "group2"] //assigns the asset to group(s) in the Intelligent Assets application. Required if the asset does not already exist
}