Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Jun 2009
    Location
    Berlin, Germany
    Posts
    52

    [Announce] SqueezeIR Trigger Plugin

    Thanks to the SqueezeIR applet, one can use a Squeezebox Controller to send infrared signals to auxillary equipment.

    The attached SqueezeIR Trigger plugin is a SqueezeIR helper that allows one to send an IR signal once a specific Squeezebox player is turned on or off. I wrote it to power on an amplifier whenever the Squeezebox Receiver connected to it is turned on. And, even better, power off the amplifier when the Receiver is turned off. That, I used to forget quite often...

    This is my first attempt at writing an LMS plugin. It is based on the PowerMonitor plugin. While the plugin works for me, it might not work for others. Please let me know about any problems you enncounter and suggestions for improvements you have.

    There are a couple of improvements I can think of already. I hope more experienced plugin writers could point out how to implement those or where something similar has been implemented already:
    • Provide a drop-down list of Squeezebox players on the settings page. I'm not sure how to properly filter out players that can't be controller by IR signals.
    • Provide a drop-down list of Squeezebox controllers on the settings page. I don't know whether there is a way to list those at all.
    • Validate all settings on input. How can I implement value checking in the settings page?
    • Support the configuration of an unrestricted number of notifications (player state changes) and potentially different players and controllers. How can I allow the user to specify as many sets of attributes as she/he likes, i.e. add fresh configuration sections and delete existing ones?

    For other users it might also be necessary to add the following functionality:
    • Differentiate between powering on and powering off


    Actually, I don't want to put too much efforrt into this because I still hope there might be a way to integrate the functionality into the SqueezeIR applet. On the other hand, there are many other notifications a plugin like this might react to, see the documentation of command line interface included in the server's help pages and the Slim::Control:Request module. And there are many other actions one might trigger other than sending IR signals.

    Have fun, maf
    Attached Files Attached Files
    Last edited by maf; 2020-05-16 at 07:11.

  2. #2
    Member
    Join Date
    Jun 2009
    Location
    Berlin, Germany
    Posts
    52
    Oh, one more thing I just discovered I would like to do and don't know how (due to lack of knowledge about Perl and LMS):

    I would like to delay powering off the amplifier by a couple of seconds. If I stream to the receiver with the great ShairTunes2 plugin, switching audio channels will result in turning off the receiver and turning it right on again. How can I wait to see if that's the case and only send the IR signal if really appropriate?

  3. #3
    Senior Member
    Join Date
    Oct 2008
    Location
    Huntingdon, UK
    Posts
    583
    Quote Originally Posted by maf View Post
    Oh, one more thing I just discovered I would like to do and don't know how (due to lack of knowledge about Perl and LMS):

    I would like to delay powering off the amplifier by a couple of seconds. If I stream to the receiver with the great ShairTunes2 plugin, switching audio channels will result in turning off the receiver and turning it right on again. How can I wait to see if that's the case and only send the IR signal if really appropriate?
    One way to delay the power off would be to add a <pause> action to the event that you are triggering within the SqueezeIR config file. However, I don't think that's what you are looking for? I'm unfamiliar with ShairTunes2 and don't really understand why it would power cycle the receiver?
    1xRadio, 2xReceiver, 2xController, 1xSB3, 1xSqueezeLite (on Rpi3/Jessie), SBS 7.9.2 (on Rpi3/Jessie)
    Creator of SqueezeIR applet for the Controller.
    Creator of LineInButton applet for the Radio.

  4. #4
    Member
    Join Date
    Jun 2009
    Location
    Berlin, Germany
    Posts
    52
    Quote Originally Posted by indifference_engine View Post
    One way to delay the power off would be to add a <pause> action to the event that you are triggering within the SqueezeIR config file. However, I don't think that's what you are looking for? I'm unfamiliar with ShairTunes2 and don't really understand why it would power cycle the receiver?
    It might be what I'm looking for if a second, identical action would cancel out the first one if triggered before the delay ends. Also, it might help if there was a way to configure the duration of the delay.

    I have asked about the power cycle on the ShairTunes2 thread, but no answer, yet.

  5. #5
    Senior Member
    Join Date
    Oct 2008
    Location
    Huntingdon, UK
    Posts
    583
    Quote Originally Posted by maf View Post
    Thanks to the [thread=79524] I don't want to put too much efforrt into this because I still hope there might be a way to integrate the functionality into the SqueezeIR applet.
    OK, you win!

    I have released v2.02 of SqueezeIR that allows ir to be sent when the player powers on or off or when the mode changes (play/pause/stop). The ir emitter of the controller appears to be quite powerful and will reach my amp in the opposite corner of my bedroom even when it's cradled and pointing at the ceiling. Your mileage may vary. I have also fixed a couple of bugs that you noticed to do with IR-o-IP URI's.
    1xRadio, 2xReceiver, 2xController, 1xSB3, 1xSqueezeLite (on Rpi3/Jessie), SBS 7.9.2 (on Rpi3/Jessie)
    Creator of SqueezeIR applet for the Controller.
    Creator of LineInButton applet for the Radio.

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
  •