------------------------------------------------------------------------
A poll associated with this post was created, to vote and see the
results, please visit http://forums.slimdevices.com/showthread.php?t=116649
------------------------------------------------------------------------
Question: On what player types does the alarm fail for you?
    
- Squeezebox Radio (official firmware 7.x) 
- Squeezebox Radio (community firmware 8.x) 
- Squeezebox Touch (official firmware 7.x) 
- Squeezebox Touch (community firmware 8.x) 
- SB Classic/Boom/Receiver/Transporter 
- Other (eg. Raspberry Pi based)
------------------------------------------------------------------------

mherger wrote: 
> Rather than just blocking player-refs notifications we should probably
> just ignore any player specific notification:
> 
> > 
Code:
--------------------
  >   > diff --git a/Slim/Utils/Alarm.pm b/Slim/Utils/Alarm.pm
  > index e6acade08..abf4be8a6 100644
  > --- a/Slim/Utils/Alarm.pm
  > +++ b/Slim/Utils/Alarm.pm
  > @@ -1982,6 +1982,11 @@ sub _alarmEnd {
  > main::DEBUGLOG && $isDebug && $log->debug('Ignoring self-created request');
  > return;
  > }
  > +       elsif ($source && $source !~ m|^/[a-z0-9]+/slim/request| && $source 
=~ m|^/[a-z0-9]+/slim/\w+/(?:[0-9a-f]:){5}[0-9a-f]|i) {
  > +               warn Data::Dump::dump($request, 'Alarm: ignored event');
  > +               main::DEBUGLOG && $isDebug && $log->debug('Ignoring 
notification to subscriber');
  > +               return;
  > +       }
  > elsif ($source) {
  > warn Data::Dump::dump($request, 'Alarm: fired event');
  > $log->error("Unknown source: $source");
  > 
--------------------
> > 
> 
> Would anybody be able to apply this and test? I think that (most)
> interactive actions taken by a user would be `/abc213/slim/request`,
> whereas notification come with a MAC address in the source element. As
> notifications already are in response to some action we should ignore
> them.

Testing this change today, I'm still getting alarm failures, first a
sanity check... here's the code changes I copied into
/usr/local/slimserver/Slim/Utils/Alarm.pm

39250

and here's a BBEdit differences between the original Alarm.pm (left) and
the modified Alarm.pm (right)

39251

Logfile extract of one of the failures:

[22-11-27 10:30:00.0016] Slim::Utils::Alarm::sound (516) Alarm triggered
for Spare Radio 2
[22-11-27 10:30:00.0025] Slim::Utils::Alarm::sound (560) Sounding alarm
[22-11-27 10:30:00.0054] Slim::Utils::Alarm::sound (589) Current Power
State: Off
[22-11-27 10:30:00.0105] Slim::Utils::Alarm::pushAlarmScreensaver (1839)
Attempting to push into alarm screensaver: . Current mode: INPUT.List
[22-11-27 10:30:00.0117] Slim::Utils::Alarm::sound (609) Current vol: 18
Alarm vol: 18
[22-11-27 10:30:00.0126] Slim::Utils::Alarm::sound (622) Alarm playlist
shufflemode: 0
[22-11-27 10:30:00.0143] Slim::Utils::Alarm::sound (628) Alarm playlist
url: sounds://_LIVE_bbc_radio_two
[22-11-27 10:30:00.0293] Slim::Utils::Alarm::_setAlarmSubscription
(1204) Adding alarm subscription
[22-11-27 10:30:00.0304] Slim::Utils::Alarm::sound (697) Scheduling time
out in 300 seconds
[22-11-27 10:30:00.0311] Slim::Utils::Alarm::_startStopTimeCheck (1880)
0 scheduled alarm(s)
[22-11-27 10:30:00.0316] Slim::Utils::Alarm::_startStopTimeCheck (1889)
Stopping time checker task
[22-11-27 10:30:00.0321] Slim::Utils::Alarm::scheduleNext (1391) Asked
to schedule next alarm for Spare Radio 2
[22-11-27 10:30:00.0326] Slim::Utils::Alarm::findNextTime (461)
Potential next time found: 18:0:0 27/11/2022
[22-11-27 10:30:00.0330] Slim::Utils::Alarm::findNextTime (466) Last
alarm due: 10:30:0 27/11/2022
~KeBul - removed lots of findNextTime entries~
[22-11-27 10:30:00.0708] Slim::Utils::Alarm::findNextTime (461)
Potential next time found: 9:45:0 28/11/2022
[22-11-27 10:30:00.0713] Slim::Utils::Alarm::findNextTime (466) Last
alarm due: 10:30:0 27/11/2022
[22-11-27 10:30:00.0717] Slim::Utils::Alarm::scheduleNext (1424) Next
alarm is at 10:45:0 27/11/2022
[22-11-27 10:30:00.0721] Slim::Utils::Alarm::scheduleNext (1435)
Scheduling alarm
[22-11-27 10:30:00.0725] Slim::Utils::Alarm::_startStopTimeCheck (1880)
1 scheduled alarm(s)
[22-11-27 10:30:00.0728] Slim::Utils::Alarm::_startStopTimeCheck (1884)
Starting time checker task
[22-11-27 10:30:00.0813] Slim::Utils::Alarm::_alarmEnd (1970) _alarmEnd
called with request: stop
[22-11-27 10:30:00.0833] Slim::Utils::Misc::msg (1325) Warning:
[10:30:00.0828] (
bless({
_cb_args      => undef,
_cb_enable    => 1,
_cb_func      => undef,
_clientid     => "00:04:20:26:1d:b9",
_func         => sub { "???" },
_isQuery      => 0,
_langoverride => undef,
_needClient   => 1,
_params       => {},
_request      => ["stop"],
_requeststr   => "stop",
_results      => {},
_source       =>
"/c6aad791/slim/playerprefs/00:04:20:26:1d:b9|20||c6aad791|Mozilla/5.0
(Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like
Gecko) Version/16.1 Safari/605.1.15",
_status       => 10,
_useixhash    => 0,
}, "Slim::Control::Request"),
"Alarm: fired event",
) at /usr/local/slimserver/Slim/Utils/Alarm.pm line 1991.
[22-11-27 10:30:00.0838] Slim::Utils::Alarm::_alarmEnd (1992) Unknown
source:
/c6aad791/slim/playerprefs/00:04:20:26:1d:b9|20||c6aad791|Mozilla/5.0
(Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like
Gecko) Version/16.1 Safari/605.1.15
[22-11-27 10:30:00.0841] Slim::Utils::Alarm::_alarmEnd (2002) Stopping
alarm
[22-11-27 10:30:00.0854] Slim::Utils::Alarm::popAlarmScreensaver (1866)
Attempting to pop alarm screensaver.  Current mode: INPUT.List
[22-11-27 10:30:01.0863] Slim::Utils::Alarm::__ANON__ (901) Restoring
pre-alarm shuffle mode: 0
[22-11-27 10:30:01.0881] Slim::Utils::Alarm::__ANON__ (905) Restoring
pre-alarm power state: off


+-------------------------------------------------------------------+
|Filename: diff.jpg                                                 |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=39251|
+-------------------------------------------------------------------+

------------------------------------------------------------------------
KeBul's Profile: http://forums.slimdevices.com/member.php?userid=32883
View this thread: http://forums.slimdevices.com/showthread.php?t=116649

_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/beta

Reply via email to