PLUGIN: VeraFlux - Send Device Data to InfluxDB

---- CURRENT STATUS: BETA / This ones for the homelabbers and experimenters ----

Hi All,

To use this plugin you’ll need a working local InfluxDB instance and a database created with appropriate retention policy. Default name is “vera”.

Copy the Plugin files to Apps->Develop Apps->Luup Files. Then create a device using device file D_VeraFlux1.xml and implementation file I_VeraFlux1.xml then reload Luup.

Use the Settings menu in the device to set the IP, Port and other stuff for the plugin to use.

It currently pulls in data from Vera itself and these services.

servicesTable['urn:micasaverde-com:serviceId:HaDevice1'] = {}
servicesTable['urn:micasaverde-com:serviceId:ZWaveDevice1'] = {}
servicesTable['urn:upnp-org:serviceId:SwitchPower1'] = {}
servicesTable['urn:upnp-org:serviceId:Dimming1'] = {}
servicesTable['urn:micasaverde-com:serviceId:DoorLock1'] = {}
servicesTable['urn:upnp-org:serviceId:TemperatureSetpoint1'] = {}
servicesTable['urn:upnp-org:serviceId:TemperatureSensor1'] = {}
servicesTable['urn:upnp-org:serviceId:TemperatureSetpoint1_Heat'] = {}
servicesTable['urn:upnp-org:serviceId:TemperatureSetpoint1_Cool'] = {}
servicesTable['urn:micasaverde-com:serviceId:GenericSensor1'] = {}
servicesTable['urn:micasaverde-com:serviceId:LightSensor1'] = {}
servicesTable['urn:micasaverde-com:serviceId:HumiditySensor1'] = {}
servicesTable['urn:micasaverde-com:serviceId:EnergyMetering1'] = {}
servicesTable['urn:micasaverde-com:serviceId:WaterMetering1'] = {}
servicesTable['urn:cd-jackson-com:serviceId:SystemMonitor'] = {}
servicesTable['urn:micasaverde-com:serviceId:SecuritySensor1'] = {}
servicesTable['urn:upnp-org:serviceId:IPhoneLocator1'] = {}

Known limitations in current beta:

  • http only
  • Username/Password for InfluxDB don’t do anything yet.
    - UI Buttons for Info/Debug logging and Enable/Disable don’t work due to a serviceID error. But you can change the variables manually and the buttons reflect the status. Icon also greys out when disabled. – Fixed in 0.2, a very big thank you to @akbooer for his help identifying the problem.
  • Only way to change what Services/Values get logged to Influx is by editing the implementation file.
  • Logs contain cheesy references to Back to the Future.

Future:

-Add watch capability for status variables (switch, sensor etc) so they are reported immediately to Influx rather than on the polling loop. (Implemented 6/6/18)

Download the Plugin Files from Github: https://github.com/livehouse-automation/veraflux

And for those that like voiding warranties and time series data. I wrote this blog about installing collectd on Vera to send OS performance metrics straight to Influx:

https://www.livehouseautomation.com.au/blogs/news/vera-performance-dashboard-using-collectd-and-grafana

Updated the download to v0.2 which fixes the UI buttons.

Special thanks to @akbooer for identifying the error in my S_VeraFlux1.xml file. He’s truly a man of :wink:

I owe you another one.

Updated the plugin to have variable watch capabilities for certain devices/variables so that changes are sent immediately to InfluxDB, rather than waiting for the polling period.

SecuritySensor1
IPhoneLocator1
DoorLock1
SwitchPower1

Also fixed the debug logging so that works properly now.

Latest version is available on GitHub - https://github.com/livehouse-automation/veraflux

Plugin is working pretty well now in terms of logging data to Influx. After a bit of heavy development (adding bugs) and testing (removing bugs) I’d describe it as pretty stable.

Now it’s Grafana Time - all of these are based on data from Vera.

Great. Thanks. This is what I am looking for. I will install VeraFlux and let you know if I have any problems.

Hi,

I am having dificilties in running the collectd on Vera. I have install it but it seems that data are not sent towards Infludb.
Any chances for hints?

[quote=“halo, post:6, topic:199197”]Hi,

I am having dificilties in running the collectd on Vera. I have install it but it seems that data are not sent towards Infludb.
Any chances for hints?[/quote]

Happy to try and help you troubleshoot - will need a lot more info about what you’ve got set up so far, what components you’ve been able to validate as working, config etc before I can give you anything specific.

Hi. I have installed and configured Veraflux, Influxdb and Grafana and I see Data are sent. But how can I select a variable in a concrete device to plot it in Grafana?

Concrete device? Or was that an autocorrect for certain device?

This is an example of how to show a temperature sensor value in Grafana.

Thanks BlueSmurf
That´s what I needed. Gafana is working fine and ploting my sensors info.

Hi,
Does the plugin transmit stats/metrics from the Vera (plus) device itself ?? (eg. CPU / MEM / …) because I can’t seem to find them. without the collectd thing installed I mean.

I read in the description : It currently pulls in data from Vera itself and these services.

Also, my list is a bit smaller, when working on a dash-board I can’t see in the dropdown-list items like ZWaveDevice1 , SystemMonitor etc,etc.

servicesTable['urn:micasaverde-com:serviceId:HaDevice1'] = {}
servicesTable['urn:micasaverde-com:serviceId:ZWaveDevice1'] = {}
servicesTable['urn:upnp-org:serviceId:SwitchPower1'] = {}
servicesTable['urn:upnp-org:serviceId:Dimming1'] = {}
servicesTable['urn:micasaverde-com:serviceId:DoorLock1'] = {}
servicesTable['urn:upnp-org:serviceId:TemperatureSetpoint1'] = {}
servicesTable['urn:upnp-org:serviceId:TemperatureSensor1'] = {}
servicesTable['urn:upnp-org:serviceId:TemperatureSetpoint1_Heat'] = {}
servicesTable['urn:upnp-org:serviceId:TemperatureSetpoint1_Cool'] = {}
servicesTable['urn:micasaverde-com:serviceId:GenericSensor1'] = {}
servicesTable['urn:micasaverde-com:serviceId:LightSensor1'] = {}
servicesTable['urn:micasaverde-com:serviceId:HumiditySensor1'] = {}
servicesTable['urn:micasaverde-com:serviceId:EnergyMetering1'] = {}
servicesTable['urn:micasaverde-com:serviceId:WaterMetering1'] = {}
servicesTable['urn:cd-jackson-com:serviceId:SystemMonitor'] = {}
servicesTable['urn:micasaverde-com:serviceId:SecuritySensor1'] = {}
servicesTable['urn:upnp-org:serviceId:IPhoneLocator1'] = {}

For the rest it works well!

Install the System Monitor plugin and it pulls data from there for CPU/MEM

urn:cd-jackson-com:serviceId:SystemMonitor - is the service ID.

{“memoryFree”, “memoryTotal”, “memoryUsed”, “memoryAvailable”, “cpuLoad1”, “cpuLoad5”, “cpuLoad15”, “systemLuupRestartUnix”, “systemVeraRestartUnix”, “cmhLastRebootUnix”, “uptimeTotal”}

Are the values it’s looking at.

You’ll only see drop downs in Grafana if something has actually been logged for a particular service or field. Some of them like ZWaveDevice1 only watches a single value and I’m not sure it actually gets used. Health: A rating from 0-5. A large number means that MiOS can communicate with it easily.

It was included originally because the definition indicated it might be of interest on a device dashboard.

1 Like

Thanks. works like a charm.