NodeRED Nodes which add support for MakeHaus tactile hardware Knobs, Buttons and Faders.
npm install node-red-contrib-makehaussudo apt install -y libudev-dev libusb-1.0-0-dev
prebuild-install: Permission denied
npm ERR! sh: 1: cmake-js: Permission denied
`
make sure that you're not running NodeRED as root! Instead, use the pi user or a dedicated NodeRED user.
$3
1. Get access to the terminal either via SSH or by connecting a keyboard and mose as well as a monitor.
1. You need to install some packages: sudo apt install -y libusb-1.0-0 libusb-1.0-0-dev libudev-dev build-essential git pkg-config
1. To grant NodeRED access to the usb serial ports, add the user to the dialout group using sudo usermod -a -G dialout nodered
1. Reboot: sudo reboot
1. Install the nodes via the NodeRED UI (menu -> palettes -> install)
If it doesn't work, try the following:
1. Make sure you're logged in as the dietpi user: su dietpi
1. Run cd /mnt/dietpi_userdata/node-red
1. Run npm i @makepro-x/makehaus-lib @elgato-stream-deck/core node-hid --build-from-source
1. Install the nodes via the NodeRED UI (menu -> palettes -> install)
Logging
In order to see more detailed logging, you need to set the environment variable DEBUG to mpx:&makehaus:.
$3
As NodeRED runs as a service on the DietPi image, you need modify /etc/systemd/system/node-red.service.
1. Add Environment="DEBUG=mpx:,makehaus:" after [Service]. The file should now look like this:
`
[Unit]
Description=Node-RED (DietPi)
[Service]
User=nodered
Environment="DEBUG=mpx:,makehaus:"
ExecStart=/mnt/dietpi_userdata/node-red/node_modules/.bin/node-red -u /mnt/dietpi_userdata/node-red
[Install]
WantedBy=multi-user.target
`
2. Reload the daemon: sudo systemctl daemon-reload
3. Restart the service: sudo systemctl restart node-red
4. View the logs: sudo journalctl -f -u node-red`