Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Page 1 of 3 1 2 3 >
Topic Options
#81323 - 17/03/2002 01:37 EmpWake - An Alarm Clock for Your Empeg
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
I did one of my famous marathon programming sessions this evening and the result is an early but functional release of EmpWake, which is my attempt at an alarm clock app. It binds to the Hijack menu and all that happy stuff. I guarantee it has bugs and it's very limited by the fact that I can't save state between reboots (so your alarm time won't be saved) but it's functional, at least for me.

There are config.ini parameters to set the defaults for what FID gets played when the alarm goes off and what the default alarm time is set to. Read my Empeg page for details

http://www.personal.psu.edu/users/a/m/amc156/empeg.html

I'm happy to hear any comments or suggestions.
_________________________
- Tony C
my empeg stuff

Top
#81324 - 17/03/2002 11:05 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Just fixed a bug where it wouldn't play while in standby mode. It's up on my page.

Hopefully Mr. Hijack will think about adding that disk-writing feature so I can save time/FID selections between reboots...
_________________________
- Tony C
my empeg stuff

Top
#81325 - 17/03/2002 11:05 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
I havent tested it yet, but it looks like youhave enough in there right now to make it useful. I keep my alarm set for the same time during the week, so using the config for this is fine. Woohoo!

What if you don't want to pick a specific FID to start with? Will it work with your current playlist? If it were to play a FID only once I'd be nervous that I wouldn't get up, but that can always be solved by using repeat (which I just started dong after reading some of TonyF's messages).

When you're satisfied that you've cleaned up your source and put in whatever other goodies you have planned, PLEASE consider adding support for the phone mute line. I think I mentioned to you before I want to wire that up in my custom box as a snooze button (having a config.ini definition for default snooze time would be cool - normally 9 minutes on my Sony alarm I think).

Damn, now I've either got to start/finish my box or set up some total frankenstein temporary table-top hack to use this. I think I'm gonna go our to Walmart this afternoon to look at a few parts.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#81326 - 17/03/2002 11:09 Re: EmpWake - An Alarm Clock for Your Empeg [Re: hybrid8]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Well let me know how/if it works for you.

I could make it work with the current playlist but I didn't think that was quite as useful. If I was listening to Enya before I went to bed, I think I would want something a little more energetic to wake me up. But having it use the current playlist is no problem, I'll add that in for the next version.

I don't know how I would go about using the phone mute line... Snooze button? Wow. I'm not sure I want to get that complicated with this. I really want to put my energy into the lyrics thing in the future. But if you can show me documentation or any other code where people have used the mute line, I'll see what I can do. Not sure I'll be able to test it here, though.
_________________________
- Tony C
my empeg stuff

Top
#81327 - 17/03/2002 11:46 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
I hope someone chimes in with quick instructions on how you can sense that mute line. Method of operation would just be that you pause or otherwise mute the audio for the specified amount of time.

The only reason I mentioned current play list was because you could set up a list beforehand. I would probably leave it on some random list most of the time, but it would be nice to select a specific album, etc. This way you don't need any kind of interface or prefs of your own. You're just controlling on/off of the player.

It would be really neat if you'd hijacked the entire display to show the time (alternate display in your app I suppose). Of course this can be simulated by using the empeg's clock visual. I suppose if you release the source code, someone else can take over and add any features you don't feel like adding yourself. With Mark's wish for being able to use the serial commands to control the FIDs, this can work very well with more hacking. Damn, I'm gonna have to run out and buy a small 2 ch. amplifier and see what kind of small cheap speakers I can find. Otherwise I suppose I can test it on my home system (not ideal for daily alarm clock use )

Bruno

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#81328 - 17/03/2002 13:00 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
bonzi
pooh-bah

Registered: 13/09/1999
Posts: 2401
Loc: Croatia
Thanks for this cool little app. I am currently rummaging through my empeg constructing a playlist that starts gently but becomes very energetic within 10 minutes.
_________________________
Dragi "Bonzi" Raos Q#5196 MkII #080000376, 18GB green MkIIa #040103247, 60GB blue

