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.

DALI commands
#7
CANx-DALI sends all received bus telegrams which you can get capture via a script and parse as needed:
Code:
if not canx then
  canx = require('applibs.canx')
  canx.getlistener(1)

  function parse(frame)
    local hdr = frame:byte(1) or 0
    local typ = bit.rshift(hdr, 4)
    local len = bit.band(hdr, 0x3)

    -- bus data frame type
    if typ == 7 and len > 0 then
      loghex(frame)
    end
  end
end

canx.step(function(msg)
  -- message from CANx device 0.1
  if msg.lineid == 0 and msg.nodeid == 1 and msg.objectid == 1
    and msg.frombus and type(msg.data) == 'string' then
    parse(msg.data)
  end
end)
Reply


Messages In This Thread
DALI commands - by Aven - 14.12.2021, 09:53
RE: DALI commands - by Daniel - 14.12.2021, 09:58
RE: DALI commands - by Aven - 14.12.2021, 10:24
RE: DALI commands - by admin - 14.12.2021, 10:14
RE: DALI commands - by admin - 14.12.2021, 10:32
RE: DALI commands - by Aven - 14.12.2021, 11:48
RE: DALI commands - by admin - 14.12.2021, 12:23

Forum Jump: