Webhooks on rooMax

Hey @TreeZorro

I was hiking through Luxembourg the last week and a half – just returned home. :slight_smile:

A webhook server is basically a small webserver accepting named commands through a local URL + predefined port. A (free) lightweight webhook server is found here:

It is available in a number of precompiled binaries (also for Windows I see, but I’m afraid I’m of no help there…). I’m sure there are plenty alternatives as well. The action for the hooks is defined in a json file on the webhook server (a Pi would be a fine self-contained option).

In hooks.json I have this command (I wrap the RoonCommandLine commands in scripts since I use these for other purposes as well, but you could also put the command directly into the json if you’d like):

 {
    "id": "baroque",
    "execute-command": "/Users/rene/Documents/Xence/Baroque.shx",
    "command-working-directory": "/var/webhook"
 } 
,

The Baroque.shx script contains the following (playing a playlist to the defined zone, shuffled) :

/usr/local/bin/roon -z "KEF LS60" -p "Baroque Instrumental Chamber and Orchestral Music" -c shuffle

And finally, the webhook is called as follows (this is also the URL you’d put in the webhook definition in rooMax as well):

http://your.ip.address.here:9000/hooks/baroque

That about does it. Since I’m on a Mac, I have since abandoned this approach in favour of Named Triggers in the great BetterTouchTool that I already use for many other things – but that doesn’t help you much, I’m afraid… :wink:

That said, I believe that @DrCWO is looking into integrating RoonCommandLine directly – so if you’re not in a hurry, you may want to wait a bit:

Note: as this discussion is rather specific to rooMax, I have moved it to the rooExtend category.

1 Like