AudioServer Control API
The AudioServer can integrate with the HauntLabs HauntController and some 3rd party scene controllers - or with your own implementation! Each of the channels can be controlled with play/pause/stop/previous/skip/volume/repeat/shuffle commands.
Accessing the API is easy, but your AudioServer must use the onboard Ethernet interface and be attached to the same network as your other scene controller.
You may obtain the IP address of your AudioServer interface by logging into the hotspot configuration web interface and inspecting the "Network" page.
API URL: http://<ethernet ip address>/api/
API Methods: GET or POST
API URL Format: http://<ethernet ip address>/api/channel/command/parameter
Available options for channel:
Available options for command / parameter (cmd <parameter>):
- play <none>
Starts audio playback of stopped/paused channel.
- stop <none>
Stops playback of playing channel.
- pause <none>
Pauses playback of playing channel.
- previous <none>
Moves to previous track and starts playback.
- skip <none>
Skips to next track and starts playback.
- repeat <on|off>
Sending 'on' turns on repeat, sending 'off' turns off repeat.
- shuffle <on|off>
Sending 'on' turns on shuffle (random), sending 'off' turns off shuffle (random).
- volume <0-100>
Sets volume level of current channel. Possible parameter values are any integer between 0 and 100. This integer represents the percent volume.
AudioServer will return a json string with a response of "OK" or "FAIL" for the request.