paul- wrote: > what is your goal? What action are you triggering? > > You can do whatever you want with a script, and load it in the user > commands section of the tweaks page.
I am revisiting the idea of a script to toggle a GPIO pin when the player goes into a quiescent state. The reason is that after updating to piCorePlayer 4.0, the LMS PowerSave script seems to have stopped working (mentioned over in the 4.0 thread). I still think it is better to take LMS out of the loop and control a GPIO pin directly in Squeezelite. [The reason I am doing this is explained in this thread describing my current player build: https://forums.slimdevices.com/showthread.php?102957-pi-based-systems&p=919531&viewfull=1#post919531] I was looking at Ralphy's Jivelite applet called "DisplayOffApplet.lua": https://github.com/ralph-irving/tcz-jivelite/blob/master/DisplayOff/DisplayOffApplet.lua The applet writes to the following file: /sys/devices/platform/rpi_backlight/backlight/rpi_backlight/bl_power When the player is active, the applet writes a "0" to the file, and when it goes quiescent (paused or stopped) the backlight times out and the applet writes a "1" to the file. I verified this on my player. It also seems to write a "1" when the power off "button" is touched on the display. So it seems like a fairly simple job to write a script to check the file and toggle the pin based on the value found there, which I am inclined to try. Does anybody see a problem with this approach? Thanks Whit ------------------------------------------------------------------------ wtnh's Profile: http://forums.slimdevices.com/member.php?userid=36993 View this thread: http://forums.slimdevices.com/showthread.php?t=103330 _______________________________________________ unix mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/unix
