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

node-red-contrib-vlora

v0.3.0

Published

VLora VFlow nodes

Downloads

16

Readme

VLora Node-RED nodes

This package contains VLora nodes for using with Node-RED.

example flow

Installation

Please read the Adding nodes to the palette documentation for information on installing third-party nodes to Node-RED.

Example command:

npm install node-red-contrib-vlora

Usage example

This usage example creates an echo flow, which returns the received uplink back to the device.

MQTT in node (Node-RED)

After the node-red-contrib-vlora package has been installed, the first thing you must do is create a MQTT subscription using the mqtt in node.

  • Add the mqtt in node to your flow.
  • Under properties select Add new mqtt-broker... and click the pencil icon.
  • Enter the hostname of the server, when using TLS the port-number is usually 8883, else 1883.
  • When using TLS make sure the Use TLS option is checked, select Add new tls-config... and click the pencil button.
    • If the MQTT broker is configured with client-certificate authentication and authorization, retrieve the certificate using the Generate certificate within the VLora Application Server web-interface. Then upload the retrieved CA certificate, client-certificate and private key. Uncheck verify server certificate as the server-certificate will already be validated using the provided CA certificate. The click Add.
  • Click once more Add, this takes you back to the initial form.
  • As Topic enter application/+/device/+/event/+ (in case you have modifications to the default VLora configuration, modify this topic if needed).
  • Click Done.

After deploying the flow containing the mqtt in node, you should see a green bullet under the node with the status connected. If that is not the case, validate the hostname, port and TLS configuration (if appliable).

Device event node (VLora)

After setting up the mqtt in node, add one or multiple device event nodes. For each node you can select the Event Type. For this usage example select Uplink. Connect this node with the mqtt in node.

Debug node (Node-RED)

Add a debug node and connect it with the device event [up] node to log the msg.payload for debugging.

Echo function node (Node-RED)

Add a function node, and add the following code to the On Message event:

return {
  payload: msg.payload.data,
  fPort: msg.payload.fCnt,
  confirmed: false,
  devEui: msg.payload.deviceInfo.devEui,
};

Connect this node with the device event [up] node.

Downlink node (VLora)

Add a device downlink node and enter:

  • The hostname:port of the server (e.g. localhost:8080 or example.com:443). this is the same hostname and port which is used to access the VLora Application Server, but without the http:// or https://.
  • Select Use TLS when the endpoint is secured with a TLS certificate.
  • Generate an API Key in the VLora Application Server and paste the token under API Token.
  • For this example set the Payload Encoding to Base64, as the uplink payload is encoded within the JSON payload as Base64.

Connect this node with the echo function node.

Debug node (Node-RED)

Add an other debug node and connect it with the downlink node. This will print the downlink frame-counter as debugging information. Make sure the Output is set to complete msg object.