Page 1 of 1

Dashboard for thermostats

PostPosted: Sun Dec 02, 2018 3:09 pm
by siclark
Written for my 14 Heatmiser thermostats so wanted to use variables to pick and choose which to display, and also enable me to build one and get it to repeat for all chosen thermostats.
Displays temp, setpoint, heatison and preheat. heatison and preheat are 100% for on, 0 for off, and shown below the temperature graphs.

You need to create a variable first called Room which contains static list of your thermostat names. I also have heatmiser controlling towerl rail timers, so have an exclusion for those.

Attached is the variable settings, and example.

Grafana is awesome! Full marks to VTMikeL (and racarter for the Heatmiser plugin)

Code: Select all
{
  "aliasColors": {
    "Heat": "#bf1b00",
    "PreHeat": "#e0752d",
    "Temp": "#bf1b00"
  },
  "bars": false,
  "dashLength": 10,
  "dashes": false,
  "datasource": "Indigo",
  "fill": 1,
  "gridPos": {
    "h": 10,
    "w": 12,
    "x": 0,
    "y": 0
  },
  "id": 2,
  "legend": {
    "avg": false,
    "current": true,
    "max": false,
    "min": false,
    "show": true,
    "total": false,
    "values": true
  },
  "lines": true,
  "linewidth": 1,
  "links": [],
  "nullPointMode": "null",
  "percentage": false,
  "pointradius": 5,
  "points": false,
  "renderer": "flot",
  "repeat": "Room",
  "repeatDirection": "h",
  "seriesOverrides": [
    {
      "alias": "TwinsTRV - Valve",
      "yaxis": 2
    },
    {
      "alias": "TRV Valve",
      "yaxis": 2
    },
    {
      "alias": "PreHeat",
      "yaxis": 2
    },
    {
      "alias": "Heat",
      "yaxis": 2
    }
  ],
  "spaceLength": 10,
  "stack": false,
  "steppedLine": false,
  "targets": [
    {
      "alias": "Stat SP",
      "groupBy": [
        {
          "params": [
            "name"
          ],
          "type": "tag"
        }
      ],
      "hide": false,
      "measurement": "thermostat_changes",
      "orderByTime": "ASC",
      "policy": "default",
      "query": "SELECT \"state.temperatureInput1\" FROM \"thermostat_changes\" WHERE $timeFilter GROUP BY \"name\"\n",
      "rawQuery": false,
      "refId": "A",
      "resultFormat": "time_series",
      "select": [
        [
          {
            "params": [
              "heatSetpoint"
            ],
            "type": "field"
          }
        ]
      ],
      "tags": [
        {
          "key": "name",
          "operator": "=~",
          "value": "/$Room/"
        },
        {
          "condition": "AND",
          "key": "name",
          "operator": "!~",
          "value": "/Rail/"
        }
      ]
    },
    {
      "alias": "Temp",
      "groupBy": [
        {
          "params": [
            "name"
          ],
          "type": "tag"
        }
      ],
      "measurement": "thermostat_changes",
      "orderByTime": "ASC",
      "policy": "default",
      "refId": "D",
      "resultFormat": "time_series",
      "select": [
        [
          {
            "params": [
              "state.temperatureInput1"
            ],
            "type": "field"
          }
        ]
      ],
      "tags": [
        {
          "key": "name",
          "operator": "=~",
          "value": "/$Room/"
        },
        {
          "condition": "AND",
          "key": "name",
          "operator": "!~",
          "value": "/Rail/"
        }
      ]
    },
    {
      "alias": "PreHeat",
      "groupBy": [
        {
          "params": [
            "name"
          ],
          "type": "tag"
        }
      ],
      "measurement": "thermostat_changes",
      "orderByTime": "ASC",
      "policy": "default",
      "refId": "B",
      "resultFormat": "time_series",
      "select": [
        [
          {
            "params": [
              "state.preHeat.num"
            ],
            "type": "field"
          }
        ]
      ],
      "tags": [
        {
          "key": "name",
          "operator": "=~",
          "value": "/$Room/"
        },
        {
          "condition": "AND",
          "key": "name",
          "operator": "!~",
          "value": "/Rail/"
        }
      ]
    },
    {
      "alias": "Heat",
      "groupBy": [
        {
          "params": [
            "name"
          ],
          "type": "tag"
        }
      ],
      "measurement": "thermostat_changes",
      "orderByTime": "ASC",
      "policy": "default",
      "refId": "C",
      "resultFormat": "time_series",
      "select": [
        [
          {
            "params": [
              "state.heatIsOn.num"
            ],
            "type": "field"
          }
        ]
      ],
      "tags": [
        {
          "key": "name",
          "operator": "=~",
          "value": "/$Room/"
        },
        {
          "condition": "AND",
          "key": "name",
          "operator": "!~",
          "value": "/Rail/"
        }
      ]
    }
  ],
  "thresholds": [],
  "timeFrom": null,
  "timeShift": null,
  "title": "$Room Heating",
  "tooltip": {
    "shared": true,
    "sort": 0,
    "value_type": "individual"
  },
  "type": "graph",
  "xaxis": {
    "buckets": null,
    "mode": "time",
    "name": null,
    "show": true,
    "values": []
  },
  "yaxes": [
    {
      "format": "celsius",
      "label": "Temp",
      "logBase": 1,
      "max": null,
      "min": "-10",
      "show": true
    },
    {
      "format": "percentunit",
      "label": "Heat On",
      "logBase": 1,
      "max": "4",
      "min": null,
      "show": true
    }
  ],
  "yaxis": {
    "align": false,
    "alignLevel": null
  },
  "minSpan": 12,
  "scopedVars": {
    "Room": {
      "text": "Living Room",
      "value": "Living Room",
      "selected": false
    }
  }
}

