This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

localbus
#3
You need to call step for it to receive data. You should also define callback before setting it.
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()
Reply


Messages In This Thread
localbus - by benanderson_475 - 31.07.2020, 06:12
RE: localbus - by fleeceable - 31.07.2020, 08:33
RE: localbus - by admin - 31.07.2020, 08:35
RE: localbus - by benanderson_475 - 01.08.2020, 11:55
RE: localbus - by Svanda - 13.11.2020, 09:56
RE: localbus - by admin - 13.11.2020, 12:40

Forum Jump: