bezmi/jvc_projector

Timeout error on handshake

evershade opened this issue · 5 comments

I've been trying to connect to my JVC LX-NZ30 projector via Home Assistant. I've tried the HA included integration and the custom integration that uses this in the backend and both fail to connect.

I traced down here from the custom integration and tried running this module direct from Python. The result is a connection failure based on a handshake timeout.

I've seen other mention of this handshake protocol on the web but the LX-NZ30 doesn't seem to require/support it. I've managed to successfully control my projector with as little as this:

import socket
import binascii

host = '192.168.1.19'
port = 4661

ctrl_power_on = b'\x06\x14\x00\x04\x00\x34\x11\x00\x00\x5D'

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.send(ctrl_power_on)

received_data = s.recv(1024)
print (binascii.hexlify(received_data))

I don't do any handshake, at least on the surface. Maybe socket is doing something generic under the hood. I'm wondering if there's a way to make the handshake conditional or base it off of the projector model number.

bezmi commented

Interesting! TCP sockets already have a handshake procedure on top of which JVC implemented their own. I suspect that they've changed up the protocol for this line-up as your command string looks a little different too. Do you have access to the protocol specification doc, or any more of the command strings?

Thanks, by the way, for the quick response!

bezmi commented

Okay, so this is a DLP model and you're the first person to contact me who is using one. It looks like their command protocol is inherently different to the D-ILA projectors, so it will require a bit of a re-work. Fortunately, it's not a difficult task. I'd suggest raising an issue in the repo for the official component's library and linking this thread there. I don't have a whole lot of time so wouldn't be able to implement this any time soon.