Re: Dashboard for thermostats

PostPosted: Sun Dec 02, 2018 3:15 pm
by siclark
And as previous post, but for the coming TRV plugin from autolog.

Also needs same variable setup, this time called TRV. Shows more detail than Heatmiser ones, setpoint from TRV and Stat device, temp from TRV and Remote sensor (where setup) and valve open %.

Naming convention is
Bedroom thermostat
Bedroom TRV
Bedroom TRV Valve

Code: Select all
{
  "aliasColors": {
    "Landing Stat SP": "#70dbed",
    "Landing Valve%": "#f2c96d",
    "Stat SP": "#70dbed",
    "TRV SP": "#629e51",
    "TRV Valve": "#f2c96d",
    "Temp Remote": "#bf1b00",
    "Temp TRV": "#f9934e"
  },
  "bars": false,
  "dashLength": 10,
  "dashes": false,
  "datasource": "Indigo",
  "fill": 1,
  "gridPos": {
    "h": 9,
    "w": 12,
    "x": 0,
    "y": 0
  },
  "id": 2,
  "legend": {
    "avg": false,
    "current": false,
    "max": false,
    "min": false,
    "show": true,
    "total": false,
    "values": false
  },
  "lines": true,
  "linewidth": 1,
  "links": [],
  "minSpan": 12,
  "nullPointMode": "null",
  "percentage": false,
  "pointradius": 5,
  "points": false,
  "renderer": "flot",
  "repeat": "TRV",
  "repeatDirection": "h",
  "seriesOverrides": [
    {
      "alias": "TwinsTRV - Valve",
      "yaxis": 2
    },
    {
      "alias": "TRV Valve",
      "yaxis": 2
    },
    {
      "alias": "TRV SP",
      "yaxis": 1
    },
    {
      "alias": "Valve",
      "yaxis": 2
    },
    {
      "alias": "Landing TRV valve",
      "yaxis": 2
    },
    {
      "alias": "Landing Valve%",
      "yaxis": 2
    }
  ],
  "spaceLength": 10,
  "stack": false,
  "steppedLine": false,
  "targets": [
    {
      "alias": "$TRV TRV SP",
      "groupBy": [
        {
          "params": [
            "name"
          ],
          "type": "tag"
        }
      ],
      "measurement": "thermostat_changes",
      "orderByTime": "ASC",
      "policy": "default",
      "refId": "C",
      "resultFormat": "time_series",
      "select": [
        [
          {
            "params": [
              "heatSetpoint"
            ],
            "type": "field"
          }
        ]
      ],
      "tags": [
        {
          "key": "name",
          "operator": "=~",
          "value": "/TRV$/"
        },
        {
          "condition": "AND",
          "key": "folder",
          "operator": "=",
          "value": "Heat Rads"
        },
        {
          "condition": "AND",
          "key": "name",
          "operator": "=~",
          "value": "/$TRV/"
        }
      ]
    },
    {
      "alias": "$TRV Stat SP",
      "groupBy": [
        {
          "params": [
            "name"
          ],
          "type": "tag"
        }
      ],
      "hide": false,
      "measurement": "thermostat_changes",
      "orderByTime": "ASC",
      "policy": "default",
      "query": "SELECT \"state.temperatureInput1\" FROM \"thermostat_changes\" WHERE $timeFilter GROUP BY \"name\"\n",
      "rawQuery": false,
      "refId": "A",
      "resultFormat": "time_series",
      "select": [
        [
          {
            "params": [
              "heatSetpoint"
            ],
            "type": "field"
          }
        ]
      ],
      "tags": [
        {
          "key": "name",
          "operator": "=~",
          "value": "/stat$/"
        },
        {
          "condition": "AND",
          "key": "folder",
          "operator": "=",
          "value": "Heat Rads"
        },
        {
          "condition": "AND",
          "key": "name",
          "operator": "=~",
          "value": "/^$TRV/"
        }
      ]
    },
    {
      "alias": "$TRV Valve%",
      "groupBy": [
        {
          "params": [
            "name"
          ],
          "type": "tag"
        }
      ],
      "measurement": "device_changes",
      "orderByTime": "ASC",
      "policy": "default",
      "refId": "B",
      "resultFormat": "time_series",
      "select": [
        [
          {
            "params": [
              "brightness"
            ],
            "type": "field"
          }
        ]
      ],
      "tags": [
        {
          "key": "name",
          "operator": "=~",
          "value": "/valve$/"
        },
        {
          "condition": "AND",
          "key": "folder",
          "operator": "=",
          "value": "Heat Rads"
        },
        {
          "condition": "AND",
          "key": "name",
          "operator": "=~",
          "value": "/$TRV/"
        }
      ]
    },
    {
      "alias": "$TRV Temp TRV",
      "groupBy": [
        {
          "params": [
            "name"
          ],
          "type": "tag"
        }
      ],
      "measurement": "thermostat_changes",
      "orderByTime": "ASC",
      "policy": "default",
      "refId": "D",
      "resultFormat": "time_series",
      "select": [
        [
          {
            "params": [
              "state.temperatureTrv"
            ],
            "type": "field"
          }
        ]
      ],
      "tags": [
        {
          "key": "name",
          "operator": "=~",
          "value": "/stat$/"
        },
        {
          "condition": "AND",
          "key": "folder",
          "operator": "=",
          "value": "Heat Rads"
        },
        {
          "condition": "AND",
          "key": "name",
          "operator": "=~",
          "value": "/$TRV/"
        }
      ]
    },
    {
      "alias": "$TRV Temp Remote",
      "groupBy": [
        {
          "params": [
            "name"
          ],
          "type": "tag"
        }
      ],
      "hide": false,
      "measurement": "thermostat_changes",
      "orderByTime": "ASC",
      "policy": "default",
      "refId": "E",
      "resultFormat": "time_series",
      "select": [
        [
          {
            "params": [
              "state.temperatureRemote"
            ],
            "type": "field"
          }
        ]
      ],
      "tags": [
        {
          "key": "name",
          "operator": "=~",
          "value": "/stat$/"
        },
        {
          "condition": "AND",
          "key": "folder",
          "operator": "=",
          "value": "Heat Rads"
        },
        {
          "condition": "AND",
          "key": "name",
          "operator": "=~",
          "value": "/$TRV/"
        }
      ]
    }
  ],
  "thresholds": [],
  "timeFrom": null,
  "timeShift": null,
  "title": "$TRV Heating",
  "tooltip": {
    "shared": true,
    "sort": 0,
    "value_type": "individual"
  },
  "type": "graph",
  "xaxis": {
    "buckets": null,
    "mode": "time",
    "name": null,
    "show": true,
    "values": []
  },
  "yaxes": [
    {
      "format": "celsius",
      "label": "Temp",
      "logBase": 1,
      "max": null,
      "min": "-10",
      "show": true
    },
    {
      "format": "percent",
      "label": "Valve",
      "logBase": 1,
      "max": "400",
      "min": null,
      "show": true
    }
  ],
  "yaxis": {
    "align": false,
    "alignLevel": null
  },
  "scopedVars": {
    "TRV": {
      "selected": false,
      "text": "Landing",
      "value": "Landing"
    }
  }
}

