Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 6 of 6

Thread: LMS http calls

  1. #1
    Senior Member
    Join Date
    Jul 2006
    Location
    Milano, Italy
    Posts
    275

    LMS http calls

    hello All,
    if you want to use the "sleep" function, you can do that from the player RC, or from an smartphone app, but not from the UI.
    If you have no RC and your phone is not on wifi, but you have a pc, you can telnet the server and echo the command to the player.
    I was reading that you can do that with http calls instead of telnet, and I thought it would be nice to save the http call in a bookmark and keep it handy.
    It is possible at all?
    I tried to follow these instructions, but without success... maybe using the wrong sintax..
    blog.san1t1.com/2013/04/building-new-squeezebox-ui.html
    Thanks for your comments,
    ciao,
    -Gian
    town: Musical Fidelity Dr.Thomas, Preamp II, Infinity 7K, Squeezebox Classic (2), Squeezebox Radio, Raspberry Pi 2 with HiFiBerry, Ubuntu 16.4 LTS server
    country: Musical Fidelity A-5, Infinity Renaissance 90, Musical Fidelity A120, Sonus Faber Concertino, Squeezebox Classic, SB Touch, Raspberry Pi 2 with HiFiBerry, Raspberry Pi 3 server with Debian Jessie on Arm7

  2. #2
    Senior Member
    Join Date
    Jul 2006
    Location
    Milano, Italy
    Posts
    275
    OK, if you enter...

    http://yourserverip:9000/status.html...1=sleep&p2=600

    sleep will start, but with 900 sec.

    Why the two figures mismatch by 50%?
    town: Musical Fidelity Dr.Thomas, Preamp II, Infinity 7K, Squeezebox Classic (2), Squeezebox Radio, Raspberry Pi 2 with HiFiBerry, Ubuntu 16.4 LTS server
    country: Musical Fidelity A-5, Infinity Renaissance 90, Musical Fidelity A120, Sonus Faber Concertino, Squeezebox Classic, SB Touch, Raspberry Pi 2 with HiFiBerry, Raspberry Pi 3 server with Debian Jessie on Arm7

  3. #3
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,748

    LMS http calls

    > http://yourserverip:9000/status.html...1=sleep&p2=600
    >
    > sleep with start, but with 900 sec.


    Maybe 900 is hardcoded. Don't know.

    I'd suggest you rather use the CLI interface over JSON/RPC than the
    status.html interface. See the CLI documentation included with LMS.

    http://htmlpreview.github.io/?https:...s/cli-api.html

    --

    Michael

  4. #4
    Senior Member
    Join Date
    Jul 2006
    Location
    Milano, Italy
    Posts
    275
    Thanks, Michael,

    I know very little about Javascript, so the JSON path would be more a difficult for me..

    Telnet is easy, and works fine, but requires opening a terminal and such, while a bookmark is on the same window of the player UI.

    Can you point me to a JSON example related to LMS, please? I'll try to learn something.

    -G
    town: Musical Fidelity Dr.Thomas, Preamp II, Infinity 7K, Squeezebox Classic (2), Squeezebox Radio, Raspberry Pi 2 with HiFiBerry, Ubuntu 16.4 LTS server
    country: Musical Fidelity A-5, Infinity Renaissance 90, Musical Fidelity A120, Sonus Faber Concertino, Squeezebox Classic, SB Touch, Raspberry Pi 2 with HiFiBerry, Raspberry Pi 3 server with Debian Jessie on Arm7

  5. #5
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,748

    LMS http calls

    > Can you point me to a JSON example related to LMS, please? I'll try to
    > learn something.


    You basically send a POST request to the /jsonrpc.js endpoint. Grab your
    browser, start the developer's console (or javascript console or
    whatever it's called in your browser) and monitor what requests the LMS
    web UI sends to the server. I think that shows pretty well how it works.

    --

    Michael

  6. #6
    Senior Member
    Join Date
    Jul 2006
    Location
    Milano, Italy
    Posts
    275
    thanks!
    -G
    town: Musical Fidelity Dr.Thomas, Preamp II, Infinity 7K, Squeezebox Classic (2), Squeezebox Radio, Raspberry Pi 2 with HiFiBerry, Ubuntu 16.4 LTS server
    country: Musical Fidelity A-5, Infinity Renaissance 90, Musical Fidelity A120, Sonus Faber Concertino, Squeezebox Classic, SB Touch, Raspberry Pi 2 with HiFiBerry, Raspberry Pi 3 server with Debian Jessie on Arm7

Posting Permissions

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