Node-RED Node
The API Clients are not shipped with the product setup executable and are managed and maintained in each respective package manager. |
The Node-RED Node connects to inmation Core server via the new inmation Web API server.
Installation
To install inmation Node just change into your node-red user directory and install like so:
cd ~/.node-red/
npm install @inmation/node-red-contrib-inmation
See the Node-RED page for more details.
Topics
Write to an Item value property
Topic: write
Payload:
[ { "p": "/System/Core/TestItem", "v": 200 } ]
Read historical Data
Topic: readhistoricaldata
Payload:
{
"items":[ { "p": "/System/Core/TestItem", "v": "AGG_TYPE_RAW" } ],
"startTime": "2017-12-01T12:00:00.000Z",
"endTime": "2017-12-01T12:05:00.000Z",
"numberOfIntervals": 1
}
Payload with options:
{
"items":[ { "p": "/System/Core/TestItem", "v": "AGG_TYPE_RAW" } ],
"startTime": "2017-12-01T12:00:00.000Z",
"endTime": "2017-12-01T12:05:00.000Z",
"numberOfIntervals": 1,
"options": {
"percentage_good": 100,
"percentage_bad": 100,
"treat_uncertain_as_bad": false,
"slopped_extrapolation": false,
"partial_interval_treatment": "UASTANDARD"
}
}
Execute Function
Topic: execfunction
Payload:
{
"context": { "p": "/System/Core/TestFolder" },
"libraryName": "my-library-name",
"functionName": "calculate",
"functionArg": { "a": 10, "b": 20 }
}
Subscribe to ChildrenCountChanges
Topic: subscribe2ccc
Payload:
[ { "p": "/System/Core/TestItem" } ]