defaults | ||
.dockerignore | ||
.env | ||
.gitignore | ||
db.py | ||
Dockerfile | ||
export-addresses.csv | ||
knx_monitor.py | ||
LICENSE | ||
README.md | ||
requirements.txt | ||
structure.py |
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. -
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 tohttp://localhost:8086
Export the topology
Here are the steps to export the topology in the proper format:
- Open ETS
- Open your project
- Open a Group Addresses panel
- Right clock on the top Group Addresses (just above Dynamic Folders)
- Click on Export Group Addresses
- Choose CSV Format, 1/1 Name/Address with a Semicolon CSV Separator
- Select a file name to store the result
- 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