Author Topic: Ko/pi Alarm Applet Needed  (Read 20116 times)

Bundabrg

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Ko/pi Alarm Applet Needed
« Reply #15 on: August 07, 2005, 11:13:43 pm »
THANKS danr!

I'll add your tip to my ipk of 'fixes' etc. See end.

I've also got a working (somewhat) of apmsleep with wakeup checking kopi. I can't take all the credit since Chistoph created a script that almost fulfilled my needs and I just modified it a bit. (See  discussion at This Thread).

I've packaged everything in ipk's and put them on my server. To install, add the following as a feed: -

src updates http://www.worldguard.com.au/projects/zaur...urrent/cookpot/

The following ipks are there currently: -
 - apmwrapper - More advanced apm script that wraps the real apm executable.
 This is compatible with the pdaxrom apm wrapper and should work with
 the original apm file as well. It creates /etc/apm/suspend.d and
 /etc/apm/resume.d directories and will execute the scripts in there
 on a suspend or resume.
 Will also wake the device up on events.

 - chkhinge-scripts - Enhances the clamshell scripts
 Creates closed.d, landscape.d and portrait.d under /etc/sysconfig/clamshell.
 Scripts in these dirs will be executed each time the device enters one
 of these states.

 - mplay - mplayer wrapper for Zaurus.
 Will drop the resolution to 320x240 and execute mplayer with commandline
 useful for playing video fullscreen.

 - pdaxrom-patchlist - A list of fixes/hacks I find useful.
  - Creates a cron.hourly job that sets the "hardware" clock to minimize timeloss on a crash
  - Adds scripts to /etc/apm directories to unmount all smbfs mounts before a suspend and to set the "hardware" clock on both suspend and resume to minimize time loss on crash
  - Wraps xrandr so that when full resolution is selected (IE: xrandr -s 0) and matchbox-panel is running, it will restart matchbox-panel. This restores the applets that were killed due to lack of screen space.
  - Patches /etc/profile PS1 to display in colour
  - Adds .Xdefaults to root as posted by jerrybme
  - Modify esd.conf to terminate and wait longer to start (rgrep)
  - Added /usr/bin/playwave. It calls play. Fixes kopi alarm issue (danr, gromituk)

 - wakeup-kopi - Provides a wakeup event for kopi. The zaurus will wake up
 in time to view the next alarm


To install the alarm wakup, install 'wakeup-kopi'. It will in turn install apmwrapper. Install the pdaxrom-patchlist to include the fix for playwave. The wakeup-kopi stuff is placed in /etc/apm/wakeup.d and /etc/apm/scripts.d

I must stress I've not had much chance to test out the wake-kopi stuff. It seems to work for me, but theres lots I've not tested. Recurring events definately do not yet work, and perhaps events on daylight saving days etc...

 - Bundabrg
[img]http://www.worldguard.com.au/brendan-ambi.png\" border=\"0\" class=\"linked-sig-image\" /]

Bundabrg

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Ko/pi Alarm Applet Needed
« Reply #16 on: August 08, 2005, 12:42:47 am »
Installed the latest kdepim provided by danrs link above. Very nice.
It calls 'playwave', so it plays the alarm fine now. The older kdepim does NOT call playwave.

I set an event 1 hour from now, with a reminder at 57 minutes before. Hit the suspend button on my C860, stuck it in my belt and waited. 3 Minutes later, it woke up, and started beeping!

 - Bundabrg
« Last Edit: August 08, 2005, 02:11:24 am by Bundabrg »
[img]http://www.worldguard.com.au/brendan-ambi.png\" border=\"0\" class=\"linked-sig-image\" /]

danr

  • Full Member
  • ***
  • Posts: 138
    • View Profile
    • http://
Ko/pi Alarm Applet Needed
« Reply #17 on: August 08, 2005, 03:55:03 am »
Fantastic work Bundabrg, I've been waiting for this sort of feature for a long time!  I want to try it out for myself, but the only problem is a couple of the ipkg files on your web site are not found (apmwrapper_3.2.1_arm.ipk and hotfix-pdaxrom-rc8_1.0.5_arm.ipk).  Perhaps there are permission problems on these two files?

Anyway, looking forward to giving it a go when I can.

Cheers,

Dan
SL-C860 running Debian EABI on top of Angstrom 2.6 kernel

Bundabrg

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Ko/pi Alarm Applet Needed
« Reply #18 on: August 08, 2005, 05:57:32 am »
Wierd. The packages file doesnt even reference them. I've uploaded newer versions.

I'll check that its not sending a cached copy.

