31.05.2024, 09:21
Modify lutron_login() in the user library to log the data that is sent to LM.
Add log(lutron_receive(tcp)) at the end of your script to check the reply.
Code:
function lutron_login()
local tcp, tcp_err = lutron_connect()
if not tcp then
return nil, tcp_err
end
local res, err
res, err = tcp:receive(7)
log(res, err)
tcp:send(user..'\r\n')
res, err = tcp:receive(10)
log(res, err)
tcp:send(password..'\r\n')
res, err = tcp:receive(9)
log(res, err)
if res == nil or res == 'bad login' then
tcp:close()
return nil, res
end
return tcp
end
Add log(lutron_receive(tcp)) at the end of your script to check the reply.