node-red-contrib-tciot 0.9.7

Helper functions for TwinCAT IoT

npm install node-red-contrib-tciot

This package for Node-RED includes helper functions for TwinCAT IoT. In its current version, it includes a parser for TwinCAT IoT JSON encoded messages, which splits the incoming message up.

The content is splitted as follows:

  • The sub object "Values" is returned as output 1
  • The sub object "MetaData" is returned as output 2
  • A re-structured JSON object is returned on output 3

The re-structured object that is returned as output 3 is an array of all found symbols aggregated plus their MetaData.

Example

Input

As an input, a JSON object is expected that follows the TwinCAT IoT JSON format, which is used by the Beckhoff products TF6701, TF6710, TF6720 and EK9160.

{ "Values": { "Key1": 2, "Key2": 3 }, "MetaData": { "Key1": { "Unit": "C", "Description": "Some text" }, "Key2": { "Unit": "V", "Description": "Again some text" } } }
Output 1

The first output of the node returns the "Values" sub object of the input.

{ "Key1": 2, "Key2": 3 }
Output 2

The second output of the node returns the "MetaData" sub object of the input.

{ "Key1": { "Unit": "C", "Description": "Some text" }, "Key2": { "Unit": "V", "Description": "Again some text" } }
Output 3

The third output of the node returns the modified JSON.

[ { "Name": "Key1", "Value": 2, "MetaData": { "Unit": "C", "Description": "Some text" } }, {"Name": "Key2", "Value": 3, "MetaData": { "Unit": "V", "Description": "Again some text" } } ]

Node Info

Version: 0.9.7
Updated 6 years, 10 months ago
License: ISC
Rating: not yet rated

Categories

Actions

Rate:

Downloads

9 in the last week

Nodes

  • twincat-iot-json-parser

Keywords

  • node-red
  • twincat
  • iot
  • beckhoff
  • automation

Maintainers