A KNX to InfluxDB metrics logger written in NodeJS.
npm install
Get full stack with InfluxDB and Grafana up and running
docker-compose.yml
to your needsconfig.yml
is okaysudo docker-compose up
65001
(this should be done automatically somehow, not sure how yet)influknx
in InfluxDB, for simple setup, no GRANT needed (as service is contained in docker network and isn't exposed, this should be fine)sudo docker-compose logs -f --tail=1
http://<ip>:3000
and create the InfluxDB datasource, name it influknx
to make sample dashboard workgrafana-examples/sample-dashboard.json
The actual application that listens to configured datapoints on the bus, decodes values and sends them to InfluxDB.
See https://bitbucket.org/ekarak/knx.js/src/master/README-datapoints.md for supported data types. The datatype must match the data type of the group address in KNX ETS.
---
knx:
gateway_ip: 10.10.0.105 # IP of your KNX gateway
gateway_port: 3671
influxdb:
host: influxdb
# username: influknx
# password: influknx
database: influknx
datapoints:
'7/0/0': # KNX group address
description: 'House (Power)' # used to generate the influxdb tag, should be unique
type: 'DPT14' # important to select carefully, otherwise you'll get garbage values only!
measurement: power # name of the measurement in influxdb, group similar things together
'7/0/1':
description: 'Somethingelse2 (Power)'
type: 'DPT14'
measurement: power
name: Somethingelse_Power # overwrite the tag generated from `description` if you change description
'7/0/21':
description: 'Haus (Wirkenergie, T2)'
type: 'DPT12'
measurement: energy
Test script to make sure you selected the correct DPT (data point type) before actually sending anything to InfluxDB any might messing up your data.
A simple csv to InfluxDB importer. Can work with 2 column CSV without headers, in the format of <unixtimestamp>,<value>
to import existing historical data
node csv-importer.js Haus_Wirkleistung power 38779.hour.csv
# node csv-importer.js <tag> <measurement> <csv file path>