Re: [SlimDevices: Beta] Alarm not working with 8.3?

2022-11-28 Thread Michael Herger
New 8.3.1/8.4 builds should be available with this additional check on 
the source.

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


Re: [SlimDevices: Beta] Alarm not working with 8.3?

2022-11-28 Thread Michael Herger

I actually think that the MAC address is included in the source string
when the associated session is controlling a different device, i.e.


In that case it would be a /slim/request - which is excluded explicitly.

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


Re: [SlimDevices: Beta] Alarm not working with 8.3?

2022-11-28 Thread gordonb3



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.

I actually think that the MAC address is included in the source string
when the associated session is controlling a different device, i.e.
other than itself. This regex might thus block legit actions to stop the
alarm from e.g. Controller.

Also not completely unimportant, `index()` is more CPU friendly than
regex, even if the latter is applied with fixed strings.



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

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


Re: [SlimDevices: Beta] Alarm not working with 8.3?

2022-11-28 Thread Michael Herger

Okay. I've got it this time. No, REALLY!!! :o
(I verified it with a regex testing utility.)
The problem is missing quantifiers after the components of the MAC


You're correct!


Hopefully this post will redeem my technical credibility to at least a
minor extent. In any case, the change should allow Michael's solution to
function as intended.


Thanks! You got my blessing :-D
___
beta mailing list
beta@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/beta


Re: [SlimDevices: Beta] Alarm not working with 8.3?

2022-11-28 Thread SamY



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)


SamY wrote: 
> I stand exposed...  :D

Okay. I've got it this time. No, REALLY!!! :o 
(I verified it with a regex testing utility.)
The problem is missing quantifiers after the components of the MAC
address so the solution is to change:


Code:

m|^/[a-z0-9]+/slim/\w+/(?:[0-9a-f]:){5}[0-9a-f]|



To:


Code:

m|^/[a-z0-9]+/slim/\w+/(?:[0-9a-f]+:){5}[0-9a-f]+|



Or, to be more strict:


Code:

m|^/[a-z0-9]+/slim/\w+/(?:[0-9a-f]{2}:){5}[0-9a-f]{2}|



Hopefully this post will redeem my technical credibility to at least a
minor extent. In any case, the change should allow Michael's solution to
function as intended.



Sam

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

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


Re: [SlimDevices: Beta] Alarm not working with 8.3?

2022-11-28 Thread MichaelPr



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)


Really interesting thread and thanks for tirelessly chasing the bug.
This morning I had it again - faulty/non-triggered alarm with my 8.3.1
setup and the whole family overslept - the interesting thing about it, I
hadn't touched the setup for the past few weeks and I hadn't adjusted
the alarm either and it was reliable over this weeks. In my view,
material was not really involved and the alarm was always acknowledged
over the radios - anyway, I'm really happy that the issue has been
recognized and will be fixed soon.

Best regards and thank you so much!



lms: 8.3.1 - 1667914563 
on rpi4/ raspbian buster 10
points to musiclibrary on qnap ts212 (nfs) 

1x duet - cntrl-fw: 8.0.1-r16907/ receiver-fw: 77
2x sb radio - fw: 8.0.1-r16907
1x squeezebox boom - fw 57
1x transporter - fw: 87
rpi 2b - pcp 8.0.1/ squeezelite  v1.9.9-1391-pcp
softsqueeze 3.9.2 on win 10 / squeezeplay 8.0.1r1343 on win 10
squeeze player 1.3.21 on s22/android 13.0.0 

controller:
android phone - squeezer 2.3.0/ material skin 3.0.1

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

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


Re: [SlimDevices: Beta] Alarm not working with 8.3?

2022-11-28 Thread SamY



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)


Paul Webster wrote: 
> The trailing i is to indicate that the text matching should be
> case-insensitive.

I stand exposed...  :D



Sam

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

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


Re: [SlimDevices: Beta] Alarm not working with 8.3?

2022-11-28 Thread Paul Webster



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)


The trailing i is to indicate that the text matching should be
case-insensitive.



Paul Webster
author of \"now playing\" plugins covering radio france (fip etc),
planetradio (bauer - kiss, absolute, scala, jazzfm etc), kcrw, abc
australia and cbc/radio-canada
and, via the extra \"radio now playing\" plugin lots more - see
https://forums.slimdevices.com/showthread.php?115201-announce-radio-now-playing-plugin

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

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


Re: [SlimDevices: Beta] Alarm not working with 8.3?

2022-11-28 Thread SamY



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)


SamY wrote: 
> I suspect a typo in Michael's second regex, checking for a MAC address
> in the source but I don't see it offhand.

At the risk of exposing my limited knowledge of the intricacies of
regular expressions, I believe the problem could be the trailing 'i'
after the pattern in the last regex. I would replace:


Code:

m|^/[a-z0-9]+/slim/\w+/(?:[0-9a-f]:){5}[0-9a-f]|i



with:


Code:

m|^/[a-z0-9]+/slim/\w+/(?:[0-9a-f]:){5}[0-9a-f]|



i.e. No trailing 'i'



Sam

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

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