npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

smithtek-node-red-format

v1.4.0

Published

A custom node for Node-RED to format messages with timestamps.

Downloads

15

Readme

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: [email protected]
Website: www.smithtek.com.au