update sensor tripped from http

Hello all,

I’m very new to Vera and lua scripting… What I would like to do is update a virtual sensor via an http call. Let me explain,

I have in my garage an older Fonera 2100. It controls my garage door via one of the GPIO pins. I do this with a simple cgi/bash script to toggle a relay.

What I want/need to do is have a status of the door. I was thinking some kind of simple switch connected to another GPIO, that when the door is closed the switch is closed. I would read the state of the switch via cron every minute, then update vera with an http call. I’m okay with fonera side of things, but how would I go about making a virtual sensor that I can update via http?

I’ve seen the virtual binary device, and I think that is probably what I should use, but I’m not too sure how to install it.

Thanks for you help!

Alright, so I think I’ve got it worked out. I found a “Binary Switch” from 325xi. I can use that as the state of the garage, and update it with

http://ipaddress:3480/data_request?id=lu_action&output_format=xml&DeviceNum=28&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0

That should do it!!

why don’t you just use a z-wave window sensor? http://forum.micasaverde.com/index.php?topic=5106.30

Well, mainly because I’m cheap! ;D

Plus I already have the fonera there that has some I/O to it. I was just a matter of working out the virtual switch…