Re: Dashboard for thermostats

PostPosted: Sun Dec 02, 2018 3:50 pm
by siclark
Just realised I haven't specified what states to enable. If it's not obvious from the Json I'll have a look and update tomorrow.

Re: Dashboard for thermostats

PostPosted: Mon Dec 03, 2018 8:25 am
by vtmikel
Nice job. I've also set up temperature readings from many of my rooms, and graphed the "heatSetPoint" and "coolSetPoint" using a different style. It's a useful graph. I now notice the temperature differences between my rooms (also taking into consideration the location of my sensors - some are high up, and near windows).

Re: Dashboard for thermostats

PostPosted: Thu Sep 17, 2020 9:34 am
by CBowles
Hi Si,

Nice work on the heating dashboards for Heatmiser. I've been working on some for myself but I don't seem to be getting the "state.temperatureInput1" metrics from Indigo into Influx/Grafana.
The only metrics that it picks up from 'thermostat_changes' are:

coolSetpoint
deviceTypeId
heatSetpoint
id
model
name

Did you have the same issue initially? If so, how did you get round it?
At the moment, I have having an Indigo schedule writing the device states to a variable and reading them from there!

Cheers,

Chris
--

Re: Dashboard for thermostats

PostPosted: Thu Sep 17, 2020 12:05 pm
by siclark
I think you need to go into the Grafana plugin and add it to the feed there. I don’t remember the exact details, it’s been a while.

Re: Dashboard for thermostats

PostPosted: Fri Sep 18, 2020 6:20 am
by CBowles
Hi Si,

Many thanks for your prompt reply!
I found it in the end, there are default values Included and any that aren't you need to go to Configure in the plugin and add the states or the whole device for inclusion.
Then low and behold, the values are ingested!

C--

Re: Dashboard for thermostats

PostPosted: Fri Sep 18, 2020 7:50 am
by siclark
Great.. sorry I coulnt point you in exactly the right place but glad you got there.

Simon