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 🙏

© 2026 – Pkg Stats / Ryan Hefner

node-red-contrib-ipcbox-cm5

v1.0.5

Published

Native GPIO nodes for Waveshare IPCBOX-CM5 using gpiod tools

Readme

node-red-contrib-ipcbox-cm5

Custom Node-RED nodes for Waveshare IPCBOX-CM5 (Raspberry Pi CM5 based Industrial Controller).
These nodes provide high-performance, real-time monitoring and control for Digital Inputs (DI) and Digital Outputs (DO) by leveraging system-level gpiod tools.

Key Features

  • Ubuntu Ready: Well-tested on Ubuntu 24.04.4 LTS.
  • Real-time DI Monitoring: Uses hardware interrupts (via gpiomon) for instant response.
  • Initial State Sync: Automatically detects and outputs current DI status upon Node-RED startup.
  • Integrated Debounce: Built-in software filtering to eliminate mechanical switch noise.
  • Zero Compilation: No C++ build tools required, ensuring stability on modern Ubuntu/Debian kernels.

1. Prerequisites (System Tools)

Before installing this module, you must ensure that the gpiod library is installed on your system. Open your terminal and run:

sudo apt update
sudo apt install -y gpiod

2. GPIO Permission Setup (Crucial)

By default, Linux restricts hardware access to the root user. To allow Node-RED to control GPIOs, follow these steps to set up Udev Rules: Create the GPIO group and add your user:

# 1. Create group named "gpio"
sudo groupadd -f gpio

# 2. add now user (eg.ubuntu) join to group named "gpio"
sudo usermod -aG gpio $USER

# 3. Change the group ownership of device files (Temporary, valid until next reboot)
sudo chgrp gpio /dev/gpiochip*
sudo chmod g+rw /dev/gpiochip*

Create a new Udev rule file:

sudo nano /etc/udev/rules.d/99-gpio.rules

Paste the following line into the file:

SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", GROUP="gpio", MODE="0660"

Apply the changes and Reboot:

sudo udevadm control --reload-rules && sudo udevadm trigger
# It is highly recommended to reboot the system
sudo reboot

3. Installation

Once the system is configured, you can install the nodes locally or from the Node-RED Palette Manager. For Local Installation (using .tgz file):

cd ~/.node-red
npm install /path/to/node-red-contrib-ipcbox-cm5-1.0.0.tgz

4. Hardware Mapping Reference

The nodes are pre-configured for the IPCBOX-CM5 industrial board layout: | Function | Node Label | BCM GPIO | Electrical Logic | | :--- | :--- | :--- | :--- | |Digital Input 1 | DI1 | 23 | Inverted (24V = 0 / Low) | | Digital Input 2 | DI2 | 24 | Direct (24V = 1 / High) | | Digital Output 1 | DO1 | 27 | Open-Collector | | Digital Output 2 | DO2 | 22 | Open-Collector | | Indicator 1 | USER1 | 25 | Resistor Pull High | | Indicator 2 | USER2 | 26 | Resistor Pull High |

5. Usage

IPCBOX DI (Input Node)

  • Debounce (ms): Set the time interval to filter out contact bounce from mechanical switches.
  • Output: Returns msg.payload as true (Active/24V) or false (Inactive/Disconnected).
  • Topic: Outputs as input/DI1 or input/DI2. IPCBOX DO (Output Node)
  • Input Payload: Accepts true/false, 1/0, or "ON"/"OFF".
  • Hardware Action: Activating DO will pull the Open-Collector output to Ground (RGND). IPCBOX INDICATOR (Output Node)
  • Input Payload: Accepts true/false, 1/0, or "ON"/"OFF".
  • Hardware Action: The outputs use an 3.3V pull-high with a resistor design. Activating the channel will sink PGIO to Ground.

Example Flow

This package includes a pre-built example. Go to Import -> Examples -> node-red-contrib-ipcbox-cm5 -> Basic GPIO Usage to get started.


License

MIT License - Developed by Iden Tech.