maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   [Announce] ProfileMatic for Harmattan (https://talk.maemo.org/showthread.php?t=79642)

ajalkane 2012-05-22 13:22

Re: [Announce/WIP] ProfileMatic for Harmattan
 
Quote:

Originally Posted by Schturman (Post 1210752)
ok, this one:
[code] initctl stop apps/profilematicd
sh: initctl: not found
~ # initctl stop apps/profilematicd

Ok, you need to put that as "/sbin/initctl stop apps/profilematicd"

achilles333 2012-05-22 15:53

Re: [Announce/WIP] ProfileMatic for Harmattan
 
Quote:

Originally Posted by DarkSkies (Post 1210620)
I'd like PM to active the auto-lock option (so the security code needs to be entered to unlock the phone) in case I am on the move and lose my phone. Any idea on how to accomplish this?

There's an option to run external commands. What would be the proper syntax to initialise auto-lock say after 10 min of inactivity?

If I understood your requirement correctly, the device already has autolock feature after certain time of inactivity. Go to settings->security->device lock. and then configure autolock time there.

Schturman 2012-05-22 17:46

Re: [Announce/WIP] ProfileMatic for Harmattan
 
sorry, this one:
Code:

~ # /sbin/initctl stop apps/profilematicd
apps/profilematicd stop/waiting
~ # exit
~ $ /opt/profilematic/bin/profilematicd
Configuration: index 0, ruleId: {705b2102-9a15-4376-9992-6a2b585b393a}, ruleName: Tomy sleeping
Configuration: index 1, ruleId: {7c09fdf4-c238-42f6-8efb-6b2532132c34}, ruleName: Power saving
Configuration: index 2, ruleId: {2b5d64c4-0f19-46ad-87d7-8520729f0533}, ruleName: BT on
Configuration: index 3, ruleId: {7ea70379-39d7-4a66-8ff5-1c1880ac2f0b}, ruleName: BT off
Configuration: index 4, ruleId: defaultRule, ruleName: Default rule


REFRESH


Tue May 22 20:35:51 2012 RulesManager::refresh()
ConditionManagerTime::time, considering dayId 0 (1)
ConditionManagerTime::from(Tue May 22 20:35:512012), nextStart(Mon May 21 21:00:00 2012), nextEnd(Tue May 22 06:40:00 2012)
ConditionManagerTime::time, considering dayId 1 (1)
ConditionManagerTime::from(Tue May 22 20:35:512012), nextStart(Tue May 22 21:00:00 2012), nextEnd(Wed May 23 06:40:00 2012)
ConditionManagerTime::time, matching next timeStart returning Tue May 22 21:00:00 2012
ConditionManagerTime::refresh match 0
Setting nearest to Tue May 22 21:00:00 2012, was
ConditionManagerTime::time, considering dayId 0 (1)
ConditionManagerTime::from(Tue May 22 20:35:512012), nextStart(Mon May 21 01:40:00 2012), nextEnd(Mon May 21 06:15:00 2012)
ConditionManagerTime::time, considering dayId 1 (1)
ConditionManagerTime::from(Tue May 22 20:35:512012), nextStart(Tue May 22 01:40:00 2012), nextEnd(Tue May 22 06:15:00 2012)
ConditionManagerTime::time, considering dayId 2 (1)
ConditionManagerTime::from(Tue May 22 20:35:512012), nextStart(Wed May 23 01:40:00 2012), nextEnd(Wed May 23 06:15:00 2012)
ConditionManagerTime::time, matching next timeStart returning Wed May 23 01:40:00 2012
ConditionManagerTime::refresh match 0
ConditionManagerTime::time, considering dayId 0 (1)
ConditionManagerTime::from(Tue May 22 20:35:512012), nextStart(Mon May 21 06:45:00 2012), nextEnd(Mon May 21 23:58:00 2012)
ConditionManagerTime::time, considering dayId 1 (1)
ConditionManagerTime::from(Tue May 22 20:35:512012), nextStart(Tue May 22 06:45:00 2012), nextEnd(Tue May 22 23:58:00 2012)
ConditionManagerTime::time, matching next timeEnd returning Tue May 22 23:58:00 2012
ConditionManagerTime::refresh match 1
ConditionManagerLocationCell::refresh currentCellId 328042
ConditionManagerTime::time, considering dayId 0 (1)
ConditionManagerTime::from(Tue May 22 20:35:512012), nextStart(Mon May 21 06:45:00 2012), nextEnd(Mon May 21 23:58:00 2012)
ConditionManagerTime::time, considering dayId 1 (1)
ConditionManagerTime::from(Tue May 22 20:35:512012), nextStart(Tue May 22 06:45:00 2012), nextEnd(Tue May 22 23:58:00 2012)
ConditionManagerTime::time, matching next timeEnd returning Tue May 22 23:58:00 2012
ConditionManagerTime::refresh match 1
ConditionManagerLocationCell::refresh currentCellId 328042
ConditionManagerLocationCell::refresh containscurrentCellId
ConditionManagerWlan::refresh wlanNames is empty, matches
ConditionManagerIdle not set -1
RulesManager::_activateRule: activatingRule {7ea70379-39d7-4a66-8ff5-1c1880ac2f0b}/BT off
ActionProfile::activate profile is empty, not setting
ActionFlightMode::activate not setting flight mode
ActionPsmState::activate not setting power saving state
ActionBlueTooth::activate: 0
ActionCellularMode::activate: -1
HarmattanPlatformUtil::setStandByScreenMode 1
ActionStandByScreenMode::activate StandByScreen enabled
ActionCommandLine::runCommandLine() no commandline
ActionPresence::activate rule has no presence changes or previous presences
RulesManager::_activateRule: activatingRule defaultRule/Default rule
ActionProfile::activateRule profile general, volume 100 (previous /-1)
Setting profile to general
Return value 1
Setting profile general to volume 100
Return value 1
ActionFlightMode::activate not setting flight mode
ActionPsmState::activate not setting power saving state
ActionCellularMode::activate: -1
ActionCommandLine::runCommandLine() no commandline
ActionPresence::activate rule has no presence changes or previous presences
Now Tue May 22 20:35:51 2012
Scheduling a timer to Tue May 22 21:00:00 2012, interval 1448s
ConditionManagerLocationCell::monitorCellId(1)
ConditionManagerWlan::endRefresh, stopping monitoring
ConditionManagerIdle not monitorUserActivityIdle
rules_version: 2
Starting
Tue May 22 20:35:52 2012 ActionPresence::onAccountManagerReady()
Tue May 22 20:35:52 2012 ActionPresence::_activatePendingRule() no pending rule
ConditionManagerLocationCell::cellIdChanged to328046
ConditionManagerLocationCell::cellIdChanged current rule has this cellId
ConditionManagerLocationCell::cellIdChanged to390652
ConditionManagerLocationCell::cellIdChanged watched contains and is not in current Rule's cellIds, requesting refresh


REFRESH


Tue May 22 20:37:12 2012 RulesManager::refresh()
ConditionManagerTime::time, considering dayId 0 (1)
ConditionManagerTime::from(Tue May 22 20:37:122012), nextStart(Mon May 21 21:00:00 2012), nextEnd(Tue May 22 06:40:00 2012)
ConditionManagerTime::time, considering dayId 1 (1)
ConditionManagerTime::from(Tue May 22 20:37:122012), nextStart(Tue May 22 21:00:00 2012), nextEnd(Wed May 23 06:40:00 2012)
ConditionManagerTime::time, matching next timeStart returning Tue May 22 21:00:00 2012
ConditionManagerTime::refresh match 0
Setting nearest to Tue May 22 21:00:00 2012, was
ConditionManagerTime::time, considering dayId 0 (1)
ConditionManagerTime::from(Tue May 22 20:37:122012), nextStart(Mon May 21 01:40:00 2012), nextEnd(Mon May 21 06:15:00 2012)
ConditionManagerTime::time, considering dayId 1 (1)
ConditionManagerTime::from(Tue May 22 20:37:122012), nextStart(Tue May 22 01:40:00 2012), nextEnd(Tue May 22 06:15:00 2012)
ConditionManagerTime::time, considering dayId 2 (1)
ConditionManagerTime::from(Tue May 22 20:37:122012), nextStart(Wed May 23 01:40:00 2012), nextEnd(Wed May 23 06:15:00 2012)
ConditionManagerTime::time, matching next timeStart returning Wed May 23 01:40:00 2012
ConditionManagerTime::refresh match 0
ConditionManagerTime::time, considering dayId 0 (1)
ConditionManagerTime::from(Tue May 22 20:37:122012), nextStart(Mon May 21 06:45:00 2012), nextEnd(Mon May 21 23:58:00 2012)
ConditionManagerTime::time, considering dayId 1 (1)
ConditionManagerTime::from(Tue May 22 20:37:122012), nextStart(Tue May 22 06:45:00 2012), nextEnd(Tue May 22 23:58:00 2012)
ConditionManagerTime::time, matching next timeEnd returning Tue May 22 23:58:00 2012
ConditionManagerTime::refresh match 1
ConditionManagerLocationCell::refresh currentCellId 390652
ConditionManagerLocationCell::refresh containscurrentCellId
ConditionManagerWlan::refresh wlanNames is empty, matches
ConditionManagerIdle not set -1
RulesManager::_activateRule: activatingRule {2b5d64c4-0f19-46ad-87d7-8520729f0533}/BT on
ActionProfile::activate profile is empty, not setting
ActionFlightMode::activate not setting flight mode
ActionPsmState::activate not setting power saving state
ActionBlueTooth::activate: 1
ActionCellularMode::activate: -1
HarmattanPlatformUtil::setStandByScreenMode 1
ActionStandByScreenMode::activate StandByScreen enabled
ActionCommandLine::runCommandLine() no commandline
ActionPresenceImpl::changeAccountPresence: Changing account presence to "available" for "gabble/jabber/schturman0"
ActionPresenceImpl::changeAccountPresence: Changing account presence to "available" for "spirit/skype/schturman0"
ConditionManagerTime::time, considering dayId 0 (1)
ConditionManagerTime::from(Tue May 22 20:37:122012), nextStart(Mon May 21 06:45:00 2012), nextEnd(Mon May 21 23:58:00 2012)
ConditionManagerTime::time, considering dayId 1 (1)
ConditionManagerTime::from(Tue May 22 20:37:122012), nextStart(Tue May 22 06:45:00 2012), nextEnd(Tue May 22 23:58:00 2012)
ConditionManagerTime::time, matching next timeEnd returning Tue May 22 23:58:00 2012
ConditionManagerTime::refresh match 1
ConditionManagerLocationCell::refresh currentCellId 390652
RulesManager::_activateRule: activatingRule defaultRule/Default rule
ActionFlightMode::activate not setting flight mode
ActionPsmState::activate not setting power saving state
ActionCellularMode::activate: -1
Now Tue May 22 20:37:12 2012
Scheduling a timer to Tue May 22 21:00:00 2012, interval 1367s
ConditionManagerLocationCell::monitorCellId(1)
ConditionManagerWlan::endRefresh, stopping monitoring
ConditionManagerIdle not monitorUserActivityIdle
ConditionManagerLocationCell::cellIdChanged to328046
ConditionManagerLocationCell::cellIdChanged watched contains and is not in current Rule's cellIds, requesting refresh


REFRESH


Tue May 22 20:37:20 2012 RulesManager::refresh()
ConditionManagerTime::time, considering dayId 0 (1)
ConditionManagerTime::from(Tue May 22 20:37:202012), nextStart(Mon May 21 21:00:00 2012), nextEnd(Tue May 22 06:40:00 2012)
ConditionManagerTime::time, considering dayId 1 (1)
ConditionManagerTime::from(Tue May 22 20:37:202012), nextStart(Tue May 22 21:00:00 2012), nextEnd(Wed May 23 06:40:00 2012)
ConditionManagerTime::time, matching next timeStart returning Tue May 22 21:00:00 2012
ConditionManagerTime::refresh match 0
Setting nearest to Tue May 22 21:00:00 2012, was
ConditionManagerTime::time, considering dayId 0 (1)
ConditionManagerTime::from(Tue May 22 20:37:202012), nextStart(Mon May 21 01:40:00 2012), nextEnd(Mon May 21 06:15:00 2012)
ConditionManagerTime::time, considering dayId 1 (1)
ConditionManagerTime::from(Tue May 22 20:37:202012), nextStart(Tue May 22 01:40:00 2012), nextEnd(Tue May 22 06:15:00 2012)
ConditionManagerTime::time, considering dayId 2 (1)
ConditionManagerTime::from(Tue May 22 20:37:202012), nextStart(Wed May 23 01:40:00 2012), nextEnd(Wed May 23 06:15:00 2012)
ConditionManagerTime::time, matching next timeStart returning Wed May 23 01:40:00 2012
ConditionManagerTime::refresh match 0
ConditionManagerTime::time, considering dayId 0 (1)
ConditionManagerTime::from(Tue May 22 20:37:202012), nextStart(Mon May 21 06:45:00 2012), nextEnd(Mon May 21 23:58:00 2012)
ConditionManagerTime::time, considering dayId 1 (1)
ConditionManagerTime::from(Tue May 22 20:37:202012), nextStart(Tue May 22 06:45:00 2012), nextEnd(Tue May 22 23:58:00 2012)
ConditionManagerTime::time, matching next timeEnd returning Tue May 22 23:58:00 2012
ConditionManagerTime::refresh match 1
ConditionManagerLocationCell::refresh currentCellId 328046
ConditionManagerTime::time, considering dayId 0 (1)
ConditionManagerTime::from(Tue May 22 20:37:202012), nextStart(Mon May 21 06:45:00 2012), nextEnd(Mon May 21 23:58:00 2012)
ConditionManagerTime::time, considering dayId 1 (1)
ConditionManagerTime::from(Tue May 22 20:37:202012), nextStart(Tue May 22 06:45:00 2012), nextEnd(Tue May 22 23:58:00 2012)
ConditionManagerTime::time, matching next timeEnd returning Tue May 22 23:58:00 2012
ConditionManagerTime::refresh match 1
ConditionManagerLocationCell::refresh currentCellId 328046
ConditionManagerLocationCell::refresh containscurrentCellId
ConditionManagerWlan::refresh wlanNames is empty, matches
ConditionManagerIdle not set -1
RulesManager::_activateRule: activatingRule {7ea70379-39d7-4a66-8ff5-1c1880ac2f0b}/BT off
ActionProfile::activate profile is empty, not setting
ActionFlightMode::activate not setting flight mode
ActionPsmState::activate not setting power saving state
ActionBlueTooth::activate: 0
ActionCellularMode::activate: -1
HarmattanPlatformUtil::setStandByScreenMode 1
ActionStandByScreenMode::activate StandByScreen enabled
ActionCommandLine::runCommandLine() no commandline
ActionPresence::activate rule has no presence changes or previous presences
RulesManager::_activateRule: activatingRule defaultRule/Default rule
ActionFlightMode::activate not setting flight mode
ActionPsmState::activate not setting power saving state
ActionCellularMode::activate: -1
ActionPresence::activate rule has no presence changes or previous presences
Now Tue May 22 20:37:20 2012
Scheduling a timer to Tue May 22 21:00:00 2012, interval 1359s
ConditionManagerLocationCell::monitorCellId(1)
ConditionManagerWlan::endRefresh, stopping monitoring
ConditionManagerIdle not monitorUserActivityIdle
ConditionManagerLocationCell::cellIdChanged to357837
ConditionManagerLocationCell::cellIdChanged current rule has this cellId
ConditionManagerLocationCell::cellIdChanged to328046
ConditionManagerLocationCell::cellIdChanged current rule has this cellId
ConditionManagerLocationCell::cellIdChanged to328042
ConditionManagerLocationCell::cellIdChanged current rule has this cellId
ConditionManagerLocationCell::cellIdChanged to357837
ConditionManagerLocationCell::cellIdChanged current rule has this cellId
ConditionManagerLocationCell::cellIdChanged to328046
ConditionManagerLocationCell::cellIdChanged current rule has this cellId
ConditionManagerLocationCell::cellIdChanged to328042
ConditionManagerLocationCell::cellIdChanged current rule has this cellId
ConditionManagerLocationCell::cellIdChanged to328046
ConditionManagerLocationCell::cellIdChanged current rule has this cellId


ajalkane 2012-05-22 18:41

Re: [Announce/WIP] ProfileMatic for Harmattan
 
Quote:

Originally Posted by Schturman (Post 1210873)
sorry, this one:
Code:

~ # /sbin/initctl stop apps/profilematicd
apps/profilematicd stop/waiting
~ # exit
~ $ /opt/profilematic/bin/profilematicd


That's the way to do it. But that output did not of course show the situation when the Power saving goes on, and when it goes off (if the rules are the same as you sent me, the power saving goes on 1:40 in the morning, and off 6:15).

But meanwhile, I'd like you to double check that you have in action "Power saving mode" the "restore previous" option on in rule "Power saving".

godofwar424 2012-05-22 20:06

Re: [Announce/WIP] ProfileMatic for Harmattan
 
Have encountered a pretty annoying bug.

I have set ProfileMatic to switch to 2G only while I am at home using my WiFi or when the phone has been idle for 5 minutes (two different profiles)

This works great, but when I am on the phone, and in a WiFi weak area in my house, as soon as the WiFi connection drops, ProfileMatic jumps in a switched 3G back on MID PHONECALL.

This results in a call being dropped.

The same happens after 5 minutes of a phone call where the Idle profile switches to 2G.

Some kind of check if in call function would be nice just to avoid this error, meaning I can tell ProfileMatic to deactivate when I am on the phone.

Otherwise Great app! :)

ajalkane 2012-05-22 21:23

Re: [Announce/WIP] ProfileMatic for Harmattan
 
Quote:

Originally Posted by godofwar424 (Post 1210946)
This works great, but when I am on the phone, and in a WiFi weak area in my house, as soon as the WiFi connection drops, ProfileMatic jumps in a switched 3G back on MID PHONECALL.

Have you tried using the WLAN condition's timeout to solve this problem?

Quote:

The same happens after 5 minutes of a phone call where the Idle profile switches to 2G.
Something like this was reported, that Harmattan thinks it's idle while being active in call... are you using bluetooth headset or anything like that, or does it just happen in normal phone call? This is obviously a bad situation, and I'd like to do a workaround if PR1.3 does not fix this.

Quote:

Some kind of check if in call function would be nice just to avoid this error, meaning I can tell ProfileMatic to deactivate when I am on the phone.
I can surely understand this use case. I'm not sure if it really has to be an option at all, I think changing mobile mode should be delayed if call is on-going. But I'm not sure when I have time to dig into this, if anyone has pointers how to detect when call is going on, it'll surely help speed-up the implementation.

godofwar424 2012-05-22 21:31

Re: [Announce/WIP] ProfileMatic for Harmattan
 
Quote:

Originally Posted by ajalkane (Post 1210984)
Have you tried using the WLAN condition's timeout to solve this problem?

