Home - mlamoure/indigo-grafana-dashboard GitHub Wiki

What this plugin does

This plugin builds a time-series dashboard for Indigo (indigodomo.com) home automation software. It uses two components to make this happen: a time series database called InfluxDB, and a data visualization tool called Grafana.

This plugin includes both InfluxDB and Grafana within it. Previous plugins that worked to do this required steps for installation outside of Indigo. This plugin does not, thus simplifying the installation and management.

Both InfluxDB and Grafana are included within the plugin, nothing is installed outside of the plugin directory. The plugin config asks for a location to put the Influx and Grafana data only. This is so that your historical data and dashboards are not wiped during each plugin update.

Configuration

  1. Install the latest version of the plugin through the releases page:
  2. Configure the plugin, at a minimum supplying the Influx and Grafana Data directories.
  • InfluxDB Data Location: Influx is a time series database that will store your device log history so that it can be visualized in Grafana. Depending on the configuration of this plugin, InfluxDB may archive 2-3GB of data per year (or more), based on how many devices you choose to send to InfluxDB (configurable via the inclusion/exclusion plugin config dialog). See the wiki document for more information.

  • Grafana Data Location: Grafana does not store very much data. It will keep any customizations to your dashboard in this location and minimal logs.

  1. Once Influx and Grafana have sucessfully been started (review event log), browse to the Grafana URL as provided by the event log.
  2. Log into Grafana using the default login / password to grafana, which is: admin/admin. I recommend changing this now that you are logged in.
  3. Browse to the Data Sources and create a new Data Source
  • Name: Indigo
  • Type: InfluxDB
  • URL: http://localhost:8086. <- MAKE SURE YOU ACTUALLY TYPE THIS INTO THE FIELD. Grafana includes a default value that makes it seem like you already have the field completed. This is just an example, and you must put in your URL manually or your data soruce will not work.
  • Database: indigo (or whatever you changed it to in the advanced config)
  • User: indigo (or whatever you changed it to in the advanced config)
  • Password: indigo (or whatever you changed it to in the advanced config)
  • "Server" access mode is sugggested, but is up to your preference.

Example Dashboard

  1. On the left side of Grafana, select the "+" Icon, then select "Import"
  2. Copy the JSON code from this file to your clipboard, and paste it in to the "Or Paste JSON" box: JSON Dashboard
  3. Select the data source you set up in the initial configuration

Once you create your first dashboard using the example provided, you should see the panels but may not see much data if the Grafana Indigo plugin has not been running for long. Let the plugin begin to log more data and you will start to see your devices load on your dashboard.

Troubleshooting

  • If you receive a "bad gateway" error in your dashboard, check your data source. USe the "Test" button to see if Grafana is connecting to Influx correctly. Check your URL in particular, and read the note above about how the example value that Grafana places in the URL field is not a replacement for skipping putting in your URL.
  • Check the forums for others that have had the same issue: https://forums.indigodomo.com/viewforum.php?f=279

Migration of a previous instance of InfluxDB

To move your prior instance of Influx:

  1. Make a BACKUP
  2. Configure the plugin so that the data directory is properly configured, and that the database name, user, and password matches the database name of your external instance
  3. Verify that the InfluxDB Server is starting properly
  4. Stop the server by disabling the plugin
  5. Go to the data directory of your old server and copy the data, meta, and wal directories.
  6. Go to the data directory of your new server and delete the data, meta, and wal directories.
  7. Paste the data directory of the old server into the new server data directory and wait for the copy to complete.

Migration of a previous instance of Grafana

Stop your Grafana servers. Copy the grafana.db of your old instance to the data directory of the new instance.

Security

When using the built-in InfluxDB and Grafana servers, the plugin manages the configuration file for these servers.

  • InfluxDB: Influx does not support binding to the local machine, so the server is open on the network. The plugin does set the "auth-enabled" flag to true. An administrator account is created using the login / password supplied in the plugin configuration. HTTPS is not enabled.

  • Grafana: Like InfluxDB, Grafana is open to access outside of the local machine. The default admin account for Grafana is admin/admin. As the configuration instructions explain, you should change this once you log into your Grafana instance for the first time. These configuration changes are stored in your Grafana Data directory and should persist even if you upgrade the plugin.

Included dependencies

  • InfluxDB Server: 1.5.2
  • Grafana Server: 5.1.2
  • Influx Python Client: 5.0.0