Top
#81329 - 17/03/2002 13:08 Re: EmpWake - An Alarm Clock for Your Empeg [Re: hybrid8]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Yeah an actual clock display would be pretty slick. I could even have it as a fulltime clock display in a corner of the screen or something since we don't really get it very easily with the player. I can do that as well as a fullscreen clokc, but there are issues with the knob being bound to my app and not the player. I'll come up with something.
_________________________
- Tony C
my empeg stuff

Top
#81330 - 17/03/2002 13:11 Re: EmpWake - An Alarm Clock for Your Empeg [Re: bonzi]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Thanks for this cool little app. I am currently rummaging through my empeg constructing a playlist that starts gently but becomes very energetic within 10 minutes.

Glad you find it useful. Let me know if you run into any problems. One thing I'm not sure of is how accurate the timing is... Like, I just have a detached thread sleep for the number of seconds until the alarm should go off. It should be accurate but I wouldn't use this as your only alarm clock until you're sure it's working right.
_________________________
- Tony C
my empeg stuff

Top
#81331 - 17/03/2002 13:36 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
I'm starting empwake with Bitt's preinit.d and it seems to be starting fine.

First (only) bug (or "feature" that causes hang ) Pressing a button to bring up Hijack's "Clock" causes a hang if your interface is active.

I still have to see if this next one is something I've missed...

