Influxdb2 and HE integration

@dennypage

I just created another pull request for a bug fix i found for when doing the initial install.

Are you guys using Influx Cloud or Influx OSS (local)?

I run it locally on my x86 micro PC server.

Does the HE integration care whether cloud or local?

I run it locally. I have run some queries nativly out of InfluxDB but haven't created my Grafanna dashboard for it yet, it's on my short list for 2023:

I guess what I’m trying to understand is whether the above InfluxDB Logger app assumes cloud, assumes local, or doesn’t care? Suppose I should direct the question to @jake9 since it’s his app.

With 2.X of InfluxDB, I believe Chronograf (their dashboarding tool) is now integrated into InfluxDB. Curious if anyone has experience with using this instead of Grafana.

I didn't write the original, I forked it to meet my needs and have only used it locally. I believe the APIs for Cloud and their 2.0 OSS offering are the same so I would imagine it would work. I prefer everything to run as locally as possible.

Chronograf was built to integrate with InfluxDB, but is a separate install. I use Chronograf for some of the admin tasks but I've stuck with Grafana as it generally has better capabilities for dashboards.

1 Like

Oh - I understand now - you took my fork and contributed it back to the HubitatCommunity repo (thank you!). If I get some time this week I'll start up InfluxDB cloud and give it a shot, I assume it would work.

At this moment I don't remember where I found this fork for 2.x but it could very well be yours. I didn't do it initially. It was a bit behind the current code base so I pulled out what made it 2.x capable and updated the most recent code base for the influxdb logger from the main repo. I just submitted the pull request to the repo for influxdb logger that will support 2.x. :crossed_fingers: :crossed_fingers:

@mluck I believe when I found the code the original person stated he built it to work with InfluxDB Cloud as well. I haven't tested that though as I only run it locally. I think what was called out to be needed to work with the InfluxDB cloud was support for TLS which will be part of the added code if it gets merged.

I just scanned through jake9's code and what i was working with and there are similarities but doesn't match exactly.

I have another small update that I was dabbling with for performance optimizations as well. I had two updates to do before I could submit this code. There is a good chunck of code needed to bring INfluxDB Logger up to support Influxdb2.x.

You can see the latest code i am trying to get added here.

1 Like

The code in HubitatCommunity supports local only.

1 Like

I think the code i just put in a pull request was originally intended to enable InfluxDB cloud as well as 2.0. It has an option for HTTPS for that purpose. I don't have a cloud account to test it, but if thay gets merged in someone could test it to be sure.

@mluck if you want to test the code i am trying to add to the Community InfluxDB Logger you can get it from this link

I think I have got it in a state that it will be allowed to merge with the community app.

1 Like

InfluxDB 2 support is now in the repo. The HPM file will be updated shortly.

@mavrrick58, thank you for all your hard work!. And for your patience. :slight_smile:

1 Like

@mluck and @dennypage

I just confirmed that with our latest updates to support InfluxDB2.x we also enabled the ability to connect Hubitat to the InfluxDB Cloud. I just connected my dev hub to their cloud. So now it doesn't need to be local.

The things you need to do differently to connect to the cloud are

  1. Get your host id from the Cloud account once logged in and put the host name in the host value on the connection properties page .
  2. Enable TLS
  3. Use Port 443

The rest will be the same as if it was local.

1 Like

Is that you that's been working on the influxdb logger app?

If so can I make a feature request?

Some years ago I managed to add "humiditySetpoint" as a measurement to record from thermostats. I forget where I added it, but with some of the last updates via HPM obviously I lost it. :slight_smile:

EDIT:
I'm looking at the code now. On line 311, I think I just added humiditySetpoint to the list of attributes for thermostat.

I'm not smart enough with the whole github thing to make that change though :slight_smile:

I was was just working on getting a few changes I have been running myself added to the community app. @dennypage is acting as the maintainer right now. They weren't even my changes but code I found and then merged into the current code base.

You should already be able to capture custom Attributes but it isn't something that is immediately available if you don't know how to do it.

In the image below If you change the "Get Access To All Attributes" option to on then you will get a different method of selecting what to pass to InfluxDB. At this point you can select the value you are asking about. Unfortunately you will need to resellect everything you are passing

When that is turned off it is generally only allow standard device capabilities and their attributes. I would differ to @dennypage but I don't think that should be changed.

Also be very careful with what attributes you select when doing the option to select from All Attributes. That data is not ensured be able to be passed to Influxdb and not break the parser which could cause loads to fail.

1 Like

I added the humiditySetpoint in my app code to test, and it's working as expected.

One of my graphs is house humidity, but also what the ecobee is currently humidifying to. I've actually had it in there for years, but just recently let HPM match up the packages and got the update. :slight_smile: