01.08.2020, 11:55
(31.07.2020, 08:35)admin Wrote: You need to call step for it to receive data. You should also define callback before setting it.Many Thanks
Code:if not lb then
lb = require('localbus').new(1)
function groupcallback(event)
log(event)
if event.dst == '0/2/1' then
local value = knxdatatype.decode(event.datahex, dt.uint16)
log(value)
end
end
lb:sethandler('groupwrite', groupcallback)
lb:sethandler('groupread', groupcallback)
lb:sethandler('groupresponse', groupcallback)
end
lb:step()