Use the webhook service to trigger any IRemoteControl command from simple HTTP requests. This guide expands on the summary in the main manual and walks through setup, payload formats, and tooling examples using curl, PowerShell, and Postman.
%AppData%\EliteG19s\options.json."Webhooks" section (create it if absent):{
"Webhooks": {
"IsEnabled": true,
"Port": 32123
}
}
IsEnabled: turns the listener on or off (default false).Port: TCP port for incoming requests (default 32123).http://localhost:<port>/.Note: The listener currently binds to
localhostonly. To expose it outside the machine, use an HTTP reverse proxy or tunnelling tool and secure the connection yourself.
| Endpoint | Method | Purpose |
|---|---|---|
/health or / |
GET |
Returns { "status": "ok" } when the listener is running. |
/remote-control (or /) |
POST |
Execute an IRemoteControl command. |
Send JSON with at least a command property. Additional properties become command parameters. You may also nest them under parameters.
{
"command": "SwitchScreen",
"screenName": "Status"
}
Successful responses:
{
"success": true,
"command": "SwitchScreen",
"result": null
}
Errors return HTTP 4xx/5xx and:
{
"success": false,
"error": "Unknown command 'Foo'"
}
Every webhook command maps 1:1 to an IRemoteControl method. The tables below list every handler, the payload properties it understands, plus important value ranges. Unless stated otherwise commands return success: true with a null result.
| Command | Parameters | Effect |
|---|---|---|
VolumeUp |
None | Raises master volume (small steps below 10%, larger above). |
VolumeDown |
None | Lowers master volume. |
ChangeVolume |
delta (int -100..100) |
Adds delta/100 to master volume; hitting the limits clamps to mute/100%. |
Mute |
None | Toggles global mute (also syncs space-traffic chatter). |
| Command | Parameters | Effect |
|---|---|---|
StopMusic |
None | Releases the current audio source. |
PauseMusic |
None | Pauses the active track/stream. |
GoToNextTrack |
None | Skips to the next queued item. |
GoToPreviousTrack |
None | Returns to the previous item. |
ShuffleMusic |
None | Toggles shuffle on the active provider. |
MusicSkipForward |
None | Jumps forward ~30 seconds when supported. |
MusicSkipBack |
None | Jumps backward ~30 seconds when supported. |
| Command | Parameters | Effect |
|---|---|---|
ListenToRadiostation |
station (string) |
Starts a radio preset defined in %AppData%\EliteG19s\options.json (RadioStations). Case-insensitive. |
ListenToSpotifyPlaylist |
playlist (string) |
Plays a named Spotify preset from options.json. |
ListenToPodcast |
podcast (string) |
Streams the newest episode of a configured podcast. |
ListenToMusicFolder |
folder (string path) |
Recursively queues supported files under the folder and resumes the last position when available. |
StreamMusicUrl |
url (absolute URI) |
Starts streaming from an HTTP(S) source. |
ListenToPlaylist |
path (string path) |
Loads and plays a .m3u/.m3u8 playlist file. |
WatchYoutubePreset |
preset (string) |
Removed: YouTube/Twitch presets are no longer supported. Use SwitchScreen with the WebBrowser screen and provide a URL instead. |
| Command | Parameters | Effect |
|---|---|---|
SwitchScreen |
screen (string) |
Brings the named screen to the front on every display. Built-in choices include Status, Orrery, Menu, Options, Radio, Spotify, AudioVisualization, News, WhatsNew, Camera, GPS, Youtube, and Twitch (additional custom screen names from your setup will also work). |
ShowAudioVisualization |
visualization (string) |
Loads an audio visualization. Accepted names (case-insensitive): Cassette, Orrery, Equalizer, Full Screen Cover Art, Full Screen Equalizer, Starfield, Waveform, Spectrogram. |
| Command | Parameters | Effect |
|---|---|---|
ListenToSpaceTrafficControl |
enabled (bool/0/1) |
Enables or disables space-traffic chatter. |
SpaceTrafficVolumeUp |
None | Steps the chatter volume up. |
SpaceTrafficVolumeDown |
None | Steps the chatter volume down. |
ChangeSpaceTrafficVolume |
delta (int -100..100) |
Adds delta/100 to the chatter volume. |
NPCVolumeUp |
None | Steps NPC speech volume up. |
NPCVolumeDown |
None | Steps NPC speech volume down. |
ChangeNPCVolume |
delta (int -100..100) |
Adds delta/100 to NPC speech volume. |
| Command | Parameters | Effect |
|---|---|---|
ButtonUp, ButtonDown, ButtonLeft, ButtonRight, ButtonMenu, ButtonOK, ButtonCancel |
None | Simulates the named Logitech G19 button press. |
Button |
button (string) |
Sends an arbitrary button by name; accepts Up, Down, Left, Right, Menu, OK, Cancel, or Mono0..Mono3. |
SelectInteractiveOption |
option (string) |
Chooses an answer on interactive overlays (case-insensitive match). |
| Command | Parameters | Effect |
|---|---|---|
OrreryZoomIn, OrreryZoomOut, OrreryFaster, OrrerySlower, OrreryResetView |
None | Adjust the Orrery screen zoom, time scale, or reset view. |
MarkPosition |
None | Stores the commander’s current location in the GPS manager. |
NextWaypoint |
None | Cycles to the next saved waypoint. |
| Command | Parameters | Effect |
|---|---|---|
FindCommodity |
commodity (string), isBuying (bool) |
Searches Inara for the best buy/sell location near the current system. |
AddToShoppingList |
commodity (string), amount (int) |
Adds or updates a shopping-list entry; amount <= 0 removes it. Commodity names are fuzzy-matched. |
ReadShoppingList |
None | Speaks the current shopping list aloud. |
ClearShoppingList |
None | Empties the shopping list. |
| Command | Parameters | Effect |
|---|---|---|
GetStatus |
None | Returns a LocationDTO describing commander ranks, ship, system/station, planetary coordinates, power settings, and dozens of boolean flags (IsDocked, IsInSuperCruise, etc.). |
GetWhatsPlaying |
None | Returns an AudioMetadataDTO with station, artist, album, title, and base64-encoded coverArt. |
| Command | Parameters | Effect |
|---|---|---|
ShowMessage |
message (string) |
Displays a toast message on-screen. |
Speak |
text (string), useCache (bool, optional, default false) |
Sends raw TTS to the ship board computer; cached requests reuse generated audio when useCache is true. |
SpeakMessage |
key (string), args (array, optional) |
Speaks a localized Ship AI line. Provide args as a JSON array that fills format placeholders, e.g. "args": ["Jameson", 42]. |
Log |
message (string) |
Writes an informational line to log.txt when verbose logging is enabled. |
LogError |
message (string) |
Writes an error entry to log.txt (always logged when logging is enabled). |
Boolean parameters accept JSON
true/falseor1/0. String comparisons ignore letter case unless noted. When a payload omits an optional property the handler falls back to safe defaults.
curl.exe http://localhost:32123/remote-control ^
-H "Content-Type: application/json" ^
-d "{\"command\":\"ChangeVolume\",\"delta\":15}"
Invoke-RestMethod)Invoke-RestMethod `
-Uri http://localhost:32123/remote-control `
-Method Post `
-ContentType application/json `
-Body (@{ command = "SwitchScreen"; screenName = "Status" } | ConvertTo-Json)
curl http://localhost:32123/remote-control \
-H "Content-Type: application/json" \
-d '{"command":"GetStatus"}'
POST request with URL http://localhost:32123/remote-control.{
"command": "ListenToRadiostation",
"name": "Radio Sidewinder"
}
GET http://localhost:32123/health returns { "status": "ok" } when the listener is running.%AppData%\EliteG19s\log.txt when logging is enabled) records listener start, stop, and any command execution failures.log.txt for the underlying exception message.| Symptom | Fix |
|---|---|
curl: (7) Failed to connect |
Ensure EliteG19s is running and Webhooks.IsEnabled is true. Confirm the port is open via the health endpoint. |
HTTP 403 or 500 |
Inspect log.txt for details and verify the payload matches the expected parameter names. |
| Command succeeds but nothing happens | Confirm the target feature (e.g., Spotify) is configured inside EliteG19s and the command name is correctly cased. |
| Need remote access | Tunnel the localhost port (e.g., via SSH or ngrok) and secure it with authentication at the proxy layer. |
Use a scheduled PowerShell script that posts JSON with Invoke-RestMethod. Below shows two ready-to-save snippets.
# Morning volume boost at 07:30
Invoke-RestMethod -Uri http://localhost:32123/remote-control -Method Post -ContentType application/json -Body (
@{ command = "ChangeVolume"; delta = 15 } | ConvertTo-Json
)
# Shift the display to Status screen before play sessions
Invoke-RestMethod -Uri http://localhost:32123/remote-control -Method Post -ContentType application/json -Body (
@{ command = "SwitchScreen"; screen = "Status" } | ConvertTo-Json
)
Assign each script to a basic task and run powershell.exe -File c:\Path\To\Script.ps1 as the scheduled action.
Import the following flow to trigger webhook calls from inject buttons. Each inject node sends one JSON payload to /remote-control.
[
{
"id": "flow-root",
"type": "tab",
"label": "EliteG19s Webhooks"
},
{
"id": "inject-volume",
"type": "inject",
"z": "flow-root",
"name": "Volume +10",
"props": [{ "p": "payload" }],
"payload": "{\"command\":\"ChangeVolume\",\"delta\":10}",
"payloadType": "json",
"repeat": "",
"once": false,
"wires": [["http-elite"]]
},
{
"id": "inject-spotify",
"type": "inject",
"z": "flow-root",
"name": "Play Spotify Preset",
"props": [{ "p": "payload" }],
"payload": "{\"command\":\"ListenToSpotifyPlaylist\",\"playlist\":\"Morning Mix\"}",
"payloadType": "json",
"wires": [["http-elite"]]
},
{
"id": "http-elite",
"type": "http request",
"z": "flow-root",
"name": "EliteG19s Webhook",
"method": "POST",
"ret": "obj",
"url": "http://localhost:32123/remote-control",
"headers": [{ "key": "Content-Type", "value": "application/json" }]
}
]
Deploy the flow, then click the inject buttons to test.
Define reusable REST commands in configuration.yaml, then call them from automations.
rest_command:
eliteg19s_switch_screen:
url: "http://localhost:32123/remote-control"
method: post
headers:
Content-Type: application/json
payload: '{"command":"SwitchScreen","screen":"Orrery"}'
eliteg19s_radiostation:
url: "http://localhost:32123/remote-control"
method: post
headers:
Content-Type: application/json
payload: '{"command":"ListenToRadiostation","station":"Radio Sidewinder"}'
automation:
- alias: "Daily Orrery Overview"
trigger:
- platform: time
at: "20:00:00"
action:
- service: rest_command.eliteg19s_switch_screen
- alias: "Start Evening Radio"
trigger:
- platform: state
entity_id: person.commander
to: home
action:
- service: rest_command.eliteg19s_radiostation
Reload Home Assistant commands and automations, then use any trigger (time or presence) to dispatch the payloads.