Wake on calendar

Discussion in 'Acer Aspire One' started by fdfd, Sep 21, 2008.

  1. fdfd

    fdfd

    Joined:
    Sep 21, 2008
    Messages:
    5
    Likes Received:
    0
    All,

    Probably a daft question, but going to ask anyway (I've searched and nothing found on the forum).

    With either Linux or XP version (I'd prefer Linux version), does the one have a sleep mode which can awaken on calendar item? If so what's the battery life like please?

    Would like to use as a PDA - don't want it on all day and am notoriously disorganized so would need something that can ping me on calendar item.

    Thanks
     
    fdfd, Sep 21, 2008
    #1
  2. fdfd

    kevin

    Joined:
    Sep 18, 2008
    Messages:
    274
    Likes Received:
    0
    This is not at all a daft question. I would like to do this, too.

    I've checked that the Hardware and (LInux) OS have the necessary wake-on-alarm support, and they do. But I can't find any software anywhere that can make use of this feature. Ideally it needs to be integrated into a calendar application like lightning or kdepim.

    It might be worth investigating kdepim, because that at least is designed for PIM operation. I will look into this further, but if anybody has any suggestions I'd be grateful.
     
    kevin, Sep 22, 2008
    #2
  3. fdfd

    fdfd

    Joined:
    Sep 21, 2008
    Messages:
    5
    Likes Received:
    0
    Thanks for the info on kdepim - I'll take a look.

    If this functionality is available I'll get a aspire one (linux), if not I won't. So, phoned Acer presales hotline in the UK this morning. Indicated purchasing decision is now down to purely wake up on calendar however the presales guy couldn't say for certain whether it would have this ability or not. He strongly suspected NOT as if it did he would have thought that Acer would have been putting the information in the advertising / presales information.

    Basically for me Aspire One would be a fantastic PDA / netbook with this functionality (I'll buy clothes with bigger pockets :) ), - or a low spec laptop with a small screen without this functionality.

    I understand everyone thinking "why would it have this functionality, it's a netbook not a PDA" - fair point, but with Acer in a position to customize the linux os to exploit the hardware surely this would have been a must have feature to appeal cross market?
     
    fdfd, Sep 23, 2008
    #3
  4. fdfd

    kevin

    Joined:
    Sep 18, 2008
    Messages:
    274
    Likes Received:
    0
    They probably just never thought about it. Since all the hardware and drivers are in place, Acer could add the required functionality to their calendar app in about five minutes. The difficulty will be getting in touch with anybody at Acer who has any idea what you're talking about.

    I could munge something together that did the necessary work on, say, the Thunderbird calendar. I couldn't do anything with the built-in Acer calendar because I have no idea what format it stores data in. But Thunderbird can be made to store data in ical format, which is well understood. It would only take a few hundred lines of perl or something to extract the necessary times from the ical file.

    But I just don't have enough time on my hands to do this right now. I'd be happy to explain what was required to anybody who had time and was looking for an interesting programming exercise.

    I still don't whether kdepim can do this stuff. I think the handheld version can, but I'm not sure about the desktop version. I don't think it can. Probably the necessary support could be added to the desktop version in five minutes but, again, I just don't have the time to do it. Sorry.
     
    kevin, Sep 23, 2008
    #4
  5. fdfd

    fdfd

    Joined:
    Sep 21, 2008
    Messages:
    5
    Likes Received:
    0
    NVRAM WakeUp might do the trick here - would need to integrate the functionality into thunderbird / lightning somehow...
     
    fdfd, Sep 26, 2008
    #5
  6. fdfd

    kevin

    Joined:
    Sep 18, 2008
    Messages:
    274
    Likes Received:
    0
    There's no problem with hardware support. If you poke a formatted date in /proc/alarm the unit wakes up just fine. What would be required is something that periodically scans the lightning database, finds the latest event (allowing for repeats) and pokes the time into /proc/alarm.

    But part of the problem is that people use lightning with different back-ends. I believe the default is to use an sqlite file, but I use an icalendar file so I can sync with Google. I imagine there are other backends as well. This means the functionality would probably have to be added to lightning itself, not implemented in some separate process that could be run as, e.g., a cron job. I don't know lighning myself well enough to do this job, and I don't really know how to propose it as a new feature.

    To add to the confusion, I believe /proc/alarm is deprecated and will not exist in later Linux kernels. So we'd be trying to put something into Lightning that really only works on the AA1.
     
    kevin, Sep 26, 2008
    #6
  7. fdfd

    daldred

    Joined:
    Aug 25, 2008
    Messages:
    887
    Likes Received:
    0
    It's annoying (from this point of view) that more than one format is available for Lightning calendars - but couldn't we hack up something based on one option then, if it works, start extending it to others? Unless Lightning is doing something pretty odd, it's going to be possible for a perl script to read the dates from its database, be that ical or sqlite, and drop the next one due into /proc/alarm; run that every couple of minutes and you're unlikely to miss much.

    Edit: no, don't: run it on sleep only. As long as the next time is set on sleep, the job's done, as far as I can see.

    I believe Lightning keeps its data in one of those Mozilla randomly named directories, so there will probably need to be some sort of config file anyway, which could simply contain the type of file as well.

    What is replacing /proc/alarm? Isn't this likely to be just a matter of a change of location for the alarm (to somewhere in /sys), rather than a major change in how it works.

    I don't claim brilliance in scripting, but I think I can see the shape of something which would work here; I'm sure there will be useful Perl modules around to save too much hassle reading ical/sqlite files. Anyone care to co-operate in trying to hack something together?
     
    daldred, Sep 26, 2008
    #7
  8. fdfd

    kevin

    Joined:
    Sep 18, 2008
    Messages:
    274
    Likes Received:
    0
    I already started hacking something up in perl to do this using an ical file, thinking it would be a five-minute job. The trick is managing the repeats. Parsing the time and date out of a single event is trivial (so long as everything is in the same timezone, which is likely in most cases). But working out whether an event the repeats on the third thursday of the month at 9am is early than one that repeats every thursday at 10am is something of a headache. There are various Perl module that are supposed to simplify the parsing of ica, but to be honest I found them harder to use than just scanning the file with a bunch of regexps.

    I might revist this problem if I find myself with time on my hands, but the other reason I haven't been inclined so far is that I just can't believe that this functionality doesn't exist withing lightning or a plugin already.

    BTW /proc/alarm is being replaced by something under /sys -- can't remember the name. But the /sys one will take a Unix long integer data rather than a local time in ASCII format. The reason for this is that nobody has been able to agree whether /proc/alarm should take local time or UTC. It's not a big change from a programming perspective, of course, since it's easy enough to convert from one to the other. But it's a config headache for users.
     
    kevin, Sep 26, 2008
    #8
  9. fdfd

    daldred

    Joined:
    Aug 25, 2008
    Messages:
    887
    Likes Received:
    0
    I think we may have some more finding out to do here...

    There's no /proc/alarm on my One. There is a proc/acpi/alarm, but putting a date & time into it doesn't make the One wake up.

    There is a /sys/ structure; find /sys/ -name alarm doesn't bring any results up. find /sys/ -name wakeup brings up screensful.

    I'll see what I can find out.....
     
    daldred, Sep 26, 2008
    #9
  10. fdfd

    kevin

    Joined:
    Sep 18, 2008
    Messages:
    274
    Likes Received:
    0
    Sorry, my bad. I meant /proc/acpi/alarm. :eek:

    As for waking up, it works fine for me. You have to get the format spot on, however. And there is some confusion about whether the time you put in there is UTC or local time. You might have to try both (which is why it's deprecated). Linux can run with the hardware clock set to UTC and do adjustments internally, or it can run with the hardware clock set to local time. It's not always easy to determine how a particular system is set up.
     
    kevin, Sep 27, 2008
    #10
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.