June 17, 2022: Node-RED Flows have been updated to v1.01.02 to support the latest CTR2 firmware.

When you update to v1.xx.xx CTR2 firmware YOU MUST update your Node-RED flow too (if you’re using Node-RED).

This is the latest version of the CTR2 Node-RED flows. To update your running version, download this file and unzip it. Next, rename it to flows.json then copy it over the same file in your {home}/.node-red/ folder. In the user interface, open the Config page and verify the HMI Rev Date matches the date above. It should also match the Code Rev Date of the code running on the Teensy.

Node-RED can provide a user interface for the HMI in place of the Nextion touchscreen display. Instructions for installing Node-RED, importing the CTR2 flows, and connecting it to your HMI can be found in this post.

Before you import CTR2 flows into Node-RED, load the required support nodes from the Palette Manager. Here’s screen shot of what you’re palette should look like before importing my flows.

You can install Node-RED on a Windows, Mac, or Linux machine. I’ve had good luck with a Raspberry Pi (Pi 3B+ and Pi 4). Visit https://nodered.org/ to download the Node-RED developers package for your PC and learn about how it works. They have a script to install Node-RED on the Raspberry Pi that makes the process super easy. Once you get the hang of it I’m sure you’ll come up with many other uses for it (shack automation comes to mind). There’s an active forum for ham applications here.

The Raspberry Pi’s GPIO serial port can connect directly to the Local Display port on the HMI. Here’s the schematic:

When you first install Node-RED you’ll need to edit it’s settings.js file to create a secure login account and password. This process is explained in detail on their security page.

You may also want to change the default editor used to edit JavaScript in the program. This can also be changed in the settings.js file. Under the editorTheme topic, scroll down to codeEditor: and under lib: replace ace with monaco. Monaco gives you some syntax checking that really helps when you’re new to JavaScript.

Even if you don’t have HMI hardware built yet these flows will let you test drive the CTR2 web based interface. Be forewarned that most features will not work without the HMI since it does the “heavy lifting”. The Node-RED interface simply interprets what the HMI is sending it.

Download the following file, unzip it, and use the Import menu option in Node-RED to import these flows into Node-RED. Be forewarned, there are a lot of tabs and over 1800 nodes. Meaning it is tedious to remove the flows and the web pages if you want to remove it!

NOTE: To decide if the Node-RED web based solution is right for you, I highly suggest installing Node-RED and these flows on a new Raspberry Pi install to try it out. This is easy to do with the Raspberry Pi Imager software. Just insert a spare SD card in your PC and install the latest edition of Raspberry Pi OS (32-bit). Insert that card into your Pi, setup the initial settings, and install Node-RED and these flows. I’ve tested my flows on several Raspberry Pi’s I have laying around and found that it runs best (of course) on my Pi 3B+ and Pi4. It will run on a Pi B+, but it is irritatingly slow.

While you’re at it, download SonoBus to manage the 2-way audio required to operate CTR2 remotely over the web. Jesse has done a great job creating a high-performance, low-latency point-to-point (no intermediate servers or services) audio application that works well with the digital audio from Teensy audio adapter.