Alternative Web Interface (/w Websockets & long-poll Ajax through Socket.io.js)

I put together an example of a Perl client program that also hosts a webpage that can control the Vera.

This is useful if you want to have custom web control of Vera with real time updating.

Basically the Perl program is comprised of:

  1. A vera client running on the AnyEvent event driven framework
  2. Webserver running on PSGI/Plack using:
  • Dancer Micro web framework
  • Pocket.io (Perl port of socket.io.js) for Websocket / long-poll Ajax updates

It is extendable to control other devices besides Vera.

You can tell from the attached screenshot that my web gui skills are bit limited, but all the layout is done in CSS so it can be changed easily. I trimmed down the devices to only show one of each type. Note that the Denon receiver shown is not actually a device on Vera, my code interfaces with it directly and support for it is not complete.

Right now the device support even for Vera devices is a bit limited, I only support Binary and Dimmable Lights and Security Sensors. However, the controls for those should work 100%.

You can find the code here:

Just saw your post… very cool. I’m looking to build something similar, only Python is my poison of choice. You mentioned “vera client”… is there a specific API that you are subscribing too?

I have a python client you can use here:

Probably needs some tweaking but it is a start.

Really nice radarengineer!