An Edrys module that automatically controls Elgato lights in stations based on user presence. When users enter a station, the lights turn on, and when the last user leaves, the lights turn off.
To add the module to your Edrys class, import the following URL:
https://edrys-labs.github.io/module-station-light-control/index.html
The system consists of two main components:
- Frontend Module: An Edrys module that runs in a station and monitors user presence
- Backend Server: A lightweight NodeJs server that runs locally on the station machine and communicates with the Elgato light
- The module detects user presence changes in the station using the Edrys API
- When status changes, the module sends a request to the backend server
- The server communicates with the Elgato light using its REST API
- The light turns on/off based on the command
You can run the server using Docker:
docker run --init -p 3000:3000 edryslabs/station-lights-server
- Add the Station Light Control module to your Edrys class (it should only be visible in station mode)
- In the module settings, configure:
- lightIp: The IP address of your Elgato light (e.g.,
192.169.1.100
)
- lightIp: The IP address of your Elgato light (e.g.,
- Elgato Key Light
- Connected to the same network as the server
- API access enabled
The backend server provides these endpoints:
GET /api/light?ip={light-ip}
: Get the current light statusPOST /api/light
: Update light state with the following body:{ "on": 1, // 1 for on, 0 for off "brightness": 50, // 0-100 "temperature": 213, // Color temperature "ip": "192.169.1.100" // Light IP address (lightIp) }
POST /api/heartbeat
: Send a heartbeat to keep track of active stations (ensures lights are turned off when a station window is closed, but the light is still on):{ "stationId": "unique-station-id", // Unique identifier for the station instance "lightIp": "192.169.1.100", // Light IP address "lightState": true // Current state of the light (true if on, false if off) }