node-red-contrib-tciot

0.9.7 • Public • Published

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" } } ]

Package Sidebar

Install

npm i node-red-contrib-tciot

Weekly Downloads

2

Version

0.9.7

License

ISC

Unpacked Size

4.49 kB

Total Files

4

Last publish

Collaborators

  • s.goldstein