[update]
I can definatley see the correct versions. It almost sounds like you are getting an older copy of the Packages file. If you get the file manually ( http://www.worldguard.com.au/projects/zaur...okpot/Packages) , does it have a reference to apmwrapper 3.2.3?

I guess the other obvious is to check that you are not accessing my older rc9 and rc8 feeds before the current feed?

 - Bundaberg
« Last Edit: August 08, 2005, 06:03:50 am by Bundabrg »
[img]http://www.worldguard.com.au/brendan-ambi.png\" border=\"0\" class=\"linked-sig-image\" /]

zautrix

  • Sr. Member
  • ****
  • Posts: 437
    • View Profile
    • http://www.pi-sync.net
Ko/pi Alarm Applet Needed
« Reply #19 on: August 08, 2005, 09:13:19 am »
Quote
I must stress I've not had much chance to test out the wake-kopi stuff. It seems to work for me, but theres lots I've not tested. Recurring events definately do not yet work, and perhaps events on daylight saving days etc...

 - Bundabrg
[div align=\"right\"][a href=\"index.php?act=findpost&pid=91053\"][{POST_SNAPBACK}][/a][/div]

Hmm, it should be no problem to add a small feature to KO/Pi that KO/Pi writes the next alarm (in local time) to a file when it did compute the next alarm.

Then you won't miss any recurring alarm.
If you think that  this is useful please let me know what filename / filepath do you need and what format the date/time values should have.

z.
« Last Edit: August 08, 2005, 09:15:04 am by zautrix »

ChrisEBoy

  • Newbie
  • *
  • Posts: 47
    • View Profile
Ko/pi Alarm Applet Needed
« Reply #20 on: August 08, 2005, 10:12:18 am »
Quote
Hmm, it should be no problem to add a small feature to KO/Pi that KO/Pi writes the next alarm (in local time) to a file when it did compute the next alarm.

Then you won't miss any recurring alarm.
If you think that  this is useful please let me know what filename / filepath do you need and what format the date/time values should have.

z.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=91078\"][{POST_SNAPBACK}][/a][/div]

Hi Zautrix,

I've been looking at this too.  The way I see it either this or writing a custom AlarmServer is the way to go.  

Obviously if you can add this in directly to kopi that would be the coolest option.  If possible could you put a time_t value (from toTime_t) in the file?  That would allow the logic for "how long to sleep" to be very easy to write.

File wise I'd prefer /home/$USER/.koalarm_next or something similar, as it wouldn't be a problem for non-root z's.

Once again, that would be excellent many thanks for the offer.

cheers,

Chris

PS For all others in the thread, do you know how long the apmsleep can sleep for?  is it 99 hours or 24 hours etc?  This would affect how often the Z would have to wake to check the time for an alarm when its over this maximum number.
Chris

Bundabrg

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Ko/pi Alarm Applet Needed
« Reply #21 on: August 08, 2005, 06:51:09 pm »
No idea how long it can sleep. Still testing ;-). Worst case, it sleeps for the length of time, wakes up, then sleeps again.

Having the next alarm written to a file (or pipe) would be great. It gets around a lot of issues, especially the fact that kopi only saves every few minutes.
 - Bundabrg
[img]http://www.worldguard.com.au/brendan-ambi.png\" border=\"0\" class=\"linked-sig-image\" /]

Bundabrg

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Ko/pi Alarm Applet Needed
« Reply #22 on: August 08, 2005, 11:29:29 pm »
Quote
Quote
I must stress I've not had much chance to test out the wake-kopi stuff. It seems to work for me, but theres lots I've not tested. Recurring events definately do not yet work, and perhaps events on daylight saving days etc...

 - Bundabrg
[div align=\"right\"][a href=\"index.php?act=findpost&pid=91053\"][{POST_SNAPBACK}][/a][/div]

Hmm, it should be no problem to add a small feature to KO/Pi that KO/Pi writes the next alarm (in local time) to a file when it did compute the next alarm.

Then you won't miss any recurring alarm.
If you think that  this is useful please let me know what filename / filepath do you need and what format the date/time values should have.

z.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=91078\"][{POST_SNAPBACK}][/a][/div]

I think have it call an external file, if its there 'ala' playwave. IE, call '/usr/bin/setkopialarm next_alarm_in_epoch_time "next_alarm_summary"'
That way we can change how it works without a recompile or needing something to 'poll' the alarm file.

Quote
PS For all others in the thread, do you know how long the apmsleep can sleep for? is it 99 hours or 24 hours etc? This would affect how often the Z would have to wake to check the time for an alarm when its over this maximum number.

I don't use the hours field in my script, just the minutes field. IE, apmsleep +24:00 is equivalent to apmsleep +0:1440.

I'm thinking that since it supports that, then assuming the hardware supports it, it may be able to sleep up to int:int hours and minutes away (ie: 65535 hours and 65535 minutes?). I'm assuming (havn't looked at its code) that is just converts the time to seconds anyway.

 - Bundabrg
[img]http://www.worldguard.com.au/brendan-ambi.png\" border=\"0\" class=\"linked-sig-image\" /]

Bundabrg

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Ko/pi Alarm Applet Needed
« Reply #23 on: August 08, 2005, 11:31:05 pm »
Don't forget also to have it set the alarm or write to the external file when a uses suspends an alarm.

 - Bundabrg
[img]http://www.worldguard.com.au/brendan-ambi.png\" border=\"0\" class=\"linked-sig-image\" /]

andrewwoods

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • http://
Ko/pi Alarm Applet Needed
« Reply #24 on: August 26, 2005, 11:39:08 am »
I've been struggling for ages to make this work, so today I did some serious debugging of the awk file. It turns out that I didn't have the TIMEZONES package installed, so all my times were out by 1 hour as kopi was taking timezone into account and the 'date' command wasn't.

Hope this helps someone.
Andrew
SL-C860 pdaxrom Beta3 512MB SD
Buffalo CF WLAN RTM-8000 GPRS ANYCOM BT

Bundabrg

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Ko/pi Alarm Applet Needed
« Reply #25 on: August 26, 2005, 10:42:44 pm »
Ohhh nice catch. I'll update the ipk to require the timezones package.

 - Bundabrg
[img]http://www.worldguard.com.au/brendan-ambi.png\" border=\"0\" class=\"linked-sig-image\" /]

freebird

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Ko/pi Alarm Applet Needed
« Reply #26 on: August 28, 2005, 08:52:02 am »
Quote
THANKS danr!

I'll add your tip to my ipk of 'fixes' etc. See end.

I've also got a working (somewhat) of apmsleep with wakeup checking kopi. I can't take all the credit since Chistoph created a script that almost fulfilled my needs and I just modified it a bit. (See  discussion at This Thread).

I've packaged everything in ipk's and put them on my server. To install, add the following as a feed: -

src updates http://www.worldguard.com.au/projects/zaur...urrent/cookpot/

The following ipks are there currently: -
 - apmwrapper - More advanced apm script that wraps the real apm executable.
 This is compatible with the pdaxrom apm wrapper and should work with
 the original apm file as well. It creates /etc/apm/suspend.d and
 /etc/apm/resume.d directories and will execute the scripts in there
 on a suspend or resume.
 Will also wake the device up on events.

 - chkhinge-scripts - Enhances the clamshell scripts
 Creates closed.d, landscape.d and portrait.d under /etc/sysconfig/clamshell.
 Scripts in these dirs will be executed each time the device enters one
 of these states.

 - mplay - mplayer wrapper for Zaurus.
 Will drop the resolution to 320x240 and execute mplayer with commandline
 useful for playing video fullscreen.

 - pdaxrom-patchlist - A list of fixes/hacks I find useful.
  - Creates a cron.hourly job that sets the "hardware" clock to minimize timeloss on a crash
  - Adds scripts to /etc/apm directories to unmount all smbfs mounts before a suspend and to set the "hardware" clock on both suspend and resume to minimize time loss on crash
  - Wraps xrandr so that when full resolution is selected (IE: xrandr -s 0) and matchbox-panel is running, it will restart matchbox-panel. This restores the applets that were killed due to lack of screen space.
  - Patches /etc/profile PS1 to display in colour
  - Adds .Xdefaults to root as posted by jerrybme
  - Modify esd.conf to terminate and wait longer to start (rgrep)
  - Added /usr/bin/playwave. It calls play. Fixes kopi alarm issue (danr, gromituk)

 - wakeup-kopi - Provides a wakeup event for kopi. The zaurus will wake up
 in time to view the next alarm


To install the alarm wakup, install 'wakeup-kopi'. It will in turn install apmwrapper. Install the pdaxrom-patchlist to include the fix for playwave. The wakeup-kopi stuff is placed in /etc/apm/wakeup.d and /etc/apm/scripts.d

I must stress I've not had much chance to test out the wake-kopi stuff. It seems to work for me, but theres lots I've not tested. Recurring events definately do not yet work, and perhaps events on daylight saving days etc...

 - Bundabrg
[div align=\"right\"][a href=\"index.php?act=findpost&pid=91053\"][{POST_SNAPBACK}][/a][/div]

Hello Bundabrg
I was waiting for a long time for alarm waiking up my zaurus
I want to  try that; but i can't download the following files from you server
-pdaxrom-patchlist
-wakeup-kopi
- apmwrapper

Please can you help  ?
Thanks
Freebird

cpuffer_zaurus

  • Newbie
  • *
  • Posts: 31
    • View Profile
Ko/pi Alarm Applet Needed
« Reply #27 on: August 28, 2005, 05:54:53 pm »
I have been attempting to setup the alarm system. Could someone be so kind as to point out some things to check and tests to run , that will help me see what parts of the alarm system are working and which are not.

I have a C680 running the latest build of pdaXrom.

Getting this to work would be a big step up for pdaXrom in my life.

Charles Puffer

Bundabrg

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Ko/pi Alarm Applet Needed
« Reply #28 on: August 28, 2005, 08:59:33 pm »
Quote
Hello Bundabrg
I was waiting for a long time for alarm waiking up my zaurus
I want to try that; but i can't download the following files from you server
-pdaxrom-patchlist
-wakeup-kopi
- apmwrapper

Please can you help ?
Thanks
Freebird

Whoops, forgot about those who don't just do an ipkg update etc...
I've updated my index.php file to catalog the right directory now (was pointing at rc8) and it will show those files now.

Quote
I have been attempting to setup the alarm system. Could someone be so kind as to point out some things to check and tests to run , that will help me see what parts of the alarm system are working and which are not.

I have a C680 running the latest build of pdaXrom.

Getting this to work would be a big step up for pdaXrom in my life.

Charles Puffer

What have you done so far Charles? Have you installed the apps etc as per one of my previous posts (and installed timezones)?
Once that is done, you should be able to make an even for 5 minutes from now, with an alarm for 3 minutes before. Then SAVE in kopi, and suspend the Z. 2 minutes later it should come up.

Another test is to see how many minutes there are till the next alarm. SAVE in kope, and execute the following from the terminal
  /etc/apm.d/wakeup.d/wakeup_kopi
It will return the number of minutes to sleep (mine returns 1384, so a little under 24 hours away is my next alarm)

It would be nice if someone could compile KOPI with those changes as discussed before (either writing next alarm to a file, or even better, executing an external script). Using a script like this has a few shortcomings, namely: -
  - KOPI needs to have saved its data file
  - Can't trigger on suspended alarms
  - Doesn't yet trigger on recurring alarms (really complicated!)

 - Bundabrg
[img]http://www.worldguard.com.au/brendan-ambi.png\" border=\"0\" class=\"linked-sig-image\" /]

cpuffer_zaurus

  • Newbie
  • *
  • Posts: 31
    • View Profile
Ko/pi Alarm Applet Needed
« Reply #29 on: August 28, 2005, 11:21:09 pm »
Quote
Quote
Hello Bundabrg
I was waiting for a long time for alarm waiking up my zaurus
I want to try that; but i can't download the following files from you server
-pdaxrom-patchlist
-wakeup-kopi
- apmwrapper

Please can you help ?
Thanks
Freebird

Whoops, forgot about those who don't just do an ipkg update etc...
I've updated my index.php file to catalog the right directory now (was pointing at rc8) and it will show those files now.

Quote
I have been attempting to setup the alarm system. Could someone be so kind as to point out some things to check and tests to run , that will help me see what parts of the alarm system are working and which are not.

I have a C680 running the latest build of pdaXrom.

Getting this to work would be a big step up for pdaXrom in my life.

Charles Puffer

What have you done so far Charles? Have you installed the apps etc as per one of my previous posts (and installed timezones)?
Once that is done, you should be able to make an even for 5 minutes from now, with an alarm for 3 minutes before. Then SAVE in kopi, and suspend the Z. 2 minutes later it should come up.

Another test is to see how many minutes there are till the next alarm. SAVE in kope, and execute the following from the terminal
  /etc/apm.d/wakeup.d/wakeup_kopi
It will return the number of minutes to sleep (mine returns 1384, so a little under 24 hours away is my next alarm)

It would be nice if someone could compile KOPI with those changes as discussed before (either writing next alarm to a file, or even better, executing an external script). Using a script like this has a few shortcomings, namely: -
  - KOPI needs to have saved its data file
  - Can't trigger on suspended alarms
  - Doesn't yet trigger on recurring alarms (really complicated!)

 - Bundabrg
[div align=\"right\"][a href=\"index.php?act=findpost&pid=93555\"][{POST_SNAPBACK}][/a][/div]

ampsleep works.
 /etc/apm/wakeup.d/wakeup_kopi works (but it is apm not apm.d)
The wakup works (but becase of daylight saveings time the time that triggers the wakeup is an hour ahead of the displayed time and the KO/PI time.)
I am not getting any sound this may be do to a config problem or it may be do to the time/daylight saveings time problem noted above.

is there a good way to test the alarm part of the alarm?

$25 US to pdaXrom when I can simply install and use KO/PI and the alarms work (a second $25 for recurrring alarms) I know this is not a big prize, but I think some other users can pile on. Being clear this means a standard install and not haveing to do anything extra.

Charles Puffer