New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

BUBBA controlling your lighting

How are you using your Bubba Two or Excito B3? Got pictures? Share here!
Post Reply
6feet5
Posts: 269
Joined: 13 Apr 2007, 17:32
Location: Gnesta, Sweden
Contact:

BUBBA controlling your lighting

Post 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
Last edited by 6feet5 on 03 Jul 2011, 07:55, edited 1 time in total.
mike_nl
Posts: 49
Joined: 03 Jul 2009, 13:56

Re: BUBBA controlling your lighting

Post 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
6feet5
Posts: 269
Joined: 13 Apr 2007, 17:32
Location: Gnesta, Sweden
Contact:

Re: BUBBA controlling your lighting

Post 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).
DanielM
Posts: 637
Joined: 28 Mar 2008, 06:37
Location: Sweden

Re: BUBBA controlling your lighting

Post 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
Post Reply