Simple node script which listens for certain events from socket.io and switches colors on a PWM or WLED strip, matching each color configured for a player
- Install all node dependencies
npm install - Run with
VENUE=<id> npm start
# ... or for testing PWM
VENUE=<id> npm run mock- Make sure
matchis started on a venue withhas_led_lights(PWM) orhas_wled_lights(WLED) enabled.
If you are using a PWM strip, make sure to set correct GPIO pins for the RGB strip via environment variables RED, GREEN and BLUE.
For WLED two different modes are supported, either direct serial (USB) mode, or via the HTTP API.
The easiest is using the HTTP API, by adding the IP address of your WLED instance under venue settings in kcapp
If only the has_wled_lights setting is enabled, it will attempt to connect via serial. To use this the correct serial port must be specified via the SERIAL environment variable on startup
