Bug 6997 - Report of Alarm not working
: Report of Alarm not working
Status: CLOSED FIXED
Product: SB Controller
Classification: Unclassified
Component: Settings
: unspecified
: Macintosh Other
: P3 normal (vote)
: 7.0
Assigned To: Ben Klaas
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-07 07:20 UTC by Blackketter Dean
Modified: 2008-05-15 13:03 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments
set playlist properly (3.49 KB, patch)
2008-02-09 14:47 UTC, KDF
Details | Diff
update instead of set (4.45 KB, patch)
2008-02-09 16:08 UTC, KDF
Details | Diff
add saved playlists too (1.31 KB, patch)
2008-02-09 16:43 UTC, KDF
Details | Diff
all-in-one patch (5.58 KB, patch)
2008-02-09 21:33 UTC, KDF
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Blackketter Dean 2008-02-07 07:20:23 UTC
From: 	  ezkcdude.34euob1202387702@no-mx.forums.slimdevices.com
	Subject: 	[SlimDevices: Jive] Alarm function?
	Date: 	February 7, 2008 4:30:21 AM PST
	To: 	  Jive@lists.slimdevices.com
	Reply-To: 	  jive@lists.slimdevices.com


I've tried setting up the alarm, but it never seems to work. I'm not
sure if it's actually the alarm that is at fault, or the fact that
sometimes the wireless signal becomes lost overnight. Has anyone
actually used the alarm?


-- 
ezkcdude

