Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 7 of 7
  1. #1
    Senior Member
    Join Date
    Mar 2008
    Posts
    124

    Combining player on the cmd line?

    Hi there,

    What would be the proper cmdline command in order to combine players?
    If I have say 6 players, I would like to combine 2, 3 or all of them.

    Need to be on the command line as I will use with an automation system connected to port 9090 of the LMS server.

    Thanks very much!

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

    Combining player on the cmd line?

    > What would be the proper cmdline command in order to combine players?

    I guess you want to synchronize them? Please see the CLI documentation:

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

    How you trigger any of those commands depends on your environment. I
    recommend using JSON/RPC if you can do http POST requests. Using raw
    socket (telnet style) is another option if you can't do http requests.
    --

    Michael

  3. #3
    Senior Member
    Join Date
    Sep 2005
    Posts
    2,432
    Quote Originally Posted by starcat View Post
    Hi there,

    What would be the proper cmdline command in order to combine players?
    Hi

    there is no command to combine players!

    There is only a command to add a slave player to another player.

    So you need some more lines and brain to "lets say add one two or x players" cause you need to define the master first.

    For this command see in the command help section or your lms.

    *lms*:9000/html/docs/cli-api.html?player=#Supported Commands

  4. #4
    Senior Member
    Join Date
    Mar 2008
    Posts
    124
    The master player is the one that I am listening to.
    I want to sync another players to it (names, mac addresses are known of course).

    All with text via telnet to port 9090 on the LMS.
    This is not a problem, I only need the cmd syntax. So no http, JSON, etc, simple text :-)

    I was already looking at *lms*:9000/html/docs/cli-api.html?player=#Supported Commands
    however I am not getting really artful...

    Thanks again for any help!
    Last edited by starcat; 2017-11-29 at 15:44.

  5. #5
    Senior Member
    Join Date
    Sep 2005
    Posts
    2,432
    Quote Originally Posted by starcat View Post
    The master player is the one that I am listening to.
    I want to sync another players to it (names, mac addresses are known of course).

    All with text via telnet to port 9090 on the LMS.
    This is not a problem, I only need the cmd syntax. So no http, JSON, etc, simple text :-)

    I was already looking at *lms*:9000/html/docs/cli-api.html?player=#Supported Commands
    however I am not getting really artful-

    Thanks again for any help!
    * masterplayer is always the same or the one thats playing?


    <playerid> sync <playerindex|playerid|-|?>

    The "sync" command specifies the player to synchronise with the given playerid. The command accepts only one playerindex or playerid. To unsync the player, use the "-" parameter.
    Note that in both cases the first <playerid> is the player which is already a member of a sync group. When adding a player to a sync group, the second specified player will be added to the group which includes the first player, if necessary first removing the second player from its existing sync-group.
    You may query which players are already synced with this player by passing in a "?" parameter. Multiple playerids are separated by a comma. If the player is not synced, "-" is returned.

    Examples:

    Request: "04:20:00:12:23:45 sync 1<LF>"
    Response: "04:20:00:12:23:45 sync 1<LF>"

    Request: "04:20:00:12:23:45 sync ?<LF>"
    Response: "04:20:00:12:23:45 sync 04:20:00:12:23:21<LF>"

    Request: "04:20:00:12:23:45 sync -<LF>"
    Response: "04:20:00:12:23:45 sync -<LF>"

  6. #6
    Senior Member
    Join Date
    Mar 2008
    Posts
    124
    Thanks! This works perfectly:

    Request: "04:20:00:12:23:45 sync ?<LF>"
    Response: "04:20:00:12:23:45 sync 04:20:00:12:23:21<LF>"

    Request: "04:20:00:12:23:45 sync -<LF>"
    Response: "04:20:00:12:23:45 sync -<LF>"
    Last edited by starcat; 2017-11-29 at 15:50.

  7. #7
    Senior Member
    Join Date
    Apr 2008
    Location
    Paris, France
    Posts
    2,193
    You can have a look at squeezy, too.
    Powerful and easy to use CLI utility, IMHO.

    It has a -sync option and a lot of other useful features.
    3 SB 3 • Libratone Loop, Zipp Mini • iPeng (iPhone + iPad) • LMS 7.9 (linux) with plugins: CD Player, WaveInput, Triode's BBC iPlayer by bpa • IRBlaster by Gwendesign (Felix) • Server Power Control by Gordon Harris • Smart Mix, Music Walk With Me, What Was That Tune? by Michael Herger • PowerSave by Jason Holtzapple • Song Info, Song Lyrics by Erland Isaksson • AirPlay Bridge by philippe_44 • WeatherTime by Martin Rehfeld • Auto Dim Display, SaverSwitcher, ContextMenu by Peter Watkins.

Posting Permissions

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