Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Junior Member
    Join Date
    Apr 2021
    Posts
    5

    JSON protocol for 3rd party apps support

    I have read the CLI docs that comes with LMS, and I have done some protocol snooping on what exactly is being sent back and forth between a 3rd party controller app (or the web interface itself) and the LMS.

    I was wondering if there is a better set of documents to understand which fields are used when...

    Anyone has anything more comprehensive than the CLI reference?

  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,530

    JSON protocol for 3rd party apps support

    Basically you can use /jsonrpc.js to send all kinds of CLI commands and
    get structured JSON data back:

    curl -X POST -d
    '{"id":5,"method":"slim.request","params":["00:04:20:12:34:56",["status","-",1,"tags:uBJjKlaxNo"]]}'
    http://localhost:9000/jsonrpc.js

    Now what you need to look for depends on what you are trying to achieve.

  3. #3
    Junior Member
    Join Date
    Apr 2021
    Posts
    5
    Thank you, and thatís what Iíve done so far. The problem is in how to interpret which fields are used in each type of response. For example, when you request a list of items from an app like Spotty, there are a bunch of structures in the returned JSON that might or might not be the ones youíre looking for. Icon, icon_id, image, all carry the url of the image for the item, but which one is used depends on the context and where you are in the hierarchy.

    The CLI docs also donít mention anything about the menu: parameters or window style.

    There must be a comprehensive doc for all this somewhere

  4. #4
    Senior Member wt0's Avatar
    Join Date
    Jul 2008
    Posts
    734
    Quote Originally Posted by ThatPaolo View Post
    Thank you, and thatís what Iíve done so far. The problem is in how to interpret which fields are used in each type of response. For example, when you request a list of items from an app like Spotty, there are a bunch of structures in the returned JSON that might or might not be the ones youíre looking for. Icon, icon_id, image, all carry the url of the image for the item, but which one is used depends on the context and where you are in the hierarchy.

    The CLI docs also donít mention anything about the menu: parameters or window style.

    There must be a comprehensive doc for all this somewhere
    AFAIK there's no documentation on that. Wish there was. It would've made my life lot easier.

    BTW, the json server responses are filled with inconsistencies like the one you mentioned.

    Sent from my Pixel 3 using Tapatalk
    --------------
    Squeezebox apps for webOS, Android and Windows Phone, http://www.angrygoatapps.com

  5. #5
    Junior Member
    Join Date
    Apr 2021
    Posts
    5
    Quote Originally Posted by wt0 View Post
    AFAIK there's no documentation on that. Wish there was. It would've made my life lot easier.

    BTW, the json server responses are filled with inconsistencies like the one you mentioned.

    Sent from my Pixel 3 using Tapatalk
    I am working on a UWP controller (https://github.com/PaoloM/Fiona) and I could really use some advice on how to deal with what is returned by apps

  6. #6
    Senior Member wt0's Avatar
    Join Date
    Jul 2008
    Posts
    734
    Quote Originally Posted by ThatPaolo View Post
    I am working on a UWP controller (https://github.com/PaoloM/Fiona) and I could really use some advice on how to deal with what is returned by apps
    Sorry I already have a UWP controller for sale in the Windows Store, so it's not really in my interest to provide too much help.

    Besides, it's a bit too complicated for any amount of help I can provide here. It took a lot of trial and error to get it right.

    Sent from my Pixel 3 using Tapatalk
    --------------
    Squeezebox apps for webOS, Android and Windows Phone, http://www.angrygoatapps.com

  7. #7
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,530

    JSON protocol for 3rd party apps support

    > The CLI docs also don’t mention anything about the menu: parameters or
    > window style.
    >
    > There must be a comprehensive doc for all this somewhere


    Unfortunately there's none. At least not a comprehensive doc. There's
    something int he old wiki, but it's incomplete, and pretty sure not
    accurate in all places.

    See eg.
    https://wiki.slimdevices.com/index.p...owseItems.html

  8. #8
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,285
    Quote Originally Posted by mherger View Post
    > The CLI docs also don’t mention anything about the menu: parameters or
    > window style.
    >
    > There must be a comprehensive doc for all this somewhere


    Unfortunately there's none. At least not a comprehensive doc. There's
    something int he old wiki, but it's incomplete, and pretty sure not
    accurate in all places.

    See eg.
    https://wiki.slimdevices.com/index.p...owseItems.html
    Would the old documentation from Squeezeplay browse protocol be useful ?
    https://htmlpreview.github.io/?https.../jiveMLON.html

    Itís probably not updated with latest changes but it might give some clues.
    Erland Isaksson (My homepage)
    Developer of many plugins/applets
    Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

  9. #9
    Junior Member
    Join Date
    Apr 2021
    Posts
    5
    Quote Originally Posted by erland View Post
    would the old documentation from squeezeplay browse protocol be useful ?
    https://htmlpreview.github.io/?https.../jivemlon.html

    itís probably not updated with latest changes but it might give some clues.
    oh

    yes!


  10. #10
    Junior Member
    Join Date
    Apr 2021
    Posts
    5
    Quote Originally Posted by ThatPaolo View Post
    oh

    yes!

    Oh

    no... 13 years old

Posting Permissions

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