Home-Assistant, Ecobee, InfluxDB, and Grafana

I have setup home-assistant to talk to by Ecobee3, and to report data into influxdb. I use Grafana to visualize my temperature data. And this all works fine.

However, I would like to overlay on my temperature graphs the furnace state. HA reports to influxdb a filed called ‘state’ which is one of ‘off’, ‘heat’ or ‘fan’. I’d like to be able to visualize this data on my Grafana graphs.

The problem is that ‘state’ has text values, and thus cannot be plotted directly in Grafana. I do not see any way in influxdb or Grafana to map the text results into numerical values that I could graph.

Grafana also supports Annotations which would be sufficient for me, however, HA reports ‘state’ for every sample, and annotations are expected to only show state-change, so I end up with to many annotations, and they are unusable. I do not see any way to filter the query to only show changes in Grafana or influxdb.

Has anyone run into this, and already has a solution?

If not, I am not sure where to address the problem…

Should the ecobee3 plugin, or influxdb plugins be enhanced to ensure that data stored in inflluxdb is in a format that can be used by grafana?

Should influxdb have improved queries to allow mapping text to numerical value in the ‘select’ query?

Should Grafana have a mechanism to do the text->numeric mapping, or to do an edge-detect during annotations?

Should I be using different tools that have more flexibility (if so which ones)?

I believe the templating mechanism is intended to be used in situations like these. But I have never used it so I can’t really help.

Thanks,
That does indeed look like it could do what I want. However I cannot mak heads or tails of the documentation. I understand (more or less) the rules, but I do not understand how assignment is done either incoming or outgoing, and I’m not sure if my sensors (ecobee and mysensors/mqtt) support them, or whether influxdb supports it on the outgoing side.

On learning about templates, I did find the ‘template sensors’ which seem like they’d work, but appear to require me to break up each of my multi-data sensors into simple key/value pairs. That is a lot of work, but it may be the best option since it would also allow me to prune down the data stored long time for analytics.

For now, I took a different tact. I enhanced the influxdb module to map my allow me to map data as it is transmitted. I probably wouldn’t have bothered if I’d known about templating, but it will get me through until I understand that better:

I have never bothered to understand templates, because anything complex I do using AppDaemon using Python. If you are programming in Python anyway, I suggest you take a look:

Quick question somewhat (but not) related to this.

I’ve set up Grafana/InfluxDB with HomeAssistant but for some reason the Ecobee entities don’t show up as available for queries when making a dashboard in Grafana even though most of my other HASS entities do.

e.g. I have a climate.main_floor entity in HASS but it doesn’t appear as an entity in Grafana to choose. None of the Ecobee entities do.

Is there something else that needs to be configured for them to show up?

Gawh, isn’t it always the case that you figure something out right after you post asking?

Found it under : From default degreeC where entity_id = ecobeeentity_id

1 Like

I wonder if this is still consistent today. Looking at my own HA configuration, Ecobee weather doesn’t even show up as a sensor. It is in a completely different domain. When I query my HA database directly, it shows up as weather.home not sensor.ecobee or sensor.weather. I do not see it at all when I look in InfluxDB.

Should be easy enough to create template sensors that copy the data that I care about temp, humidity, possibly one or 2 other attributes without the bloat that I don’t care about.

Wondering if other Ecobee users have any recent experience?