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

@phoenixcontactusa/node-red-contrib-tcrouter

v1.1.4

Published

Node red nodes for communicating with the Phoenix Contact TC Router

Downloads

4

Readme

node-red-contrib-tcrouter

Downloads

This repo contains the source code for node-red-contrib-tc-router. It is based on the nodejs library node-tcrouter for communicating with the Phoenix Contact TC Router. With this set of node-red nodes, one can send and receive text messages, start and stop vpn's, send emails, control the onboard output, read the on board input and monitor status information of the TC Router device. Using this library and the TC Router, one can easily monitor and interact with remote devices while minimizing the overall cost of their system.

Setup

In order to use the nodes in this node-red package, the TC Router device must be configured properly to enable the associated features. Setup guides can be found on the node-tcrouter gitbook page.

Nodes

Example Flow

send-sms

Sends text messages to a list of recipients from the SIM cards associated phone number. This block requires the following msg.payload with the following json format

{
    "contacts": "11122233333",
    "content": "hello world"
}

The contacts input can also accept an array of phone numbers for texting multiple numbers simultaneously:

{
    "contacts": ["1112223333","2223334444"],
    "content": "hello world"
}

send-email

Sends email from the configured SMTP server email address. This block requires a msg.payload with the following format

{
    "to": "[email protected]",
    "cc": "[email protected]",
    "subject":"Hello World",
    "body":"hello world from node-red-tcrouter"
}

receive-sms-check && receive-sms-ack

Provides the ability to receive text messages and then perform associated actions from within node-red. The "receive-sms-check" block requires an input trigger to check the router for new messages. An inject block with a timestamp payload is sufficient. The "receive-sms-ack" block also requires a simple trigger to clear the previous sms message from the router's memory.

get-io

Reads the on board inputs and output of the TC Router. Any input, such as an injected timestamp, will trigger this block to request the IO status of the associated tcrouter.

get-info

Gets the status information of TC Router. Useful information provided include RSSI (internet signal strength), internet connectivity status, SIM card and activation status, etc. To trigger this block to read the status information from the configured TC Router, any change in input is sufficient.

control-output

Sets the on board output of the TC Router to on or off based on the provided input. This block requires a msg.payload with the following json format

{
    "index": 1,
    "value": true
}

As of the writing of this document, the output index must be 1 (the TC Router has 1 available output). The "value" property must be a boolean value representing turning the output on (true) or off (false)

control-vpn

Turns a configured vpn on or off. Requires the following msg.payload input:

{
    "type":  2,      //must be 1 for ipsec, 2 for openvpn
    "index": 1,      //must be greater than 0 - index of the vpn configured
    "state": true   //true for on, false for off
}