We have moved to a new Sailfish OS Forum. Please start new discussions there.
387

We need a Scheduler or Automation tool like Profilematic or Situations [answered]

asked 2013-12-25 21:04:49 +0200

peakki gravatar image

updated 2014-01-10 10:02:27 +0200

foss4ever gravatar image

I would like to have the option to make the phone silent at ex. 10.30pm and enable sounds ex. 7.30am automatically. It would also be cool if you could make the phone go to power saving without automatic data connection (like email fetching), or run spesific commands on entering a particular mobile network cell.

The functionality of ProfileMatic in N9 made it possible for user to trigger various commands and actions (e.g. profile changes, entering power-saving mode etc) based on signals/triggers from the system like entering a particular gsm cell, being connected to a spesific WiFi access point, etc. or simply based on a date and time (used as a scheduler).

Now, it would be great to have this kind of scheduler/automation/personalization tool that could even be combined to the Ambience changes in Jolla.

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by Jolly-Jo
close date 2015-02-11 15:24:47.518619

Comments

25

it is a "must have" feature. Including Cell/WLAN based location triggers.

ortylp ( 2013-12-25 21:37:34 +0200 )edit
12

i suppose this is the most relevant answer at the moment: ajalkane, the creator of profilematic, intends to port profilematic to sailfish, if it's feasible. at the moment he is waiting for a jolla device. i don't know if that perhaps means donations would speed up the process :

edgar ( 2013-12-26 18:25:07 +0200 )edit

Hmm, don't you need possibility to run headless daemons for it (and start them during bootup)? Or possibility for running your app on schedule? Both things are possible, both won't let you get through Harbour criteria at the moment.

Artem ( 2013-12-30 00:58:55 +0200 )edit
3

Profilematic would be fantastic, I hope ajalkane could start working with the port, sooner the better. Anyway I think Jolla could add a simple automated silent feature similar to iOS "Do not disturb" feature. This is something we had already in Symbian devices.

shertell ( 2014-01-01 22:22:40 +0200 )edit
16

Actually, I think it would be a good idea to integrate the profilematic functionality with the Ambience idea. Currently, when you are marking as fav an ambience, you can set the ringtone volume and tones for that ambience. The idea would be to include WLAN/bluetooth/IM status/etc and trigger action

Jorge ( 2014-01-02 15:27:50 +0200 )edit

5 Answers

Sort by » oldest newest most voted
63

answered 2014-07-07 13:58:56 +0200

updated 2014-08-03 00:01:46 +0200

Hello everybody,

I started to write some code (GitHub), to do something like profilematic, but with a much more modern architecture. It's still in the early days of prototyping, and there is nothing interesting to show yet. I didn't know until today that there were already quite a lot of nice preparation work done on TJC, so I will share what I did too, so that we can do it together (c)

I'm at Step 2 of this answer. I'm open to discuss my architecture and will edit the answer if you agree.

Overview

I'm trying to write a library for having a bot reacting to events and executing actions, the phonebot library. Phonebot have

  • libphonebot, a static library that provides the engine to read and execute rules
  • plugins to have more capabilities
  • phonebotd, the daemon that execute these rules
  • jolla-settings-phonebot, a settings plugin to configure phonebot
  • harbour-phonebot, a selfcontained daemon + app to pass harbour

Since most of the stuff is done inside libphonebot, I can create several packages that share the same basis, one for harbour, others for openrepos etc. Note that phonebotd and harbour-phonebot might be incompatible, so you would run either phonebotd + settings-phonebot or harbour-phonebot.

Architecture

phonebot isn't trying to reinvent the wheel and takes inspiration from both profilematic, IFTTT and on{X}. The idea is simple: you build rules, either à-la profilematic-IFTTT, with if -> then conditions, or by writing scripts.

Since we are with Qt, we can take advantage of QML and JS to write rules. Actually phonebot is just reading QML files that contains rules. It uses the powerful QQmlEngine to do all the hard work of parsing, interpreting etc.

A Rule in phonebot is a QML component that have 3 properties

  • trigger: something that triggers the rule
  • condition: a condition (or conditions) to respect for the rule to be active
  • actions: a series of actions to execute when the rule is triggered, and when conditions are respected

The Trigger is in charge of emitting signals to run the Rule. Triggers could be: when it's 10pm, when you enter in the home wifi zone, when Battery reached a certain level etc.

The Condition do not provide any signal, and represent more a state. A Condition could be "when driving", "when at home" etc. (even if implementing this kind of condition is rather tricky).

An Action is what to run: execute a program, turn on / off some settings, change an ambience, or use DBus to do stuff.

Here is an example of scripted rule. You will also be able to configure rule with a friendly UI (using default Triggers, Conditions and Actions).

import org.SfietKonstantin.phonebot 1.0

Rule {
    name: "SimpleRule"
    trigger: TimeTrigger { hour: 22; minute: 0 }
    actions: ActionSilent { silent: true }
}

Technologies

I need to check if the QtMobility modues got ported to Qt 5. It's unsure if QSystem* are available. However, a lot of APIs are actually open-source, and, even if they are forbidden in harbour, they can be integrated (statically) in phonebot.

Here is a non-exaustive list of libraries I plan to use

Testing versions

Initial POC is done, and I have some testing versions, that allows you to play with time and profile. Have a look at TMO and test them !

edit flag offensive delete publish link more

Comments

Seems to be a very good start to me. Thanks for joining in :)

Let us know if you need help !

François ( 2014-07-08 12:08:49 +0200 )edit

Wow. IFTTT support sounds very interesting. Your initial proof of concept release seems to have a good key features I miss in sailfishos. In addittion to that I would like too see some time based network management like " turn wifi/mobile data off from 8.00 to 16.00. Thanks for your contribution in bringing new functionalities to jolla :)

Mądry ( 2014-07-08 19:24:46 +0200 )edit
4

Initial proof of concept is out, see TMO

Sfiet_Konstantin ( 2014-07-08 20:39:37 +0200 )edit

Right way .. thank's for ideas .. I like systematic soulutions..

Kaacz ( 2014-07-09 13:35:49 +0200 )edit

This sounds interesting. The programmability is what was lacking in Profilematic. But this reminds me of Mobots, which was available for Symbian.

Fuzzillogic ( 2014-07-09 18:58:30 +0200 )edit
42

answered 2014-06-27 17:16:31 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2014-07-10 18:47:42 +0200

Kaacz gravatar image

Since a lot of people want this, and since we are on http://together.jolla.com, why don't we do it together ?

ProfileMatic is certainly a good start. It's under GPL, let's port it to Sailfish OS !

Here's what I suggest :


Step 1 : Let's define precisely what we want.

Events

Time based events :

  • ☐ Weekdays
  • ☐ Start/End time
  • ☐ Idle time
  • ☐ Calendar event

Kaacz example: On N9 I have rule "In week night & Idle 10min set LPM on" & "In weekend & Idle 10min set LPM on".

Location based events :

  • ☐ Entered/Exited specified location based on mobile cell-IDs
  • ☐ Entered/Exited specified location based on GPS

Network based events :

  • ☐ Connected to any WLAN
  • ☐ Connected to specified WLAN (rely on router MAC address)

Battery based events :

  • ☐ Status (charging, not charging)
  • ☐ Level

Actions

Netword related actions :

  • ☐ Set WiFi on/off
  • ☐ Connect to specified WLAN (this one also turns WiFi on if needed)
  • ☐ Set BlueTooth on/off
  • ☐ Set 3G/4G on/off
  • ☐ Set Plane mode on/off
  • ☐ Set GPS on/off
  • ☐ Set mobile data connectivity on/off (I no need data in night for.ex.)

