I’m progressing a small project to integrate a VeraLite device and Z-Wave support into my hybrid technology home automation system I’m not allowed to post a link to my web page describing it
Can someone tell me if the Vera will support socket level communication, e.g. could I put the following code in the Luup tab for a scene and expect it to work?
There’s no facility to close a socket, or to bind to a port, as far as I can tell.
If you do work out how to do anything more, please post some details here.
A workaround for what you want to do is to write a device for Vera that opens the socket; then there are various ways you could send the device the data you want to transmit from inside some scene code. But that will hold the port open on your remote device even when you’re not sending data.
Luasocket is installed, so your code might work as-is. The issue is more to do with blocking. If you put that code inside a Luup plugin then it may block more than just your plugin.
The best thing to do is try it and see. If it does affect stability, then you can fall back to autotoronto’s solution.
Thanks for the responses guys. This stuff is all new to me. My VeraLite arrived 2 days ago and up till then my knowledge of Z-Wave, Lua and Luup was non-existent. It’s a shame I’m not allowed to link to the project on my web site. I’ve spent this evening getting my plan B working successfully, which is to use this code in the Luup tab:
This calls some PHP code on my home automation server, which then passes the command using socket level comms to the main HCS process. It’s a bit of a circuitous route but it does work
All I really want is a way for Z-wave sensors to trigger a scene and the new status to be sent to my HCS process, which is where all the intelligence sits in my hybrid technology system. I can also do the reverse by invoking scenes using the VeraLite web interface.
I’ll now have another try with getting the VeraLite to do socket layer comms directly as this would be tidier and more efficient.
All I really want is a way for Z-wave sensors to trigger a scene and the new status to be sent to my HCS process, which is where all the intelligence sits in my hybrid technology system. I can also do the reverse by invoking scenes using the VeraLite web interface.
You might not be aware (shoot me if you are) that basically Vera exposes [i]everything[/i] via a web interface available on port 3480? For some info see http://wiki.micasaverde.com/index.php/UI_Notes#The_HTTP_interface
Also it broadcasts all your zwave devices as UPnP endpoints?
To test UPnP calls you can use the Intel Device Spy utility available [url=http://www.intel.com/cd/ids/developer/asmo-na/eng/downloads/upnp/tools/218896.htm?desturl=http://softwarecommunity.intel.com/isn/downloads/zips/IntelToolsForUPnPTechnology_v2.zip]here.[/url] It should pick up Vera, show you all the devices, like light switches, thermostats, etc., let you expand the services and see the actions and variables. Click an action, like SetTarget, to specify the arguments and click 'Invoke' to run the action, such as turning on and off the light.
Just some other ways to interface to Vera, in case you didn’t know of them.