Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    927
    Quote Originally Posted by pputzer View Post
    I gather that the commands are run on the LMS server itself, though?
    Correct

    We'd still need a daemon on the player to act on the events?
    No, the server can execute commands on the clients e.g. with ssh
    The external command run by the plugin gets the player / client information (technically, the LMS player status) passed as a parameter, so that's easily done in e.g. a shell script.
    Various SW: Web Interface | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | LMSlib2go | ...
    Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...

  2. #12
    Senior Member
    Join Date
    Mar 2010
    Posts
    114
    Quote Originally Posted by Roland0 View Post
    No, the server can execute commands on the clients e.g. with ssh
    The external command run by the plugin gets the player / client information (technically, the LMS player status) passed as a parameter, so that's easily done in e.g. a shell script.
    So the script would have to parse the player ID from the parameter? While doable, that does not seem "easy" to me. While the functionality overlaps, I don't see any benefits in having event subscription happening in an LMS plugin (as opposed to a daemon using the CLI).

  3. #13
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    927
    Quote Originally Posted by pputzer View Post
    So the script would have to parse the player ID from the parameter? While doable, that does not seem "easy" to me.
    Code:
    PLAYER_IP=$(echo $2|grep -o '"[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*:'|tr -d '":')
    PLAYER_NAME=$(echo $2|sed -e 's#\(.*"player_name":"\)\([^"]*\)"\(.*\)#\2#')
    While the functionality overlaps, I don't see any benefits in having event subscription happening in an LMS plugin (as opposed to a daemon using the CLI).
    Nothing to install / run on the client, zero dependencies
    Better performance / less overhead
    Simpler implementation
    Generic solution for all events
    Various SW: Web Interface | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | LMSlib2go | ...
    Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...

  4. #14
    Senior Member
    Join Date
    Mar 2010
    Posts
    114
    Quote Originally Posted by Roland0 View Post
    Code:
    PLAYER_IP=$(echo $2|grep -o '"[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*:'|tr -d '":')
    PLAYER_NAME=$(echo $2|sed -e 's#\(.*"player_name":"\)\([^"]*\)"\(.*\)#\2#')
    So what is passed to the script? The output of the `players` CLI command? I haven't found any documentation on this anywhere.

    Quote Originally Posted by Roland0 View Post
    Nothing to install / run on the client, zero dependencies
    Better performance / less overhead
    Simpler implementation
    Generic solution for all events
    For someone seeking a completely custom automation solution, sure. For other use cases, I don't think that having everything on the server is actually a benefit. Performance wise, I doubt there will be much of a performance difference for most scenarios. There might be if the raw computing power of the server vastly different from the player (say a desktop computer and an RPi Zero). Even then, I'd wager that the actual limiting factor will be the network roundtrip, and that's going to be there either way.

    Installing shell scripts and configuration files on a NAS is far more involved than on a piCorePlayer (even more so if a solution could eventually be integrated into the main distribution). I think the Perl motto is very apt here: TMTOWTDI

  5. #15
    Senior Member
    Join Date
    Mar 2010
    Posts
    114

    Feature parity with real Squeezeboxes

    I've looked at the IR Blaster plugin and the Jivelite code in more detail. To support native IR Blaster functionality, Squeezelite would have to be extended to process the undocumented blst frame of slimproto. That should be doable for Linux/Raspberry, but I'm unsure whether this is a worthwhile approach. (The IR Blaster plugin would then have to be adapted to send IR commands to Squeezelite players.)

  6. #16
    Senior Member
    Join Date
    Mar 2010
    Posts
    114

    New release of Squeezebox IR Events

    I've released a new version of the Squeezebox IR Events daemon. It can now run arbitrary scripts.

Tags for this Thread

Posting Permissions

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