21.01.2021, 08:34
Here's how to combined 4 separate object values into a single object:
This will work over KNX/IP but not over BACnet. Each BACnet datapoint can only store a single value.
Code:
addrs = { '1/1/1', '1/1/2', '1/1/3', '1/1/4' }
value = ''
for _, addr in ipairs(addrs) do
val = grp.getvalue(addr)
enc = busdatatype.encode(val, dt.float16)
value = value .. enc.dataraw
end
grp.write('1/1/5', value, dt.raw)
This will work over KNX/IP but not over BACnet. Each BACnet datapoint can only store a single value.