cncjs-pendant-streamdeck
v1.2.0
Published
A cncjs pendant for the Elgato Stream Deck
Readme
cncjs-pendant-streamdeck
A ridiculously configurable mobile web and Elgato Stream Deck pendant for CNCjs + Grbl


The web version acts as a prototype for the Stream Deck, and powerful and useful pendant as a side effect.
All configuration takes place in config.json. An example, mostly matching my own interface, is included to get started.
You can use your own images, or those included with the pendant, courtesy czottmann's system-uicons and fluent system icons and a handful from Font Awesome.
Features
- Works with or without a Stream Deck, either as CLI process or web pendant
- Linux-friendly, does not use default Stream Deck software
- Unlimited pages
- Arbitrary grid dimensions for web version
- Excessively customizable
- Execute one or more actions on press, release, and/or button hold
- Support up to 6 axes
- Multi axis smooth jogging
- Templated text for
- Lots of included icons, or add your own
- Display and animate gcode
- Run macros
- Run cncjs custom commands (ex: to restart the system or update packages)
- Manage alarms, hold, and pause events (like macro-triggered tool changes)
- Custom configuration is well documented
- Configuration validator
- Full GUI config editor
Compatibility
This has been tested with Grbl 1.1h, CNCjs 1.9.26 and Node 14.20.0+
Documentation
Full documentation can be found at https://billiam.github.io/cncjs-pendant-streamdeck
Installation
Web
- Download the latest release and extract it, to ex:
/home/my-name/cncjs-pendant-streamdeck - Rename
config.example.jsontoconfig.json - Update the
config.jsonfile with your connection information in thecncjssection. - Edit your
~/.cncrcfile, adding a mount point for this pendant"mountPoints": [ { "route": "/grid", "target": "/home/pi/cncjs-pendant-streamdeck" } ] - Restart CNCjs
Stream Deck
Follow Web steps above to generate create a configuration directory, config.json file, and button images.
You can skip the cncrc step if you do not need the web interface.
Linux
Instructions borrowed from https://github.com/julusian/node-elgato-stream-deck
On linux, the udev subsystem blocks access to the StreamDeck without some special configuration.
Save the following to /etc/udev/rules.d/50-elgato.rules and reload the rules with
sudo udevadm control --reload-rules
SUBSYSTEM=="input", GROUP="input", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0060", MODE:="666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0063", MODE:="666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006c", MODE:="666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006d", MODE:="666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0080", MODE:="666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0086", MODE:="666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0060", MODE:="666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0063", MODE:="666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006c", MODE:="666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006d", MODE:="666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0080", MODE:="666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0086", MODE:="666", GROUP="plugdev"Unplug, and replug the device after reloading rules if necessary.
Install Stream Deck and canvas dependencies:
apt-get install libusb-1.0-0-dev libudev-dev libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-devInstall optional node dependencies:
npm install -g canvas @julusian/jpeg-turboInstall the application:
npm install -g cncjs-pendant-streamdeckRun the pendant
cncjs-pendant-streamdeck --directory /home/my-name/cncjs-pendant-streamdeckEditor

After installing the web version, visit /grid/editor.html in your browser to load the configuration editor.
Update your connection information first, which can be done from the settings gear in the upper right corner, since this will allow you to see the cncjs state as normal from the editor.
General interface settings, like the color palette used and CNC settings can be changed in the same settings popup.
Afterward, you can add or remove scenes in the scene list, edit or add new buttons, and change their behavior.
Limitations
- The editor does not know about your own custom icons, so they will not appear in the icon selector
- To save your changes, you must download the new configuration using the save icon in the upper right corner of the screen, and replace your existing configuration with this one on your cncjs device. You'll need to reload the pendant page or restart the pendant service (for Stream Deck) to see your changes.
- The layout of the file list view, which uses cncjs's watch folders, cannot be edited. You can change the appearance of
the buttons used in this view from the
fileListscene in the scenes list.
Licenses and credits
Several icon sets have been added for convenience
- czottmann - streamdeck-iconpack-fluentui-system-icons - MIT
- czottmann - streamdeck-iconpack-system-uicons - MIT
- fontawesome - CC BY 4.0
Alterations: SVG images have been converted to PNG
