15.09.2022, 10:04
(15.09.2022, 09:23)admin Wrote: You're sending string data (10:57 and Thu 15-09-2022) which Influx does not understand. String values must be enclosed in quotes.
Try replacing lines 35..42 with this:
Code:local body
if type(value) == 'boolean' or type(value) == 'number' then
body = string.format('%s,name=%s,addr=%s state=%s', table, name, addr, value)
elseif type(value) == 'string' then
body = string.format('%s,name=%s,addr=%s value=%q', table, name, addr, value)
else
log('invalid data type', addr, type(value))
return
end
Currently this script sends values for all objects. There should be some filtering implemented so only the required data is pushed.
ok, now it's collecting data.... and yes, I need to filter them.
I guess I have to modify the function knx_callback(event), but my object addresses are not in a specific range, so I need to implement a sort of list of addresses to send.