Go to file
2023-07-03 23:49:45 +02:00
defaults feat: Proper configuration. 2022-12-20 15:39:41 +01:00
.dockerignore feat: Proper configuration. 2022-12-20 15:39:41 +01:00
.env Add support for ventilation volume. 2023-07-03 23:49:45 +02:00
.gitignore Add support for ventilation volume. 2023-07-03 23:49:45 +02:00
CHANGELOG.md chore(release): 1.1.0 2022-12-20 15:39:50 +01:00
db.py Add support for ventilation volume. 2023-07-03 23:49:45 +02:00
Dockerfile feat: Proper configuration. 2022-12-20 15:39:41 +01:00
export-addresses.csv Add support for ventilation volume. 2023-07-03 23:49:45 +02:00
knx_monitor.py Add support for ventilation volume. 2023-07-03 23:49:45 +02:00
LICENSE feat: Initial commit 2022-12-19 12:24:47 +01:00
README.md Add support for ventilation volume. 2023-07-03 23:49:45 +02:00
requirements.txt feat: Initial commit 2022-12-19 12:24:47 +01:00
structure.py Add support for ventilation volume. 2023-07-03 23:49:45 +02:00

KNX monitor

About

This program collects KNX data into InfluxDB

Requirements

You need an IP router/gateway accessible from your network. You also need InfluxDB (and grafana) installed so data can be uploaded.

Tou also need to install the requirements:

pip install --no-cache-dir -r .requirements.txt

Usage

You need to configure the following environment variables:

  • KNX_GATEWAY_IP is the address of the gateway/router. Default value is 10.0.0.36

  • KNX_TOPOLOGY is the CSV export of the group adresses. It's used to map the monitored data with types and store the proper values. It defaults to export-addresses.csv. Please see below how to export the right format.

  • LOG_ONLY only logs the collected information, doesn't push to InfluxDB. It defaults to 1

  • INFLUX_BUCKET - the bucket to store the data. It defaults to my_bucket

  • INFLUX_ORG - the organisation (defined when you initialise the bucket). Defaults to example.com

  • INFLUX_TOKEN - the token to access the InfluxDB instance. Defaults to change_me

  • INFLUX_URL the URL where InfluxDB is located. It defaults to http://localhost:8086

Export the topology

Here are the steps to export the topology in the proper format:

  1. Open ETS
  2. Open your project
  3. Open a Group Addresses panel
  4. Right clock on the top Group Addresses (just above Dynamic Folders)
  5. Click on Export Group Addresses
  6. Choose CSV Format, 1/1 Name/Address with a Semicolon CSV Separator
  7. Select a file name to store the result
  8. click "OK"

You should have a CSV file like:

"Group name";"Address";"Central";"Unfiltered";"Description";"DatapointType";"Security"
"Cellar - HVAC";"0/-/-";"";"";"";"";"Auto"
"Media - HVAC";"0/3/-";"";"";"";"";"Auto"
"Valve1-1 Media [CTEMP 1.3.10]";"0/3/6";"";"";"Wellness Lounge H";"DPST-9-1";"Auto"
"Valve1-1 Media [SETPOINT TEMP]";"0/3/7";"";"";"Wellness Lounge H";"DPST-9-1";"Auto"
"Valve1-1 Media [CMD]";"0/3/8";"";"";"Wellness Lounge H";"DPST-5-1";"Auto"
"Valve1-1 Media [OP]";"0/3/9";"";"";"Wellness Lounge H";"DPST-20-102";"Auto"

Launch

You can either use the command line:

python3 knx_monitor

or use the provided docker image. In this case, please make sure you set the read-only volume to the export file

-v /path/to/your/export.csv:/code/data/export-addresses.csv

You can either define the above environment variables, or create a .env file and map it via

-v /path/to/your/envfile:/code/knx/.env

HTH