I've been running some
GE ColorEffects ('G35') RGB xmas lights on my house for a year or so now. We turn them on for holidays and I've have to re-load the onboard program every time I wanted a different set of patterns.
I had hoped to use the Yun for this (at least I can load new programs over Wifi, mission accomplished) but of course, it goes beyond that... because it's so tempting to want to do MORE, because the Yun is capable of so much more!
So here's what I came up with:- Enabled cron, and wrote python scripts which use
astral /
python-dateutil /
pytz to figure out when sunset will happen today, then
python-crontab /
croniter to modify the start time of the script which turns the lights on at the best time.
- Using python '
gdata' module to look at a public google calendar I created, and I post 'special events' on that calendar on holidays. The body of the event contains a code, like XMAS, USA (4th of July) or halloWEEN, etc. which corresponds to different patterns of lights to play back.
But of course there are a few problems, and I would appreciate any advice folks can give me...
- I can upload a normal light control sketch to the board, but when I try combining with any kind of Yun bridge client stuff to communicate with the Linino side, it's getting hung up. The light control stuff is very timing-sensitive, it talks to each individual bulb on the light strings using a 1-wire kind of bus and has to vary the on/off timing pulses it sends. So I am not sure how to handle this better.
I looked at the trial version of '
arduino for visual studio' by visualmicro.com but it seemed to slow down the arduino too much with the debug overhead, which also messed up the attempts to debug this code.
- I am running out of space when only loading one set of light patterns (just my Xmas stuff plus the overhead for Bridge client and parsing my commands eats up 94%+ of the 28k.)
- The light patterns are all programmed (based off of
sowbug's libraries, which in turn are based off of work by deepdarc and others who reverse-engineered the G35 protocol in the first place) and it takes a long time to write new patterns.
Instead I have been thinking about sequencer programs like
Vixen (Windows only), or
OLA /
QLC and similar.
I am wondering if I could run a process on the Linino side which would basically pick a file off of the SD card to 'play back' at a certain rate, sending the light control events to the Arduino side, which would then basically be a receiver that would translate openDMX (or whatever protocol) into the command format understood by the GE ColorEffects lights. That would solve my issues of running out of space, and of having to write code for different light patterns. I'd just use a sequence authoring program on my computer, save a file and then load it on cue.
However this method would require a pretty fast baud rate, I think the openDMX stuff needs ~250000 baud. I have seen a couple of threads where people have talked about disabling the bridge communication between the Arduino and Linino sides and just using that connection as a more dumbed-down, high-speed serial bus. However I'm not sure whether that would be fast enough to support this idea.
Any helpful thoughts or pointers would be appreciated!