Reply
Thread Tools
Posts: 1,313 | Thanked: 2,977 times | Joined on Jun 2011 @ Finland
#1131
Originally Posted by slarti View Post
It isn't reused. It just seems so. If you check what happens in the background with my script, it does get deleted. The clock UI just doesn't know what to do. If you close the app and restart it, the alarm isn't there anymore. If you create a new alarm with the same parameters it seems like it enables the old alarm when, in fact, the UI refreshes with the new alarm.
Aah... that explains the behavior quite nicely.
__________________
My N9/N950 projects:
 
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#1132
No, thank you!

I know I've been pestering you for months with this alarm stuff. I hope it has some use for you, too. I know it has for me, thanks again .
 
Posts: 1,313 | Thanked: 2,977 times | Joined on Jun 2011 @ Finland
#1133
Originally Posted by slarti View Post
No, thank you!

I know I've been pestering you for months with this alarm stuff. I hope it has some use for you, too. I know it has for me, thanks again .
I do have use for it indeed . And you saved me a lot of pondering by doing the alarm condition script, so I'm happy how things are right now.
__________________
My N9/N950 projects:
 

The Following 2 Users Say Thank You to ajalkane For This Useful Post:
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#1134
I made a few rules including one 8 + 8 min rule and noticed that if you don't press snooze but let the alarm snooze itself, the snooze time is set by the system default, not the value in PM.

I also realised I might have a use for the extra precision with the alarm rule after all. If this is something that is very easy to do, please consider it. The seconds wouldn't have to show in the Ui in any way. Just that the updateRule method would accept second accuracy and that the rule would execute then. If this is at all tricky, forget about it, because it's not important.
 

The Following 2 Users Say Thank You to slarti For This Useful Post:
Posts: 133 | Thanked: 108 times | Joined on Mar 2012
#1135
No doubt that this is one of the greatest and must-have apps for MeeGo.

It will be much more powerful if there are more conditions that can be set. My immediate thoughts will be adding "Launch application" as new condition and adding time interval between start and end time and/or repeat option under "Time" condition.

By having "Launch application" as condition I can activate smartsearch with custom action with script when firing up the Search app and deactivate it when closing it as an example.

Also with the time interval between start and end time I can do some specific actions like activating background connection for 5 mins and then deactivate background connection for 15 mins during specific period to save some juicy. Or even I can check if the internet connection is broken with some monitoring data flow (provided that data flow can be monitor in this case of course ) as the WIFI connection is always broken after some times and didn't notice it until you see a red arrow pointing down in the status bar meaning the email sync is failed or can't load anything from the browser when you fire it up or even wazapp gets disconnected and didn't notice until you want to message someone.

Of course I don't know if it is doable but these are just an ideas that hopefully can make our device more "smart"

Thxk again for this great app
 

The Following User Says Thank You to bnwg For This Useful Post:
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#1136
bnwg,

For smartsearch i'm pretty sure that it needs time to (re)build its indexes so just when you open Search app even if it was enabled it would need a few minutes to update its index. So I'm not too sure if its a good idea as you'll be getting old information anyway if its not updated.

Checking for WiFi connectivity you can simply write a sh script that pings google every X mins; if it failed then the script itself can disconnect the connection etc... The script can be run as nohup so it would keep running in the background but I'm not too sure if it affects battery consumption too much
 
Posts: 133 | Thanked: 108 times | Joined on Mar 2012
#1137
Originally Posted by thedead1440 View Post
bnwg,

For smartsearch i'm pretty sure that it needs time to (re)build its indexes so just when you open Search app even if it was enabled it would need a few minutes to update its index. So I'm not too sure if its a good idea as you'll be getting old information anyway if its not updated.

Checking for WiFi connectivity you can simply write a sh script that pings google every X mins; if it failed then the script itself can disconnect the connection etc... The script can be run as nohup so it would keep running in the background but I'm not too sure if it affects battery consumption too much
Thxk for comments

Regarding to the WiFi connectivity, one of the ideas to notice whether the connection is broken and need to be refresh would be using the change of status from wazapp. If the status changed from Online to connecting or offline or close then a script could be executed to refresh the connectivity. I just notice there is one user script that can show the wazapp status from BB thread and I'm learning the code from all those scripts (as I don't know coding ). Of course I'm not sure if it will work and even if it's possible to do that but would like to find a way to do some work-around stuff for this annoying bug
 
Posts: 1,313 | Thanked: 2,977 times | Joined on Jun 2011 @ Finland
#1138
Originally Posted by slarti View Post
I made a few rules including one 8 + 8 min rule and noticed that if you don't press snooze but let the alarm snooze itself, the snooze time is set by the system default, not the value in PM.
I've updated the beta version. I'm trying now to set another option, that should result in the "not pressing snooze" resulting in same snooze value as pressing snooze. I haven't had time to test this at all myself.

I also realised I might have a use for the extra precision with the alarm rule after all. If this is something that is very easy to do, please consider it. The seconds wouldn't have to show in the Ui in any way. Just that the updateRule method would accept second accuracy and that the rule would execute then. If this is at all tricky, forget about it, because it's not important.
It's not that hard to change the behaviour, but here is two problems:

- Even the minute precision is not EXACTLY on that minute. Instead in an effort to preserve battery I am using (heartbeat-based) timer, so that the wakeups try to occur on other wakeups of the device. In practice this means that the real timeout can be as much as 30 seconds later than that was set in condition. In light of that, setting precision by second doesn't make much sense.
- The other problem is that changing the current behavior could have unexpected side-effects. So I wouldn't want to change it without a good reason.
__________________
My N9/N950 projects:
 

The Following User Says Thank You to ajalkane For This Useful Post:
Posts: 1,313 | Thanked: 2,977 times | Joined on Jun 2011 @ Finland
#1139
Originally Posted by bnwg View Post
No doubt that this is one of the greatest and must-have apps for MeeGo.
Thank you.

And thank you for the comments. I do have some ideas how to implement the interval for time condition. Unfortunately not any concrete ideas about "application launched condition".

But I do not know when or if either of these things will come to fruition. I have no immediate plans for them at least for the moment, as the "plate is full" in regards to my free time for at least until autumn.

As a workaround, I think the interval time condition could be implemented by doing some ingenious scripting like slarti has done here http://talk.maemo.org/showpost.php?p...postcount=1028
__________________
My N9/N950 projects:
 

The Following 3 Users Say Thank You to ajalkane For This Useful Post:
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#1140
Originally Posted by ajalkane View Post
I've updated the beta version. I'm trying now to set another option, that should result in the "not pressing snooze" resulting in same snooze value as pressing snooze. I haven't had time to test this at all myself.
This works.



Originally Posted by ajalkane View Post
It's not that hard to change the behaviour, but here is two problems:

- Even the minute precision is not EXACTLY on that minute. Instead in an effort to preserve battery I am using (heartbeat-based) timer, so that the wakeups try to occur on other wakeups of the device. In practice this means that the real timeout can be as much as 30 seconds later than that was set in condition. In light of that, setting precision by second doesn't make much sense.
This explains why it has sometimes seemed like the rule actions failed to execute. I just didn't wait long enough.

You're right, not much sense in the extra precision.

Originally Posted by ajalkane View Post
- The other problem is that changing the current behavior could have unexpected side-effects. So I wouldn't want to change it without a good reason.
Like I said, if tricky at all...

Originally Posted by ajalkane View Post
As a workaround, I think the interval time condition could be implemented by doing some ingenious scripting like slarti has done here http://talk.maemo.org/showpost.php?p...postcount=1028
I thought I'd highlight the important part of that sentence :

Seriously, though, I was thinking about a script that would take seconds as an argument and would set an alarm with that using some ProfileMatic magic. This would make it possible to make 'shortcuts' on the desktop to some timers.

That same logic could be used to make a script that would just update a rule to execute 15 minutes later from now. Then put that script as a custom action in the same rule it's updating thus creating a loop that repeats every 15 minutes. Of course, the script could do other things when executed or could be placed in another script.

I've read that you can install cron on the N9, too, although there are some permission problems. That might be an alternative way to go.

The stupid thing about all this is that the timed daemon was supposed to be a cron replacement but it wasn't documented at all and seems almost impossible to use from the command line. There is an add_events dbus method for it but no one seems to know how to use it.
 

The Following User Says Thank You to slarti For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 18:32.