Go Back   maemo.org - Talk > Software > Applications
 
Register FAQ Community Calendar Today's Posts Search

Notices

Reply
 
Thread Tools
  #1  
Old 2010-03-05, 18:22
shapeshifter shapeshifter is offline
 
Join Date: Nov 2009
Posts: 187
Thanks!: 111
Thanked 345 Times in 86 Posts
Default [Announce] "Alarmed" scheduling App (automatic profile switching, gprs-data-resetting...)

Hi there.

I wrote a small App that acts as a GUI front-end and CLI-wrapper to maemos alarmd scheduler back-end. It's written in python and uses the PySide bindings to Qt.

Feature list:
  • Set all of the below to be executed at specific intervals (every minute, hourly, on specific weekdays, on last day of month etc...):
    • Recurring alarms
    • Reset the GPRS data counter
    • Switch to online/offline mode
    • Switch the profile to silent/general or any ProfilesX profile
    • Switch bluetooth on/off
    • Execute a custom command
    • More 'cron-like' stuff like this
  • Saving presets for comman line executions
  • Enabling and disabling events
  • Complete CLI-Interface
  • Support for Cron syntax like "23,26 */3 1,2 * *"
  • Support for date syntax like "now + 10 minutes"

Notes:
  • Support for ProfilesX dropped in favour of Tweakr profiles
  • If it should happen that you create an event and for some reason it gets lost from Alarmed's menu/list, but still exists and acts, look in /var/cache/alarmd/alarm_queue.ini and you'll find your event somewhere at the bottom. It comes with a "cookie", which identifies it. For example: "cookie: 886". You can then use the CLI interface to delete the event. It will tell you it doesn't exist, but it will nevertheless delete the backend-event:
    Code:
    /opt/alarmed/alarmed.py -CD 886
    Don't mess with the alarm_queue.ini, you might do serious damage!
Allright, if you have read all this, you may install the App from extras-devel

Here are some screenshots:











Changelog:
0.1.4-2:
  • Added flight mode enable/disable (thanks to rlinfati)
  • Fixed a bug in gprsdataresetter.py (thanks to rooted)
  • Slightly less frequently crashing due to some workarounds. Is stable at times, but still crashes at random due to pyside bugs.
