Max2Play Home 2016 (en) › Forums › Max2Play as Squeezebox (Player / Server) › Trigger script on power on/off event of squeezelite
This topic contains 7 replies, has 4 voices, and was last updated by Heiner premium 4 years, 4 months ago.
12. November 2017 at 17:54 #32433
Is it possible to make max2play, squeeelite player trigger a script when it receives a power on or off event from the server?
I have tested the /Audioplayer/squeezelite/advanced options/Command Line Options/ with „-S /opt/squeezelite/power.sh“ but squeezelite fails to start then due to a problem to initiate WiringPi… From the source I cannot understand why this would happen.
I compiled a my own squeezelite-rpi and replaced the max2play version an dthen it worked.
Seems like a bug..
14. November 2017 at 17:16 #32485
- This topic was modified 5 years, 4 months ago by e00mei.
You might have used an older version of Squeezelite on Max2Play.
Please try using our own compiled one which should be Squeezelite Max2Play v1.0.3 based on v1.8.7-99930. März 2018 at 19:58 #34914
the -S-option works fine with the version of squeezelite, which comes with max2play. But I would like to know which kind of event (on or off) it is. Is there any way to determine the current state of squeezelite? Maybe by asking the squeezebox server LMS?
Magnum4. April 2018 at 10:19 #34959
Check out the voice control plugin. There’s a command to check the status of a player as well as some other CLI commands listed that might help you along.4. April 2018 at 19:01 #34983
which plugin do you mean. Here https://www.max2play.com/addons/ is no plugin named „voice control“.
Magnum5. April 2018 at 11:32 #34995
Sorry I was unclear, it’s called Speech Control in our overview, here’s the link.14. November 2018 at 3:06 #41986
I just wanted to add the information, that the powerstate is in $1 as 1 (on) or 0 (off).
Don’t know, if any other parameters are given.
I looked for this little piece of information a long time before finding it.
Might be obvious to many people, but I would have loved to find it here, because this thread shows up on top for the -S parameter15. November 2018 at 12:04 #42046
Thanks for chiming in and adding this info! We recently published the new, free plugin API-Examples that expands upon the info given in our discontinued Voice Control Plugin. It comes preinstalled from version 2.47 in the inactive plugins section under Settings/Reboot.
You must be logged in to reply to this topic.