Noob questions about plugin development

Hi all,

I don’t yet own a Vera device but I’m currently researching the Vera platform to see if it will meet my needs. I have some questions about creating my own interfaces to devices…

Background: I have a Rako lighting system and Honeywell Evohome heating system. As neither of these are currently supported natively by Vera, I intend to create software bridges to these two platforms that will expose REST-JSON (and also possibly a UPnP) interfaces. These software bridges will run on my RasPi or Windows server. I understand that I can then create ‘Luup plugins’ to interact with these devices.

Questions:

  1. Is it possible to develop your own Luup plugins as a normal user, i.e. without needed to register as a developer and get the developer hardware?

  2. How can I ensure the Vera system has up-to-date knowledge of my device status?
    Does Vera periodically poll custom Luup plugins to check for updated status, or would my software bridge need to call the Vera UPnP or web interface to notify Vera that the device has changed status?

  3. What control would I have over how custom Luup plugin devices are exposed in Vera’s Web and smartphone UIs?
    E.g. the Rako device would expose a number of lights (sub-devices), each with a dimminglevel property, and the Evohome device would expose a number of heating zones, each with a targetTemp and currentTemp property.
    Would I be able to link the individual lights and heating zones to appropriate controls in appropriate rooms in the smartphone/web GUI?

  4. Finally, can anyone provide a link to Luup example code for a two-way UPnP device interface (all the ones by Ap15e are no longer available).

Thanks

z.

Yes. Actually, there is no developer program.

2) How can I ensure the Vera system has up-to-date knowledge of my device status? Does Vera periodically poll custom Luup plugins to check for updated status, or would my software bridge need to call the Vera UPnP or web interface to notify Vera that the device has changed status?

Most plugins run a polling loop to check the external device every so often. The Philips Hue plugin does this, for instance, because it’s all that’s available on the Hue Bridge hardware. If your device is a proper UPnP device then you can write your plugin to send a UPnP SUBSCRIBE event to the device and get instant status notifications: see the Sonos and WeMo plugins for sample code. Alternatively, if you’ve got control over the code that you can run on the device, you can have it push HTTP (sort-of-RESTful) status updates to the Vera when the device state changes.

3) What control would I have over how custom Luup plugin devices are exposed in Vera's Web and smartphone UIs? E.g. the Rako device would expose a number of lights (sub-devices), each with a dimminglevel property, and the Evohome device would expose a number of heating zones, each with a targetTemp and currentTemp property. Would I be able to link the individual lights and heating zones to appropriate controls in appropriate rooms in the smartphone/web GUI?

Yes, all of that. You can make “parent devices” in the Vera that represent the external device, and which have each of the logical sub-functions as children. Since there are already Vera device types for dimmers and for thermostats, you can re-use those device types for the children, and you’ll automatically get control over the devices as if they were natively supported by Vera. They should also Just Work effortlessly from remote apps too.

4) Finally, can anyone provide a link to Luup example code for a two-way UPnP device interface (all the ones by Ap15e are no longer available).

WeMo plugin source code (GPL) and Sonos plugin source code (licence unknown). Because of a shortcoming in the Vera web server, you also need the UPnP Event Proxy (GPL) for proper subscription support.

Working examples are really the best way to learn how to make plugins. There is some updated documentation on the MCV wiki but winnowing it from the out of date stuff has been tricky.

I wasn’t expecting such a thorough and helpful reply so quickly. Thank you futzle. Superb. :smiley: