Re: [SlimDevices: SqueezeCenter] Pause specific Squeezebox at scheduled times?

2019-05-14 Thread edwin2006


Thanks for sharing the chosen solution!



*SqueezeBoxes:* 1x Transporter (Living room) 1x SB2 (shed), 1x Radio
(Kitchen), 1x Boom (Dining room), 1x piCorePlayer (jacuzzi), 1x
piCorePlayer (Garden) 1x OSMC + Squeezelite (Movie room), 1x Touch
(Study 2), few spare unit's
*Server:* LMS on Pi3 7.9.1. on PcP 3.21
*Network:* AVM Fritzbox, Netgear Smart Switch 24p, 3x Ubiquity

edwin2006's Profile: http://forums.slimdevices.com/member.php?userid=66926
View this thread: http://forums.slimdevices.com/showthread.php?t=110538

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] Pause specific Squeezebox at scheduled times?

2019-05-14 Thread cramcram


mherger wrote: 
> >
> The kids soon 
> understood that if they used the SB when they were not allowed to use 
> them, the SB would be gone :-). (it still happens of course, but this is
> 
> part of the growing up experience)
> -- 
> Michael

Hi all, thx for all your replies and your help. This community is
amazing. I finally decided to go with Michael's educational approach
rather than with the tech-approach. Anyway we shouldn't further discuss
education in this forum ;)

To reply to some of your suggestions: I'm using max2play but I don't
want to start fiddling around with scripts within max2play (which I fear
would be gone with the next update of max2play). The SSID approach would
be nice and easy, unfortunately with my Google Wifi I can't setup a
separate SSID.



cramcram's Profile: http://forums.slimdevices.com/member.php?userid=22906
View this thread: http://forums.slimdevices.com/showthread.php?t=110538

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] Pause specific Squeezebox at scheduled times?

2019-05-08 Thread Roland0


The approach outlined in #5 works nicely.

Configuration:
/usr/local/etc/lmseventtrigger.json:

Code:


  {
  "enabled": false,
  "numStatusResults":1,
  "events": [
  {"cmd":"/usr/local/bin/lms-autostop.sh","event":[["playlist"],["newsong"]]}
  ]
  }
  



/usr/local/bin/lms-autostop.sh (adjust player name and id):

Code:


  #/bin/bash
  echo "$2"| grep -q '"player_name":"kids_squeezebox"' || exit 
  (echo "00%3A00%3A00%3A00%3A00%3A00 stop" | /bin/busybox nc localhost 9090) &
  



enable plugin (e.g. via cron at a specified time):

Code:


  wget "http://lmsserver:9000/plugins/LMSeventTrigger/js.html?cmd=enable;
  



This will stop the player as soon as a track is started.



