On your LMS: http://localhost:9000/html/docs/cli-api.html (replace "localhost" with your server's address).
Don't have LMS running? What are you doing here then, anyway?The documentation is on github, of course. Read it online. It's not nicely laid out, but hey, it's available!
Results 1 to 6 of 6
-
2016-03-04, 07:39 #1
Where can I find the CLI documentation?
Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information)
-
2020-08-19, 01:31 #2
- Join Date
- Feb 2011
- Location
- Cheshire, UK
- Posts
- 5,510
VB2.4 storage QNAP TS419p (NFS)
Living Room Joggler & Pi4/Khadas -> Onkyo TXNR686 -> Celestion F20s
Office Joggler & Pi3 -> Denon RCD N8 -> Celestion F10s
Dining Room SB Boom
Kitchen UE Radio (upgraded to SB Radio)
Bedroom (Bedside) Pi Zero+DAC ->ToppingTP21 ->AKG Headphones
Bedroom (TV) & Bathroom SB Touch ->Denon AVR ->Mordaunt Short M10s + Kef ceiling speakers
Guest Room Joggler > Topping Amp -> Wharfedale Modus Cubes
Everything controlled by iPeng & Material on iOS
-
2020-08-19, 01:47 #3
- Join Date
- Apr 2015
- Location
- Germany
- Posts
- 784
It's basically the same.
You'll have to put the command JSON formatted to LMS-IP:9000/jsonrpc.js
To set the volume to 25 (CLI: "04:20:00:12:23:45 mixer volume 25<LF>" )you could POST it like this:
Code:curl -X POST -d '{ "method": "slim.request", "params":["00:04:20:xx:xx:xx", ["mixer", "volume", "25"]]}' 192.168.178.37:9000/jsonrpc.js
The command itself is a list consisting of the player ID (MAC) and another list with the parameters p0 to p5.
see also here for a good overview:
https://gist.github.com/samtherussel...d2470b8689d9f2
-
2020-08-19, 08:52 #4
- Join Date
- Feb 2011
- Location
- Cheshire, UK
- Posts
- 5,510
VB2.4 storage QNAP TS419p (NFS)
Living Room Joggler & Pi4/Khadas -> Onkyo TXNR686 -> Celestion F20s
Office Joggler & Pi3 -> Denon RCD N8 -> Celestion F10s
Dining Room SB Boom
Kitchen UE Radio (upgraded to SB Radio)
Bedroom (Bedside) Pi Zero+DAC ->ToppingTP21 ->AKG Headphones
Bedroom (TV) & Bathroom SB Touch ->Denon AVR ->Mordaunt Short M10s + Kef ceiling speakers
Guest Room Joggler > Topping Amp -> Wharfedale Modus Cubes
Everything controlled by iPeng & Material on iOS
-
2020-12-03, 18:10 #5
- Join Date
- Nov 2005
- Posts
- 39
a general command to jsonrpc.js
Thanks all for sharing! This really helped me get started. I was having some trouble figuring out how to send some other commands though until I saw somewhere that if you want to send a "general" command for example you still need to give a mac address for some reason? So I got this to work for example. Not sure also if/why the "id":0 is needed but I put that in there too
Code:{ "method": "slim.request", "params": [ "FF:FF:FF:FF", [ "player", "count", "?" ] ], "id": 0 }
Code:{ "method": "slim.request", "params": [ "FF:FF:FF:FF", [ "apps", "0", "15" ] ], "id": 0 }
Code:{ "method": "slim.request", "id": 0, "result": { "count": 13, "appss_loop": [ { "type": "xmlbrowser", "icon": "plugins/Spotty/html/images/93aac68fb06348598c1e67734dfaceee.png", "weight": 1, "cmd": "spotty", "name": "Spotty" }, { "icon": "plugins/Pandora/html/images/icon.png", "type": "xmlbrowser", "weight": 10, "cmd": "pandora", "name": "Pandora" }, ...
-
2020-12-03, 20:40 #6
- Join Date
- Nov 2005
- Posts
- 39
I think I found it here:
https://forums.slimdevices.com/showt...2985-JSON-help
I just got this to work (have to talk to one specific player...)
Code:{ "method": "slim.request", "params": [ "aa:bb:eb:zz:yy:xx", [ "myapps", "items", "0", "9" ] ], "id": 0 }
Code:{ "method": "slim.request", "params": [ "aa:bb:eb:zz:yy:xx", [ "myapps", "items", "0", "9", "item_id:xyz859.0" ] ], "id": 0 }