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.

Control Onkyo through tcp
#1
Hi, I want to control an Onkyo device through TCP using eISCP.  The protol information can be seen here at section 1.2
https://tascam.com/downloads/tascam/790/...otocol.pdf

I found out some other code to control it using php
https://www.domoticz.com/wiki/Onkyo 
or ruby
https://gist.github.com/also/3546825


I use this python code and it work perfectly from my computer
https://github.com/miracle2k/onkyo-eiscp


I try to make some code like below to power on the Onkyo from LM but it didnt work
Code:
cmd = 'ISCP\x00\x00\x00\x10\x00\x00\x00\x08\x01\x00\x00\x00!1PWR01\x0D'
require('socket')
sock=socket.tcp()
sock:settimeout(2)
a=sock:connect('192.168.1.100',60128)
b=sock:send(cmd)


Can you help me to make this code work? Thank you very much
Reply
#2
The command looks correct. What do you get as a result for connect/send?
Reply
#3
I Use

Code:
cmd = 'ISCP\x00\x00\x00\x10\x00\x00\x00\x08\x01\x00\x00\x00!1PWR01\x0D'
require('socket')
sock=socket.tcp()
sock:settimeout(2)
a=sock:connect('192.168.1.100',60128)
b=sock:send(cmd)
log(a)
log(b)
log('a = ' .. a)
log('b = '  .. b)


and get:

[Image: ylU4e6C.png]
Reply
#4
Problem solve. Thank you
Reply


Forum Jump: