Ok, I did not resist and I spent the past two days coding…
I committed revision 190 on svn wich adds daemon support, and not a scrubby daemon…
with pyEphem lib – supplying latitude and longitude – all “astronomical-related” parameters (such as dawns and sunsets, solstices and equinoxes) are well computed and execution is set consequently so as reported in previous posts:
- NIGHT: during the night the program is in complete idle state (sweet dreams)
- DAWN: 50~100 minutes (according to the season) before dawn till completion the program will take a “capture” every 15~30 secs (according to the season)
- DAYLIGHT: during the day the program takes a capture every 180 seconds (this value is totally arbitrary, if you think it should be different ask)
- SUNSET: more or less as dawn
The daemon needs latitude and longitude to be added to the default profile.
If you want to try daemon functionality you have to manually add them to the default profile (wherever you want), wich is currently the only one supported by the daemon (will be fixed soon).
Here’s a hint:
latitude = 46.04546789 # replace with your latitude
longitude = 13.568765156 # same as above
# you can check your location on http://www.earthtools.org/
That’s the daemon usage; note that the daemon itself (without any command send with “set”) will do absolutely nothing, so, to effectively “run” you have to send a command (see below):
calised start|stop|restart # manages daemon process
if the daemon is running, you can:
calised grab info1 info2 info3 ... # grab info from the daemon
calised get info1 info2 info3 ... # get info from the daemon
calised send -? # sends commands to the daemon
“grab” command obtains fresh new values (for instance, activates the camera to get the values).
“get” instead simply displays the last value obtained by the program, if none then displays “None”.
“send” is used to send commands.
grab|get available “infos” are:
- scr | screen-brightness: screen brightness in /255
- amb | ambient-brightness | brightness: ambient brightness in /255
- cbs | current-backlight-step: current backlight step
- pct | percentage: ambient brightness in percentage (the value will be corrected by the amount of light coming from the screen)
- bls | backlight-step | step: the backlight step suggested by the program (note that grab/get commands will not change the backlight level)
- scr | screen-brightness: screen brightness
send “commands” are:
- -x | –start: start automated “capture” thread execution. This will probabily be the default when starting the daemon;
- -c | –stop: stop thread execution
- -s | –set: do a single “capture” and set the backlight according to that
Right now there are almost NO checks/locks so if you ask for a “capture” when also the thread is capturing (not idle, but grabbing from cam) the program will likely crash or the camera will lock or anything worst…
Just fixed and cleaned, now everything should be ok.
On my machine and probabily also timezone everything should be fine (or at least if previous versions of calise worked this one should work too).
But, as always, please report – the way you like better – any bug you find.