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: 7758
Threads: 42
Joined: Jun 2015
Reputation:
447
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: 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
-- send Power ON
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: 7758
Threads: 42
Joined: Jun 2015
Reputation:
447
Code: 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')
|