Usage

Calise can be executed as service or with interactive interfaces.

Service
To run calise (service version) run: $ calised Service version is designed for extended use over time (from several hours to even days).

Features
Key features of this version are:
 * 1) negligible CPU time usage
 * 2) very low power usage (although it strongly depends on the power usage of the camera, with default options, should be from 1/3 to 1/6 of a usb mouse)
 * 3) time and space optimization (thanks to ephem module and weather informations)

How it works
Service behaviour during the day can be divided into three different states:
 * day
 * The period of time between dawn and sunset. Since during this period of time ambient brightness level won't rapidly change, service is set to do less captures than on dawn or sunset and time between captures is defined as follows:, where   is a multiplier (from 0.2 to 1.0) based on weather informations obtained from internet (if weather lookup is disabled or there's no internet connection,   is set to 0.6)
 * For example, if weather information is "thunderstorm"  will be set to 0.2, else if weather information is "clear"   will be set to 1.0
 * dawn/sunset
 * During this period of time ambient brightness will (for sure) go from 0 to max (and vice-versa) and will do that in a pretty short period of time. Knowing that, time between captures is set to  of the time needed for the sun to go from -6° to 15° on the horizon (and vice-versa), this means that someone living near north-pole will get higher time between captures than someone living near the equator and that that value will likely vary during the year (more for north-pole inhabitants than equator ones).
 * night
 * During this period of time ambient brightness should be 0 and so default behaviour is to wait until next dawn. Night behaviour was set like this because service accepts manual backlight change queries and usually, during the night, only 1 to 3 brightness changes happen (lit or shut lamps, eventually more than one time).

Usage scenarios
Service version can be executed either as userspace service or as system-wide service (optionally run as system daemon).

Running in userspace will get you slightly more control on service execution, running instead as system-wide service will allow all (eventual) users to control it (there are policies, basically "video" group users can do almost everything, others can only request captures and dump data).

To know more about running calised as system-wide service take a look at startup scripts.

Details
Anyway every single execution's option can be modified either with profile's settings or passing cli arguments. For detailed informations about command line arguments read calised man page: man calised to know how are command line arguemnts named inside profiles, read  inside installation package.

Interactive interface
To run calise (interactive version) run: $ calise if you installed pyqt module but you don't want the GUI run instead: $ calise --no-gui Interactive version is designed for faster response time at the expense of power usage. Actually default settings are pretty mild but with few custom settings from command line can became a really powerful tool.

Features
Key features of this version are:
 * 1) heavily customizable capture options (I mean, every execution option is customizable as for service version but, since it's somehow more aggressive/powerful, will be an interesting tool in good hands)
 * 2) optional Qt GUI
 * 3) record/export data capability; also service can export all capture data, but this version is actually intended for that and so values are already formatted as csv file

How it works
Interactive version has fewer and less complicated mechanisms than service version. Shortly:
 * a frame is taken and its brightness is computed
 * this value is appended to a value array (of the size defined by "number of values to average") and an "average brightness" value is returned
 * to avoid too much frequent backlight changes there's a timed lock that starts/expires on different triggers

Usage scenarios
Typical usage scenario is for experimentation. I mean, test different room's ambient brightnesses during the day, export values, compare and/or build a plots. Of course, you can carelessly use it as a daemon (but don't bug me with electricity bills or claiming poor battery durations).

Details
For detailed informations about command line arguments read calise man page: man calise to know how are (the few supported) command line arguemnts named inside profiles, read config/sample.conf inside installation package.