Phone related actions :

  • ☐ Set ring volume level
  • ☐ Set media volume level
  • ☐ Set brightness level
  • ☐ Set specified ambiance
  • ☐ Set locking on/off (I don't need a lock screen when at home)

App related actions :

  • ☐ Launch specified app
  • ☐ Set IM status (available, not available, disconnected)

Misc. :

  • ☐ Send email to specified recipient(s) (the email content is generated from a template)
  • ☐ Send SMS to specified recipient(s) (ie: your kid just got home : his/her phone sends you a SMS)
  • ☐ Create a new backup

Step 2 : Figure out how to technically do these things.

Events

Time based events :

Location based events :

The QSystemNetworkInfo from Qt Mobility seems to be interesting here. It provides a cellId property and a cellIdChanged SIGNAL that should allow us to know where we are.

Network based events :

These are probably available if we listen to QNetworkConfigurationManager::configurationChanged SIGNAL. We then have a QNetworkConfiguration instance, and we can probably test it.

Battery based events :

Here again, Qt Mobility has a QSystemBatteryInfo class which seems to provide everything needed. There are batteryStatus, chargingState and remainingCapacityPercent properties. And of course, there also are batteryStatusChanged, chargingStateChanged and remainingCapacityPercentChanged SIGNALs.

QSystemDeviceInfo also has the necessary properties : batteryLevel, batteryStatus and currentPowerState.


Step 3 : Prioritize things depending on the OMGIWantThis-factor and what's doable on a technical POV.

Step 4a : Define a good architecture so it's easy to add Events and Actions.

Step 4b : Define what we want for UI/UX. (ProfileMatic seems great to me)

Step 5 : Code ! We'd need a team to work on the C++ part and another one to work on the UI (QML).

Step 6 : Improve. Add functionnalities from the lists defined in Step 1 as soon as they are technically available. Fix bugs. Improve the UI/UX.


  • I can start a wiki post for Step 1. - DONE Feel free to edit/reorganize the lists above.
  • I don't have the required skills for Step 2, but I can keep track of things and centralize everything if it's needed. I can also spend some time on searching/exploring source code, SDKs, etc.
  • Step 3 must be voted.
  • Step 4 must be debated.
  • For Step 5, I'd like to help on the QML part since I don't know C++ :(
  • And for Step 6, I'll probably be able to keep track of things, triage bugs, etc. We'll see until then :)

What do you guys think about that ? Who's in ?

edit flag offensive delete publish link more

Comments

5

Key point for me is the question, what Jolla's vision for ambiences is. Should it go towards a system adjusting the phone to a certain situation, i.e. something such as discussed here or will it just remain a fancy word for themes?

lenggi ( 2014-06-27 21:02:46 +0200 )edit

Agree, maybe Jolla could inform us how long will it take to make something more out of the Ambiences. See https://together.jolla.com/question/397/screenborder-swipe/#post-id-9299

Neo ( 2014-06-28 16:05:19 +0200 )edit

Thanks for the link, I didn't realize I could get some information about this subject in a post titled "Screenborder Swipe"... But that's another issue :)

What's described in the post you're referring to is very interesting. I am convinced that providing system settings switches in ambiances is the way to go.

But we would still miss the ability to automatically change the ambiance, depending on some "Events". They are only talking about changing the ambiance manually.

One of the Actions I was thinking about is the ability to change the ambiance. If we manage to do that, and Jolla provide "extended ambiance" support, we achieve our goal.

Moreover, working on Step 1 and 2 could also benefit Jolla.

You know, I just watched Google I/O. And I also watched Apple's WWDC a few weeks ago. We have a lot to catch. We can't just sit here and wait for the small team at Jolla to provide everything, can we ?

François ( 2014-06-30 15:40:56 +0200 )edit

I am stay on this side and I want help with this ..

Kaacz ( 2014-07-10 18:50:23 +0200 )edit

A "Keep phone unlocked on [condition]" would be awesome. Correlates to https://together.jolla.com/question/51516/dont-lock-device-on-trusted-wifi/

Tanghus ( 2014-07-22 13:53:53 +0200 )edit
23

answered 2015-01-01 17:00:44 +0200

nightmare gravatar image

updated 2015-01-01 17:02:02 +0200

since today, there is Situations from Pastilli Labs available in Jolla-Harbour

https://twitter.com/SituationsApp/status/550553198269046784

edit flag offensive delete publish link more

Comments

2

This is Great news!

kt ( 2015-01-01 17:03:23 +0200 )edit
3

Not very #SailfishOS type of UI, though :/

foss4ever ( 2015-01-01 17:21:12 +0200 )edit
3

And it can't start automatically at boot because of harbour limitations, unfortunately :(

rburkhanov ( 2015-01-01 18:56:09 +0200 )edit
2

And takes more than 30% processor load and ~400 mW. It's a great idea, but completely useless under these circumstances.

Robomike ( 2015-01-01 21:41:16 +0200 )edit

@Robomike Would you mind sharing your setup where that kind of numbers are observed? Of course it is not supposed to do that.

hhaveri ( 2015-01-01 21:51:20 +0200 )edit
14

answered 2014-02-22 11:20:33 +0200

StaticNoiseLog gravatar image

updated 2014-02-22 11:24:04 +0200

I have just made a similar posting as I had not seen this one. So I am going to delete my posting but add my ideas here as an answer (comments cannot be that long). I hope this is OK. In some sense it is an answer as it specifies details of how it can be done.

As a Jolla user I would like to

  • get maxmium battery life by specifying in which locations (work, home, ...) certain phone functions should be enabled or disabled automatically.
  • have my Jolla "learn" a location by scanning the cell IDs of the mobile phone base station antennas in range. This is a user-controlled process: A scan is initiated manually and all cell IDs detected within a few minutes will from now on identify this location. I want to give a name to that location. See the Android program "Actions" which implements this very well (also the "Tasker" app). It must be possible to "refresh" a location at a later point in time as cell IDs may change when a base station antenna is replaced/updated.
  • specify which phone functions should be enabled or disabled upon entering or exiting a location that my Jolla has learned. In particular I want to do this for WLAN and possibly Bluetooth.
  • when I manually turn on WLAN in a friend's place, the WLAN must stay on, even if this is a location unknown to my Jolla. Automatic enabling/disabling of functions must only occur when a transition from/to a defined location is detected (exit/enter the range of a set of base station antennas that define a known location).
  • GPS or WLAN should NOT be used to determine location. This is all about battery life and the precision of location achieved by looking at base station antennas in range is sufficient for this purpose.

Usage example: My Jolla would know when I am "at home" and enable WLAN when I return to my place. When all "home antennas" have gone out of range, WLAN will automatically be turned off.

Of course this does not have to be limited to WLAN and Bluetooth. Maybe somebody wants to use a different ringtone or volume setting in a certain location. But I don't think Sailfish OS should implement all kinds of automation functions like the Android apps "Actions" or "Tasker". The OS itself should only be able to dermine location by cell IDs (it naturally has to know about base station antennas in range) and control those functions that have a heavy impact on battery life. An API can be offered so that native apps can be written that provide more features. But I do not want to have an additional program running just to save battery life.

edit flag offensive delete publish link more

Comments

Most of those functionalitues and features were present (and still are) in N9 Profilematic, and the Cell Id Identification of location was how I used my phone to detect wherger I was at home or at work, and trigger actions and profiles when enerering and exiting those zones. It also had time based action triggers to e.g. turn WLAN off/on at partticular times or automatically go to silent mode when entering specific places. Excellent for the battery life and really badly needed stuff in our Jolla's ;)

foss4ever ( 2014-02-22 12:16:39 +0200 )edit
1

I did not know Profilematic, but it seems to be an excellent example of how automation could work. I hope that knowing locations by cell ID will be integrated into the Sailfish OS itself. It could be a distinctive feature: As far as I know, all other mobile operating systems need an app running for this type of service. Also time-based control sounds like a good idea that could be an integral feature of the Sailfish OS.

StaticNoiseLog ( 2014-02-22 16:31:07 +0200 )edit

Well that's what this topic is all about, and most of the suggestions you made are already written in the question description. If something is missing feel free to edit it accordingly.

foss4ever ( 2014-02-22 17:14:09 +0200 )edit

All we need is to expand Ambience functionality and include things that Profilematic is doing for N9. For example there is no point changing "ambience" for work or sleeping time. An ambience should be configurable to say e.g. Mon-Fri from 09:00-17:00 go silent mode, etc.

pmelas ( 2014-04-03 14:43:22 +0200 )edit
1

Lack of scheduled profiles is the main reason my Jolla has been in the drawer for last 5 months. Has enyone asked this ajalkane guy if he would be willing to invest his time on porting to SailFish? Jolla development should send him a unit with a "pretty please" note attached.

Hema ( 2014-04-17 13:43:21 +0200 )edit
4

answered 2014-06-30 19:30:19 +0200

rainisto gravatar image

There is "Night Silence" application in harbour store, that covers the automatec sound mute part of your question.

edit flag offensive delete publish link more

Comments

3

closed source thoug!

ray-ven ( 2014-06-30 19:57:15 +0200 )edit

Question tools

Follow
67 followers

Stats

Asked: 2013-12-25 21:04:49 +0200

Seen: 6,179 times

Last updated: Jan 01 '15