[APP][Pro] InfluxDb

Hi Danny,

You’d look up the devices’ capability names (described as datapoint names by you) at the developer site, to see if they’re the same @ Homey: https://tools.developer.homey.app/tools/devices

Example of the capability names used for some device:

Maybe I’m wrong, but in case the capability names match the ones on the screenshot:

Because measure_power and measure_temperature.2 of your device are correct ‘official’ (sub)capability names, while capability_0, capability_1 and such are certainly not, I suspect the app developer of that app (one of the Nibe apps?) should update the app code, and use standard capability names if possible / suitable.

An overview of all capability names:
https://apps-sdk-v3.developer.homey.app/tutorial-device-capabilities.html

i’m using influx and grafana and am really happy!

but: i only use maybe 10 devices data out of more than 200 with grafana.

So i want to delete reguarly all other measurement.

I know the syntax in Cli or api (influx delete --bucket “homey” --org “home” --predicate ‘_measurement=“Rollo_Büro”’ --start “1970-01-01T00:00:00Z” --stop “2030-12-31T23:59:00Z”)
but i did not find any way to wildcard the measurement name.

best would be if the influx-app would allow to select those devices i want to see in influx.

any idea how to clean multiple measurements at once?

thank you

Good advice, I often go to this Homey Developer Tools for the same reason :slight_smile:

This is a bit of an old one (replying to my earlier post of March 2024) …
But by using Homey Script I have fixed the issue I ran into.

To briefly repeat the issue:

  • InfluxDB only sends values to the influx database when they change. Which totally makes sense of course.
  • Grafana cannot show a value if the last updated value in the database is outside (so before) the current time interval. It can work with “fill with last known previous value”, but not if that last updated value is before the current time interval

I tried to work with the following InfluxDB flowcard for a few monts roughly 2 years ago. Goal was to write a data measurement even if the value did not chnage, but this weekend I found out why that did not work and that it also polluted my database (a lot) in that specific months.

image

Maybe (likely) a used the flowcard wrong, but what I wanted to do is write one or more capabilities of a device to the influxdb.

So for example, a device with the name “Solarpowermeter” with the fields (capabilities)

  1. Voltage
  2. Ampere
  3. Power (kW)
  4. Meter power (kwH)

A wanted to write the field “Power”, so selected as measurement Name “Solarpowermeter - Power” and as number Value “Solarpowermeter - Power”. My expectation was that this would result in adding new values to the existing device and the existing datafield as a new datapoint.

But… in reality it added each power measurement as a new entry / “device” in InfluxDB. So if I look in InfluxDb with Putty I see the list of all the devices, but also see a lot of numbers as a “device”. Almost 50.000… :frowning: generated in the few months I was testing this.
So obviously this way of using “name” in this flowcard was wrong, but I had no idea how to do that differently. But I did found a solution.

First cleaning up the database: removing them one by one takes ages I found out, so I am new removing the specific months from my history which goes a lot quicker. This will remove all data in that months, but that should not be a big issue.

And good news: with the support of ChatGPT it was quite easy to create a HomeScript which is able to send a value to the influx database as a new measurement, even if the value did not change.
In fact: it can send all “capabilities” of a device to influxdb. So this way you could make a selection of Homey device(s) for which you want to save all data, or even select some of the capabilities if you want to.

In my experience it is not really an issue if the Influx database becomes big: I have a database of 8 Gb with also many devices in it. So most easy approach would be: just let the InfluxDB Homey app update the values when they change. Works very stable for me, for years now.

If you really want to change this: try to work with HomeyScript. I do that now with a specific time interval for some values that can easily remain the same for weeks which is a problem if you want to see them in Grafana.

I did not test it, but you can also do this trigged by changes, either from a flowcard or within a script. So if that works for you, you should be able to stop the “all devices” update from the InfluxDB Homey app.

I have Homey SHS running (Container|Docker) on my Synology NAS
I installed influxdb (Container|Docker) also on my Synology NAS
I am able to access influxdb with webbrowsers and login

http://influxdb:8086/orgs/ed7ee9651eb2fa36/load-data/buckets

and via https://influxdb:443
However the Homey app (confige) keeps status: disconnected (all fields filled!)
InfluxDB v2.9.1 Server: d4fa194 Frontend: 78dfa90
Suggestions?

Hello Peter,

  • Did you try entering the IP instead of http://influxdb:8086, like http://ip_of_influxdbserver:8086/ ?
  • Maybe using custom ports isn’t possible (yet): Try it when you temporary configure the influxdb server with the standard http port, 80.
  • Using https most probably doesn’t work at all without non-self-signed certificates

IP adres did not work; http://influxdb:80 failed but webbrowser is ok
I have created a diagnostic report: 21965837-f7f9-44d0-a7cc-0355d154b33e
Maybe this helps