Visualizing smart home data using Veraplus + Telegraf + InfluxDB + Granafa + Raspberry PI

Visualizing smart home data using Veraplus + Telegraf + InfluxDB + Granafa + Raspberry PI

I am using a Veraplus to control everything in my house through mobile and Alexa. Here are a few examples:

1. Smart devices:

2. Siri:

3. Android tablet:

Although Vera has two plugins (DataMines and Datayours) that could be used to visualize Vera logs, it requires a lot of memory and storage. As a result, I try to find another solution that does not play a heavy burden on my Veraplus which already has a few hundred devices and ten plugins or more. Here is my approach that seems to work well.


1. A Veraplus from Vera Control. You can learn more about Veraplus from their forum:

2. A Raspberry Pi (

3. Telegraf

4. InfluxDB

5. Grafana

Step 1: Install Influx DB + Telegraf + Granafa on a Raspberry Pi from this link

Step 2: Mount Vera log folder to a shared folder in the Raspberry.

  •  Disable USB logging in Vera
  •  Mount to a shared folder in Raspberry:
    • sudo mkdir /pi
    • mount -t cifs -o user=<username>,pass=<password> //<raspberry pi ip>/<share> /pi
  • Make sure the mount is still valid after a Vera reboot
    • sudo vi /etc/rc.local
    • Add these lines to the top
    • mount -t cifs -o user=<username>,password=<password> //raspberry IP/<share> /pi &ln -s /pi /tmp/log

      ln -s /pi/cmh /tmp/log/cmh

Step 3: after step 2, Vera will write logs to a shared folder in the Raspberry PI. Next, we will use telegraf collect data to influx DB.

  • sudo pico /etc/telegraf/telegraf.conf
  • Make telegraf.conf input and output look like this:
    • [[inputs.logparser]]
      ## files to tail.
      files = [“<raspberrypiIP>/<sharefolder>/cmh/LuaUPnP.log”]
      ## Read file from beginning.
      from_beginning = false
      ## Override the default measurement name, which would be “logparser_grok”name_override = “powerusage”
      ## For parsing logstash-style “grok” patterns:
      patterns = [‘(.*) device: 364 (.*)KWH([^R])(.*)was: %{BASE10NUM:previouskwh:float} now: %{BASE10NUM:currentkwh:float}(.*)’]
    • [[outputs.influxdb]]
      ## The full HTTP or UDP endpoint URL for your InfluxDB instance.
      urls = [“http://<raspberrypiIP>:8086”] # required
      ## The target database for metrics (telegraf will create it if not exists).
      database = “powerusage” # required
      ## Write timeout (for the InfluxDB client), formatted as a string.
      timeout = “5s”
  • Telegraf will parse (tail) the log LuaUPnP.log with the regular expression and put the data in InfluxDB (database: powerusage).
  • (.*) device: 364 (.*)KWH([^R])(.*)was: %{BASE10NUM:previouskwh:float} now: %{BASE10NUM:currentkwh:float}(.*)
    • 364 is my home energy monitorying device ID
    • REGEX reads two values: currentkwh and previouskwh

Step 4: after storing all the values from the logs in InfluxDB, we can use Grafana to visualize the value. Here are some examples in my case.

  • Power today:

  • Water usage today

  • House temperature

  • House humidity

  • House motions & doors


Leave a Reply

Your email address will not be published. Required fields are marked *