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:
For other users it might also be necessary to add the following functionality:
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
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