It doesn't seem to read from the config settings for me right now. So the active state isn't set and neither is the time (reads all 0's). If I manually set the alarm it will go off (a few seconds late) but will jump to some random tune while also choosing to play the entire player (tested by presetting to a single song or a small list before the alarm goes off and leave it in pause)

Also, the time displayed is always "Timezone-offset" hours from actual time. I'm using the Hijack time offset adjustment in the config to get Hijack to show the correct time. I guess you'll need such an offset option if you're not going to use Hijack's.

For now I've removed Hijack's time offset and have changed over to using GMT with the player. So my player clock always matches up with the time the kernel gets. It would be nice if you could read the current time details from wherever the player stores its settings, each time your menu pops up.

One suggestion... In your time setting, would you make it so that it wraps around the time? So going backwards from 00 will get me to 59. That'll make setting a lot faster.

[edit] Some other weirdness... On first entering your menu, it will sometimes skip over the "Time" item when I rotate the knob (and I'm rotating it very carefully by a single click). This instance it also took a long time for your interface to pop up. The screen stayed blank for some 2 seconds after clicking empwake in Hijack's menu.

Bruno


Edited by hybrid8 (17/03/2002 13:42)
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#81332 - 17/03/2002 13:50 Re: EmpWake - An Alarm Clock for Your Empeg [Re: hybrid8]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
First (only) bug (or "feature" that causes hang ) Pressing a button to bring up Hijack's "Clock" causes a hang if your interface is active.

Hmm, I'll have to wait until Mark shows up to comment on that one. My guess is it has something to do with the fact that I'm using the overlay rather than full screen?

It doesn't seem to read from the config settings for me right now. So the active state isn't set and neither is the time (reads all 0's). If I manually set the alarm it will go off (a few seconds late) but will jump to some random tune while also choosing to play the entire player (tested by presetting to a single song or a small list before the alarm goes off and leave it in pause)

I need to see your config.ini and your serial output when you start EmpWake to figure this one out. Like I said in my disclaimer, my parsing and bounds checking is really lax right now.

What do you mean by a few seconds late? It takes a few seconds to load any playlist or song... Is that all you're talking about? You should hear some disk access right at the exact second (or close to it) that the alarm goes off, then the player has to load the playlist like it normally would.

For now I've removed Hijack's time offset and have changed over to using GMT with the player. So my player clock always matches up with the time the kernel gets. It would be nice if you could read the current time details from wherever the player stores its settings, each time your menu pops up.

Hmm I've never used any kind of time zone stuff before so I'm not sure how to correct this. I'm just calling localtime() right now.

It would be nice if you could read the current time details from wherever the player stores its settings, each time your menu pops up.

Yeah I just don't know where that is. Anyone else?

[edit] Some other weirdness... On first entering your menu, it will sometimes skip over the "Time" item when I rotate the knob (and I'm rotating it very carefully by a single click). This instance it also took a long time for your interface to pop up. The screen stayed blank for some 2 seconds after clicking empwake in Hijack's menu.

Well first the slowness in starting is something I've seen in the Viewer app as well. I think it has to do with the fact that the player is using realtime scheduling and unless user apps also do this (which means they'll steal CPU away from the player) those apps can get almost no CPU time if the player decides to do stuff. I think what's happening is the player's loading its cache or reading from disk and the user app therefore gets very little CPU.

I could tell EmpWake to use realtime scheduling (I did this with EmpTriv with some success) but then it's stealing CPU away from the player and if it gets really busy it could cause music to skip. I don't think an alarm clock is important enough to do that.

Now, as to the skipping over a menu option, I think what's probably happening there is you're accidentally sending a knob left or knob right code when you click the knob to start the program. Then you see the long pause, then it pops up and processes the knob left code which has been buffered. If that's not it, then I haven't seen the problem you're talking about.

One suggestion... In your time setting, would you make it so that it wraps around the time? So going backwards from 00 will get me to 59. That'll make setting a lot faster.

Sure, I can do that.


Edited by yn0t_ (17/03/2002 13:54)
_________________________
- Tony C
my empeg stuff

Top
#81333 - 17/03/2002 14:00 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
I've tried two variations with config.ini. I just copied your text and pasted it at the top of my ini file without success. And I've also tried it down near the bottom.

The problem with the skipping menu entry isn't when I first jump into your interface. It's only after rotating the knob. So it's not likely a queued up command. Doesn't happen all the time.

Here's my config in any case:

[empwake]
active=true
time=15:35:56
fid=1610
[synchronise]
seq_num=87
[tuner]
region=us
[controls]
stalk_side=none
[Options]
Name=Twisted Melon
[User Info]
Email=bruno@mypocket.com
Phone=519-927-7718
Name=Bruno Fernandes
[Network]
Gateway=0.0.0.0
Netmask=255.255.255.0
IPAddress=192.168.0.88
DHCP=1
[sense]
muteaction=1
mute=1
[power]
off_timeout=1800000
[display]
visual_names=1
caching=1
[aux]
source=
title=
artist=
[hush]
hushpercent=50
[volumecap]
enabled=0
[kenwood]
disabled=0
[ramp]
disabled=0
[wendy]
flag_amount=0
[custom]
wendy=
[searches]
amount=0
[menu]
quit=0
sort_playlist=0
[output]
notify=1

[hijack]
supress_notify=1

[ir_translate]
initial.H=Info

voldown=Clock
volup=Info

PopUp0=Mark,Visual+,Repeat,Swap,SelectMode
PopUp1=Genre,Year,Detail

b9460D.L=popup0 ;FM long
b9460D=artist ;FM

b9460C.L=popup1 ;AM long
b9460C=album ;AM

b94613=shuffle ;src

b9460B.L=Pause.L,null ;NextTrack long
b9460B=top ;NextTrack

b9460A.L=menu.L ;PrevTrack long
b9460A=menu ;PrevTrack

b94616=info ;att

b94614.L=NextTrack.L ;Volume+ long
b94614=NextTrack ;Volume+

b94615.L=PrevTrack.L ;Volume- long
b94615=PrevTrack ;Volume-

[VisualFavourites_AM]
count=0
[VisualFavourites_AUX]
count=0
[VisualFavourites_DSP]
count=0
[VisualFavourites_FM]
count=0


Edited by hybrid8 (17/03/2002 14:06)
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#81334 - 17/03/2002 14:04 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Oh, if you're going to touch the code to add something, I could really do with some way to cancel out without accepting changes. Using the cancel button on the remove and/or some face button would be cool with me. Right now all buttons except the knbox press drop down to the player. Likewise I'd love to be able to use empwake from the Rio remote without having to use the knob (this is less important than a cancel button for me though).

Seems that while not working completely as described for me yet, it does seem to work with randomizing the entire player as I was originally asking. Even if only by fluke.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#81335 - 17/03/2002 14:10 Re: EmpWake - An Alarm Clock for Your Empeg [Re: hybrid8]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Hmm. I think the read of config.ini is failing completely but I don't have any debug output for that case right now. Is there *any* output on your serial port from Empwake when it starts?

Also, can you try running it from a regular shell prompt instead of from Bitt's preinit thing to see if there's something going on there?
_________________________
- Tony C
my empeg stuff

Top
#81336 - 17/03/2002 14:14 Re: EmpWake - An Alarm Clock for Your Empeg [Re: hybrid8]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Oh, if you're going to touch the code to add something, I could really do with some way to cancel out without accepting changes. Using the cancel button on the remove and/or some face button would be cool with me. Right now all buttons except the knbox press drop down to the player. Likewise I'd love to be able to use empwake from the Rio remote without having to use the knob (this is less important than a cancel button for me though).

Eh... I wanted to use as few buttons as possible. I kinda liked the idea of most of the button passing through to the player... I'll see what everyone else says. I don't think it's that difficult to click the button a couple times to accept the changes or to roll back to whatever time you really wanted. Does your current alarm clock have "undo" functionality?

Even if only by fluke.

No fluke. If config.ini doesn't work, I tell it to explicitly play the entire player. As of right now. That will be changed in the next release to just play whatever playlist is currently selected.
_________________________
- Tony C
my empeg stuff

Top
#81337 - 17/03/2002 14:31 Re: EmpWake - An Alarm Clock for Your Empeg [Re: hybrid8]
jheathco
enthusiast

Registered: 21/12/2001
Posts: 326
Loc: Mission Viejo, California
I'm up for making a little userland app that would sit in the corner of the screen and always display the date/time (maybe scrolling). But how would you get this to always be on display and still allow operation of other features on the empeg? Can you get a userland app to be activated on boot? It would be a hassle to always have to select it everytime from the hijack menu
_________________________
John Heathco - 30gig MKIIa w/ tuner module

Top
#81338 - 17/03/2002 14:36 Re: EmpWake - An Alarm Clock for Your Empeg [Re: jheathco]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
But how would you get this to always be on display and still allow operation of other features on the empeg?

That's kinda what Mark's overlay functionality was made for. However there's a catch in that when the overlay app is running, it still has input focus. There seems to be no way to have the overlay apps "detach" so to speak so that you can then run other Hijack apps or whatever. I can unbind the buttons, but you can't then bring up the hijack menu or anything. This is kinda hard to explain, but I was hoping Mark might be able to find a way for multiple apps running in overlay mode, or for one of them to run "in the background" so to speak. Right now the on-screen clock I was talking about wouldn't work very well.
_________________________
- Tony C
my empeg stuff

Top
#81339 - 17/03/2002 14:56 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
The reason I asked for a cancel method is because using the kob it's very easy for me to mess up the time. And no, my regular alarm clock doesn't have undo. It's a piece of crap. I also have to scroll through either the hour or minute UPWARDS only. And it doesn't play MP3s. Hence why I really want to use the empeg. Oh, and I also HATE radio (and buzzers).

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#81340 - 17/03/2002 15:03 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
There's no output when I run it from shell (obviously). And if it doesn't start at init time, then how's it supposed to bind to hijack's menu?

If you can suggest anything else, let me know...

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#81341 - 17/03/2002 15:07 Re: EmpWake - An Alarm Clock for Your Empeg [Re: hybrid8]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
There's no output when I run it from shell (obviously). And if it doesn't start at init time, then how's it supposed to bind to hijack's menu?

Apps can bind to Hijack at any time. Init has nothing to do with it.

I'm going to put a lot more debug stuff in the next release to tell me where it's choking on your config.ini. Is anyone else having this problem?
_________________________
- Tony C
my empeg stuff

Top
#81342 - 17/03/2002 15:10 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Oh, ok... Then when I run it from bash, it's not binding to Hijack.

This is bad news for me, but at the same time it gives me some extra time to hack together a better (half-usable) platform for actually having this thing firing off in the mornings.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#81343 - 17/03/2002 15:50 Re: EmpWake - An Alarm Clock for Your Empeg [Re: hybrid8]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
I don't know why it wouldn't be binding... I added a couple more debug statements, try with the new version that's on my page and let me know what you get on serial, if anything. I am checking all the return codes for binding to the menu, etc...
_________________________
- Tony C
my empeg stuff

Top
#81344 - 17/03/2002 16:05 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Cool, I like the new time interface! Less button pressing for small adjustments.

I found a couple of small graphical bugs with it though.
-Your seconds display is missing one veritcal row of shading on the right side when compared to minutes and hour
-When you highlight the seconds, the box is shift one pixel to the left of where it should be (you can see one blank column on the left)
-When you press the button to select the seconds adjustment, the right side of the highlight box disappears (again, because of the positioning of the box in the first place as mentioned above).

One small tweak to the interface... Can you make it so the box is restored after pressing the button? This way it's obvious that the button press took. (ie. Press button once, top and bottom of box go blank = input mode. Press button again, top and bottom come back=no longer in input mode). Oh, sorry two suggestions.. Would you put the colons back in there (somewhere) as well?

Ok, I'm going to check out the serial output now.

Bruno


Edited by hybrid8 (17/03/2002 16:10)
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#81345 - 17/03/2002 16:13 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Ok, the only output from empwake to serial is this:

EmpWake v0.97 running as pid 11
empwake: could not read config.ini

config.ini is there and is read by the player and by hijack. Set to 644 as usual as well. Same config I pasted into the other message.

And when I run it from the command line I get just the first line (showing PID). I also have to manually press return to get the prompt back (missing newline in output?) It still doesn't bind to the Hijack menu like this.

Bruno


Edited by hybrid8 (17/03/2002 16:17)
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#81346 - 17/03/2002 16:17 Re: EmpWake - An Alarm Clock for Your Empeg [Re: hybrid8]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Okay if that line is being printed, then this statement:

open( "/empeg/var/config.ini", O_RDONLY );

is returning -1 status. I can't think of any reason why that would happen if your config.ini is readable.
_________________________
- Tony C
my empeg stuff

Top
#81347 - 17/03/2002 16:31 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
IIRC, if he's using my preinit, then /empeg/var isn't mounted because it's actually on /drive0. Then again, I may be remembering totally incorrectly.
_________________________
Bitt Faulk

Top
#81348 - 17/03/2002 16:33 Re: EmpWake - An Alarm Clock for Your Empeg [Re: hybrid8]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Okay run the attached empwake binary and tell me what it gives you. You should get an error number that I can use to tell what's going on.

Edit: The attachment didn't work. Use this link instead:

http://www.personal.psu.edu/users/a/m/amc156/empwake


Attachments
79327-empwake (206 downloads)



Edited by yn0t_ (17/03/2002 16:35)
_________________________
- Tony C
my empeg stuff

Top
#81349 - 17/03/2002 16:34 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
Perhaps the error messages should be changed to also dump out the "errno" value.. so we can see why something might be failing..

Cheers

Top
#81350 - 17/03/2002 16:35 Re: EmpWake - An Alarm Clock for Your Empeg [Re: mlord]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Yeah I beat ya to that realization by about 30 seconds or so.
_________________________
- Tony C
my empeg stuff

Top
#81351 - 17/03/2002 16:38 Re: EmpWake - An Alarm Clock for Your Empeg [Re: wfaulk]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Hmmm that sounds about right. Argh... How am I going to handle that situation then?
_________________________
- Tony C
my empeg stuff

Top
#81352 - 17/03/2002 16:41 Re: EmpWake - An Alarm Clock for Your Empeg [Re: mlord]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Hey Mark, while you're here, any plans on getting that disk-writing feature into Hijack? That would let me save peoples' alarm clock settings...
_________________________
- Tony C
my empeg stuff

Top
Page 1 of 3 1 2 3 >