envy / knx2influx Goto Github PK
View Code? Open in Web Editor NEWPut data from KNX/IP into InfluxDB
Put data from KNX/IP into InfluxDB
Make it possible to add tags per sender like this:
{
"sender_tags": {
"1.0.2" : ["tag=value"],
"0.0.3" : ["othertag=bla", "foo=bar"]
}
}
These tags should then be added whenever this sender is seen for a GA.
Hi there,
Great tool, thanks so much!
Exactly (almost :)) what I am looking for: I would like to build a simple KNX group monitor, logging ALL KNX telegrams to InfluxDB (v1.8), comparable to what's described here: https://knx-user-forum.de/forum/%C3%B6ffentlicher-bereich/knx-eib-forum/1389088-knx-node-for-node-red/page14. And then build a Grafana view on top.
One element that I would like to include in InfluxDB is the APCI type. I think I found it in knxnet.cpp (ct?) but I am lacking the C++ skills to adjust knx2influx.cpp.
Would that make sense to add for you as well?
Hi again,
For logging ALL KNX telegrams, the possibility to log the raw, "un-format_dpt'ed" data would be required. This way, not all GAs need to be defined in the config file.
For example: DPT setting in config file is taken into consideration for specified GAs.
When the GA is not included or when a wildcard is used, the raw data is logged.
Ideally, the behavior can be configured with an option. For example, that the raw value is always logged alongside the dpt'ed value.
Add an optional field that specifies if the value should be read on startup to update the database.
When I start knx2influx, I get the error message:
JSON error: No interface given in config!
Error parsing JSON.
How (which format) do I add the interface to knx2influx.json
Im confused as nothing about the interface is mentioned in the config json.
My current json file has the minimal config:
{
"host": "http://localhost:8086",
"database": "knx",
"gas": []
}
Hi and happy New Year,
Would it be possible to add http auth support to knx2influx?
Hi,
It is possible save in database KNX Group Address? For example 1/0/1 , 1/0/2 ....
I have only:
SELECT * FROM /.*/
name: test
time room sender value
1638896975114714732 Living 1.1.19 true
1638896975961648685 Living 1.1.19 false
1638897021221378379 Living 1.1.19 true
1638897022600424646 Living 1.1.19 false
My knx2influx.json is:
{
"host": "http://127.0.0.1:8086",
"database": "knx",
"interface": "192.168.7.213",
"gas":
[
{
"ga": "1/0/*",
"series": "test",
"dpt": 1,
"tags": ["room=Living"]
}
]
}
BR,
Daniel
Hi Envy,
I triedto compile knx2influx on a mac (macOS Catalina 10.15.1).
I get however the following error: unknown type name 'pthread_barrier_t'
I tried to compile with different -std options, but the error did not disappear.
Would you know a way of successfully compiling knx2influx on a mac?
make:
c++ -O0 -g -I. -I./libknxnet -Wall -fpie -fstack-protector-strong -std=c++11 -c -o knx2influx.o knx2influx.cpp
knx2influx.cpp:28:8: error: unknown type name 'pthread_barrier_t'
static pthread_barrier_t bar;
^
1 error generated.
make: *** [knx2influx.o] Error 1
Not sure how to implement this:
https://blog.albertarmea.com/post/47089939939/using-pthreadbarrier-on-mac-os-x
I would like to move the executable to /usr/local/bin and the config file to /etc, but I did not find a parameter to set this.
Make it possible to specify wildcard/range GAs:
Listen on all GAs starting with 0/3
{
"ga": "0/3/*"
}
Listen to all GAs in range 0/3/1 to 0/3/10 incl.
{
"ga": "0/3/1-10"
}
Decode 22.101 and output multiple fields
Make it possible to cache received values and reinsert them if no update has been received in a specified amount of time:
Example: reinsert cached value every 10s if no update has been received in that time
{
"ga": "0/3/1",
"repeat": 10
}
Hallo,
ich wollte dein tool ausprobieren, bekomme aber immer die Meldung
Sending data to http://10.0.150.165:8086 database knx
Error adding membership: No such device
terminate called after throwing an instance of 'std::exception*'
Aborted
meine config sieht grad so aus (nur eine GA zum testen)
{
"interface": "10.0.150.151",
"host": "http://10.0.150.165:8086",
"database": "knx",
"gas":
[
{
"ga": "0/5/104",
"ignored_senders": ["1.1.253"],
"series": "energie",
"dpt": 14
}
]
}
Die verbindung zum DB-Server scheint zu funktionieren
curl -G http://10.0.150.165:8086/query --data-urlencode "q=SHOW DATABASES"
{"results":[{"statement_id":0,"series":[{"name":"databases","columns":["name"],"values":[["_internal"],["edomi"],["iobroker"],["collectd"],["plex_data"],["proxmox"],["knx"]]}]}]}
Interface hab ich über EIBD / KNXD, und direkt auf die IP-Schnittstelle/Router probiert. Der fehler bleibt der gleiche.
Hast du irgend welche Tipps für mich?
Gruß
Christian
Building under CentOS7 with gcc 4.8.5 is working fine, but compiling under Ubuntu 16 with a gcc 5.4.0 does not work because the libs to link against are given in the wrong order.
After changing line 9 in the Makefile from
8 knx2influx: knx2influx.o cJSON.o config.o libknxnet/libknxnet.a
9 $(CXX) $(LDFLAGS) $^ -o $@
to
8 knx2influx: knx2influx.o cJSON.o config.o libknxnet/libknxnet.a
9 $(CXX) $^ -o $@ $(LDFLAGS)
knx2influx compiles under both gcc versions without further problems.
Hi,
Have the following test setup in the config json
"gas": [ { "ga": "1/0/1", "series": "5_years", "dpt": 1, "log_only": true, "convert_to_int": true } ]
However, the received values are directly written to influx instead of being displayed in line protocol format.
In the documentation it is mentioned that subdpt is optional (default = 1). But without a subdpt a GA with dpt=5 does not give a value.
Not working:
{
"ga": "3/1/89",
"ignored_senders": ["1.1.253"],
"series": "stellgroesse",
"dpt": 5,
"tags": ["room=Wohnen"]
},
Working:
{
"ga": "3/1/89",
"ignored_senders": ["1.1.253"],
"series": "stellgroesse",
"dpt": 5,
"subdpt": 1,
"tags": ["room=Wohnen"]
},
Make it possible to specify a list of GAs that should be periodically read
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.