Bluesound control using Domoticz
Today I came across this post on the bluesound helpdesk, decoding the Bluesound API.
For me, this is a great find, because this makes integrating bluesound in Domoticz very easy.
Below are the decoded API commands. I will update this post to explain how to use them.
Simple commands:
http://192.168.1.38:11000/Pause
http://192.168.1.38:11000/Play
http://192.168.1.38:11000/Skip
http://192.168.1.38:11000/Back
Commands can take other variables too.
http://192.168.1.38:11000/Play?id=0 (play 1st song from playlist)
http://192.168.1.38:11000/Play?seek=60 (jump to 60th second in the playing track)
http://192.168.1.38:11000/Volume?level=0 (value is % so 0 is mute or -91db and 100 is full volume or 0db)
http://192.168.1.38:11000/Repeat?state=0 (different repeat states 0,1,2)
http://192.168.1.38:11000/Shuffle?state=0 (different repeat states 0,1)
The controllers seem to issue the following commands every second alternatively to get their status.
http://192.168.1.38:11000/SyncStatus
http://192.168.1.38:11000/Status
And then using the returned values of those commands they do other stuff like get the Artwork for the song playing.
http://192.168.1.38:11000/Artwork?service=LocalMusic&album=&artist= (insert album and artist name in the URL)
Grouping and Ungrouping of players are done with the
http://192.168.1.38:11000/AddSlave?slave=192.168.1.41&group=Study%20Player (Study Player is the group name)
http://192.168.1.38:11000/RemoveSlave?slave=192.168.1.41
You can get the list of Services that the player can use using
http://192.168.1.38:11000/Services
Or browse through the Radio Service using
http://192.168.1.38:11000/RadioBrowse
Jump to
http://192.168.1.38:11000/Playlists
http://192.168.1.38:11000/Genres?service=LocalMusic (Library)
http://192.168.1.38:11000/RadioBrowse?service=TuneIn (TuneIn Radio)
This command appears to provide a list of all the Inputs
http://192.168.1.38:11000/RadioBrowse?service=Capture
Then you can switch to them using
http://192.168.1.38:11000/Play?url=Capture%3Ahw%3A1%2C0%2F1%2F25%2F2&preset_id&image=/images/inputIcon.png (Optical Input)
http://192.168.1.38:11000/Play?url=Capture%3Abluez%3Abluetooth&preset_id&image=/images/BluetoothIcon.png (Bluetooth Input)
Volume control
http://192.168.1.38:11000/Volume?level=40
Preset control (create presets in Bluesound app first)
http://192.168.1.38:11000/Preset?id=1
# Play preset 1 @ volume level 40
http://192.168.84.89:11000/Preset?id=1
http://192.168.84.89:11000/Volume?level=40
http://192.168.84.89:11000/Play
Some LUA examples can be found here
Leave a Reply