There are 10 kind of people in the world - those who understand binary
and those who don't.
SHINYMETAL
'*Site*' (http://www.ezdiyaudio.com)| '*RSS*'
(http://www2.kumc.edu/students/ezamir/rss/ezdiyaudio.xml) |'*Forum*'
(http://ezdiyaudio.informe.com)
------------------------------------------------------------------------
ezkcdude's Profile: http://forums.slimdevices.com/member.php?userid=2545
View this thread: http://forums.slimdevices.com/showthread.php?t=43188

_______________________________________________
jive mailing list
jive@lists.slimdevices.com
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive
Comment 1 KDF 2008-02-07 09:03:05 UTC
if its on linux, beware of the log rotation as that will restart the server and the alarm won't work if it happens to be around the same time.   
Comment 2 Chris Owens 2008-02-07 09:30:10 UTC
QA will have a look and assign to Ben if we can reproduce.
Comment 3 Blackketter Dean 2008-02-07 22:37:07 UTC
QA folk, who was going to take this on?
Comment 4 Chris Owens 2008-02-08 09:36:03 UTC
Seems to work on Transporter, James will test with Jive.
Comment 5 James Richardson 2008-02-08 12:28:18 UTC
I was unable to reproduce the orginal error as reported with the latest firmware/SC version
 (Jive 7.0R1853 / Ray 22 / SC 
Comment 6 James Richardson 2008-02-08 12:29:57 UTC
I will contact the customer via the forum to see if he can reproduce the error using the latest daily build for SqueezeCenter.
Comment 7 Bryan Alton 2008-02-09 07:01:43 UTC
With SC17367/ r1879 I still can't get the alarm to work with SBC.
 
 Settings are checked from Web interface. Go into Settings/Alarm on SBC.
 
 Enable, Set the time and press "home" and time will be right but alarm not enabled.
 
 Set the time, back, enable, press home - alarm enabled but time will be 00:00.
 
 Enable, Set the time and press "home" and time will be right but alarm not enabled. So go back into Setting/Alarm, just enable the alarm, home and then 
 alarm time will be 00:00 and enabled.
 
Comment 8 KDF 2008-02-09 13:24:39 UTC
something  seems to have been recently broken:

bit of the log when trying the alarm settings;
[08-02-09 13:21:38.1158] Slim::Utils::Misc::msg (1239) Warning: [13:21:38.1154] Argument "playlist_id:-2" isn't numeric in numeric gt (>) at /usr/local/slimserver/7.0.1/server/Slim/Control/Request.pm line 1685.
[08-02-09 13:21:38.1162] Slim::Utils::Misc::msg (1239) Warning: [13:21:38.1160] Argument "dow:0" isn't numeric in addition (+) at /usr/local/slimserver/7.0.1/server/Slim/Control/Request.pm line 1694.
[08-02-09 13:22:31.7735] Slim::Utils::Misc::msg (1239) Warning: [13:22:31.7730] Argument "" isn't numeric in numeric eq (==) at /usr/local/slimserver/7.0.1/server/Slim/Control/Jive.pm line 948.
[08-02-09 13:22:31.7742] Slim::Utils::Misc::msg (1239) Warning: [13:22:31.7739] Argument "PLUGIN_RANDOM_TRACK" isn't numeric in numeric eq (==) at /usr/local/slimserver/7.0.1/server/Slim/Control/Jive.pm line 948.
[08-02-09 13:22:31.7749] Slim::Utils::Misc::msg (1239) Warning: [13:22:31.7746] Argument "PLUGIN_RANDOM_CONTRIBUTOR" isn't numeric in numeric eq (==) at /usr/local/slimserver/7.0.1/server/Slim/Control/Jive.pm line 948.
[08-02-09 13:22:31.7755] Slim::Utils::Misc::msg (1239) Warning: [13:22:31.7753] Argument "PLUGIN_RANDOM_ALBUM" isn't numeric in numeric eq (==) at /usr/local/slimserver/7.0.1/server/Slim/Control/Jive.pm line 948.
[08-02-09 13:22:31.7762] Slim::Utils::Misc::msg (1239) Warning: [13:22:31.7759] Argument "PLUGIN_RANDOM_TRACK" isn't numeric in numeric eq (==) at /usr/local/slimserver/7.0.1/server/Slim/Control/Jive.pm line 948.
[08-02-09 13:22:31.7769] Slim::Utils::Misc::msg (1239) Warning: [13:22:31.7766] Argument "" isn't numeric in numeric eq (==) at /usr/local/slimserver/7.0.1/server/Slim/Control/Jive.pm line 948.
[08-02-09 13:22:31.7776] Slim::Utils::Misc::msg (1239) Warning: [13:22:31.7774] Argument "" isn't numeric in numeric eq (==) at /usr/local/slimserver/7.0.1/server/Slim/Control/Jive.pm line 948.
[08-02-09 13:22:31.7783] Slim::Utils::Misc::msg (1239) Warning: [13:22:31.7780] Argument "" isn't numeric in numeric eq (==) at /usr/local/slimserver/7.0.1/server/Slim/Control/Jive.pm line 948.
Comment 9 KDF 2008-02-09 13:29:15 UTC
part of the problem is that at least when i created it, the alarm playlist was the string token for cases of current, or random options.  Jive seems to assume these are now negative numbers.  So there is a conflict if the settings have been used from something OTHER than jive.  this may be why i saw it working before when I tested with a player that never had any alarm settings prior to setting with jive.
Comment 10 KDF 2008-02-09 13:57:32 UTC
a second issue is that it seems the alarm CLI is expecting you to provide all settings at once.  A previously enabled alarm, when setting the time shows the following for prefs debug;

[08-02-09 13:56:30.6660] Slim::Utils::Prefs::Base::set (114) setting server:00:04:20:10:02:5b:alarm to [0, 0, 0, 0, 0, 0, 0, 0]
[08-02-09 13:56:30.6670] Slim::Utils::Prefs::Base::set (114) setting server:00:04:20:10:02:5b:alarmtime to [36_000, 0, 0, 0, 0, 0, 0, 0]
[08-02-09 13:56:30.6678] Slim::Utils::Prefs::Base::set (114) setting server:00:04:20:10:02:5b:alarmplaylist to ["", "", "", "", "", "", "", ""]
[08-02-09 13:56:30.6686] Slim::Utils::Prefs::Base::set (114) setting server:00:04:20:10:02:5b:alarmvolume to [50, 50, 50, 50, 50, 50, 50, 50]


Thus, the enable get wiped out.
Comment 11 KDF 2008-02-09 14:21:42 UTC
ok, I think I see what's going on.  the alarm command "cmd:set" is being sent from Jive.  This creates a new alarm each time you set a pref.  What it should be calling is "cmd:update" and I think SC should then make sure to create a new alarm if one does not already exist, and not overwrite prefs that aren't supplied.

The playlist id's need to also be converted to the token for saving.

Comment 12 KDF 2008-02-09 14:47:48 UTC
Created attachment 2835 [details]
set playlist properly

playlist changes were not calling the cli properly (were using alarms query, as opposed to alarm set command.).

there is also another change to get rid of that warning on Jive.pm line 948 and match up the radio button with the current pref.

Todo: fix the set/update command call.
Comment 13 KDF 2008-02-09 16:08:34 UTC
Created attachment 2836 [details]
update instead of set

This handles the playlist setting, gets rid of the warning properly and does the settings update without wiping the other prefs.  we can use update because the default handler should be filling in alarm prefs for all days.
Comment 14 KDF 2008-02-09 16:43:02 UTC
Created attachment 2837 [details]
add saved playlists too

this patch is in ADDITION to the previous, as it adds the ability to have a list of ALL saved playlists as alarm playlist options.
Comment 15 KDF 2008-02-09 17:17:03 UTC
one last change required:
	playlist_id => $playlist->id,

seems to all work now.
Comment 16 KDF 2008-02-09 21:33:18 UTC
Created attachment 2838 [details]
all-in-one patch

so that's its easy to patch, this is the whole thing in one diff.
Comment 17 Blackketter Dean 2008-02-09 22:10:06 UTC
Andy/Ben: Can you review this patch?

Comment 18 Chris Owens 2008-02-11 10:03:32 UTC
Ben to review KDF's patch
Comment 19 Ben Klaas 2008-02-11 12:02:21 UTC
fixed in change 17410

I was able to both reproduce the problem pre-patch and confirm the fix post-patch. Gracias, KDF!
Comment 20 Bryan Alton 2008-02-11 12:37:32 UTC
Just updated to 17411.

There is a small problem. - enable alarm, set time (not to 12:00) on SBC.  Check setting on web and alarm is enabled but time is set to 12:00AM although alarm goes off at correct time .

Should the alarm settings be displayed on web interface after being set on SBC ?
Comment 21 KDF 2008-02-11 12:51:29 UTC
web time shows fine for me.  jive, however, does not.  I suspect that the initialText needs formatting. 
Comment 22 Ben Klaas 2008-02-11 12:54:18 UTC
odd... I see the alarm correctly set in webUI, playerUI, and jive. All the same, all work.
Comment 23 Bryan Alton 2008-02-11 13:31:09 UTC
It's OK - basically I was looking at alarms on Web UI for wrong player.

I had been testing on SB3 with SBC although I didn't "change player" after updating SC when I set the alarm using SBC it was the alarm for SBR - I didn't notice the player being controlled had changed although I don't know how.
Comment 24 Ben Klaas 2008-02-11 16:44:41 UTC
SC change 17424 and jive r1914 fix the issue of the initialText in the jive alarm time entry not updating after entering it.

boy, what a doozy that one was
Comment 25 James Richardson 2008-05-15 13:03:20 UTC
This bug has recently been fixed in the latest release of SqueezeCenter 7.0.1

Please try that version, if you still see the error, then reopen this bug.

To download this version, please navigate to: http://www.slimdevices.com/su_downloads.html