Homey Community Forum

[APP] InfluxDb

Hi,

The app will only write new measurements. It will buffer for 10 seconds, before it writes every measurement to the InfluxDb.

The Homey CPU and memory state, and app state, is fetched every 30 seconds.

So you should see some data quite fast.

Check that status is “Connected” in app settings. And the number of measurements since last restart of the app is also show.

As a complete Noob with Influxdb i have some questions. I have influxdb installed on a server and it is up and running. Also installed the Homey app and this is also up and running.

So my question is;
Are the Logic variables and Better Logic variables also added? If so; then the real noob question how do I retrieve these data.

I am trying to write a homeyscript and want the power measurements of my solar panels. With homeyscript i can access those measurements, and store them in better logic variables. What i want is that i can get the measurements from e.g 01-09-2020 - 30-09-2020 and count all these measurements to the total of a month. That way i can comparise that month with another month.

Is this possible an how? Do i have to use flows, ore can it be done in homeyscript

Hi,

Logic variables and Better logic variables are not supported.

But I guess it would be possible to add an action flow, to add data to the InfluxDb. Is that something you could use, you think?

I think that would be awesome. But does influxdb have the measurements of the solar panels? The solarpanel uses the “zonnpanelen” app, so it is added as a device in Homey. Could i use that? And How?

All “number” and “boolean” capabilities, for all apps, will be saved to InfluxDb. On any change that happens.

So if the app has any number or boolean capabilities, they should be available in your InfluxDb.

If you have any special calculated values, you can put them in a virtual device, and they should also be stored in InfluxDb.

Ok so the data are available. Can you point me in the right direction how to retrieve these data, because in the app i only see that measurements are made. But how can i see those, and use them. So a absolute noob question.

You can use a visualisation app that supports InfluxDB. One of the more popular ones is Grafana.

For example, here’s a chart that tracks solar energy generation, actual delivery back into the grid, and illuminance (outside). It wasn’t a very bright day today…

1 Like

I am curious, in the App profiler in Athoms dev tools we see the CPU for each app as well, next to memory usage. Its only the last 140 seconds.

And in the Insight website for each app is also Memory and CPU showed (and no storage).

But it seems not possible to capture CPU usage of an app?

https://developer.athom.com/tools/app-profiling
https://insights.homey.app/

Yes, that would have been nice.

The app uses the Homey API, https://api.developer.athom.com/HomeyAPI.ManagerSystem.html
but this doesn’t return the CPU per app, just memory consumption per app, together with the system CPU (1 minute, 5 minute, 15 minute averages). If someone has information about how to do this… please let me know.

And then, when I look at the app-profiling and CPU per app in Insights… the values look a bit low / strange to me. I’m not sure if the correct values are reported…

V. 0.9.10 is now ready for testing:

Changes:

  • Added triggers for online and offline events
  • Added export of CPU usage per app: CPU usage is exported every 10 minutes, with one measurement per minute.
  • Prefix for measurement names can be set: The prefix can be set in settings, and is advantageous if you have several Homeys logging to the same InfluxDB.
1 Like

Replaced the Prometheus app with the InfluxDb app however I notice the average load has increased from approx. 125% to 250%. Is there a way to throttle the app to lower the load? Or should I get a Homey Pro :wink:

I run the InfluxDb app on a Homey (Early 2018) and a Homey Pro (2019), without problems.

Currently all numeric and boolean capabilities are logged to InfluxDb. Also Homey stats, like cpu usage, memory and app stats (cpu, memory) are also logged.

Right now it’s not possible to throttle the app.

I echo your experience. Installed but just as with Prometheus it is a CPU hog. I like the effort but the load runs over 3 and lights on/off and motion detection in the house are delayed.
I have the early homey 2016 so I recon this would work better with a Homey Pro.

Thanks for creating the app but it puts too much load on my Homey causing delays.

I run it on an Homey Pro with al lot of devices and flows and have not much delays with influxdb, it does eat around 30 Mb memory.

Could the speed of the disk and host where influx is hosted be of influence?

My influx is a docker on a Synology NAS DS716+II

InfluxDb is on docker vm on ESXi host with Core i3. CPU is pretty much idle on the InfluxDb docker. So it’s Homey cpu and resources that is slow here.

I can add a setting so you can change the update frequency. Now it’s every 10 seconds. Maybe increasing the update frequency might help some of you.

Also adding a setting to disable sending Homey metrics (memory + CPU). That sends a lot of data, every 30 seconds, and it might be good to be able to disable that.