Tried it, but it doesnt particularly help seeing as if I walk out of my house on the phone, and get in my car and drive off, or walk down the road, when the timeout runs out, the phonecall will be disconnected :(

Quote:

Originally Posted by ajalkane (Post 1210984)
Something like this was reported, that Harmattan thinks it's idle while being active in call... are you using bluetooth headset or anything like that, or does it just happen in normal phone call? This is obviously a bad situation, and I'd like to do a workaround if PR1.3 does not fix this.

I was just in a normal call, my bluetooth is on but not connected to anything. I haven't tested this when using my cars bluetooth handsfree. Although I am sure if the normal phone call idle issue is fixed it would also fix any bluetooth headsets issues :)

PS. Nice to see a fast reply, active devs are my favourite :) lol

godofwar424 2012-05-22 21:49

Re: [Announce/WIP] ProfileMatic for Harmattan
 
Quote:

Originally Posted by ajalkane (Post 1210984)
I can surely understand this use case. I'm not sure if it really has to be an option at all, I think changing mobile mode should be delayed if call is on-going. But I'm not sure when I have time to dig into this, if anyone has pointers how to detect when call is going on, it'll surely help speed-up the implementation.

Is there no way of doing a quick check if call-ui is active? Or if the microphone and speaker are being used by call-ui??

Or if the proximity sensor is active (this happens when in a call)

DarkSkies 2012-05-22 23:42

Re: [Announce/WIP] ProfileMatic for Harmattan
 
Quote:

Originally Posted by achilles333 (Post 1210821)
If I understood your requirement correctly, the device already has autolock feature after certain time of inactivity. Go to settings->security->device lock. and then configure autolock time there.

it does, but i want the auto-lock to be automatically engaged only when i am on the move (that is, when particular conditions are met).

Schturman 2012-05-23 11:49

Re: [Announce/WIP] ProfileMatic for Harmattan
 
Quote:

Originally Posted by ajalkane (Post 1210896)
That's the way to do it. But that output did not of course show the situation when the Power saving goes on, and when it goes off (if the rules are the same as you sent me, the power saving goes on 1:40 in the morning, and off 6:15).

But meanwhile, I'd like you to double check that you have in action "Power saving mode" the "restore previous" option on in rule "Power saving".

Yes, i Checked this, and i set this correctly, but this morning it's again not returned... Maybe problem came from Fastern9 ?
For now i added power saving off to default rule, will see what happen tomorrow.


All times are GMT. The time now is 22:01.

vBulletin® Version 3.8.8