0.1.4-3:
  • _Much_ more stable due to more workarounds (thanks avoozl on #pyside). Couldn't get it to segfault even once anymore!
0.1.4-4:
  • Fixed missing python-alarm dependency (thanks to hcm)
0.1.5-2:
  • Temporarly removed dbus from menu as it's not working anyway
  • Made it possible to put real commands with arguments and everything into the command exec line!
  • Added profile switching for silent and general profiles
0.1.6-2:
  • Added support for switching tweakr profiles!
  • A few small bug fixes
  • Switch to .sh files for small scripts
0.1.6-3:
  • Small fix in tweakr profile switching
0.1.7-1:
  • Added relative event settings ("tommorow", "next tuesday...", "in x seconds/minutes/hours/days")
  • Small bugfix in tweakr profile switching
0.1.7-3:
  • Small bug fixes
0.1.8-1:
  • Massive restructuring of code
  • Complete CLI interface added (see /opt/alarmed/alarmed.py -Ch for help)
  • Added support for cron-like strings, e.g. "23,26 * 1,2 * *"
  • Added support for date-like strings, if you have coreutils installed, e.g. "now + 10 minutes"
  • Minor bug fixes, probably introduced a couple of new ones.
0.1.8-2/3:
  • small fixes and fix for people not having bash installed (thanks evad)
0.1.9-1/2:
  • Cleaned up dependencies, no more boost! Pyside ftw.
  • Added bluetooth switch
  • Added saving/loading presets when using command line execution!
0.1.9-3/4:
  • GPRS counter reset fixed, resets both home and roaming at the same time.
0.1.9-5:
  • Switched around alarm buttons and added info message to alarm dialog.
0.1.9-6:
  • Improved list layout (no more sideways scrolling)
0.2.0-1:
  • You can now toggle (enable and disable) events!
0.2.1-1
  • Fixed a small bug that prevented events from being saved.
    Also incorporated patches by hunludvig and ForeverYoung:
  • UTF-8 for text
  • Removed tweakr support, instead added support for ProfilesX
  • Alarm buttons fixed
  • Fixed bug where deleted item remains in list
  • Improved cron syntax
    Thanks a lot for the contrubution!
0.3.0-1
  • New: Switching to a specific network (as requested by rotoflex)
  • New: Builtin functions: Switch to 2G, 3G or Dual Mode
  • Fixed: Scheduling for 'Next...' now works (as reported by Deserve)

Last edited by shapeshifter; 2011-09-05 at 23:07. Reason: new version
Reply With Quote
The Following 106 Users Say Thank You to shapeshifter For This Useful Post:
77h, aanckar, ade, alienhead, AlMehdi, antoarts, asys3, atilla, avim, b666m, Bingley Joe, bman, borghal, Bratag, Bundyo, Caesar, casper27, ceevee, cheve, choubbi, codeMonkey, Corwin, dashti, dhanurdhar, djdas, dvergin, ejasmudar, evad, F2thaK, fhofer, fleetwood, g-man, Garrett_PL, getnani, gidoca, gionni88, hcm, Hrw, HRZ, hypnotik, iKneaDough, Jaffa, jedi, jgbreezer, jhwan, joerg_rw, Joseph9560, jukey, kevloral, kl2010, klinglerware, kojacker, Laughing Man, lemmyslender, leojab, lrose, m750, mannakiosk, marble, Marlon, mason, mdengler, mece, moepda, musculus, nan, Natan_xy, ndi, nicholes, nze, panjgoori, peterleinchen, pillar, reinob, renowong, RobbH, robbie, rotoflex, sachin007, saponga, Sasler, Selene, shiny, sixwheeledbeast, slarti, sting04, Straycat, tetris11_, theonelaw, ThomasAH, Tinnet, TomJ, tuxsavvy, udaychaitanya16, v13, vkv.raju, Wanker, Wikiwide, x-lette, xman, Zentenario, zimon, ZogG
  #2  
Old 2010-03-07, 15:13
rooted rooted is offline
 
Join Date: Jan 2010
Posts: 156
Thanks!: 3
Thanked 90 Times in 48 Posts
Default Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)

Bug in gprsdataresetter.py: Type of gprs_reset_time key is string, so the proper command line input is:

gconftool-2 -s /system/osso/connectivity/network_type/GPRS/gprs_reset_time --type=string $(date +%s)

Stumbled upon it by chance. Was looking for command line option to reset GPRS counter (to use it with fcron), found it here! Thanks.
Reply With Quote
The Following 2 Users Say Thank You to rooted For This Useful Post:
  #3  
Old 2010-03-07, 15:20
Bingley Joe Bingley Joe is offline
 
Join Date: Jan 2010
Location: Canada
Posts: 356
Thanks!: 205
Thanked 172 Times in 99 Posts
Default Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)

Thanks! This will be incredibly useful once you've got it stable..
Reply With Quote
The Following 2 Users Say Thank You to Bingley Joe For This Useful Post:
  #4  
Old 2010-03-07, 16:04
rlinfati rlinfati is offline
 
Join Date: Nov 2007
Location: Concepcion, Chile
Posts: 177
Thanks!: 92
Thanked 199 Times in 70 Posts
Default Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)

Please, add a option to go offline ( fligth mode ) and go online ( normal mode ), thanks

cortex:/home/opt/alarmed# cat go-online.sh
#!/bin/sh

/usr/bin/dbus-send --system --dest=com.nokia.mce --type=method_call /com/nokia/mce/request com.nokia.mce.request.req_device_mode_change string:"normal"

cortex:/home/opt/alarmed# cat go-offline.sh
#!/bin/sh

/usr/bin/dbus-send --system --dest=com.nokia.mce --type=method_call /com/nokia/mce/request com.nokia.mce.request.req_device_mode_change string:"offline"
__________________
User:rlinfati
Reply With Quote
The Following User Says Thank You to rlinfati For This Useful Post:
  #5  
Old 2010-03-07, 16:16
x-lette x-lette is offline
 
Join Date: Feb 2010
Location: Berlin, Germany
Posts: 539
Thanks!: 235
Thanked 165 Times in 113 Posts
Default Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)

Do I get it right this is a kind of crond with gui? That would be fantastic! But still I'm waiting for it getting more stable as I really depend on a working device
Reply With Quote
The Following User Says Thank You to x-lette For This Useful Post:
  #6  
Old 2010-03-08, 13:18
shapeshifter shapeshifter is offline
 
Join Date: Nov 2009
Posts: 187
Thanks!: 111
Thanked 345 Times in 86 Posts
Default Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)

new version! see first post for updates.

Quote:
Originally Posted by rooted View Post
the proper command line input is:
gconftool-2 -s /system/osso/connectivity/network_type/GPRS/gprs_reset_time --type=string $(date +%s)
Stumbled upon it by chance.
Thanks for this one! Fixed in 0.1.4-2.

Quote:
Originally Posted by rlinfati View Post
Please, add a option to go offline ( fligth mode ) and go online ( normal mode ), thanks
Added in 0.1.4-2 as a built-in function, thanks for supplying the scripts!

Quote:
Originally Posted by x-lette View Post
Do I get it right this is a kind of crond with gui?
Yep that's pretty much what it is, though the actual daemon (alarmd) is shipped with the n900 already. I just wrote a GUI for it.
Reply With Quote
The Following 3 Users Say Thank You to shapeshifter For This Useful Post:
  #7  
Old 2010-03-10, 10:58
hcm hcm is offline
 
Join Date: Jan 2010
Location: Germany
Posts: 75
Thanks!: 26
Thanked 78 Times in 32 Posts
Default Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)

thank you very much, exactly what I was looking for

I think the package should depend on python-alarm, it was not installed automatically in my case…
Reply With Quote
The Following User Says Thank You to hcm For This Useful Post:
  #8  
Old 2010-03-10, 11:13
Corwin Corwin is offline
 
Join Date: Feb 2008
Location: Germany
Posts: 273
Thanks!: 535
Thanked 113 Times in 63 Posts
Default Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)

Thanks a lot for your work, very much appreciated.
Unfortunately it will not come up when I try to start it - nothing happens.
__________________
Hi! I'm a Maemo Greeter!

Useful links for newcomers: New members say hello , New users start here, Community subforum, Beginners' wiki page, Maemo5 101, Frequently Asked Questions (FAQ)
If I can help with anything else, just ask! Please click 'Thanks!' if this post was helpful.
Reply With Quote
  #9  
Old 2010-03-10, 11:16
hcm hcm is offline
 
Join Date: Jan 2010
Location: Germany
Posts: 75
Thanks!: 26
Thanked 78 Times in 32 Posts
Default Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)

@corwin: have a look at my post above, install python-alarm (apt-get install python-alarm as root)
Reply With Quote
The Following User Says Thank You to hcm For This Useful Post:
  #10  
Old 2010-03-10, 11:17
shiny's Avatar
shiny shiny is offline
 
Join Date: Dec 2009
Location: West London, UK
Posts: 147
Thanks!: 159
Thanked 53 Times in 33 Posts
Default Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)

Quote:
Originally Posted by Corwin View Post
Thanks a lot for your work, very much appreciated.
Unfortunately it will not come up when I try to start it - nothing happens.
I found that the python-alarm package was missing and had to install it manually. Could this be a dependency issue that needs fixing?
Reply With Quote
The Following User Says Thank You to shiny For This Useful Post:
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 20:36.