Control WiZ smart light fixtures using DMX over Art-Net protocol. This application provides a web interface for managing WiZ fixtures and automatically bridges Art-Net DMX data to control them.
This is a project I created for a local church with smart lights that also doubles as a theater stage. It's meant to be tiny and run on a raspberry pi.
- Device Management: Create, read, update, and delete WiZ fixture configurations
- Auto-Discovery: Scan your network to find WiZ fixtures automatically
- Art-Net Bridge: Daemon process that maps DMX channels to WiZ fixtures in real-time
- Web Interface: Clean, responsive UI for managing fixtures and monitoring status
- Auto-Restart: Art-Net daemon automatically restarts on failure with exponential backoff
- JSON Storage: Simple file-based storage for device configurations
-
Install dependencies:
npm install
-
Start the server:
npm start
-
Open your browser to:
http://localhost:3000
- Click Scan Network in the "Discover WiZ Fixtures" section
- Wait 3 seconds for the scan to complete
- Found fixtures will appear with their MAC address, IP, and status
- Click Add next to a discovered fixture to pre-fill the form
- Set the DMX channel number and click Add Device
Each fixture requires:
- MAC Address: Unique identifier (cannot be changed after creation)
- IP Address: Current network IP
- Name: Friendly name for the fixture
- Type: Fixture type (e.g., "WiZ RGB", "WiZ Tunable")
- Channel: Starting DMX channel (uses 6 consecutive channels for full control)
The Art-Net daemon automatically starts with the server and:
- Listens for Art-Net DMX data on your local IP
- Maps DMX channels to WiZ fixtures based on database configuration
- Each fixture uses 6 consecutive DMX channels
- Reloads device configuration every 60 seconds
DMX Channel Mapping (per fixture): Each fixture uses 6 consecutive channels starting at the configured channel number:
- Channel + 0: Red (0-255)
- Channel + 1: Green (0-255)
- Channel + 2: Blue (0-255)
- Channel + 3: Cool White (0-255)
- Channel + 4: Warm White (0-255)
- Channel + 5: Dimmer/Brightness (0-255, converted to 0-100%)
DMX Mapping Examples:
- Fixture 1 on channel 1: Uses DMX channels 1-6 (R, G, B, C, W, Dimmer)
- Fixture 2 on channel 10: Uses DMX channels 10-15 (R, G, B, C, W, Dimmer)
- Fixture 3 on channel 20: Uses DMX channels 20-25 (R, G, B, C, W, Dimmer)
- Start: Manually start the Art-Net daemon
- Stop: Stop the Art-Net daemon (disables DMX control)
- Status indicator shows running state and restart count
- server.js: Express backend with REST API and daemon management
- storage.js: JSON file-based storage module
- wiz-discovery.js: UDP broadcast discovery for WiZ fixtures
- artnet-daemon.js: Art-Net to WiZ bridge process
- public/index.html: Frontend web interface
GET /api/devices- List all devicesGET /api/devices/:macAddress- Get specific devicePOST /api/devices- Create new devicePUT /api/devices/:macAddress- Update deviceDELETE /api/devices/:macAddress- Delete devicePOST /api/discover- Discover WiZ fixturesGET /api/artnet/status- Get daemon statusPOST /api/artnet/start- Start daemonPOST /api/artnet/stop- Stop daemon
Devices are stored as individual JSON files in the data/ directory:
- Filename:
{MAC-ADDRESS}.json - Auto-created on first run
The application communicates with WiZ fixtures using JSON over UDP port 38899:
Get Status:
{"method":"getPilot","params":{}}Set RGB Color:
{
"id":1,
"method":"setPilot",
"params":{
"r":255,
"g":0,
"b":0,
"dimming":100
}
}Set RGB with Cool/Warm White:
{
"id":1,
"method":"setPilot",
"params":{
"r":255,
"g":128,
"b":0,
"c":100,
"w":50,
"dimming":80
}
}Parameters:
r,g,b: Red, Green, Blue values (0-255)c: Cool white intensity (0-255)w: Warm white intensity (0-255)dimming: Overall brightness percentage (0-100)
MIT