If anyone is interested in this, I got some basic stuff working using HTTP calls through PostMan, which could be easily translated to a driver / app in HE. This just sets two similar colours across two zones on the LED strip around the mousepad. I would send a 1 or 0 depending on whether I want this effect on (1), or the lighting turned off (0). I'd like to look at more complicated lighting effects eventually, then try and tie this in with other automations, such as turning the lights off when I go to bed and maybe when I am working from home.
The example was built using SS's notes here.
The Setup
1. Register the "Game"
HTTP POST: http:// < IP of PC > : < SS Engine Port > /game_metadata
Body:
{
"game": "LIGHTING",
"game_display_name": "Smart Lighting",
"developer": "sburke781",
"deinitialize_timer_length_ms": 60000
}
2. Register Game Event
HTTP POST: http:// < IP of PC > : < SS Engine Port > /register_game_event
Body:
{
"game": "LIGHTING",
"event": "ON_OFF",
"min_value": 0,
"max_value": 100,
"icon_id": 0,
"value_optional": false
}
3. Bind Game Event
HTTP POST: http:// < IP of PC > : < SS Engine Port > /bind_game_event
Body:
{
"game": "LIGHTING",
"event": "ON_OFF",
"min_value": 0,
"max_value": 1,
"handlers": [
{
"device-type": "indicator",
"zone": "one",
"color": {
"red": 255,
"green": 24,
"blue": 0
},
"mode": "color"
},
{
"device-type": "indicator",
"zone": "two",
"color": {
"red": 255,
"green": 24,
"blue": 0
},
"mode": "color"
}
]
}
Activating the Game Event
4. Game Event
HTTP POST: http:// < IP of PC > : < SS Engine Port > /game_event
Body:
{
"game": "LIGHTING",
"event": "ON_OFF",
"data": {
"value": 1
}
}
5. Heartbeat (Optional)
HTTP POST: http:// < IP of PC > : < SS Engine Port > /game_heartbeat
Body:
{
"game": "LIGHTING"
}