SSH monitoring of Vera events

I have a VeraLite that I use for controlling lighting, heating and motion sensors, which is working well. However, I am increasingly using Python and I would like to run it on a RaspberryPi as an alternative control unit that could interact with some other automation processes that I use Python for (such as backing up mobile phones, monitoring broadband speeds, downloading media, etc.).

So far, the approach I have been using is to send http requests to Vera for actions such as switching on lights and changing thermostat setpoints, but I would also like to respond instantly to events such as a motion sensor being tripped. One way I thought of for doing this would be to SSH onto the VeraLite and parse the logs, although this seems a fairly inelegant and inextensible way of doing it. I have looked into the Vera Alerts plugin, but it looks like an uneccessary layer of complexity and doesn’t seem to offer the flexibility and straightforward access to device variables that I would like.

So, can anyone suggest where I should start looking for the device data that I need (state changes, variables, etc.) within the VeraLite directory structure and/or whether SSH would be the best way of going about this?

Have a look here:

http://wiki.micasaverde.com/index.php/UI_Notes

And here:

http://wiki.micasaverde.com/index.php/UI_Simple

These pages will explain on how to get the status and configuration of Vera. It also tells you how to use the timeout and minimumdelay parameters that will hold onto the connection for a max of n (timeout) and wait a minimum of n for changes to happen. In other words the timeout will be set to hold onto the connection for say 60 seconds unless a change happens, it will than proceed to return the data. If minimumdelay is set, it will wait for n seconds after a change happens. This allows for any other changes to finish up before returning the data.

  • Garrett

That’s great, many thanks Garrett.

I can log on using this or the direct IP version… and see the log in real time. but I only seems to start at a certain time. How would I go back and see an event that happened earlier in the day or night?

In the same directly you may find some older logs with similar names. The ones that end in .gz are compressed and will need to be decompressed (7zip or gzip) to be readable.

If those logs don’t go back far enough in time then they are gone. Vera rotates these logs to avoid filling up the file system. If you log to a USB stick then you will have more space for more history.

In the same directly you may find some older logs with similar names. The ones that end in .gz are compressed and will need to be decompressed (7zip or gzip) to be readable.

If those logs don’t go back far enough in time then they are gone. Vera rotates these logs to avoid filling up the file system. If you log to a USB stick then you will have more space for more history.[/quote]

OK… thanks! I just installed infoviewer… any tips on which log I’d look for there? wayyyyy easier!

I don’t believe that the Info Viewer plugin can see these zipped older logs.