How to Interface arduino/ethernet shield to start scene

Hi,
Don’t know if it could interest some of you guy but i’ve been able to interface the arduino/ethernet shield with the Vera box, sorry if it already been done or explain. I just use the pushingbox code and modified it to work with the vera. Here’s the code for the arduino:

So pin 2 and 3 of the arduino is the input to detect whatever you want: switch, Elk-930… So just change the code with your scene number, your vera ip address and upload it to the arduino. I just use 2 input for now for the elk-930 to monitor my door bell and the phone line, scene send prowl notification to my iPhone but more input can be add.

Anyway, i hope that it could help or give some idea for you guy and again sorry if that have already been discuss, i’ve search on the forum but didn’t saw any tuto for it.

Thanks for posting this, Mic. You’re right; no one has talked about controlling Vera from an Arduino before, though there’s been plenty of talk about the other way around.

As an enhancement, you might want to consider adding some software debounce to the loop, and adding conditions to invoke a scene when the logic state is high too.

Very nice thanks for the input, I’ve been looking for bidirectional communication for Dmp alarm integration (I think I’m the only person on here that owns one :D) I started with my arduino UNO but i think it’s beyond My current skill set and time that I have to apply to the project so I added a dsc 1616 to my system to act as the interface between my Vera and my Dmp panel but I can’t seem to get that to work either I’m using an it-100 and it seems to communicate with the Vera but I can’t get it to show up on my dsc system when I do a 903 command. my zone states and labels are not showing up either, I believe I have the plugin set up correctly and my it-100 led is flashing correctly I called dsc tech support and they told me to call mcv. I’m at a loss but I’m hoping this will at least allow Vera to see my Dmp’s armed status and allow scene controll from there which is really what I’m looking for anyway because I get all of my email, text control and notifications directly from the Dmp panel already

Good idea futzzle, Don’t have time right now but to night or tomorow i will update the code to be able to send also a command to trigger a scene when pin is high to so we could put a virtual switch to have live feedback of the state of the input. I saw on ebay some wireless keychain remote that have 4 channle toggle relay, i think it was arround 20$ including shipping, could be nice to have a 4 channel wireless keychain to interact with the vera for this price. I will probably make a shot on one of these. I’m realy not a expert in alarm system but i did saw that your board should be able to interact with internet so maybe there’s an api http command to control your system with some virtual device on the vera with this , luup code:

luup.inet.wget(“your http api command here”)
return

Like i said i don’t know much with the alarm system so maybe i’m wrong and maybe you already try it. I use this command to send prowl notification, eventghost trigger and any software that can be control with http api command.

My system won’t accept commands from ip only txt from a programmed cell number as far as a stand alone wireless interface this is the one we commonly use arround our shop http://utcfssecurityproducts.com/ProductsAndServices/Pages/60-660-01-95R.aspx

It seams that the ouput use the same as the elk-930, open-collector transistor.

Yeah you have to use a relay if you want a form c contact

Update the code for the high state trigger also so now with 2 scene and a virtual switch you have the live state of the arduino input.
It’s also now 2 ways, you could also control a relay from it with http command.

here’s the link:

Very nice I just got an Ethernet shield last night I hope I have time to work on it tonight

Hey mic ,
I tried to upload that sketch, it came through as an .ino file and I couldn’t get to work am I missing something? sorry I’m sure its something obvious. Any help would be great

Are you using the last version of arduino software? Witch os you use? if your with ubuntu, try to open it with text editor and then copy paste the code. I think older version of arduino software (IDE) was using the .PDE file, the new one use .ino. Let me know

here the last update code:

Now it have debonce on the phone ring scene, and you are able to control 4 relay.

For the doorbell and phone

So, create 2 virtual switch and 4 scene

scene turn on virtual switch 1
scene turn off virtual switch 1
scene turn on virtual switch 2
scene turn off virtual switch 2

Take note each scene ID to put them in the arduino code

So you will have live state of the 2 input.

If you also want to have only one trigger scene when phone ring (prowl notification, pause T.V) there a work around (Thanks to Futtzle):

use the Countdown Timer plugin (from apps.mios.com). Give it a duration of 60 seconds, and tie the Arduino scene to the timer’s “Start” button. Tie the notification to the timer’s event “Timer starts while not muted”. Then any further events in the first minute will not trigger your notification.

For the relay,

Create 4 virtual switch and 4 scene, on every scene put trigger on the (on and off) off the virtual switch and add luup code:
luup.inet.wget(“http://IP OF ARDUINO /?1”)
return true

1=relay1 on
2=relay1 off
3=relay2 on
4=relay2 off
5=relay3 off
6=relay3 off
7=relay4 on
8=relay4 off

It’s alive ! Thanks to mic. I’ve been on this for close to a month now and finally have a way to interface my alarm panel and anything else that comes up thanks agin mic I’m sure I’ll come up with some crazy ideas for this soon, I’ll post them here also shoot me an email if you ever need any security parts I’ve got a ton of stuff layin arround I think I’ve even got one or two of those wirelss quick bridges in my shop I’ll send you one if you wanna pay to ship it, those will communicate with almost any ge wireless devices I think. Thanks agin

@Mic,
Thanks for uploading your lastest code. It really helps to start with something that works from the beginning. Please keep up the great work on this and also let us know about any more improvements that you may make in the future.
This opens the door for connecting a lot of different sensors, switches, ect. to our Vera’s !
Thanks again for the great work…

Thanks guy. with the ability of interfacing the arduino with the vera open up a lot of possibility, next step for me will probably be a rain detector and water detector for my sub pump. If you have any idea that come up, please let me know.

For the diy version the arduino digital pins are sensitive enough to sense water for input but if you want to avoid the earth ground contact you can add an elk 912 sensitive relay and use the water as a trigger and the form c relay to trigger the arduino and then Vera for the professional install I use the winland water bug they work great can be a bit pricey though http://www.winland.com/waterbugalert.html

Thanks for the reply Ruetech,
has a DIY lover, i will try the hard way, but cheap way, don’t have a lot of time now but as soon as i will come with something, i wil post it.

Mic

Hey Ruetech,
The door sensor for z-wave is so expensive, i’ve check for the ge solution like you say and the sensor is much less expensive. Do you think that it could be a good solution to monitor about 6 door? If so and you’re willing to sell me one (the bridge unit), let me know i will give you my email.

Thanks

Like this deal

http://www.smarthome.com/59482/GE-45131-Choice-Alert-Window-Door-Sensor/p.aspx

http://www.smarthome.com/7358/Hidden-Mount-Long-Round-Magnetic-Contact-Switch-Normally-Closed/p.aspx

I’d use this one if you can get wire to the doors I’ve seen contacts like these that were 10 to 15 years old and still working. Plus you can’t beat three bucks a piece and they will wire direct to arduino I’m a least amount of parts as possible kinda guy so maybe mix it up hard wire some go wireless with others as far as the quick bridge ill have to find it but I’m sure I have a few ill test them out and if I have one that works well ill just send it to you if you pay to ship my email is in my profile if you want to talk direct