17.10.2022, 16:41
Thanks admin, that worked fine!
However, the script pushes a hell load of data to influx that is not really necessary.
I could use the "range" tip from above, but using "tags" would be easier and more flexible for future changes.
I tried my best, but I don't think I understand event.getvalue to be honest.
This particular GA have 2 tags, one of them is "influxdb"
BTW, any suggestion on the timestamp manipulation?
However, the script pushes a hell load of data to influx that is not really necessary.
I could use the "range" tip from above, but using "tags" would be easier and more flexible for future changes.
I tried my best, but I don't think I understand event.getvalue to be honest.
This particular GA have 2 tags, one of them is "influxdb"
BTW, any suggestion on the timestamp manipulation?
Code:
function knx_callback(event)
local id = event.dstraw
local tagname = event.getvalue(tag)
if tagname == "influxdb" then
local addr = event.dst
local value, dt = get_value(addr, event.datahex)
if value ~= nil then
send_metric('rawdata', dt.name, addr, value)
end
end
end