13.01.2016, 14:57
Chrome issue, remove all leading spaces from this script.
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()