has anyone implemented x10 support through the new firmata class in 06? Might be doing some arduino triggering of x10 controllers, and was wondering if anyone had experience in this. If the answer is no, maybe i’ll port this over to OF…
http://www.arduino.cc/en/Tutorial/X10
also welcome are other suggestions for wireless control of lighting circuits through code (context: gallery space, 12+ independent lights to trigger)
thx,
k
Plugging the X10 lib into firmata should be pretty easy, (I’d give it a crack right now but I’m a bit occupied). Another option might be using DMX (sounds like not so much though, I’m guessing you want to integrate this with an existing lighting setup)
http://forum.openframeworks.cc/t/dmx-control-over-usb/928/0
depends on how fine grained the control over the lights needs to be. You could also just hook a bunch of relays to an Arduino and control on/off that way, though dimmers would be trickier.
hi, thanks for the response. I also don’t think it’d be too terribly difficult to port x10, just haven’t taken the time to sit down with it.
in re: relays, the whole thing would be terribly simple to deal with if it was hardwired. are you suggesting wireless relays? zigbee or otherwise? wireless relay boards tend to be fairly costly too, from my knowledge (400+)…
at present (assuming the client doesn’t change their mind) i only really need to switch on and off the lights wirelessly, and the lights are actually going to be placed in the gallery setting, not a pre-existing setup. DMX might be a bit heavy for such a simple application on only 12 lights, but i haven’t had much experience with it…perhaps it would help avoid other problems…
seems like there are several ways of tackling it, just trying to suss out the most efficient way (cost, energy, reliability). thoughts?
I really haven’t had much experience with DMX either, so I can’t say much different than a google search would tell you, and it doesn’t help you wirelessly anyways…in terms of relays, I was thinking of actual relays, but yeah, if it was fully wired, it’d be trivial.
If I’m not misunderstanding something, you’re going to need to be using XBees or some other kind of radio+mC or a WiFly to read commands since you need wireless control. Also, in larger commercial buildings w/more complex wiring schemes x10 can be kind of pain but you don’t really have to worry about glitchiness once you get it up and running, i.e. the module isn’t going to crap out or get interference.
Costwise though, if the lights are just getting plugged in and you just need two points of control, control panel to send commands and receiver to control the lights, then 2 arduinos, 2 xbees, and 12 relays, diodes, resistors = ~100$ and xbee has been pretty reliable for me (so far). I might be misunderstanding something tricky in your project though,.
I think maybe a modification of your suggestion might work…two arduinos communicating through xbee would be almost the same thing as just hardwiring the thing, just separating computer/control and actual device. this has its uses, but i’m not sure that’s the goal in this situation. i’d rather figure out some way of squeezing a mac mini or something in somewhere than have to deal with all the wireless protocols and such…still kindof hoping i can do that 
but!
I do think it would be possible to have several xbee’s connected individually to the devices, and hacking their output pin(s) through circuitry to trigger signals as needed, differentiated by their different addresses. I’m still trying to discuss with the client what exactly they’re going for, but i believe the idea was to keep the devices separate/autonomous, i.e. not connected to one another through wiring.
some inspiration here…
http://www.makingthings.com/ref/firmwar-…-o-s-c.html
something like /xbeeconfig/io0 4
anyhow, i appreciate any other thoughts, and will keep the thread updated with my findings.
Just one more quick thought, you might look at using an Arduino with an Ethernet shield and making up a really simple server that would be globally accessible.
Thanks for the link to the Make Controller stuff, I hadn’t seen that before, looks interesting and inspiring.
=== edit
It’s totally possible to set the state of the pins on the XBee using the “DX” where X is 0 -4 command:
Input/Output Pins
There are several io properties that allow you to configure each of the 9 IO pins on the XBee module. Pins can be set to one of 5 values:
* 0 - disabled
* 2 - analogin
* 3 - digital in
* 4 - digital out high
* 5 - digital out low
There are 9 IO pins on the XBee module, numbered 0 - 8. Send messages to them by specifying io + their number. Pin 8 cannot be an analogin - it can only be a digital in or out. For example, to set IO 0 to analogin, send the message
I think that would totally be the best way to go for you, you can just set the digital out to control a relay, up to 8 per XBee depending on the model.