Subscribe to Events

I wrote driver for a RTI XP processor to control the Vera. Currently it polls the Vera to get status updates. I searched the forum and wiki’s for an example on how to subscribe to events but have found a sample. I would much rather have it get eventing vs. polling.

Any one here know how and to and willing to share?

Thanks,
Shakey

You have to rely on polling the Vera data. Vera does not have a way to push updates / changes.

  • Garrett

For reference, what Garrett is talking about it handled in this document:
http://wiki.micasaverde.com/index.php/UI_Simple

The other alternative, but it would be a LOT of work, would be to write something custom on Vera that “pushes” data to your device based upon the specific changes that you’re interested in, and the vendor-specific push protocol that the RTI XP requires.

This code would then have to use [tt]luup.variable_watch[/tt] to [internally] subscribe to the stuff of interest so that Vera would “notify” your Luup code when those items change.

The problem here is that, for a large system, you’re potentially subscribing to a LOT of changes… this has never really been tested @scale, so you’d be completely pioneering a new route.

Thanks.

I thought I read somewhere you could subscribe to events. I wish the Vera documentation was better organized and had a true “SDK”. Polling is working just wanted to be able to get events as they happened like I can on the UDI ISY.

Shakey

The events you are referring to are I believe the notification events. Not status change events.

  • Garrett