Posts: 53
Threads: 20
Joined: Apr 2017
Reputation:
1
Hello,
I need help to control Panasonic PT-VZ580 with LM.
There is IP control in this projector and I have all necessary commands from manual (I attached it), but I don't know how to send them from LM.
Maybe someone have similar control example or smth.
Full manual
Posts: 8223
Threads: 43
Joined: Jun 2015
Reputation:
475
Make sure that password is disabled on the projector and command port is set to 1024. Change 192.168.1.111 to projector's IP.
For command with a parameter try it either like
IIS:HD1 or
IISHD1 (documentation is not clear on this point).
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
function tcpsend (
data ,
ip ,
port )
local sock =
require (
'socket' ).
tcp ()
sock :
settimeout (
3 )
local res ,
err =
sock :
connect (
ip ,
port or 1024 )
if res then
res ,
err =
sock :
send (
'00' ..
data ..
'\r' )
if res then
res ,
err =
sock :
receive (
'*a' )
else
alert (
'send failed: ' ..
tostring (
err ))
end
else
alert (
'connect failed: ' ..
tostring (
err ))
end
sock :
close ()
return res ,
err
end
res ,
err =
tcpsend (
'PON' ,
'192.168.1.111' )
log (
res ,
err )
Posts: 53
Threads: 20
Joined: Apr 2017
Reputation:
1
Ok, thank you for help!
We also need to control other projector over IP - Cineversum.
Could you please help with this one too?
Heres some examples from manual, and
full manual :
Full manual
Posts: 53
Threads: 20
Joined: Apr 2017
Reputation:
1
Posts: 8223
Threads: 43
Joined: Jun 2015
Reputation:
475
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
function tcpsend (
data ,
ip ,
port )
local sock ,
res ,
err
sock =
require (
'socket' ).
tcp ()
sock :
settimeout (
5 )
res ,
err =
sock :
connect (
ip ,
port or 20554 )
if res then
res ,
err =
sock :
receive (
5 )
if res ==
'PJ_OK' then
sock :
send (
'PJREQ' )
res ,
err =
sock :
receive (
5 )
if res ==
'PJACK' then
sock :
send (
data )
res ,
err =
sock :
receive (
6 )
else
alert (
'invalid/no ack: ' ..
tostring (
res ))
end
else
alert (
'invalid/no init: ' ..
tostring (
res ))
end
else
alert (
'connect failed: ' ..
tostring (
err ))
end
sock :
close ()
return res ,
err
end
cmdon =
string.char (
0x21 ,
0x89 ,
0x01 ,
0x52 ,
0x43 ,
0x37 ,
0x33 ,
0x30 ,
0x35 ,
0x0A )
cmdoff =
string.char (
0x21 ,
0x89 ,
0x01 ,
0x52 ,
0x43 ,
0x37 ,
0x33 ,
0x30 ,
0x36 ,
0x0A )
res ,
err =
tcpsend (
cmdon ,
'192.168.1.111' )