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.
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.
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)
You can get the list of Services that the player can use using
Or browse through the Radio Service using
http://192.168.1.38:11000/RadioBrowse?service=TuneIn (TuneIn Radio)
This command appears to provide a list of all the Inputs
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)
Preset control (create presets in Bluesound app first)
# Play preset 1 @ volume level 40
Some LUA examples can be found here
Leave a Reply