SW: 'Web UI for LMS'
(http://forums.slimdevices.com/showthread.php?98186-Announce-Alternative-Web-Interface-(beta))
| 'Playlist Editor / Generator'
(http://forums.slimdevices.com/showthread.php?108199-Announce-LMS-Playlist-Editor)
| 'Music Classification'
(http://forums.slimdevices.com/showthread.php?108278-Announce-Essentia-Integration-music-classification-(moods-genres-))
| 'Similar Music'
(http://forums.slimdevices.com/showthread.php?108495-Announce-LMSmusly-play-similar-music)
| 'LMSlib2go' (https://www.nexus0.net/pub/sw/lmslib2go/)
HowTos: 'build a self-contained LMS'
(http://forums.slimdevices.com/showthread.php?99648-Howto-build-a-self-contained-LMS)
| 'Ogg Opus'
(http://forums.slimdevices.com/showthread.php?107011-Howto-play-Ogg-Opus-files)
| 'Bluetooth/ALSA'
(http://forums.slimdevices.com/showthread.php?107230-Howto-Bluetooth-streaming-to-from-LMS-(ALSA-only-no-PulseAudio))

Roland0's Profile: http://forums.slimdevices.com/member.php?userid=56808
View this thread: http://forums.slimdevices.com/showthread.php?t=110538

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] Pause specific Squeezebox at scheduled times?

2019-05-08 Thread Manul


Some WiFi routers/access points also have the option to limit internet
usage for certain devices based either on time of day or on total time
online.



Manul's Profile: http://forums.slimdevices.com/member.php?userid=68932
View this thread: http://forums.slimdevices.com/showthread.php?t=110538

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] Pause specific Squeezebox at scheduled times?

2019-05-08 Thread Paul Webster


The WiFi suggestion is 2 have two different WiFi networks serving the
same LAN - with one reserved for the kids equipment.
If you have a WiFi Access Point that has that ability - along with the
possibility to have a time limit on it - then it has the extra feature
that if the kids have tablets/computers on the same WiFi then they stop
working as well.

Lots of WAPs have support for Guest Network but might not have a
time-of-day feature.

Another way to achieve it would be to put in an additional WAP but put
it in a sort of bridge mode so that DHCP serving still comes from the
main one.
Then even if it does not have a time-of-day function you could simply
put it on a timer switch to power it off at night.



Paul Webster
http://dabdig.blogspot.com
Author Radio France (FIP etc) plugin

Paul Webster's Profile: http://forums.slimdevices.com/member.php?userid=105
View this thread: http://forums.slimdevices.com/showthread.php?t=110538

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] Pause specific Squeezebox at scheduled times?

2019-05-08 Thread RobbH


edwin2006 wrote: 
> Allright perhaps I was a bit short in explanation.
> If the SB is connected via wifi then a solution would be to place wifi
> on a scheduled base. So wifi is only working from day 10 AM until 15.00
> pm.
> 
> A lot of sb's are connected via wifi and if one thing is critical in a
> good working SB environment than it is a good working network (cable or
> wifi). 
> One brand that provides good wifi is ubiquiti and it has also that
> capability of making a schedule. 
> 
> So using ubiquiti would give you a solution for OP question and also
> provides good wifi and so avoid network related problems with lms.
> Assuming the cabled part of router and switch is also in good condition
> and proper configurated. 
> 
> Regards, edwin

Many thanks for the detailed explanation! Unless I'm misunderstanding,
this solution requires switching off the entire wireless network in
order to silence one player?

It might be possible to set up a virtual network, which is only accessed
by the Squeezebox that needs to be silenced. But in that case, this is
becoming nearly as complicated as my ramblings about creating a virtual
player to load a url.

In any case, it's certainly a valid approach, worth considering, and
good to have it included in this thread. Again, thanks for explaining!



RobbH's Profile: http://forums.slimdevices.com/member.php?userid=67008
View this thread: http://forums.slimdevices.com/showthread.php?t=110538

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] Pause specific Squeezebox at scheduled times?

2019-05-07 Thread edwin2006


Allright perhaps I was a bit short in explanation.
If the SB is connected via wifi then a solution would be to place wifi
on a scheduled base. So wifi is only working from day 10 AM until 15.00
pm.

A lot of sb's are connected via wifi and if one thing is critical in a
good working SB environment than it is a good working network (cable or
wifi). 
One brand that provides good wifi is ubiquiti and it has also that
capability of making a schedule. 

So using ubiquiti would give you a solution for OP question and also
provides good wifi and so avoid network related problems with lms.
Assuming the cabled part of router and switch is also in good condition
and proper configurated. 

Regards, edwin



*SqueezeBoxes:* 1x Transporter (Living room) 1x SB2 (shed), 1x Radio
(Kitchen), 1x Boom (Dining room), 1x piCorePlayer (jacuzzi), 1x
piCorePlayer (Garden) 1x OSMC + Squeezelite (Movie room), 1x Touch
(Study 2), few spare unit's
*Server:* LMS on Pi3 7.9.1. on PcP 3.21
*Network:* AVM Fritzbox, Netgear Smart Switch 24p, 3x Ubiquity

edwin2006's Profile: http://forums.slimdevices.com/member.php?userid=66926
View this thread: http://forums.slimdevices.com/showthread.php?t=110538

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] Pause specific Squeezebox at scheduled times?

2019-05-07 Thread RobbH


edwin2006 wrote: 
> Again, why not close wifi SSID?

Perhaps that's what the original poster has done! Or perhaps he didn't
understand your suggestion any better than I did. Would you be willing
to offer some explanation for those of us who are a bit dense?

What are the chances the OP would be able to do this without substantial
investment in new equipment? (Sorry if that's a foolish question. Again,
I have only a vague inkling of what you're suggesting, and that may well
turn out to be entirely wrong.)



RobbH's Profile: http://forums.slimdevices.com/member.php?userid=67008
View this thread: http://forums.slimdevices.com/showthread.php?t=110538

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] Pause specific Squeezebox at scheduled times?

2019-05-07 Thread RobbH


In my earlier comments, I got swept up in enthusiasm for the "elegance"
of doing everything within LMS. But doing it that way is kludgy,
anything but elegant. A much more reasonable approach would be to use
something like wget to call one of the urls I mentioned in message 6. If
the OP has LMS running on Linux, it would be simple enough to set up a
cron job to do that at the appropriate time. I assume similar options
are available on Windows and Mac.



RobbH's Profile: http://forums.slimdevices.com/member.php?userid=67008
View this thread: http://forums.slimdevices.com/showthread.php?t=110538

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] Pause specific Squeezebox at scheduled times?

2019-05-06 Thread Sparkman


There are a number of home automation systems that interface with LMS. 
I use HomeSeer and the Squeezebox plugin for it.  You could easily
create an event that detects a player that starts playing and then turn
it off or pause it between a certain time period.





Sparkman's Profile: http://forums.slimdevices.com/member.php?userid=63916
View this thread: http://forums.slimdevices.com/showthread.php?t=110538

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] Pause specific Squeezebox at scheduled times?

