Big dummies guide to capturing and presenting Loxone stats to InfluxDB

414 views
Skip to first unread message

HA Retrofit

unread,
Jun 1, 2019, 3:35:42 AM6/1/19
to loxone-...@googlegroups.com
Hi all,
By background, I'm not a software developer or someone who works in a devops environment or someone who has actually ever written a program to perform a specific function.
My exposure to Linux is limited (I have Pi-Hole running on 2x Pi2 providing DHCP and secure DNS) and any involvement I have had with Linux has been on a 'follow the tutorial' basis.
That said I have a very good knowledge of networks, can read and follow a tutorial and am willing to invest the time to learn what to do to make something work.

Using a raspberry pi, I would like to be able to capture the statistics from my Loxone miniserver and present them to InfluxDB and then onto Grafana so I can show the wife what's going on in our home.
There are plenty of good Pi InfluxDB and Grafana tutorials, the challenge is getting the stats out of the miniserver and into InfluxDB.

Unfortunately, the examples I've found on the web or in this forum, assume a knowledge I don't have.
Some examples (from the current thread on this):
Rob_IN has written and posted something on GitHub. He said: I updated the https://github.com/raintonr/loxone-stats-influx readme file. Should be a little clearer now.

For me (Not wanting to be critical Rob) its still not clear.
Again from Rob's GitHub post: The idea is that these share a common JSON config file <== What's the filename? Where do I put it? 
Create .loxone_stats_influx in your home dir <== Which home dir? (Is this one on the Loxone or is this the home Dir on my pi e.g /home/username?)
and link/copy into the config folder for the Node.js app. <== Which config folder? Is this  (on the Pi) the folder /etc or something else?

Run loxone_stats_influx_import.pl <== How? Where do I put the file?

@Rob - This isn't intended to be critical of you - its to illustrate that the examples I have found assume an understanding/innate knowledge of how all these things plug together

Can someone either point me to or write a big dummies, step by step, guide to capturing the stats and presenting them to Influxdb?
I imagine I'm not the only one who would be interested, I'm also happy to contribute if I can..

Once I know how to poll them at a regular frequency, into a folder on the Pi, Influx can take it from there.

Thanks in advance ...

Jan De Bock

unread,
Jun 2, 2019, 1:20:17 AM6/2/19
to Loxone English
Hi, not sure if you have seen my update in the forum https://groups.google.com/forum/#!msg/loxone-english/ijOUU8FHMKA/NcMJY_IyFgAJ
I created a small UDP program to collect stats. and it is documented there.
This is not collecting stats from the SD card, but sends straight them to UDP.  Disadvantage is that you don't have those stats in your loxone app. But advantage is that you use less resources and don't rely on writing to the SD card all the time. 
Hope this helps you


On Saturday, June 1, 2019 at 9:35:42 AM UTC+2, HA Retrofit wrote:
Hi all,
By background, I'm not a software developer or someone who works in a devops environment or someone who has actually ever written a program to perform a specific function.
My exposure to Linux is limited (I have Pi-Hole running on 2x Pi2 providing DHCP and secure DNS) and any involvement I have had with Linux has been on a 'follow the tutorial' basis.
That said I have a very good knowledge of networks, can read and follow a tutorial and am willing to invest the time to learn what to do to make something work.

Using a raspberry pi, I would like to be able to capture the statistics from my Loxone miniserver and present them to InfluxDB and then onto Grafana so I can show the wife what's going on in our home.
There are plenty of good Pi InfluxDB and Grafana tutorials, the challenge is getting the stats out of the miniserver and into InfluxDB.

Unfortunately, the examples I've found on the web or in this forum, assume a knowledge I don't have.
Some examples (from the current thread on this):
Rob_IN has written and posted something on GitHub. He said: I updated the https://github.com/raintonr/loxone-stats-influx readme file. Should be a little clearer now.

For me (Not wanting to be critical Rob) its still not clear.
Again from Rob's GitHub post: The idea is that these share a common JSON config file <== What's the filename? Where do I put it? 
Create .loxone_stats_influx in your home dir <== Which home dir? (Is this one on the Loxone or is this the home Dir on my pi e.g /home/username?)
and link/copy into the config folder for the Node.js app. <== Which config folder? Is this  (on the Pi) the folder /etc or something else?

Run loxone_stats_influx_import.pl <== How? Where do I put the file?

@Rob - This isn't intended to be critical of you - its to illustrate that the examples I have found assume an understanding/innate knowledge of how all these things plug togethert 

