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 | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file jvc_proxy-0.0.1.tar.gz
.
File metadata
- Download URL: jvc_proxy-0.0.1.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76cab61a4dbe3382fbab0bf8b83ecefce54184f61c19c58b08604d3981d52799 |
|
MD5 | db2d2a7c19a4de3bd50acee860ffebaf |
|
BLAKE2b-256 | 05c2bf4313315a57045bd908dd6b4088ceff98113daa0e8189584087d6310a3d |
File details
Details for the file jvc_proxy-0.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: jvc_proxy-0.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d903e3e4d109fc52295cb1628fe48a0b7faf15c6b8a02050f419cbf8a794a028 |
|
MD5 | 7d0a066fd6c64242193ba5a9069d1122 |
|
BLAKE2b-256 | ca7af130f65935413a60994fff57567ed4c525af80b4524375bcad6ca8ba24e6 |