New Hubitat to InfluxDB Bridge via MakerAPI+Node [beta]

Yay! glad you got it working :slight_smile:

Thanks @asj.

One question, for you or anyone else who may know... What's the best way to setup a variable on a Grafana dashboard to allow a user to select one or more sensors?

I do know this can be done on an individual chart in the legend, but wanted to learn a bit more about the variables feature. Trying to achieve this lead to me trying to get Tag Values for the deviceName tag on the temperature measurement in InfluxDB, which does not return when I try to show tag values in the influx CLI. I can see this is a tag "column", but cannot return a distinct list of values. Any advice?

Thanks,
Simon

Here’s a good video to help get you started.

1 Like

Thanks @Vettester! I was like “man it’s a pain to find I’ll need to make a video for @sburke781

2 Likes

Wow, there's a lot to digest there. I might need to slow it down to try and absorb everything :slight_smile: Thanks for providing the link @Vettester.

I think I may have got side-tracked with trying to access the tags through InfluxDB, when, if I can access them in Grafana, would become a mute point, utlimately Grafana is where I want to use them.

You might might want to try just creating specific charts without using variables. I’m using average temperatures for the areas I am interested in and have found it makes a lot cleaner dashboard.

Here’s what I’m using for temperature:

Note: The flat red line at 70 degrees is an alert I have set for my main floor thermostat.

1 Like

Nice chart.

I recently started to play with averaging multiple sensors in HE to look at indoor and outdoor temperature, using @Cobra 's driver: Average All. I still need to send these through via the maker API. Even though I could do this calc in Influx / Grafana I feel the driver gives me more flexibility with HE dashboards, etc.

I also like the focus of the dashboard, I'm still toying with how best to lay mine out. Will try and post some pics in the next day or two.

1 Like

@sburke781 I use these sometimes, I use grafana in a pretty basic way, but maybe this will help for you? This adds an ah-hoc filter on any dashboard so you can have 15 sensors, then just pick 1:

https://youtu.be/EJrq4qFrdWg

1 Like

Thanks, I'll take a look and let you know how it goes.

I did end up getting a variable to work, just can't remember what source of information provided I used... I'm terrible at looping back with outcomes... :slight_smile:

I setup a variable with a comma separate list of values (would have preferred to have a dynamic list, but this was easy enough and they won't change too often):

I then added this to the WHERE clause of the two queries I have, one for Temperature and one for Humidity (only Temperature shown below).

I then added the variable as a selector in the dashboard, which filters all the charts where those queries are used:

I also posted some details of a modified version of these charts I have added to my Hubitat dashboard, details are here and here.

Thanks again for all your help,
Simon

Has any tried or been able to setup a stacked bar chart based on two separate metrics? I have read and experienced how influx db does not support unions across measurements. My only options I can see may be a continuous query (I think that's what it was called) or setting up dummy devices with the same attributes (metrics) so they appear in the same measurement "table" in influx.

The situation I have is a HE device for my Solar panels that has a number of readings, including how much energy the panels produced in total (a), how much of that production was consumed by the house (b), and how much was fed back into the grid (c). a = b + c. There is a similar situation with overall consumption, solar power consumed and power drawn from the grid.

In both cases I want to show a stacked bar showing the percentage breakup between self consumption and the grid related metric, i.e. metric b vs metric c.

Any ideas?

I keep getting an echo of the example, can you guide me what I may be doing wrong? I looked for the errant commas, couldn't find any.

What error are you getting @karnik.abhijeet?

@asj it does not throw me an error, it echos the example config.json file. Do you want to see my config file?

You don’t happen to be familiar with unraid and there docker templates?

Is the config.js.example accurate? I am having trouble getting this working.

{
local_config: {
    hostname:  "0.0.0.0",
    base_port: 8567,
    influxdb_port: 8086,
    influxdb_host: "192.168.0.100",
    influxdb_db_name: "hubitat",
    local_url: "http://192.168.0.51",
    poll_interval: 1800,
},
hubs: {
	"Production": {
		"url": "http://192.168.0.98/apps/api/3438",
		"token": "2dbe7144-ab8d-417e-86f7-90131ad6c621"
	    }
}

What’s the error or problem you’re having?

Thanks for this app.

I've been logging to Influx for over 3 years now. First from ST, then from the InfluxDB logger app in HE.

I'm not entirely sure it's related to the Influx logger app, but I've had 2-3 hub lockups in the past 5 weeks so I thought I would try this out to see if the lockups stopped.

I'm running a few other node apps, but this one has me stumped. I just get the default config.json output when I run the app.

Pretty sure my config.json spec is correct. Can anyone see what the problem is?

{
	"local_config": {
		"influxdb_port": 8086,
		"influxdb_host": "192.168.5.133",
		"influxdb_db_name": "SmartThings",
		"local_url": "http://192.168.5.225"
	},
	"hubs": {
		"home": {
			"url": "http://192.168.5.56/apps/api/737",
			"token": "57097ed7-817b-4439-ad0c-90d3b7be1c7e"
		}
	}
}