Bug 15515 - Alarm icon not always reflecting correct state in clock screensaver
: Alarm icon not always reflecting correct state in clock screensaver
Status: RESOLVED FIXED
Product: SB Radio
Classification: Unclassified
Component: Alarm
: Include FW version in comment
: Macintosh MacOS X 10.5
: P3 normal with 2 votes (vote)
: 7.6.0
Assigned To: Ben Klaas
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-22 04:25 UTC by Daniel Barrett
Modified: 2011-04-12 13:41 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
My player's alarms (46.83 KB, image/jpeg)
2010-01-22 04:25 UTC, Daniel Barrett
Details
log from this morning. No alarm icon (81.38 KB, text/plain)
2011-01-30 01:18 UTC, Stefan Hansel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Barrett 2010-01-22 04:25:09 UTC
Created attachment 6450 [details]
My player's alarms

Server: 7.4.1
Firmware: 7.4.1-r7915

On my Radio, I have an alarm set for Monday-Friday at 7:15am. For a while, the
Radio would display its little "bell" icon only Sunday through Thursday,
indicating an upcoming alarm. Now, however, it also displays the alarm on
Friday and Saturday, even though no alarm rings on Saturday & Sunday.  This is
confusing and makes me worry that the radio alarm will go off on weekends (when
it shouldn't).

I have attached a screenshot of my player's alarm page on the server web site.
Comment 1 Daniel Barrett 2010-01-22 04:44:17 UTC
In my alarms (see my uploaded screenshot), I deleted alarm 2 (a disabled, one-time alarm) and it made no difference -- the alarm bell icon still displays on the player when no alarm is scheduled the next day.
Comment 2 Daniel Barrett 2010-01-29 04:22:39 UTC
This seems to happen if, when the alarm rings, you simply press the Radio's power button to shut it off.  If instead, you look at the display, choose "turn off alarm" and press the circular dial, the icon properly disappears.
Comment 3 Chris Owens 2010-02-01 08:29:51 UTC
QA to reproduce
Comment 4 Chris Owens 2010-02-01 08:30:41 UTC
QA to reproduce
Comment 5 Bill Dean 2010-02-27 12:00:34 UTC
(In reply to comment #4)
> QA to reproduce

I use a remote to turn off the radio from across teh room - would like to not have to go into the menus to make the alarm menus work.

We also have a boom that gets turned off with the remote and this behavior is not present.

Seems like a fixable problem.

thanks.
Comment 6 Bill Dean 2010-02-27 12:10:26 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > QA to reproduce
> I use a remote to turn off the radio from across teh room - would like to not
> have to go into the menus to make the alarm menus work.
> We also have a boom that gets turned off with the remote and this behavior is
> not present.
> Seems like a fixable problem.
> thanks.
Should Have also added - 

Win Vista 32 operating system.

Thanks.
Comment 7 Chris Owens 2010-03-08 11:26:51 UTC
Moving lower-priority bugs to next target
Comment 8 Walker LaRon 2010-04-20 13:11:38 UTC
SB Touch fw r8673
SB Radio fw r8673

2 Touches and 1 Radio

Connected to Mysb.com

Both my Touch and Radio displays an Alarm Icon, but I do not have any alarms set.

I tested with a fresh mysb.com account, and the same thing occurred.  Dan E. is also experiencing this issue.


Thanks,

LaRon
Comment 9 Mickey Gee 2010-05-28 12:48:31 UTC
I was able to observe this bug with a Radio. I think this bug will intermittently occur under these conditions:

- Alarm time must be set
- Alarms turned OFF
- Connected to MySqueezebox.com only
- Network or internet connection to MySqueezebox.com is intermittent

My guess is that the alarm code will check regularly with MySqueezebox.com to determine whether an alarm has been turned ON. If so, then the alarm icon is shown on the screen. If this check occurs when the connection to MySqueezebox.com is momentarily absent, then this check becomes confused and sometimes thinks an alarm is ON.

A similar situation may happen when using Squeezebox Server and the network connection is spotty, but that's an even bigger SWAG.
Comment 10 Stefan Hansel 2010-05-30 00:24:54 UTC
One should note, that you can also have this bug the other way round: no icon, when there is an alarm scheduled.

Steps to reproduce:
- Have an alarm set from monday to friday
- have it ring on friday, stop it, alarm icon disappears (as in the next 24h there is no alarm)
- put the radio to soft power off, showing one of the built in clocks (I use the digital with black background)
- wait until sunday - the alarm icon will not reappear (unless you hit soft power on)
Comment 11 Ben Klaas 2011-01-13 15:00:12 UTC
candidate for 7.6.0
Comment 12 SVN Bot 2011-01-20 07:34:01 UTC
 == Auto-comment from SVN commit #9291 to the jive repo by bklaas ==
 == http://svn.slimdevices.com/jive?view=revision&revision=9291 ==

Fixed Bug: 15515
Fixed Bug: 16673
Description: use AlarmSnooze's RTC fallback alarm timer state (running or not) to govern whether an alarm icon is present on the iconbar
This should fix all bugs that involve the iconbar to display the wrong thing for a  upcoming-within-24h alarm
Comment 13 Stefan Hansel 2011-01-23 10:00:17 UTC
Hi Ben, 

I'm not sure if your patch fixes the (whole) problem. 
While the alarm icon might be right now an the status bar you also need to take care for the clock screensavers.

At least my Radio on the weekend is in the soft-power of state showing a one of the clock screensavers (guess I'm not the only one). With 7.5.2 the alarm icon is not present on sunday at 12:00 even if I have an alarm at 8:00 on monday.
The icon only updates, when I hit the power button (I applied the changes from your last commit to my 7.5.2 version manually) to see the status bar. Only when I reenter soft-power-off again also the icon on the screensaver is the correct one.

Or are the screensavers handled in another bug-report?
Comment 14 Ben Klaas 2011-01-24 07:23:44 UTC
Thanks Stefan. Reopening to cover the Screensaver part of this, which I'd overlooked.

Will investigate a player object method to query for an upcoming alarm, so the right decision on the icon can be made with common code.
Comment 15 Ben Klaas 2011-01-25 15:24:17 UTC
Reviewing this, I don't see bad behavior from the clocks, they do in fact show an alarm icon appropriately.

I reviewed the code, and the icon should appear properly (it queries the player object for alarmState) when the clock first comes up. It should also update when there is a change in alarmState (through a notify_playerAlarmState method), so that should also work.

Not sure what was going on in your situation to show no icon, but running r9298 here and see no issue. Maybe there's a bug yet to be solved, but I'm not seeing it...
Comment 16 Daniel Barrett 2011-01-25 17:27:54 UTC
Try this on the radio:

1. Set an alarm for all weekdays at 7:15am.
2. Let the alarm ring on Friday morning (the last alarm of the week) and turn it off by pressing the on/off button.
3. You'll still see an alarm icon, even though there is no alarm coming on Saturday.
4. The alarm icon will stay there all weekend.
Comment 17 Ben Klaas 2011-01-26 06:56:21 UTC
Daniel, what firmware revision are you running?
Comment 18 Daniel Barrett 2011-01-26 12:19:05 UTC
Firmware: 7.5.1-r9218
Comment 19 Stefan Hansel 2011-01-26 16:10:45 UTC
I'm also still on 7.5.1 - were there any changes to the player state notifications?
Will try to install 7.6 for the weekend.
Comment 20 Ben Klaas 2011-01-27 20:41:41 UTC
sorry, I wasn't clear. fixes for this bug are on 7.6 branch
Comment 21 Stefan Hansel 2011-01-30 01:16:44 UTC
OK Ben, I tested now with 
Version: 7.6.0 - r31861
Firmware: 7.6.0-r9298

I have one alarm scheduled from Mo-Fr, 8:00am
I'll put the Radio into soft-off on saturday afternoon (showing one of the clock screensavers).
There is no alarm-icon present (which is ok, because in the next 24hours there is no alarm).

On Sunday, 10:00am there is still no alarm icon present on the screensaver.
When I hit the power button, the Radio goes to the Now-Playing screen. For a very short moment the status bar there is empty, but then the player status (paused) and the alarm icon gets updated.

If I hit soft-power off again I see the screensaver now with alarm icon.


So for some reason the Radio does get no player notifications while in soft-power-off for a longer time?

I attached the log from this morning - looks like the Radio for some reason disconnected and only reconnected when I hit the power button.
Comment 22 Stefan Hansel 2011-01-30 01:18:01 UTC
Created attachment 7093 [details]
log from this morning. No alarm icon
Comment 23 Ben Klaas 2011-01-31 07:49:04 UTC
reopening

bug is restricted to clock screensaver now, so updating summary accordingly
Comment 24 Ben Klaas 2011-04-08 12:56:36 UTC
On reflection, comment#21 makes sense to me

the issue is that a playerstatus

Squeezeplay does a subscribe:0 for playerstatus. What that means is that it sets up the subscription for notifications only, no polling. 

So the server doesn't generate a playerstatus when an alarm becomes within 24h away, but as soon as a playerstatus is issued for something else (e.g., bringing the player out of soft off state), the notification will include a check to see whether an alarm is < 24h away, and if so the alarm icon will properly update.

what I'm going to do is change subscribe:0 to subscribe:600 so it polls every 10 minutes. That should effectively fix this bug.
Comment 25 SVN Bot 2011-04-12 13:38:32 UTC
 == Auto-comment from SVN commit #9417 to the jive repo by bklaas ==
 == http://svn.slimdevices.com/jive?view=revision&revision=9417 ==

Fixed Bug: 15515
Description: correctly set self.alarmState in clock applet when alarmState notification comes through
Comment 26 SVN Bot 2011-04-12 13:41:11 UTC
 == Auto-comment from SVN commit #9418 to the jive repo by bklaas ==
 == http://svn.slimdevices.com/jive?view=revision&revision=9418 ==

Bug: 15515
Description: poll for playerstatus every 10 minutes