Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Simple Python server to proxy commands to a JVC projector.

Project description

A tiny server that acts as a proxy between a client and a JVC projector such a projector. JVC projectors insist on an additional 3-way handshake (PJ_OK, PJREQ, PJACK) in addition to the normal TCP 3-way handshake. This means that certain home automation appliances may have timing difficulties communicating with the projector as they lack the protocol knowledge to implement the additional handshake.

See JVC Projector Control codes for the actual codes to effectively manage a JVC projector.

Using the server

Start the server, proxy between localhost and ‘my-projector’ on the usual JVC control port number (20554).

$ jvc_proxy -l DEBUG -r 2 -t 1 my-projector

Binds the server to an IP address / hostname that is accessible external to the machine (i.e. not localhost). Set logging level to DEBUG (will log the actual bytes proxied). Will retry failed connections to the projector twice. Allows 1 second timeout on network operations.

$ jvc_proxy --proxy_host my-pc -l DEBUG -r 2 -t 1 my-projector

Available arguments:

usage: jvc_proxy.py [-h] [--jvc_port JVC_PORT] [--proxy_host PROXY_HOST]
                    [--proxy_port PROXY_PORT] [-t TIMEOUT] [-v VERBOSE]
                    [-l {ERROR,WARNING,INFO,DEBUG}] [-r RETRIES]
                    [-w RETRY_WAIT]
                    jvc_host

positional arguments:
  jvc_host              JVC host to proxy to. Default: 20554.

optional arguments:
  -h, --help            show this help message and exit
  --jvc_port JVC_PORT   JVC port number to connect to.
  --proxy_host PROXY_HOST
                        Proxy server host/IP to bind to. Default: localhost.
  --proxy_port PROXY_PORT
                        Proxy server port number to listen on. Default: 20554.
  -t TIMEOUT, --timeout TIMEOUT
                        Timeout for network operations (seconds). Default: 2.
  -v VERBOSE, --verbose VERBOSE
                        Whether or not to output proxied data. Default: False.
  -l {ERROR,WARNING,INFO,DEBUG}, --loglevel {ERROR,WARNING,INFO,DEBUG}
                        Logging level. Default: ERROR.
  -r RETRIES, --retries RETRIES
                        Number of retries to allow in connection to the JVC
                        host. Default: 0
  -w RETRY_WAIT, --retry_wait RETRY_WAIT
                        Seconds to wait between connection retries. Default:
                        5.

Starting the server by default

Use the included jvc_proxy.service to start the server as a systemd unit.

Project details


Release history Release notifications

This version

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for jvc-proxy, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size jvc_proxy-0.0.1-py2.py3-none-any.whl (7.0 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size jvc_proxy-0.0.1.tar.gz (8.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page