Using HE with with InfluxDB, Grafana, with InfluxDB Logger

Will try that now, thanks.
I will need to login to my debian server which I have not touched for quite some time now.

BETA TESTING: Docker install for InfluxDB and Grafana

For those interested, there is a docker setup for InfluxDB and Grafana HERE.

Basic instructions are on the page. Once you have the files in the location you wish, and edited the variables in the .ENV file, run docker compose up to start up servers (wait a few minutes as there is a lot for Grafana to download). Then configure InfluxDb Logger to point the InfluxDB server, and then go to your Grafana server. Once in Grafana, import the Hub Info Dashboard

If you are not familiar with docker the benefits can be the servers are already installed and ready to run, same install on each PC, easy backup of the data files, and server upgrades.

1 Like

Hi All, I have an existing Ubuntu VM running docker based InfluxDB v1.8 + Grafana etc for the excellent PowerWall Dashboards.

But I cant for the life of me figure out how to add a new Bucket to InfluxDB - I tried the Curl command from HERE but it just doesnt work for me.

Im not running any security at all (it's all local and not exposed to the interwebs):

curl --request POST http://192.168.1.102:8086/api/v2/dbrps \
  --header 'Content-type: application/json' \
  --data '{
        "bucketID": "c7n67b803036ad8e",
        "database": "Hubitat",
        "default": true,
        "orgID": "de69d0957eg5c825",
        "retention_policy": "7Days"
      }'

Not matter what I try, I get a 404 page not found or some version of that, depending on what variations I'm trying. Any Ideas?

Have you tried just using the Influx Web UI?

1 Like

There isnโ€™t a web UI for v1.8.

Oh yeah forgot about that, I started out with 2.x straight away.

Here is the docs for 1.8 on how to create a database (not even called a bucket in 1.8): Get started with InfluxDB OSS | InfluxDB OSS v1 Documentation

That post you linked to above is for 2.x, and the part about v1 is how to make a v1 mapping on Influx 2.x (so you can connect to 2.x as if it was 1.8)

1 Like

Cheers, Iโ€™ll take a look.

One other complication, if you want to use my dashboards they are all created with Flux queries (2.x), except the Hub Info I have a version (posted in my thread) that I converted to InfluxQL which works on 1.8, so thats the only one that will work.

1 Like

Good to know, I might create a new influxdb docker container just for Hubitat graphing.

Honestly I would suggest you look at upgrading your InfluxDB docker to 2.x . Just know as part of the procedure you need to create the DBRP entry to retain the V1 connectivity. The. Setup a new data source for Flux for when dashboards need that engine.

The procedure with docker is actually quite simple and well documented. Just back up your influx DB data folder before the upgrade.

I'm not willing to risk breaking my PowerWall dashboards - my NAS is powered by a quad-core, 8-thread Ryzen with 32GB of ECC Ram, so it's not short on resources.

Understood. I ran the upgrade probably 4-5 times in a test db i restored all my 1.x data to when i performed the upgrade.

The desire to prevent loss of data is why i suggested backing up the data folder of influxDB. That is all you need to restore. Probably also run the 1.x command to do a backup of the database to a flatfile. That should make it easy to revert.

The process for the conversion is very simple.

Now that i think about it i had 1.8 and 2 running side by side for a time while testing the conversions. Basically i would install a second 1.8 and tested running the converaions and getting the grafana dashboard connectivity testef as well. I am willing to help if you need it. I was suprised how easy it was after doing it.

I can assure you it is very possible to get all of it running together. My grafana instance has dashboards that use the legacy query engine and flux.

The directions are https://docs.influxdata.com/influxdb/v2/install/upgrade/v1-to-v2/docker/#Copyright

If you didn't do anything fancy with your current install it mostly involves just including a few new variables and paths in your docker setup so it upgrades on next boot. Then you will have the new influx ui.

1 Like

What do you use to get your powerwall data into influxdb? Is it with influxDB Logger in Hubitat or some other method?

I could just roll back to a snapshot for the VM, but there's a ton of integrations in the PowerWall solution I'm using, and I'm just not willing to mess with it when it's working just fine. My background is IT Ops and Major Incident management - so I'm in the "if it aint broke, dont F'K with it" camp, especially if it's something that I don't fully understand.

Anyhoo, it took me all of 10 mins to get data flowing into a new InfluxDB container and my existing Grafana instance pointed too it, so Im happy:

1 Like

This awesome solution running in an Ubuntu 22.04 VM.

I think setting up a seconday instance for hubitat was no doubt the best idea after looking at the setup procedure. After looking through the setup script updating that instance to 2.x would have certainly caused some issues. Mainly it doesn't appear to have any security setup. That is a requirement with 2.x

1 Like

Ah good, that's how I understood it too. :+1: