Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    Mar 2011
    Posts
    209

    question for JSON RPC

    I'm trying to play a song and didn't get it to work, i'm not used to the syntax yet

    If i launch a status request with:

    curl -H -X POST -d '{"id":1,"method":"slim.request","params":["bb:bb:5a:21:df:c6",["status","-",1,"tags:al"]]}' http://192.168.0.30:9000/jsonrpc.js

    i get this back:

    {"method":"slim.request","result":{"remoteMeta":{" id":"-94184742214848","title":"DRadio Nachrichten","artist":"Nachrichten - Deutschlandfunk"},"player_connected":1,"remote":1, "player_ip":"192.168.0.30:41194","rate":1,"playlis t_cur_index":"0","digital_volume_control":1,"mixer volume":100,"playlist_tracks":1,"playlist_timestam p":1630154148.62517,"signalstrength":0,"duration": 610.3445,"playlist shuffle":0,"current_title":"Nachrichten vom 28.08.2021, 14:00 Uhr von Deutschlandfunk aus Deutschlandfunk","power":1,"seq_no":0,"playlist mode":"off","playlist repeat":0,"player_name":"Marantz NA8005","mode":"play","time":6.92870306968689,"can _seek":1,"playlist_loop":[{"title":"DRadio Nachrichten","artist":"Nachrichten - Deutschlandfunk","id":"-94184742214848","playlist index":0}]},"params":["bb:bb:5a:21:df:c6",["status","-",1,"tags:al"]],"id":1}%

    if i now want to play this again,

    i was trying:

    curl -H -X POST -d '{"id":1,"method":"slim.request","params":["bb:bb:5a:21:df:c6",["playlistcontrol", "cmd:load", "playlist_id:-94184742214848"]]}' http://192.168.0.30:9000/jsonrpc.js

    but this doesn't work.

    Any obivious errors in my curl string?

  2. #2
    Senior Member
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    833

    question for JSON RPC

    Would [„playlist“, „play“, „DRadio“] as parameter list work?
    (You’ll have to change the Gänsefüßchen in my example. )

    As an afterthought: are you sure that cmd: in “cmd:load” is needed? I’d guess that it’s not.

  3. #3
    Senior Member
    Join Date
    Mar 2011
    Posts
    209
    thanks, that helped. Got it to work.

    I've now a additional question because of that.
    With the status all tags request i can list everything available.
    For my use case it is important FROM WHERE these status coming from

    for example: if i started an album the tag information is the same as if i start with spicefly sugarcube or just a single track.

    How can i programatically differentiate what was launched?

    The point here is, the described launch tasks are done by the user in the webinterface and not by JSON or something

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •