13.01.2016, 13:17
Telnet is used data exchange, so you need to use LuaSocket for communication. Try this code, change IP variable and see if there's any data in logs. Errors will be logged as well.
Code:
require('json')
require('socket')
IP = '192.168.1.11'
PORT = 1255
sock = socket.tcp()
sock:settimeout(5)
sock:connect(IP, PORT)
sock:send("heos://system/check_account\r\n")
res, err = sock:receive()
if res then
dec = json.pdecode(res)
if dec then
log(dec)
else
log(res)
end
else
log(err)
end
sock:close()