Logic Machine Forum
Help with BluOS API - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Help with BluOS API (/showthread.php?tid=3434)



Help with BluOS API - Rauschentofft - 23.06.2021

I need some help to control Monitor Audios IMS-4 from LM4 with help of this api.

BluOS API

I want to control:

ex:

Zone 1:

0/5/0 Play / Pause 
0/5/1 Status Play / Pause
0/5/2 Stop
0/5/3 Status Stop
0/5/4 Back / Next
0/5/5 Shuffle
0/5/6 Status Shuffle
0/5/7 Repeat
0/5/8 Status Repeat
0/5/9 Volume 0-100%
0/5/10 Status Volume 0-100%
0/5/11 Mute
0/5/12 Status Mute
0/5/13 Playlist 0-255
0/5/14Preset 0-255

Zone 2:

0/5/0 Play / Pause 
0/5/1 Status Play / Pause
0/5/2 Stop
0/5/3 Status Stop
0/5/4 Back / Next
0/5/5 Shuffle
0/5/6 Status Shuffle
0/5/7 Repeat
0/5/8 Status Repeat
0/5/9 Volume 0-100%
0/5/10 Status Volume 0-100%
0/5/11 Mute
0/5/12 Status Mute
0/5/13 Playlist 0-255
0/5/14Preset 0-255


RE: Help with BluOS API - admin - 25.06.2021

Here's a sample event script for volume control (0..100%). Change IP as needed:
Code:
volume = event.getvalue()

ip = '192.168.1.100'
url = 'http://' .. ip .. ':11000/Volume?level=' .. volume .. '&tell_slaves=1'
res, err = require('socket.http').request(url)
log(res, err)

You can implement other controls the same way just check the documentation on which URL path and parameters must be used. If you have a player with several nodes in one then use port 11010 for zone 2 instead of 11000. Status retrieval can be done via a resident script but it's more complicated. See if control works for you first.