1.2.0 • Published 2 months ago

smithtek-node-red-format v1.2.0

Weekly downloads
-
License
GPL-3.0
Repository
-
Last release
2 months ago

smithtek-node-red-format

SmithTek format

Installation

Install the smithtek-node-red-format using the NodeRED palette manager.

Usage

The smithtek-node-red-format node is tailored for the SmithTek cloud platform. Its primary purpose is to transform and enrich JSON messages with essential metadata, such as timestamps. It also auto-detects and formats GPS data in the messages, providing seamless integration for users to set up their GPS locations on the SmithTek cloud platform.

Setup smithtek-node-red-format

  1. Drag and drop the node into your Node-RED flow.
  2. If using multiple sensor data sources, connect a join node before this node.
  3. Ensure the input message is in JSON format.

The node will append an epoch timestamp to your JSON message. This timestamp can be sourced from the system's CPU time or from the global context "gnstime" if available. If the node detects GPS properties like "position", "lat", and "lng", it will format the GPS data accordingly.

Tick the box for global context timestamp Not ticked it will use the CPU timestamp

Warning

The CPU time is not suitable if your PassPort restarts during a store and forward operation and the WAN network is not available. You must make sure your network connection reliable.

Output

The node outputs the enriched JSON message. If GPS properties are detected, the output will also be formatted to include this data in the requisite SmithTek cloud format.

Functionality

  • Timestamp Addition: Every message is enriched with an epoch timestamp.
  • GPS Data Handling: Automatic detection and formatting of GPS data, if present in the input.

How to Use the Node

  1. Integrate the smithtek-node-red-format node into your flow.
  2. Feed it the expected JSON format containing your sensor data.
  3. Connect this node's output to the next component in your flow to get the enriched message.

Standard Sensor Data:

{ "sensor1": 1234, "sensor2": 4567 }

json objects with the gps detection must include the "position" "lat" "lng" properties. the position can have any value to ensure it is a valid key/pair

{ "sensor1":1234, "sensor2":4567, "position"1 "lat":52.12345 "lng":0.1234 }

License

Copyright (c) 2023 www.smithtek.com.au
Licensed under the terms of the GPLv3

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"... The rest of your license text

Acknowledgements

Special thanks to:

  • Nick O'Leary and Dave Conway-Jones for their invaluable contributions to the Node-Red community.

Contact: info@smithtek.com.au
Website: www.smithtek.com.au

1.2.0

2 months ago

1.0.3

3 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago

0.0.1

7 months ago