USB Relay
Control simple USB HID Relays using Node JS like this one:

To install
npm i @josephdadams/usbrelay
To use:
const USBRelay = require("@josephdadams/usbrelay");
const relay = new USBRelay();
To use a specific relay, specify a HID path:
const relay = new USBRelay(path);
Get connected relays:
USBRelay.Relays;
Set relay state:
relay.setState(1, true);
relay.setState(1, false);
Relay numbers are NOT zero-based, so if you want to refer to Relay #1, use 1.
To turn all relays off:
relay.setState(0, false);
To turn a relay on, wait 1 second, and then turn off:
relay.setState(1, true);
setTimeout(function () {
relay.setState(1, false);
}, 1000);