Newbie Programming Question

I have very little programming experience. I’ve got another automation controller from Elan Systems. I want to pass some commands back and forth between controllers(mostly just for my kwikset locks) I can either send or receive RS232 or HTTP strings back and forth. Is there a simple single line code that can be used to lock or unlock my locks? I tried searching the forums but couldn’t find what I’m looking for.
Thanks,
-Shane

[tt]http://wiki.micasaverde.com/index.php/Luup_Requests#action
http://wiki.micasaverde.com/index.php/Luup_UPNP_Files#DoorLock1[/tt]

Service for door locks: [tt]urn:micasaverde-com:serviceId:DoorLock1[/tt]
Action for door locks: [tt]SetTarget[/tt]

@lshanepowers,

Welcome!

Also take a look here.

Thanks guys. That helped a lot. Great to have joined such an active community. I’m able to do it now from a web browser. Now I need to find out how to properly send it from my other controller.
Much appreciated.
Shane

So I got that to work now( I found a bug in their code that initially prevented me from sending the commands but it is fixed now-gotta love how fast I can get bug fixes from them, a major reason why I do business with them). Now I want to get some commands sent to my other controller to update me on status. The commands need to be simple 1 line commands for it to recognize. Is there a way to do that with a Lua script or something to send a command when the status of a lock changes? Eventually I may do it for other zwave devices also.
Thanks,
-Shane

If you want to programmatically watch for value-changes, in arbitrary Devices, you can use [tt]luup.variable_watch[/tt] . You’ll find a bunch of references to it by searching on “[tt]luup.variable_watch[/tt]” directly in the Forums, or the equivalent http://wiki.micasaverde.com page.

It’ll let you subscribe to the value changes, and be called back as an event.

Ok, I think it may work better from my other automation controller to poll for status. My lock is device #5 and this is the link that I’ve been using.

http://192.168.0.3:3480/data_request?id=lu_action&DeviceNum=5&serviceId=urn:micasaverde-com:serviceId:HaDevice1&action=Poll

The problem is that is returns the same data whether it is locked or not. The only change is in the jobid.

<u:PollResponse xmlns:u=“urn:schemas-micasaverde-com:service:HaDevice:1”>
67
</u:PollResponse>

Am I missing something?

Thanks,
Shane

[tt]http://192.168.0.3:3480/data_request?id=lu_variableget&DeviceNum=5&serviceId=urn:micasaverde-com:serviceId:DoorLock1&Variable=Status[/tt]

Thanks, that helped a lot. How reliable should this command be? I only get a response from the automation controller I’m sending it from every third try. The response comes back on the third try every single time. Does that make sense to anyone? It may be on my other controller side, but it doesn’t show any bytes coming in on that port at all except for the third time.
Also, does this put any load on Vera2 polling it every 10 seconds or so? It doesn’t poll the lock right, only the controller?
Thanks again,
-Shane

How would I implement a similar command but via RS232 instead of http? I know I’d have to use a usb to serial, just not sure how to do the commands this way. The controller that I’m polling from isn’t very reliable using http commands. A generic driver that they have wasn’t designed to work with http, really just rs232. One of their developers told me they were surprised that the http commands worked at all.

AFAIK you would have to write a Luup plugin.

I was afraid of that. My programming skill are very limited.