Logic Machine Forum
Panasonic projector IP control - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Panasonic projector IP control (/showthread.php?tid=1350)



Panasonic projector IP control - leonidas - 23.04.2018

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


RE: Panasonic projector IP control - admin - 23.04.2018

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)



RE: Panasonic projector IP control - leonidas - 25.04.2018

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


RE: Panasonic projector IP control - leonidas - 26.04.2018

Any thoughts?


RE: Panasonic projector IP control - admin - 26.04.2018

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')