Messages from binary switch (CA-3000)

Hi All,
Still new to this; please excuse the naive question.
I have some Intermatic CA-3000 switches. Do these devices send a message to Vera when on or off is pressed even if the light is already in that state? In other words, can I write code that can respond to a light-on message and check a variable to see if it is already on, and choose to do something special in that case?

The CA-3000 does not support instant status updates. Vera needs to poll the switch to get the proper status. Another user in the forum said they see data being passed to Vera when the switch is manually controlled but it appears that Vera does not process these messages.

  • Garrett

Does that mean that even in (plugin) code I would not have access to these messages, or just that the Vera UI doesn’t see them by default? Do you know if these messages are sent even if the device is already in the associated state?

Vera as a whole ignores these messages. So if you use the switch manually, you will need to wait for Vera to poll the switch to get the correct status. This can take a few minutes or more depending on how many zwave devices are on your network. You can get the status from Vera, but it may not be upto date.

  • Garrett

Right; it appears that the Z-Wave message that may indicate something about the state of the CA3000, is being discarded, so the internal status and consequently the GUI are not updated. This may have to do with the device being represented as a switch (I presume), but also acting as a sort of scene controller (rather than being either a switch or a scene controller).

Searching further on this, it seems a bug has been reported:

[quote=“hugheaves, post:115, topic:171262”][…] Vera doesn’t actually do anything with the received data. My Vera receives the data from the switch as soon as it’s turned on or off (i.e. without polling), but still doesn’t update the Vera device status. I filed a bug report here:

http://bugs.mios.com/view.php?id=2346[/quote]

So, if I understand correctly, Vera is seeing a message that it reports in the log, but there is no way for plugin code to poll for that message being recieved; is that right?

Right.

OK, again, please forgive my level of ignorance here. I thought I had understood that Vera was intended to be generically extensible with plugins which can support any usb dongle that exposes itself as a serial port. If this is true, then I assume it must give plugins access to any and all messages (raw data bytes) that come in the serial port. I had also assumed that internally the Z-Wave controller in the Vera just looks like another serial device - and therefore any message coming in would be accessible. Is it that MiOS has exclusive access to the main Z-Wave controller so we can only get at the data that has been pre-parsed by the OS? If you plugged another Z-Wave controller into the USB port (not setting it up as the one Vera normally uses), could a plugin get at all data that comes into that one? What am I missing? (Well, I know I’m missing a lot, but let’s limit the scope here :slight_smile: )

The zwave controller since it is serial, Vera is connected to it and serial devices can only have one connection to it. So your theory is correct that Vera is tied to the zwave controller. An forum user was working on a program that allowed him to read the zwave data coming in by being the man in the middle of the connection. You can plug in another zwave stick, but you would need to figure out how to read the data coming in from the zwave stick and also it would only allow those devices paired to the stick to work. In other words, it will be a pain in the rear.

  • Garrett

Understood that it would be a PITA. My questions are mostly theoretical. I’m just trying to understand the organization and limitations of the system. I don’t really want to write my own low level Z-wave protocol parser. However it might have been nice if the serial driver was multi-client; in the case of the ignored CA-3000 message it would have perhaps been possible to scan for a particular byte sequence from the serial port and create an event from that.

Thanks for fielding my questions. I admit I haven’t really looked at lua or luup yet other than glancing at some code snippets in forum messages. I want to get a handle on what is and isn’t possible before I decide to commit time to that effort.