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.

Sony Simple IP Protocol
#5
(25.02.2016, 09:37)admin Wrote: You have to send enquiry command, then you can parse the response to get status info.

Code:
require('socket')

-- bravia IP
ip = '192.168.1.23'

-- power-status
cmd = '*SEPOWR################\n'

sock = socket.tcp()
sock:settimeout(3)

res, err = sock:connect(ip, 20060)
if res then
 res, err = sock:send(cmd)

 if res then
   res, err = sock:receive()

   if res then
     alert('receive OK: ' .. tostring(res))
   else
     alert('receive failed: ' .. tostring(err))
   end
 else
   alert('send failed: ' .. tostring(err))
 end
else
 alert('connect failed: ' .. tostring(err))
end

sock:close()

Hi, I'm trying this but doesn't work. Appears a error like that:

"attempt to call method 'revieve' ( anil value)"

I have two more questions,

first. It's possible to extract volume value from TCP response of TV and convert this value to a KNX 1 byte value?

and the second question, if the tv awnser automactilly the status when you send 'power on', for example, it's possible to read this value without force the status query, and can I read the responses separately by \n?

Thank you very much.
Reply


Messages In This Thread
Sony Simple IP Protocol - by josep - 24.02.2016, 09:23
RE: Sony Simple IP Protocol - by admin - 24.02.2016, 11:45
RE: Sony Simple IP Protocol - by DarthPaul - 13.07.2018, 07:04
RE: Sony Simple IP Protocol - by josep - 24.02.2016, 14:39
RE: Sony Simple IP Protocol - by admin - 25.02.2016, 09:37
RE: Sony Simple IP Protocol - by josep - 25.02.2016, 19:53
RE: Sony Simple IP Protocol - by phongvucba - 22.05.2017, 15:46
RE: Sony Simple IP Protocol - by buuuudzik - 08.06.2017, 16:24
RE: Sony Simple IP Protocol - by phongvucba - 14.07.2017, 10:51

Forum Jump: