Building a Indigo dashboard in Grafana - mlamoure/indigo-grafana-dashboard GitHub Wiki
The most interesting panels in Grafana for home automation are:
- Discrete Panels
- Graph Panels
- Singlestat Panels
Common states used in Indigo
The plugin contains several default states so that someone can easily get started. For most, this will result in a minimal set of data being logged to InfluxDB. This should be enough to get some interesting graphs started, assuming you use a few standard Insteon, Z-Wave and Indigo variables.
Note: when the plugin is first installed, it will remove any of the states that you do not have in your devices. This is for efficiency so that the plugin does not waste any time looking for those states in your devices. If your plugin config has a few of these missing, it just means that you don't have these states in your own devices.
- state.onOffState - For any light or switch device, this would be the on or off state. True means the light or switch is On.
- model - The model of the device. Can be useful in filtering devices via WHERE clause.
- subModel - Same as model.
- deviceTypeId - Same as model.
- state.hvac_state - For thermostats, this will contain the heating or cooling state of the HVAC.
- onState - Similar to state.OnOffSate, depending on device type.
- energyCurLevel - For any smart device that meters the energy level, this is the current utilization of the energy consumption.
- energyAccumTotal - Cumulative energy amount since last reset.
- value.num - The value of a variable.
- sensorValue - The value of a device sensor, such as a temperature monitor.
- coolSetpoint - For thermostats, this is the set point for the HVAC cooling.
- heatSetpoint - For thermostats, this is the set point for the HVAC heating.
- batteryLevel - Battery level of the device.
- batteryLevel.num - Battery level of the device.
Discrete Panels
What it does: This panel shows discrete values in a horizontal graph. As for anything in Grafana, the date range dictates the range of data that is charted. For Discrete Panels, this means the left to right covers the time range.
Good for: Discrete panels show state transitions clearly, very nice for motion sensors, weather conditions, lights, or presence values.
Bad for: Numeric values like temperature
Example Discrete panel metrics for InfluxDB / Indigo
Single variable metric example
Multiple device metric example
In this example, the indigo setup has motion sensors that are all commonly have the word "Motion" in them, such as "Living room motion sensor". To show the transitions between active and inactive (motion and no motion), we can do a query that will pull all devices with "Motion" in the name. However, if we have devices that match that pattern that we don't want to be included, we can add conditions to exclude them.
The query notion for Influx to match a pattern is:
field =~ /pattern/
For more information, see "Regex matching" here.
Result:
Value mapping for Discrete panels
Discrete panels often require value mapping to make sense. Here is an example:
Graph panels
Single temperature graph example
Result