Reply
Thread Tools
Posts: 71 | Thanked: 54 times | Joined on Dec 2010
#1411
Originally Posted by ajalkane View Post
I'm wary of adding any conditions that are also actions. The reason is that it'd be easy to enter a vicious loop. Ie. you have action to put phone into PSM, and another rule with condition PSM that does something. Of course one could device some detection that such won't happen, but it's not necessarily that simple.

Anyway perhaps you can give a concrete use case, and that may either motivate me to do it or figure out a way to do it without these potential problems?
Hi, the point is I wanted to create a rule that sets the device online every hour or so and disconnects it again. For me it looks like my device isnt connecting to background mobile data connection when in PSM. And if im not in PSM, the device just lets mobile data connection online forever.

So i want to create 2 rules for going in normal mode, if PSM is active and after idle time of maybe 30min.
Then if PSM is off, and mobile data connection is active + idle time xxx -> set PSM on, so data connection will be closed after it is no more needed.

And furthermore, I can fix that stupid bug with Dual mode, where i dont have phone connectivity (https://harmattan-bugs.nokia.com/show_bug.cgi?id=79).

When on 3G and signal gets lost, I have to switch manually to 2G or I dont have mobile connectivity at all, altough the bar is full on 3G...
 
Jaffa's Avatar
Posts: 2,535 | Thanked: 6,681 times | Joined on Mar 2008 @ UK
#1412
I'm fairly certain the latest release on the Nokia Store (from a week or two ago) has dramatically impacted my N9's battery life.

Has anyone else seen similar? I'm not sure anything else has changed on my device, but I now struggle to get through a whole day.
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
 
Posts: 1,313 | Thanked: 2,977 times | Joined on Jun 2011 @ Finland
#1413
Originally Posted by Jaffa View Post
I'm fairly certain the latest release on the Nokia Store (from a week or two ago) has dramatically impacted my N9's battery life.
All I can say is that the last release had no changes that could have such effect. So if you didn't see such problems with previous release, it's very unlikely because of ProfileMatic.

Has anyone else seen similar? I'm not sure anything else has changed on my device, but I now struggle to get through a whole day.
There has been just a couple users who thought ProfileMatic would have effect on battery life. But either the problem was somewhere else or the user did not follow-up with more information to pinpoint the problem. Personally I haven't seen such problems.

It's also good to keep in mind that when N9's battery starts getting old, it can rapidly decrease in battery life. My workfriend's little over year old N9 started to be in state where it had to be charged twice a day.
__________________
My N9/N950 projects:
 

The Following 2 Users Say Thank You to ajalkane For This Useful Post:
Posts: 260 | Thanked: 86 times | Joined on Jan 2012
#1414
how can i add reboot command? For example, reboot when at 3a.m.. Thank you in advance
__________________


need a Guest House for temporary stay at Malaysia?
PM me
 
lorenzo's Avatar
Posts: 491 | Thanked: 299 times | Joined on Jul 2012 @ Pordenone IT
#1415
Originally Posted by baem90 View Post
how can i add reboot command? For example, reboot when at 3a.m.. Thank you in advance
1.condition: 3.00-3.01
2.reboot.sh script
Code:
#!/bin/sh

/sbin/reboot
3.rule: custom action
sh -c "echo rootme | devel-su -c 'sh /path/to/script/reboot.sh'"
 

The Following User Says Thank You to lorenzo For This Useful Post:
Posts: 1,313 | Thanked: 2,977 times | Joined on Jun 2011 @ Finland
#1416
Originally Posted by schokopudding View Post
Hi, the point is I wanted to create a rule that sets the device online every hour or so and disconnects it again. For me it looks like my device isnt connecting to background mobile data connection when in PSM. And if im not in PSM, the device just lets mobile data connection online forever.
This is my understanding of how it's supposed to be. Although I seem to remember some complaints that in PR1.3 if a connection was made while in PSM, it wouldn't be auto-closed until the application was quit - I don't personally know if that's accurate.

So i want to create 2 rules for going in normal mode, if PSM is active and after idle time of maybe 30min.
Then if PSM is off, and mobile data connection is active + idle time xxx -> set PSM on, so data connection will be closed after it is no more needed.
I guess I get what you want to achieve there, and I will have to give it some thought. This might be solvable with other approaches too. For example I've received some requests for a sort of time condition with intervals. Then you could for example say PSM on for 2 minutes every half an hour if been idle for 30 minutes, and otherwise PSM off (in default rule for example).

That's just one example, but I'll need to give it some thought. Anyway thanks for a concrete example. I will write it down for future consideration while trying to take into account other requests.

And furthermore, I can fix that stupid bug with Dual mode, where i dont have phone connectivity (https://harmattan-bugs.nokia.com/show_bug.cgi?id=79).

When on 3G and signal gets lost, I have to switch manually to 2G or I dont have mobile connectivity at all, altough the bar is full on 3G...
I don't understand how this relates to PSM condition?
__________________
My N9/N950 projects:
 

The Following User Says Thank You to ajalkane For This Useful Post:
Posts: 71 | Thanked: 54 times | Joined on Dec 2010
#1417
If PSM is off + Idle for XXXmin -> I can switch to 2G, if there is no data connection in use + PSM ON

And if PSM is on and Idle for XXX -> switch to Dual + disable PSM
 
Jaffa's Avatar
Posts: 2,535 | Thanked: 6,681 times | Joined on Mar 2008 @ UK
#1418
Originally Posted by ajalkane View Post
All I can say is that the last release had no changes that could have such effect. So if you didn't see such problems with previous release, it's very unlikely because of ProfileMatic.
Cool, thanks. As an aside, could you describe the algorithm for checking whether a profile should be activated? For example, I assume, if there's a time-based component, that's checked first. But once the time range is checked, how frequently does it check? Or can many of the conditions set triggers at lower levels? (e.g. send a signal when this cell ID is seen)

Talking about cell IDs, a suggestion: the ability to define locations separately. So I could capture the cell IDs for Home and then use a location of "Home" in two different rule sets:
  1. Go into a night time mode between 23:00-06:30 when at Home on weekdays
  2. Turn Bluetooth on when at Home on weekdays at 07:00 (so that BT Audio can work in car) - I'd then have a "Turn Bluetooth off when at Office from 09:00".
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
 

The Following User Says Thank You to Jaffa For This Useful Post:
Posts: 1,313 | Thanked: 2,977 times | Joined on Jun 2011 @ Finland
#1419
Originally Posted by Jaffa View Post
Cool, thanks. As an aside, could you describe the algorithm for checking whether a profile should be activated? For example, I assume, if there's a time-based component, that's checked first. But once the time range is checked, how frequently does it check? Or can many of the conditions set triggers at lower levels? (e.g. send a signal when this cell ID is seen)
As a high-level simplified overview (you can check sources for details) it's something like this:
* Actions are activated when all conditions in rule are matched
* All conditions are event based. So there is no polling in ProfileMatic. So I've tried to optimize ProfileMatic to do something only when the conditions have changed so that some action specified by user might have to be activated.

In case of time based conditions, it works like this:
* When ProfileMatic starts, it iterates all rules set by user and finds the time that is closest to current time (the closest time is either the start time of the "Time condition", or the end time of the condition. (Ie. when the condition is either active or stops being active).
* A timer is then set to trigger a signal at that time.
* When the signal is emitted the rules are then re-evaluated, and again the next closest time for setting the timer is found.

Talking about cell IDs, a suggestion: the ability to define locations separately. So I could capture the cell IDs for Home and then use a location of "Home" in two different rule sets:
This is something that I know of as a sort of a sore point. But I'm not yet sure if the increased complexity is worth the trouble. What I mean with this is that usually it's good enough to make one rule where the Cell Ids have been captured. After that you can copy the rule with long-press in the main view and change the copied rule's actions/conditions as wished.

Of course I'm interested in other views in why that's not good in some use cases. Also there's other possible solutions instead of named "Cell Id sets" if copying the rule is not feasible, for example a button to "Copy cell ids" and a button to pasting them into another rule, etc.
__________________
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
#1420
Originally Posted by schokopudding View Post
If PSM is off + Idle for XXXmin -> I can switch to 2G, if there is no data connection in use + PSM ON

And if PSM is on and Idle for XXX -> switch to Dual + disable PSM
Do I understand correctly, that basically this would be what you want:

When idle for at least XXXmin, switch between:
* PSM ON + 2G for YYYmins
* PSM OFF + Dual for ZZZmins

Something rubs me intuitively the wrong way with having PSM as a condition, so I'm trying to find if there's alternative solutions here.
__________________
My N9/N950 projects:
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 07:21.