Fix IAPs call.
3 the ambient sensing gestalt optimizer for the n900
5 dwimd works by sampling sensors and taking user-defined actions
6 based on a user-written config file.
10 1. Look at http://hg.alexanderweb.de/dwimd-main/file/tip/contrib/alex_config.py
11 how a config file should look like.
12 2. Write your own config file. Every function is executed every 30 seconds.
13 You can use the values and actions explained below.
14 3. Copy your config file to /etc/dwimd/dwimd_plugins/configs. It should have
19 dwimd ships the following sensors:
20 * history: Not really a sensor, it buffers data and returns the buffered
22 * load: Provides the system load as `load`.
23 * locationcheck: Provides the current location as `location`. Such location
24 objects then have a `near` method that should be called with
25 the name of a location that was previously defined with
26 `define_location`. `define_location` takes a name and either
27 `network_in_sight="network_name"` for wifi sensing or
28 `coordinates=(50, 8, 100)` for an 100m circle around
29 the GPS coordinates 50N 8E.
30 * moving: Provides `moving` and `not_moving_for_5min`. The latter is useful
32 * orientation: Provides `orientation`, `face_up` and `on_stand`. `orientation`
33 either contains "portrait" or "landscape" or the same string
34 with " (inverse)" appended (XXX check). The other two variables
36 * time: Provides `time` which supports `time.between("12:00", "15:00")` like
39 It ships the following actions. These are activatable by using the verbs explained below.
40 * availability: Should be activated with a status like "online" or "away". Additionally,
41 `availability_message` can be activated with the status message.
42 * lock: If activated with `off`, avoids that the screen locks.
43 * profile: Can be activated with a profile name that should be switched to (like
44 "silent" or "general").
45 * wifi: Should be activated with a network name as the value.
47 These verbs are provided to activate an action:
48 * require(object, value) triggers an error if somebody votes against it
49 * suggest(object, value) is a weak vote (defaults values but does not count in votes)
50 * vote(object, value, votes) is used for voting
51 * force(object, value) overwrites requires and votes
52 where object is a gestalt name or an action.
54 Gestalts can be defined like this:
55 define_gestalt("Default",
56 availability="available",
58 They group similar action values.
63 * Adjustable sample rate for every plugin.
65 gps, time, weekday, load, location, orientation
66 charging, playing, display, locked, noise level, ringing
68 availability, profile, cellular, secure, lock, wifi