Proximus

Contents

Proximus

This is a page discussing the implementation of a daemon which can trigger certain actions (e.g. change sound settings, open application) when certain states or conditions change (e.g. location, network connections, time)

Thanks to Jaffa for the name ("Mix of "proximity" and "tempus" - the original use cases")

Actions should be pluggable or scriptable by users, so they can add new features easily, the same is potentially true of the conditions (depends how hard that is to implement).

Ideally this daemon could be used as a backend for various potentially useful applications: e.g. reminder that your bus-stop is coming up; turn wifi off at night; change to silent mode during a meeting (from calendar), etc.

Please feel free to add more details, comments, etc.


Conditions

These are the things to be checked and if true will cause some action to be performed.

Time based

  • Current time [earlier than, later than, equal to]
  • Current hour [<, <=, ==, >, >=, !=]
  • Current minute [<, <=, ==, >, >=, !=]
  • Current second [<, <=, ==, >, >=, !=] - perhaps somewhat excessive -lardman

Location based

  • Current location [within some radius, outside of some radius] - implement by looking at the transitions, rather than continually running a rule while true/false? -lardman

Depending on the radius (and perhaps some hints) we can work out whether we can use cell id (free if we cache the relevant ones offline) or require GPS accuracy. In any case we can avoid turning the GPS on until we are close by using the known/cached cell id close to the location as the first part of the check.

  • Connected to X wifi network

Connection based

  • Connected to a wifi network
  • Bluetooth connection?

Other

  • Specific application starts running
  • Specific application is running
  • Specific application stops running
  • Specific application isn't running
  • headphones plugged in/out
  • Specific type of calendar event is ongoing (e.g. meeting in progress)

Actions

  • Sound [on, off]
  • Profile select [General, Silent]
  • Bluetooth [connect, disconnect to/from known device?]
  • Bluetooth [on, off (visible)]
  • Wifi [connect, disconnect]
  • Wifi [auto-connect on/off]
  • Wifi [Auto change to wifi on/off]
  • Random Application [Start, stop]

Actions should be pluggable or scriptable by users, so they can add new features easily.

Interface

As this is a daemon, the user will need some way of interacting with it to produce their desired behaviour.

One option is for applications to be able to talk to the daemon via some API so that they can use its functionality themselves without exposing much to the user. An example of this might be an app that reminds you when your bus stop is near (http://code.google.com/p/bus-stop-alarm/)


One would also want an overview of the rules that are in place (much like looking at the alarms list), and this would allow the user to set/delete different rules, and also to add priorities to the rules (otherwise we will end up with a case where rules conflict).

lcuk pointed out the Windows 7 parental controls as one thing to think about: http://img.ampercent.com/post/set-up-time-limits-parental-controls.png