PDA

View Full Version : Power Off All Players?



Mark Miksis
2018-05-09, 16:17
Maybe this exists already and I'm not aware of it...

Is there a plugin that will provide a "master off" function? In other words, if I have multiple players going, synced or not, it would be nice to be able to turn them all off with a single click. I'm not sure where this would go in the menu structure, but ideally it would be available from both the web UI and any mobile app.

yeomanspc
2018-05-10, 00:33
Ipeng is pretty good for this albeit you have to ‘touch’ each player - but they are in one screen. I think the watch app has the function to switch off all players with a single touch. Presume you have skimmed the plugins page?


Sent from my iPhone using Tapatalk

drmatt
2018-05-10, 01:13
I wrote a shell script for this that I activated from an internal web page via CGI. I leave them running these days though to confuse the dog.. :)


Transcoded from Matt's brain by Tapatalk

Apesbrain
2018-05-10, 06:00
Here's one I found and once used. Copy to a batch file named as you please. You have to find a way to call that file from within LMS. I think this capability exists within "Server Power Control" plugin which I was also using at that time. IIRC, it showed up in both web GUI and mobile app.



@echo off

::adapt the following set statements
set netcat=C:\Progra~1\Netcat\nc.exe
set lmsip=127.0.0.1
set lmsport=9090

::send the commands via netcat using a timeout of 1 second
::replace "ip.ad.dr.es.s#" with ip address of each player
echo ip.ad.dr.es.s1 power 0 | "%netcat%" -w1 -vv %lmsip% %lmsport%
timeout /t 1
echo ip.ad.dr.es.s2 power 0 | "%netcat%" -w1 -vv %lmsip% %lmsport%
timeout /t 1
echo ip.ad.dr.es.s3 power 0 | "%netcat%" -w1 -vv %lmsip% %lmsport%
timeout /t 1
echo ip.ad.dr.es.s4 power 0 | "%netcat%" -w1 -vv %lmsip% %lmsport%
timeout /t 1
echo ip.ad.dr.es.s5 power 0 | "%netcat%" -w1 -vv %lmsip% %lmsport%
timeout /t 1
echo ip.ad.dr.es.s6 power 0 | "%netcat%" -w1 -vv %lmsip% %lmsport%
timeout /t 1
echo ip.ad.dr.es.s7 power 0 | "%netcat%" -w1 -vv %lmsip% %lmsport%

pippin
2018-05-10, 06:13
Ipeng is pretty good for this albeit you have to ‘touch’ each player - but they are in one screen. I think the watch app has the function to switch off all players with a single touch.

The main iPeng app has this, too.
First, if players are synchronized the main power button always acts on all of them (unless you disable this in settings).
And second, long-pressing the main power button lets you power off all players, synchronized or not.
This works in the widget, too.

philippe_44
2018-05-10, 09:27
Maybe this exists already and I'm not aware of it...

Is there a plugin that will provide a "master off" function? In other words, if I have multiple players going, synced or not, it would be nice to be able to turn them all off with a single click. I'm not sure where this would go in the menu structure, but ideally it would be available from both the web UI and any mobile app.

You can also use Group Players plugin and create on virtual player whose role is just power off/on

Mark Miksis
2018-05-10, 09:29
Ipeng is pretty good for this albeit you have to ‘touch’ each player - but they are in one screen. I think the watch app has the function to switch off all players with a single touch. Presume you have skimmed the plugins page?

Thanks. I'm an android user and I can do something similar in Orange Squeeze. Still hoping to find something that also works on the web UI.

Mark Miksis
2018-05-10, 09:31
You can also use Group Players plugin and create on virtual player whose role is just power off/on

Interesting. That sounds like it might do the trick. I'll check it out, thanks.

drmatt
2018-05-10, 14:26
Here's one I found and once used. Copy to a batch file named as you please. You have to find a way to call that file from within LMS. I think this capability exists within "Server Power Control" plugin which I was also using at that time. IIRC, it showed up in both web GUI and mobile app.


For unix based players this will send the pause command to all players (and no need to know the player IPs).. You could adapt this to send poweroff instead.



#!/bin/bash
##
## Slightly Intelligent script to pause all playing squeezebox players.

LMSHOST=<lms server IP>

# Get number of players
PLAYERS=`/bin/echo -e "player count ?\nexit\n" | nc ${LMSHOST} 9090 | awk '{print $NF}'`

while [ $(( PLAYERS-- )) -gt 0 ] ; do

ID=`/bin/echo -e "player id "$PLAYERS" ?\nexit\n" | nc ${LMSHOST} 9090 | awk '{print $NF}'`
MODE=`/bin/echo -e $ID" mode ?\nexit\n" | nc ${LMSHOST} 9090 | awk '{print $NF}'`

if [ $MODE == "play" ] ; then
/bin/echo "Forcing pause on player ID "$ID
/bin/echo -e $ID" pause 1\nexit\n" | nc ${LMSHOST} 9090
fi

done