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.

TCP Socket Connection for Legrand
#32
Try replacing the parse function with this:
Code:
function parse(msg)
  local chunks = msg:split('*')
  local who = table.remove(chunks, 1)

  if who == '#1' then
    local what, where = unpack(chunks)
    parselighting(what, where)
  elseif who == '#4' then
    local where, dimension, value = unpack(chunks)
    parsetemperature(where, value)
  end
end
If it does not work then provide logs of the received messages.
Reply


Messages In This Thread
RE: TCP Socket Connection for Legrand - by admin - 31.08.2022, 12:38

Forum Jump: