maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting) (https://talk.maemo.org/showthread.php?t=46594)

shapeshifter 2010-03-17 20:25

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Quote:

Originally Posted by skalogre (Post 570842)
Ok, am I missing something? I haven't been able to successfully setup an automatic profile switch. I have three profiles (using Tweakr, of course) and have one event to change to a "Work" profile at 0830 and one to change back to "General" at 1730. As far as I can tell, no switching occurs.

So, you happen to have made a tweakr profile called "General"?

Well, honestly that's sort of a bug. Or rather a limitation. Tweakr profile switching should work fine. The alarmd_queue.ini file looks fine.
There's just two limitations to it:
1.) If you call a profile "Silent", it will not appear and not work. alarmed will always go to the "original silent" mode in that case
2.) If you call a profile "General", nothin will happen, because it will just switch to the "original general" profile, which tweakr always uses for any profile.

So, I *could* work around that but I thought people wouldn't go around calling their "new and special" tweakr profiles "General" or "Silent" so I took a shortcut. I guess I'll do this properly somewhere in the future. I hope it works if you rename your "General" profile to something else.

Btw, I wont be adding any new features until after the weekend. I first want to restructure the code and add a CLI interface.

skalogre 2010-03-17 20:29

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Quote:

Originally Posted by shapeshifter (Post 570994)
So, you happen to have made a tweakr profile called "General"?

Well, honestly that's sort of a bug. Or rather a limitation. Tweakr profile switching should work fine. The alarmd_queue.ini file looks fine.
There's just two limitations to it:
1.) If you call a profile "Silent", it will not appear and not work. alarmed will always go to the "original silent" mode in that case
2.) If you call a profile "General", nothin will happen, because it will just switch to the "original general" profile, which tweakr always uses for any profile.

So, I *could* work around that but I thought people wouldn't go around calling their "new and special" tweakr profiles "General" or "Silent" so I took a shortcut. I guess I'll do this properly somewhere in the future. I hope it works if you rename your "General" profile to something else.

Btw, I wont be adding any new features until after the weekend. I first want to restructure the code and add a CLI interface.

Hah, I most certainly did create a "General" profile ;)

I'll rename it and see what happens. Thanks!

Edit:

Made a test entry to switch to one of the new profiles, no change. Hmm... removed it and installed the latest from repository but the same result. I'll have to play with it a bit more.

DaSilva 2010-03-18 13:04

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Would it be possible to add a backup schedule feature? I liked the feature from Symbian. A backup can be created every x day at a specific time there.
Would be nice.

joerg_rw 2010-03-18 14:34

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Quote:

Originally Posted by x-lette (Post 569073)
When there already is command line support why not just putting this command line in a command execution entry? Not everything should be implemented as a builtin command. I'd say, these should be rather complicated or at least very common tasks.

In the end it also may be more usable having a bunch of shell scripts each one for a special task, which can then be called by any widget or app that is able to call a script. DCE, alarmed or even a self created desktop file could invoke the script and perform the task.

Flexibility rules! :cool:

I absolutely agree on that. Implement all custom functions as configurable named commandline execution shortcuts. This way user can easily extend in whatever way he likes

E.G the suggestions here: http://talk.maemo.org/showpost.php?p...3&postcount=72 were simply additions to the config, and could both be added / tweaked by user as well as deployed by alarmed



Quote:

Also a feature request: is it possible for a little tickbox on the command execution entry that says "Run as root" ?
rather nonsense, as you usually can't run anything as root without proper authentication. Would create a security issue at best


Quote:

How about an enable/disable feature? That way you could "turn off" an alarm without removing it and having to set it up again later.
Great idea.


Quote:

Btw, I wont be adding any new features until after the weekend. I first want to restructure the code and add a CLI interface.
Hey, thanks shapeshifter! :-)
Please consider to also have a 'raw' or 'expert' mode for cli, to set all the function call parameters directly and unmangled.


Further remarks:
Shouldn't /bin/ash be /bin/sh rather?
"first day of month"-request: isn't that easily accomplished by "montly" + "1. of next month"? I mean, other than "last day" the 1. of a month always is the 1. of a month.
scrolling lists: it's easy to have a screen with 9 buttons, rather than this annoying scrolling lists.
Make combined events? like having an event that executes more than one action, all bound to one entity with one time schedule (e.g. switch a profile PLUS execute a builtin function)

jOERG

x-lette 2010-03-18 15:40

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Quote:

Originally Posted by joerg_rw (Post 571980)
Make combined events? like having an event that executes more than one action, all bound to one entity with one time schedule (e.g. switch a profile PLUS execute a builtin function)

Great idea. But this one would urgently need a disable-button.

petnetti 2010-03-19 12:58

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
My problem is following:
My device language is Finnish and I have no tweakr installed.

Profile switching is not working because, alarmed uses following command in alarm_queue.ini

action0.exec_command: /bin/ash -c'/opt/alarmed/profileswicher.sh general'

but that does not work.

if I give command from xterm:
sh profileswicher.sh yleinen
it works.


So problem is following:
in Finnish language profile names seem to be different, and alarmed does not know that.


Yleinen = General
Äänetön = Silent

is this know bug ?

shapeshifter 2010-03-21 12:00

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
New Version! Now support for "cron-like" and "coreutils-date-like" syntax for setting events + full CLI interface! See first post for details.

Quote:

Originally Posted by skalogre (Post 571000)
Hmm... removed it and installed the latest from repository but the same result. I'll have to play with it a bit more.

That is really weird. Are you using another language other than English possibly?

Quote:

Originally Posted by DaSilva (Post 571859)
Would it be possible to add a backup schedule feature?

Adding it to future feature list. Definitely doable when I have time.

Quote:

Originally Posted by joerg_rw (Post 571980)
Implement all custom functions as configurable named commandline execution shortcuts.

Setting presets is the next thing on my list!

Quote:

Originally Posted by joerg_rw (Post 571980)
Please consider to also have a 'raw' or 'expert' mode for cli, to set all the function call parameters directly and unmangled.

Will look into that. Problem is, alarmd won't run stuff when characters like ">" are used if not inside an ash -c ''. Will see what I can do

Quote:

Originally Posted by petnetti (Post 573276)
in Finnish language profile names seem to be different, and alarmed does not know that.

I'm sorry I wasn't aware the default profiles had different names depending on locale. That is pretty daft on the backend side! I'll see what I can do to fix this.

lemmyslender 2010-03-21 13:52

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Installed 0.1.8-1

Output from xterm
Code:

$ /home/opt/alarmed/alarmed.py       
:: Starting alarmed GUI
Traceback (most recent call last):
  File "/home/opt/alarmed/alarmed.py", line 72, in <module>
    import alarmed_gui
  File "/home/opt/alarmed/alarmed_gui.py", line 548, in <module>
    widget = AlarmedGUI()
  File "/home/opt/alarmed/alarmed_gui.py", line 39, in __init__
    self.addEventToList(eventInfo)
  File "/home/opt/alarmed/alarmed_gui.py", line 51, in addEventToList
    newEventString = alarmed_backend.generateEventString(eventInfo)
  File "/home/opt/alarmed/alarmed_backend.py", line 115, in generateEventString
    if eventInfo["schedule"] in [i["every_minute"], i["hourly"],
KeyError: 'schedule'


slipkornsaad 2010-03-21 15:16

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Quote:

Originally Posted by shapeshifter (Post 575727)
New Version! Now support for "cron-like" and "coreutils-date-like" syntax for setting events + full CLI interface! See first post for details.

Installed, it doesn't start...even after a device reboot...

shapeshifter 2010-03-21 15:21

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
edit:
on second thought, I'll not make it backwards compatible, but it should now start fine, just display corrupt jobs. You can manually delete all jobs by doing:
Code:

/home/user/.config/alarmed/jobs/*
or just re-save or delete them in the gui.


All times are GMT. The time now is 04:13.

vBulletin® Version 3.8.8