bezmi / jvc_projector

Python library to control JVC projectors
MIT License
16 stars 10 forks source link

Add support for setting Network Password #13

Closed frankrosano closed 2 years ago

frankrosano commented 2 years ago

With the release of the latest projectors (NZ series and their respective RS variants) JVC has decided to implement a "Network Password" which must be sent during the 3-way handshake in order to interact with the projector. The network password must be between 8 and 10 characters (projector requirement), and it cannot be left blank. A blank or incorrect password will result in a PJNAK response from the Projector, which will prevent any further commands being accepted on the socket.

The format for sending this network password is by sending PJREQ_. If the password is less than 10 characters, it has to be padded to 10 characters with additional null characters. The proposed change here would evaluate the password being passed, if empty it will simply send a PJREQ request like it has in the past. If it is set, it will evaluate for validity (8-10 characters only), pad as necessary, and send the request with network password to the projector during the handshake.

A separate PR will be forthcoming to add support for setting the password in the Home Assistant component, but this change was tested and confirmed working with standalone usage.

Attached is the JVC 2021 Model LAN connection specification document for reference. ILAFPJ2021_LANconnection_spec_EN.pdf