Topic: Keep playing music after acknowledging alarm

I use Pandora as my alarm clock.  When I wake up and acknowledge the alarm, the music stops sad.  So then I have to navigate over to the Music screen and turn it back on again, so I can listen to it while I get dressed, etc.  I guess on the plus side, that is a way to make sure that I am awake, but is there any way to acknowledge the alarm and still have the music continue to play?  I looked at the "post-alarm actions" options but they don't include any music, just channel selection, day mode, night mode, etc. 

I know I could just not acknowledge the alarm, but there are 2 problems with that:

1. I set a back-up beeping alarm just in case my Internet access or Pandora are down, so if I don't acknowledge the Pandora alarm that will go off. 

2. I have my "post-alarm action" set to go to a widget channel so I can see the weather, news, etc.

My ideal behavior would be for the Chumby to use the "alarm duration" setting (I forget what it is called exactly) to play the music for that long always.  The acknowledge button would be used to say "don't play backup alarm beep" and also "do selected post-alarm action".  You could maybe even have a switch on one of the custom alarm setup screens to toggle between this behavior and the current behavior.

Re: Keep playing music after acknowledging alarm

Shasta McNasty wrote:

My ideal behavior would be for the Chumby to use the "alarm duration" setting (I forget what it is called exactly) to play the music for that long always.  The acknowledge button would be used to say "don't play backup alarm beep" and also "do selected post-alarm action".  You could maybe even have a switch on one of the custom alarm setup screens to toggle between this behavior and the current behavior.

Top idea. I don't want to do without the backup alarm either, so it would be great to have a button that acknowledged the alarm, cancelled the backup and allowed the music to continue.
At present I work around this by having the first alarm set with backup alarm, this stops playing music when I acknowledge it, then one minute later the second alarm without backup starts playing music again. This is OK, but fiddly to set up for a one-off time, and not nearly as sweet as your idea would be.

Re: Keep playing music after acknowledging alarm

This could be done if you use a self written alarm screen. I want to have exactly that behavior, but haven't had the time to program an alarm screen for myself yet sad It would be handy if there would be a working example of an alarm screen including the source. Modifying it to this behavior should be easy then.

Re: Keep playing music after acknowledging alarm

Yup, I know exactly what I want the alarm to do for me (which may be different from what someone else wants) and can probably code just about well enough to modify some existing source to do it.  But not enough to write a new alarm system from scratch...especially since the provided one is 95% of what I want.

Is it possible to put the source for the alarm system up on the Wiki?

Re: Keep playing music after acknowledging alarm

The source of the build-in alarm screen was already requested in another thread, but it seems to be difficult to rip it out of the control panel. Perhaps one of the flash developer on the forum could help and code something like that? Ideally, it should be compilable strait on the chumby itself, than everyone could modify it easily.

Re: Keep playing music after acknowledging alarm

I've just posted an FLA and SWF for a trivial example of a custom alarm ring screen that you can start from:

FLA and SWF.

It supports the two current buttons (stop and snooze) and adds the "clear the alarm", and "stop but continue the music".

(EDIT: fixed link to the SWF - thanks unwiredben).

Re: Keep playing music after acknowledging alarm

I was thinking about this same problem today. I'd love to see an official fix for it (I'm clueless when it comes to scripts, so a DIY option isn't feasible).

Re: Keep playing music after acknowledging alarm

Duane wrote:

I've just posted an FLA and SWF for a trivial example of a custom alarm ring screen that you can start from:

FLA and SWF.

I tried the swf-file, but it doesn't seem to work for me. When the alarm time is reached, the screen turns black and doesn't respond anymore (neither to clicks, nor to the top button), but I can hear the music. According to the output of the controlpanel the external screen gets loaded:

2010-01-10 22:12:00 TRACE: Alarm.ringAlarm() Daily at 22:12
2010-01-10 22:12:00 TRACE: Alarm.clearAlarm() Daily at 22:12
2010-01-10 22:12:00 TRACE: Alarm.configureDisplay()
2010-01-10 22:12:00 TRACE: ScreenManager.startAlarm()
2010-01-10 22:12:00 TRACE: ScreenManager.setDim(): 0
2010-01-10 22:12:00 TRACE: ScreenManager.clearScreenRestore()
2010-01-10 22:12:00 TRACE: ScreenManager.setDim(): new 0 old 0
2010-01-10 22:12:00 TRACE: Alarm.makeScreen()
2010-01-10 22:12:00 TRACE: parent=_level0.controlPanel.alarm
2010-01-10 22:12:00 TRACE: Alarm.makeScreen(): external alarm screen found, loading
2010-01-10 22:12:00 TRACE: Alarm.playAlarmSoundContinuous()
2010-01-10 22:12:00 TRACE: MusicPlayer.setTimerEnabled(): false
2010-01-10 22:12:00 TRACE: Alarm.saveSoundSettings(): saving volume:11 mute:false
2010-01-10 22:12:00 TRACE: Alarm.startFade()
2010-01-10 22:12:00 TRACE: Alarm.getFadeTime(): using default fade time 15

The file seems to be ok, because I can load it with:
chumbyflashplayer.x -i alarmring.swf

Has anyone already used a custom alarmscreen with success?

Christian

9 (edited by Shasta McNasty 2010-01-13 18:38:59)

Re: Keep playing music after acknowledging alarm

This works great for me!  Thanks so much!  Instead of putting it on a USB stick, I just manually made /mnt/usb and stuck alarmring.swf in.  It's perfect.

EDIT: It's almost perfect...of course /mnt/usb gets blown away after a reboot ;-(.  Would it be possible to have it look in /mnt/storage also?  Or some other spot that doesn't disappear...for now I'll just use a USB stick I guess!

Re: Keep playing music after acknowledging alarm

One more thing...would it be possible to add "Turn Music Off" as a post-alarm action? 

What I really want is the music to play for some amount of time after the alarm goes off, even if you hit the "OFF WITH MUSIC" button.  I was hoping that this custom alarmring.swf would somehow remember the alarm duration and play the music for that long after you hit the button, so that when I am done getting dressed and head downstairs for breakfast, the music would turn itself off.  I see how it could be done by using the music timer but maybe that's starting to get a bit Rube Goldbergish. 

For now I have just set up a crontab entry to shut the music off using a Control Panel event at 7AM every day (1/2 hour after my 6:30 alarm).  That should work (I will know tomorrow morning)...but it would be more accessible to more people if you could just set up a post-alarm action.

Re: Keep playing music after acknowledging alarm

Shasta McNasty wrote:

This works great for me!

So it's not a general problem that I have. Has anyone an idea why the custom alarmscreen doesn't work for me? Has anyone with a chumby classic got this screen to work? In the meantime I tried to write my own screen, but it doesn't work either sad

Shasta McNasty wrote:

What I really want is the music to play for some amount of time after the alarm goes off, even if you hit the "OFF WITH MUSIC" button.  I was hoping that this custom alarmring.swf would somehow remember the alarm duration and play the music for that long after you hit the button, so that when I am done getting dressed and head downstairs for breakfast, the music would turn itself off.  I see how it could be done by using the music timer but maybe that's starting to get a bit Rube Goldbergish.

So, if you hit "off with music", the music plays endlessly without respect to the alarm duration? That sounds perfect! That's exactly the behavior I need! I hope I can get the screen work somehow...

Shasta McNasty wrote:

It's almost perfect...of course /mnt/usb gets blown away after a reboot ;-(

A small workaround would be a crontab entry that checks whether /mnt/usb/ exists and creates it if not.

12 (edited by Shasta McNasty 2010-01-14 06:13:00)

Re: Keep playing music after acknowledging alarm

I just looked in my junk drawer and found a 64 MB (yes, MB!) USB memory stick and put the .swf on that.  Works great.  Sorry I don't know why it doesn't work for you.  I'm using a C1, maybe that's why it works for me but not you on your CC?

And yes the music plays endlessly after you hit "OFF WITH MUSIC".

Re: Keep playing music after acknowledging alarm

Any plans to port this to the offical firmware one day?
As always, thanks!

Duane wrote:

I've just posted an FLA and SWF for a trivial example of a custom alarm ring screen that you can start from:

FLA and SWF.

It supports the two current buttons (stop and snooze) and adds the "clear the alarm", and "stop but continue the music".

(EDIT: fixed link to the SWF - thanks unwiredben).

Re: Keep playing music after acknowledging alarm

Hm, one interesting problem here: with the custom alarm ring screen installed, the top button seems to no longer function as a snooze button.  Instead, if I hit the top button, nothing happens, and then if I tap the snooze icon on the alarm screen, I end up getting returned to the control panel, as if the top button's input had been grabbed by the currently-playing widget...

Re: Keep playing music after acknowledging alarm

Correct - it's actually the responsibility of the pluggable alarm ring screen to handle the top button.  I didn't implement that in my example code - I was just trying to exercise the API.

By allowing the pluggable alarm screen to handle it, an author can change the behavior, which we had requests for.

Re: Keep playing music after acknowledging alarm

Duane wrote:

Correct - it's actually the responsibility of the pluggable alarm ring screen to handle the top button.  I didn't implement that in my example code - I was just trying to exercise the API.

By allowing the pluggable alarm screen to handle it, an author can change the behavior, which we had requests for.

Ah, makes sense.  Thank you.

Re: Keep playing music after acknowledging alarm

Today I retried the provided custom alarmscreen and found one interesting line in the log, which I must have overseen last time I tried:

2010-01-23 17:42:05 StreamObject::OpenURLStream(): failed to open stream

This Line doesn't show up when I use the internal alarm screen, so it must be related to the problem with the external alarm screen. I tried the sample screen, a self-made screen and a clock widget. All 3 movies play well if started directly and none works as alarmscreen.

Any ideas?

Re: Keep playing music after acknowledging alarm

Where would one put the SWF directly on the chumby?  Having a USB key hanging out the back is unsightly.  Is it possible to copy it somewhere in the chumby's local filesystem?
On a related note, who is responsible for loading the alarmring.swf?  Is it controlpanel.swf?

Re: Keep playing music after acknowledging alarm

The alarmring.swf is called by the controlpanel, yes.

Placing the swf directly on a chumby classic is a tricky problem, because there is not much space and the controlpanel is looking just under /mnt/usb for it. I have managed to place a tiny usb-hub inside my chumby, but unfortunatly that is also very tricky wink

Re: Keep playing music after acknowledging alarm

I'l see if I can make the CP look in other places besides /mnt/usb, like /psp.

Re: Keep playing music after acknowledging alarm

Christian wrote:

I tried the swf-file, but it doesn't seem to work for me. When the alarm time is reached, the screen turns black and doesn't respond anymore (neither to clicks, nor to the top button), but I can hear the music.

I finally found the reason why the alarm screen didn't work for me: It doesn't work as long as you start the control panel with "start_control_panel". (At least for me.) I usually do that in the debugchumby to log the output. I have removed the line and now the screen works.

Re: Keep playing music after acknowledging alarm

Duane wrote:

Correct - it's actually the responsibility of the pluggable alarm ring screen to handle the top button.  I didn't implement that in my example code - I was just trying to exercise the API.

By allowing the pluggable alarm screen to handle it, an author can change the behavior, which we had requests for.

Hm, finally getting around to hacking on this after an embarrassingly long time.  Do any of the example widgets that I can look at exercise the bend sensor?

Re: Keep playing music after acknowledging alarm

Christian wrote:

Today I retried the provided custom alarmscreen and found one interesting line in the log, which I must have overseen last time I tried:

2010-01-23 17:42:05 StreamObject::OpenURLStream(): failed to open stream

This Line doesn't show up when I use the internal alarm screen, so it must be related to the problem with the external alarm screen. I tried the sample screen, a self-made screen and a clock widget. All 3 movies play well if started directly and none works as alarmscreen.

Any ideas?


I recently encountered this problem as well. Below is the log from my Infocast product.  I 'believe' this is happening from the latest binary ONLY.   Is there any known solution for this? 

What I'm doing is invoking chumby flashplayer.x from debugchumby 'without' control panel.  ALL suggestions welcome.

2011-02-08 19:53:44 StreamObject::OpenURLStream(): failed to open stream
2011-02-08 19:54:13 StreamObject::RequestForStreamID() can't find streamId 1

Re: Keep playing music after acknowledging alarm

This bug was fixed in the current beta Control Panel.

Unfortunately, we are prohibited from making the beta Control Panel available on Insiginia-branded devices.

Only chumby-branded devices have access to the beta until it reaches production.