Sure, It’s all done using the HTTP request node, you need to send JSON to your LMS server.
This flow sets the volume of a player to 25%:
[
{
"id": "2943f10c.775616",
"type": "comment",
"z": "1366ffd3.8803e",
"name": "Volume 25 on Orange",
"info": "",
"x": 340,
"y": 140,
"wires": []
},
{
"id": "8600693f.710ca8",
"type": "comment",
"z": "1366ffd3.8803e",
"name": "JSON over HTTP",
"info": "",
"x": 120,
"y": 260,
"wires": []
},
{
"id": "d0a62293.16cd18",
"type": "debug",
"z": "1366ffd3.8803e",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"x": 530,
"y": 160,
"wires": []
},
{
"id": "2dafbf3a.3567b",
"type": "inject",
"z": "1366ffd3.8803e",
"name": "test",
"topic": "test",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 110,
"y": 180,
"wires": [
[
"173b3995.9e609e"
]
]
},
{
"id": "173b3995.9e609e",
"type": "function",
"z": "1366ffd3.8803e",
"name": "Set HTTP headers",
"func": "// Volume 25 on Orange\nmsg.payload = '{\"id\":1,\"method\":\"slim.request\",\"params\":[ \"b8:27:eb:aa:c2:4a\", [\"mixer\", \"volume\", \"25\"] ]}';\nmsg.headers = {};\nmsg.headers['Content-Type'] = 'application/json';\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"x": 330,
"y": 180,
"wires": [
[
"d0a62293.16cd18",
"bb6d290d.71e5a"
]
]
},
{
"id": "83fd7656.b84c48",
"type": "debug",
"z": "1366ffd3.8803e",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"x": 530,
"y": 260,
"wires": []
},
{
"id": "bb6d290d.71e5a",
"type": "http request",
"z": "1366ffd3.8803e",
"name": "",
"method": "POST",
"ret": "txt",
"paytoqs": false,
"url": "http://lms.local:9002/jsonrpc.js",
"tls": "",
"proxy": "",
"authType": "",
"x": 340,
"y": 260,
"wires": [
[
"83fd7656.b84c48"
]
]
}
]
You’ll need to change the LMS server address and mac address of the player for it to work for you.