Page 1 of 1

BUBBA controlling your lighting

Posted: 23 Jan 2010, 17:01
by 6feet5
Hi all,

Yet again inspired by the work of Filip I've made a new software project that will fit perfectly on a bubba server (even though this is posted in B2 forum, I can't see a reason why this shouldn't work on a B1 (actually it will probably run on any perl capable computer). I've taken a different route though from Filips work as this is a perl script that will parse formulas based on sunset and/or sunrise and generate cron rules. This means this program only need to be run once every day (preferably some minutes after midnight), the time keeping is left to cron, which means minimal extra load on your bubba.

The project was made with my USB connected NEXA remote in mind, but you could use a Tellstick or run any command that cron will accept. You could for instance trigger a snapshot with your webcam at sunrise or sunset.

The configuration file accept any number of rules, where a rule consist of a condition, a true statement, a false statement and a cron part. This is what a rule will look like:

Code: Select all

sunset < 17:00 ; 17:00 ; sunset ; * * 1-4 root /usr/local/bin/control_nexa send B 1 on
This rule is a rule I use to turn on light in my livingroom; if sun sets before 17:00, turn on light at 17:00, otherwise, turn on at sunset.

The true/false statement can use simple formulas to get an offset from sunset/sunrise, like 'sunset + 01:30' to get the time one hour and thirty minutes after sunset.

The cron part is a cron rule without the hour and minute fields (the true or false statement will be used to generate minute and hour). NOTE! You need to supply a user name to the cron part (in this case, 'root').

Your can read more about it at my project page.

Enjoy!

/Johan

EDIT: Updated links

Re: BUBBA controlling your lighting

Posted: 02 Jul 2011, 17:50
by mike_nl
Hello Johan,

it will be fine when you can update the lik to this project. Because i am an automation ingeneer hee in the netherlands and i have done a lot of hings for bubba on my ow. It will be grea to see wha otehrs can do

Re: BUBBA controlling your lighting

Posted: 03 Jul 2011, 10:30
by 6feet5
mike_nl wrote:Hello Johan,

it will be fine when you can update the lik to this project. Because i am an automation ingeneer hee in the netherlands and i have done a lot of hings for bubba on my ow. It will be grea to see wha otehrs can do
Done. The links have been updated

/Johan

(in case the editing didn't result in a topic notification to you).

Re: BUBBA controlling your lighting

Posted: 03 Jul 2011, 13:36
by DanielM
Just a note here: If you want to control a Tellstick from your Bubba/B2/B3 Homeautomation works really good. Thread about that here: http://forum.excito.net/viewtopic.php?f=11&t=2882

/Daniel