Can someone write a big dummies, step by step, guide to capturing the stats and presenting them to Influxdb
Once I have worked out how to poll them at a regular frequency, into a folder on the Pi, Influx can take it from there.

Thanks in advance ...

HA Retrofit

unread,
Jun 2, 2019, 8:14:22 AM6/2/19
to Loxone English
Hi Jan,
Thanks for the pointer and reply.
I looked at your approach and thought it would mean that I can't use the stats I've already collected.
That might not be a major problem, but for now, if I can, I'd like to work with our existing data and the loxone stats that we have setup.
If I can't work out how to do it, I will probably give your approach a go.
Thanks again ...

Rob_in

unread,
Jun 3, 2019, 2:18:10 AM6/3/19
to Loxone English
Hi,

The "Very much beta. Use at your own risk!" comment top of the readme is suppose to put off people who don't know what they are doing. I would suggest anyone who doesn't know how to execute a perl file should not even be looking at this. It was intended as just something of interest for other techies.

But anyhow...

On Saturday, 1 June 2019 09:35:42 UTC+2, HA Retrofit wrote:
Again from Rob's GitHub post: The idea is that these share a common JSON config file <== What's the filename? Where do I put it? 

From the readme file: 

"The idea is that these share a common JSON config file. Create .loxone_stats_influx in your home dir and link/copy into the config folder for the Node.js app."
 
Create .loxone_stats_influx in your home dir <== Which home dir? (Is this one on the Loxone or is this the home Dir on my pi e.g /home/username?)

From the readme file: 

"The idea is that these share a common JSON config file. Create .loxone_stats_influx in your home dir and link/copy into the config folder for the Node.js app."

Ie. the home dir under which the program is running of course.
 
and link/copy into the config folder for the Node.js app. <== Which config folder? Is this  (on the Pi) the folder /etc or something else?

From the readme file: 

"The idea is that these share a common JSON config file. Create .loxone_stats_influx in your home dir and link/copy into the config folder for the Node.js app."

Ie. the config folder in the app directory which you cloned/DL'd from GitHub
 
Run loxone_stats_influx_import.pl <== How? Where do I put the file?

Just go into the directory which you cloned/DL'd from GitHub and it's there.
 
@Rob - This isn't intended to be critical of you...

Yeah, but it is, so thanks.

Can someone either point me to or write a big dummies, step by step, guide to capturing the stats and presenting them to Influxdb?

I'm a dev and have written something that other devs should be able to understand. Like I said above, if you're not a dev or don't understand dev stuff then this isn't for you.

Cheers,

Robin

Rob_in

unread,
Jun 3, 2019, 2:24:00 AM6/3/19
to Loxone English
On Sunday, 2 June 2019 14:14:22 UTC+2, HA Retrofit wrote:
I looked at your approach and thought it would mean that I can't use the stats I've already collected.

You could load your historical stats with my script then use this more direct method going forward.

FWIW, I won't be foregoing Miniserver based stats for anything based on directly sending them to InfluxDB because if Influx is offline for any reason would end up with gaps. OK, if the Miniserver fails then, yeah, no stats, but it's a single point of failure anyhow so just have to live with that. Plus, I prefer to backup the raw Miniserver data. All a matter of preference of course.

Robin

Arnaud

unread,
Jun 3, 2019, 3:17:53 AM6/3/19
to Loxone English
hi,
As he said, he's not a developer, nor am I.
I think his / her question is; is there anyone who can 'translate' the documentation provided so that the non developers can benefit from your work.
i'm very interested for that, but i'm too limited in coding concept to apply the procedure has it.
tks

MW

unread,
Sep 24, 2019, 9:43:12 AM9/24/19
to Loxone English
Hello all,

Related to the original posters questions in looking for a more dummy approach: I've been trying to get this done by using NodeRed running on a Raspberrypi. Certainly no coding skills required and quite a few tutorials available online, but as always: not always for exactly what we are trying to achieve :-) 
I had been spending some time on this a while back with mixed results in writing to a mysqldatabase on Synology. Once I have more time I will try and get this working again. The main goal for me was keeping track of room temperatures throughout the day/year.
But as an alternative, easy, approach, it might be worth looking into. 

MW

Rob_in

unread,
Sep 25, 2019, 2:47:25 AM9/25/19
to Loxone English
MySQL isn't ideal for storing time series values. You really should use something designed for the task like InfluxDB.
Reply all
Reply to author
Forward
0 new messages