2019-05-06 Thread RobbH


I think Michael actively discourages the use of html "remote control"
codes, and there is no guarantee that they will continue to work.
However, for now, this seems to work for me:


Code:

http://localhost:9000/status.html?p0=stop=[MAC or IP of target 
player]



That's using a "stop" command, which is what I used while testing. Pause
should also work, although in that form it will simply toggle the
player's current pause status. To insure that it pauses instead of
unpausing, use this:


Code:

http://localhost:9000/status.html?p0=pause=1=[MAC or IP of target 
player]



Or this to power the player off:


Code:

http://localhost:9000/status.html?p0=button=power_off=[MAC or IP 
of target player]



You can test any of these commands using the Tune In URL field in LMS.
If it does what you want, save it as a favorite and set an alarm to fire
it at the appropriate time. If you have LMS listening on some port other
than 9000, that will need to be adjusted, and if you test the command
from a machine other than the one running LMS, you will need to use the
actual LMS url instead of "localhost".

As has been pointed out, nothing prevents someone from undoing what the
command you choose has done, but that's an issue to be dealt with on an
individual basis!



RobbH's Profile: http://forums.slimdevices.com/member.php?userid=67008
View this thread: http://forums.slimdevices.com/showthread.php?t=110538

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] Pause specific Squeezebox at scheduled times?

2019-05-04 Thread Roland0


cramcram wrote: 
> Is there a way to pause a specific Squeezebox at scheduled times? I'd
> like to block the Squeezebox in the kids room at scheduled times. I
> already tried to pause Internet access for the Squeezebox on my router.
> However the Squeezebox continues to work as it accesses the local LMS
> and not the Internet...
> 

Pausing once may not be enough, they can simply resume playing anytime.
One possible solution would be to use 'this plugin'
(https://forums.slimdevices.com/showthread.php?110344-Announce-Event-Trigger-execute-commands-triggered-by-LMS-server-events)
to to wait for the event "playlist newsong", and immediately stop the
player. The script used to stop the player should check the player id to
make sure only the intended Squeezebox is stopped.



SW: 'Web UI for LMS'
(http://forums.slimdevices.com/showthread.php?98186-Announce-Alternative-Web-Interface-(beta))
| 'Playlist Editor / Generator'
(http://forums.slimdevices.com/showthread.php?108199-Announce-LMS-Playlist-Editor)
| 'Music Classification'
(http://forums.slimdevices.com/showthread.php?108278-Announce-Essentia-Integration-music-classification-(moods-genres-))
| 'Similar Music'
(http://forums.slimdevices.com/showthread.php?108495-Announce-LMSmusly-play-similar-music)
| 'LMSlib2go' (https://www.nexus0.net/pub/sw/lmslib2go/)
HowTos: 'build a self-contained LMS'
(http://forums.slimdevices.com/showthread.php?99648-Howto-build-a-self-contained-LMS)
| 'Ogg Opus'
(http://forums.slimdevices.com/showthread.php?107011-Howto-play-Ogg-Opus-files)
| 'Bluetooth/ALSA'
(http://forums.slimdevices.com/showthread.php?107230-Howto-Bluetooth-streaming-to-from-LMS-(ALSA-only-no-PulseAudio))

Roland0's Profile: http://forums.slimdevices.com/member.php?userid=56808
View this thread: http://forums.slimdevices.com/showthread.php?t=110538

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] Pause specific Squeezebox at scheduled times?

2019-05-04 Thread edwin2006


Use wifi and schedule the wifi SSID of the kids? Works also for tablet,
phone etc.
Ubiquiti has this feature (and much more)



*SqueezeBoxes:* 1x Transporter (Living room) 1x SB2 (shed), 1x Radio
(Kitchen), 1x Boom (Dining room), 1x piCorePlayer (jacuzzi), 1x
piCorePlayer (Garden) 1x OSMC + Squeezelite (Movie room), 1x Touch
(Study 2), few spare unit's
*Server:* LMS on Pi3 7.9.1. on PcP 3.21
*Network:* AVM Fritzbox, Netgear Smart Switch 24p, 3x Ubiquity

edwin2006's Profile: http://forums.slimdevices.com/member.php?userid=66926
View this thread: http://forums.slimdevices.com/showthread.php?t=110538

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] Pause specific Squeezebox at scheduled times?

2019-05-04 Thread Michael Herger

Is there a way to pause a specific Squeezebox at scheduled times? I'd
like to block the Squeezebox in the kids room at scheduled times. I
already tried to pause Internet access for the Squeezebox on my router.
However the Squeezebox continues to work as it accesses the local LMS
and not the Internet...


You want to prevent the kids from using their SB? I did start working on 
such a plugin a few years ago, but never finished it... The kids soon 
understood that if they used the SB when they were not allowed to use 
them, the SB would be gone :-). (it still happens of course, but this is 
part of the growing up experience)



--

Michael
___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] Pause specific Squeezebox at scheduled times?

2019-05-04 Thread DJanGo


cramcram wrote: 
> Is there a way to pause a specific Squeezebox at scheduled times? I'd
> like to block the Squeezebox in the kids room at scheduled times. I
> already tried to pause Internet access for the Squeezebox on my router.
> However the Squeezebox continues to work as it accesses the local LMS
> and not the Internet...
> 
> Thanks for your ideas.

for which OS?
for linux it something like

Code:


  #! /bin/sh
  
  ###vars:
  ## the mac from your player
  playerID="aa:bb:cc:dd:ee:ff"
  
  ## The IP from your LMS System
  server=192.168.199.11
  
  ## The CLI Port from your LMS
  port=9090
  
  printf "$playerID  pause\nexit\n"|nc $server $port
  




DJanGo's Profile: http://forums.slimdevices.com/member.php?userid=1516
View this thread: http://forums.slimdevices.com/showthread.php?t=110538

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


[SlimDevices: SqueezeCenter] Pause specific Squeezebox at scheduled times?

2019-05-04 Thread cramcram


Is there a way to pause a specific Squeezebox at scheduled times? I'd
like to block the Squeezebox in the kids room at scheduled times. I
already tried to pause Internet access for the Squeezebox on my router.
However the Squeezebox continues to work as it accesses the local LMS
and not the Internet...

Thanks for your ideas.



cramcram's Profile: http://forums.slimdevices.com/member.php?userid=22906
View this thread: http://forums.slimdevices.com/showthread.php?t=110538

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter