Mi Casa Verde VeraLite Home Controller

Breaking news: It is April 1, 2024 and my Vera Lite stopped functioning. I suppose it could be an April fools prank, but since I need it working, I'm swapping in the backup I bought years ago. I installed the original in 2009, so it only took 15 years for the old one to die. Looks like the network interface is broken, because it still worked well enough for me to use the buttons to remove all my switches and things from the old Vera so I could add them to the new Vera. Took a few hours to get everything working on the new controller, but it all seems back to normal now. Seems like Vera Lite controllers are pretty rare these days. Hopefully the backup will last another 15 years.

My latest toy is this VeraLite home controller for talking Z-Wave to a large range of outrageously expensive Z-Wave devices (switches, dimmers, etc). At the moment I just have a couple of these on/off switches for testing.

It is hard to tell from the picture, but it is a cute little thing about 5 by 4 inches.

The main thing I wanted to be able to do was control this stuff from the linux command line or in scripts. It has a fancy web interface that runs on the controller, and remote interface that connects to a http://www.micasaverde.com/ server for controlling it from anywhere via web or a phone app. (For the paranoid, the central server connection is optional and you can use it stand alone, but the server is free of charge - no subscription required).

Obviously, trying to automate access to a complicated web interface is not the ideal way to control this from scripts, but fortunately, you can send it complicated looking URL requests on port 3480, and make it do things like turn switches on or off, query status, etc. The only difficuly here is in decrypting the documentation in order to figure out how to actually manage to do that :-).

I got started via this forum query, where the helpful folks on the forum pointed me to most of the information below, and eventually I managed to get enough info through my head to make things work.

You can get an idea of what the silly URLs look like from the Luup Requests wiki page, and you can discover what sort of arguments you can use in these requests in the Luup UPnP Variables and Actions wiki page, but at some point, you want to find out the details of your specific devices and how to control them. The first step is probably to run a request to get the status of all the devices by pointing your web browser at a URL such as http://ip_address:3480/data_request?id=status&output_format=xml (replacing ip_address with the address or name of your vera controller). That will dump a slew of confusing junk, but bits of it are useful for constructing the URLs you need to control things. For instance here is the status for the switch device I connected to a desk lamp for testing:

<device id="4" status="-1">
   <states>
      <state id="63" service="urn:upnp-org:serviceId:SwitchPower1" variable="Status" value="0"/>
      <state id="64" service="urn:upnp-org:serviceId:SwitchPower1" variable="Target" value="0"/>
      <state id="65" service="urn:micasaverde-com:serviceId:HaDevice1" variable="Configured" value="1"/>
      <state id="66" service="urn:micasaverde-com:serviceId:HaDevice1" variable="LastUpdate" value="1372272841"/>
      <state id="67" service="urn:micasaverde-com:serviceId:HaDevice1" variable="FirstConfigured" value="1372272841"/>
      <state id="68" service="urn:micasaverde-com:serviceId:HaDevice1" variable="CommFailure" value="0"/>
      <state id="69" service="urn:micasaverde-com:serviceId:ZWaveDevice1" variable="Capabilities" value="210,156,0,4,16,1,L,R,B,RS,|37,39,114,115,117,119,134,"/>
      <state id="70" service="urn:micasaverde-com:serviceId:ZWaveDevice1" variable="ManufacturerInfo" value="99,21072,12592"/>
      <state id="71" service="urn:micasaverde-com:serviceId:ZWaveDevice1" variable="VersionInfo" value="6,2,64,1,16"/>
      <state id="72" service="urn:micasaverde-com:serviceId:ZWaveDevice1" variable="NodeInfo" value="25,27,72,73,75,77,86,"/>
      <state id="73" service="urn:micasaverde-com:serviceId:ZWaveDevice1" variable="InitialName" value="Outdoor Switch"/>
      <state id="74" service="urn:micasaverde-com:serviceId:ZWaveDevice1" variable="ConfiguredName" value="Desk Lamp"/>
      <state id="75" service="urn:micasaverde-com:serviceId:ZWaveDevice1" variable="PollSettings" value="60"/>
      <state id="76" service="urn:micasaverde-com:serviceId:ZWaveDevice1" variable="Neighbors" value="1,"/>
      <state id="77" service="urn:micasaverde-com:serviceId:ZWaveDevice1" variable="LastReset" value="0"/>
      <state id="78" service="urn:micasaverde-com:serviceId:ZWaveDevice1" variable="AssociationNum" value="0"/>
      <state id="79" service="urn:micasaverde-com:serviceId:ZWaveDevice1" variable="PollOk" value="73"/>
      <state id="80" service="urn:micasaverde-com:serviceId:ZWaveDevice1" variable="LastRouteUpdate" value="1372272956"/>
      <state id="81" service="urn:micasaverde-com:serviceId:ZWaveDevice1" variable="PollNoReply" value="1"/>
   </states>
   <Jobs/>
   <tooltip display="0"/>
</device>

The ConfiguredName attribute is indeed Desk Lamp (which I set in the web interface when I added the device), so I can tell this is the device I want when composing a URL to control the light.

The service attribute urn:upnp-org:serviceId:SwitchPower1 appears in here as well, and that matches one of the actions described in the Luup UPnP Variables and Actions wiki page, so I know I can use that in the URL to control the device.

And up front, it says the id is 4, so that is the device number to put in the URL.

The end result is this bash script to turn the light on:

#!/bin/bash
#
curl 'http://vera.my.lan:3480/data_request?id=action&output_format=xml&DeviceNum=4&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1'

And this near identical one to turn it off:

#!/bin/bash
#
curl 'http://vera.my.lan:3480/data_request?id=action&output_format=xml&DeviceNum=4&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0'

So that's the current brain dump from a day of playing around with the VeraLite. No doubt the next thing to do is stimulate the economy by buying more Z-Wave devices :-).

I do have one of my switches controlling power to my TiVo which will apparently need rebooting frequently until Comcast rolls out updates which include new cable card firmware in Florida (at some unspecified future time no longer projected to be in July).

Page last modified Mon Apr 1 18:37:27 2024