Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Aug 2020
    Posts
    13

    execute shell script from squeezlite UI

    Hi,

    I have LMS(V 8.1.1) and Squeezelite running on a raspberry pi(3b) with nanosound DAC2 .

    I am looking for ways to trigger execution of a shell script from squeezelite UI - commands through playlist or perhaps through a plugin. Any pointers and example of how this can be done will be much appreciated. Thanks.

  2. #2
    Senior Member
    Join Date
    Mar 2017
    Posts
    3,112
    Quote Originally Posted by sh1ntomi View Post
    Hi,

    I have LMS(V 8.1.1) and Squeezelite running on a raspberry pi(3b) with nanosound DAC2 .

    I am looking for ways to trigger execution of a shell script from squeezelite UI - commands through playlist or perhaps through a plugin. Any pointers and example of how this can be done will be much appreciated. Thanks.
    With material skin you can define custom actions. These will appear as entries in the desired menu - e.g. for a player, in the main menu, for an artist etc. These actions can trigger LMS commands, shell commands, javascript, etc. See https://github.com/CDrummond/lms-mat...-Customisation for more details.

    There is also the 'SqueezeCLI Handler' plugin which may provide what you are seeking - although I have never used this.
    Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.

  3. #3
    Junior Member
    Join Date
    Aug 2011
    Posts
    26
    I use SBNetIO to switch my amplifier when my squeezebox is started. This plugin sends commands to a home automation server when the playback state changes. Perhaps this could work for you. I also the plugin kidsplay, to use one of the favorites buttons on my sqb radio to switch my coffeemachine. if you want more details let me know.
    Last edited by Cadster; 2021-10-23 at 07:50.

  4. #4
    Junior Member
    Join Date
    Aug 2020
    Posts
    13
    Thanks for all the good work with the material skin.

    Quote Originally Posted by cpd73 View Post
    With material skin you can define custom actions. These will appear as entries in the desired menu - e.g. for a player, in the main menu, for an artist etc. These actions can trigger LMS commands, shell commands, javascript, etc. See https://github.com/CDrummond/lms-mat...-Customisation for more details.
    The wiki is detailed. I am trying to understand how this works. I have created the material-skin/actions.json, but I dont see the link to execute my script. Any example of calling a shell script and setting response to see if it ran successfully or not would be helpful.
    Last edited by sh1ntomi; 2021-10-23 at 17:36.

  5. #5
    Junior Member
    Join Date
    Aug 2020
    Posts
    13
    Quote Originally Posted by Cadster View Post
    I use SBNetIO to switch my amplifier when my squeezebox is started. This plugin sends commands to a home automation server when the playback state changes. Perhaps this could work for you. I also the plugin kidsplay, to use one of the favorites buttons on my sqb radio to switch my coffeemachine. if you want more details let me know.
    Thank you. I have a sqb radio but I dont intend to use it for the purpose. Perhaps the remote that comes with the nanosound DAC or the squeezelite UI is what I am looking for.

    Will take a look at SBNetIO.

  6. #6
    Senior Member
    Join Date
    Mar 2011
    Posts
    219
    i'm interested in details for the coffe machine woodoo stuff

Posting Permissions

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