node-red-contrib-pixelit 1.0.1
PixelIt Project
node-red-contrib-pixelit
Node-RED nodes to control the PixelIt easily and comfortably.
Requirements and installation
Use Node.js 22 or newer and Node-RED 2 or newer. Install node-red-contrib-pixelit
through Manage palette → Install, then restart Node-RED. Alternatively, run
this in your Node-RED user directory (usually ~/.node-red):
npm install node-red-contrib-pixelit
Quick start
Import examples/quick-start.json through the Node-RED Import dialog. Set your PixelIt device's IP address in the Core node, deploy, and click Display text. This sends a five-second text alert through HTTP. The Debug node shows the outgoing MQTT message.
For MQTT, connect Core's output to an MQTT Out node configured to use
msg.topic, and set Core's Master-Topic to the topic configured on your PixelIt.
The IP address is optional when using MQTT only. Both transports are used when
an IP and an MQTT output connection are configured. Enter your PixelIt UUID in
Core when downloading bitmap IDs from the bitmap API.
Text fields that support message references accept values such as
{{msg.payload}} or {{msg.payload.seconds}}.
To rotate screens, use Screen Init → Text/Clock/Bitmap → Screen Data Update →
Core to store each named screen. Then send an array such as
[{"screenName":"weather"},{"screenName":"clock"}] through Playlist Update →
Core. An empty array stops rotation. Each screen needs a positive duration in
seconds, at most 2147483. Invalid playlists are rejected without replacing the
current playlist. Alerts temporarily interrupt rotation; sleep mode pauses it.
Example flows
Find these in Import → Examples → node-red-contrib-pixelit or import the JSON files directly. Every package node is demonstrated, using only this package and built-in Node-RED nodes:
- quick-start.json: Screen Init, Text, Alert Screen and Core.
- playlist.json: Clock, Bitmap, Screen Data Update and Playlist Update. Store both screens before starting playback; an empty playlist stops rotation.
- bar-effects.json: Two Bar nodes with a moving gradient, a rainbow and a fixed LED override.
- animations.json: Bitmap Animation and Switch Animation, using inline frames without API downloads.
- controls.json: Matrix Control, Sound, GPIO Control and Matrix Config. Review the GPIO pin, audio hardware and all configuration fields before sending to a device. Debug is disabled because configuration messages can contain credentials.
All Inject nodes are manual. Core starts without a device IP so importing and
deploying only prepares the examples. Set an IP for HTTP or connect an MQTT Out
node using msg.topic to control a device. npm run check checks JSON, wire
references and coverage of all registered non-config node types, including nested
example directories.
Text color effects
Open Text and choose Solid, Gradient or Rainbow. For a gradient, set the end color. Leave the direction set to By character for static per-character coloring, or select one of eight directions. Set Cycle to 250–60000 ms for motion. When no direction is selected, a moving effect goes left to right.
Character colors accepts a JSON array such as ["#FFFFFF", null, "#FFD000"]
for the first 64 displayed characters, including spaces. Entries set to null
inherit the effect. End color, cycle and character colors accept message
references. The new effects require compatible PixelIt firmware.
Bar color effects
Add a Bar node after Screen Init. Chain several Bar nodes to draw them
in order, then use Alert Screen or Screen Data Update before Core.
Each node appends a line to msg.bars; it preserves any existing msg.bar and
earlier lines. A Function node can also supply the firmware-format properties.
Set the start and end coordinates and choose Solid, Gradient or
Rainbow. For a gradient or rainbow, select one of eight directions or
leave Start to end selected. Leave Cycle blank for static colors or
use 250–60000 ms for motion. LED colors accepts a JSON array of up to 64
colors such as [null, "#FFFFFF"], counted from the line's start. Entries set
to null inherit the effect. Coordinates, colors, cycle and LED colors also
accept message references such as {{msg.payload}}.
Color effects and LED overrides require compatible PixelIt firmware. Bars are hidden during scrolling text. Each screen can contain up to 32 bars added by Bar nodes, within the device payload budget.
Screen transitions
In the Animations example, open Switch Animation, turn it On and select Curtain, Pixel Dissolve, Slide, Blinds, CRT, Glitch or Vertical Slide under Animation style. Deploy the flow and trigger the example. These styles require compatible PixelIt firmware and screen content. With firmware that supports the expanded Random mix, a screen message can also select any of these styles. Older firmware keeps its original mix of Fade, Colored Bar Wipe and Zig Zag Wipe. Choose Bitmap Wipe explicitly to supply its bitmap.
Existing MQTT passwords
Matrix Config now stores its MQTT password using Node-RED credentials. Existing flows continue to work using their legacy password. Open each existing Matrix Config node, save it with Done, and deploy to move its password out of the normal flow properties into credentials. Previously exported flows and backups may still contain the old password. Keep Node-RED's credential secret and credential store with your deployment backup; ordinary flow exports do not include the credential password.
Matrix Config must still send the password to the device when applying its MQTT configuration. Its output messages therefore contain the password: avoid logging or exporting those messages.
HTTP requests and bitmap caching
Core caches up to 100 bitmaps (1 MiB total), removing least recently used entries first. New screen commands cancel outdated requests. HTTP requests time out after one second; failures appear in the node status and Node-RED log.
Development
npm ci
npm run check
npm test
Checks cover runtime/editor JavaScript syntax and example JSON. Regression tests use an isolated Node-RED stub, fake timers and mocked HTTP calls to exercise playlist validation, shutdown, failed bitmap downloads, message references and credential migration. CI runs them on Node.js 22 and 24, and the release workflow runs them before publishing. Hardware and editor integration should also be checked in a real Node-RED installation before release.
Example
![]()
Publishing releases
Push a release tag on the current default branch tip. Both v0.7.0 and
0.7.0 are accepted. Add release notes under Unreleased below, commit
them on the default branch, then create and push the tag.
git tag v0.7.0
git push origin v0.7.0
The workflow sets the version in package.json and package-lock.json,
validates the package, and updates the default branch and tag together. A
stable release moves Unreleased to a dated version section. Tags such as
v0.7.0-beta.1 and v0.7.0-rc.1 use Unreleased for their notes and leave
it in place. Stable releases publish to npm's latest dist-tag, and beta
and RC releases publish to next.
The prepared tag starts a separate publication run so npm provenance references the commit being published. The run publishes to npm and then creates the GitHub release. If publication fails after preparation, dispatch Release on the prepared tag to retry. The workflow skips an npm version that is already present with matching package integrity. Fetch the updated tag after the workflow finishes.
npm Trusted Publishing must allow npm publish for
pixelit-project/node-red-contrib-pixelit using workflow file release.yml
with no environment name. GitHub branch and tag rules must permit the
Actions token to update both refs and dispatch publication.
Changelog
Unreleased
1.0.1 (2026-11-29)
- Add a Bar node with gradients, rainbows, color cycles and individual LED colors.
- Add gradients, rainbows, color cycles and individual character colors to Text.
0.6.0 (2026-11-13)
- (o0shojo0o) Add Curtain, Pixel Dissolve, Slide, Blinds, CRT, Glitch and Vertical Slide to the Switch Animation editor. These transitions require compatible PixelIt firmware; Vertical Slide also requires a screen payload.
- (o0shojo0o) Clarify firmware-dependent Random selection in the editor, node help and README. Compatible firmware can include the new transitions when the message contains screen content; Bitmap Wipe must be selected explicitly.
0.5.3 (2026-10-31)
- (o0shojo0o) Automatically detect 8×8 and 32×8 bitmap animation dimensions in Core from the pixels per frame, including gallery downloads and cached animations. No manual size configuration is needed.
0.5.2 (2026-10-28)
- (o0shojo0o) Keep PixelIt HTTP failures visible in node status without repeated debug warnings; log each outage and recovery once per screen/config endpoint. Bitmap errors remain warnings. Fixes #90.
0.5.1 (2026-10-28)
- (o0shojo0o) Bound the bitmap cache to 100 entries / 1 MiB with least-recently-used eviction.
- (o0shojo0o) Cancel superseded screen requests and discard stale responses and error statuses.
- (o0shojo0o) Distinguish HTTP errors, timeouts, connection failures and invalid bitmap responses in node status and logs.
- (o0shojo0o) Add example flows covering all 14 nodes and validate example coverage automatically.
0.5.0 (2026-10-28)
Requires Node.js 22 or newer. Existing Matrix Config nodes should be opened, saved and deployed to migrate MQTT passwords to credentials.
- (o0shojo0o) Replace Axios with native fetch; abort HTTP requests after one second or on node close.
- (o0shojo0o) Stop playlist timers and suppress late sends when Core is closed.
- (o0shojo0o) Validate playlists and durations; allow an empty playlist to stop rotation.
- (o0shojo0o) Fix dynamic Clock/Sound values and bitmap download error handling.
- (o0shojo0o) Store Matrix Config MQTT passwords in Node-RED credentials with legacy migration.
- (o0shojo0o) Require Node.js 22+, add regression tests, CI checks and an importable example.
0.4.0 (2024-10-07)
- (o0shojo0o) added PixelIt UUID to Core-Node (is necessary in the future to use the API)
- (o0shojo0o) update dependencies
0.3.14 (2022-08-16)
- (o0shojo0o) better JSON error handling
0.3.13 (2022-08-13)
- (o0shojo0o) update URLs
0.3.12 (2022-02-06)
- (o0shojo0o) fix Typos
0.3.11 (2022-02-06)
- (o0shojo0o) added HexColor to Clock Node
- (o0shojo0o) added HexColor to Text Node
- (o0shojo0o) added Zig Zag Wipe to SwitchAnimation Node
- (o0shojo0o) added Bitmap Wipe to SwitchAnimation Node
- (o0shojo0o) added Random to SwitchAnimation Node
0.3.10 (2021-12-03)
- (o0shojo0o) added better error handling
0.3.9 (2021-05-26)
- (o0shojo0o) added GPIO Control
0.3.8 (2021-04-07)
- (o0shojo0o) bugfix 'Text.Scroll' -> on
0.3.7 (2021-03-27)
- (o0shojo0o) bugfix SleepMode brightness
- (o0shojo0o) bugfix Brightness
0.3.6 (2021-03-24)
- (o0shojo0o) bugfix 'Text.Scroll'
0.3.5 (2021-03-22)
- (o0shojo0o) bugfix 'SleepMode'
0.3.4 (2021-03-21)
- (o0shojo0o) bugfix 'Alert Screen'
0.3.3 (2021-03-20)
- (o0shojo0o) code refactor
- (o0shojo0o) removed old references and adjusted the code
- (o0shojo0o) request replaced by axios
- (o0shojo0o) fix axios exceptions
0.3.2 (2020-06-10)
- (o0shojo0o) New API address
0.3.1 (2019-12-27)
- (o0shojo0o) Bugfix undefined exception
0.3.0 (2019-12-26)
- (o0shojo0o) Added support für new sound feature of Pixel It v. 1912182240