Library to control BenQ projectors.
Project description
Python library to control BenQ projectors
Introduction
Python library to control BenQ projectors over the serial interface or serial to network bridges like esp-link.
BenQ projectors and flat panels with a serial port can support one of three protocols. This plugin supports projectors which are of the L, P, T, W and X series but probably also others.
Features
- Connects to a BenQ projector over serial and serial to network bridge
- Sending commands to projectors
- Reading the projector status
- Detect projector capabilities
- Uses asynchronous IO
Hardware
I'm using a generic serial to USB converter to connect to my projector. The projector has a male DB9 connector, thus you need a female conector on your USB converter.
Protocol
This Python library works if your projector supports the following command structure:
<CR>*<key>=<value>#<CR>
Where <CR>
is a Carriage Return
Examples:
Power on : <CR>*pow=on#<CR>
Power off : <CR>*pow=off#<CR>
Change source to HDMI: <CR>*sour=hdmi#<CR>
Serial port
You can lookup and change the baud rate in the menu of your BenQ projector.
Network connected projectors
The commands as described above should also work over a network connection, however I don't own such projector and have implemented the network functionality using a serial to network bridge. The network support for native networked BenQ projectors is thus experimental. Let me know if your network connected BenQ projector works.
Example of a serial to network bridge using a serial to TTL converter and a Wemos C3 Mini:
It has to be said that a direct serial connection to the projector is much more responsive than using a network connection, at least when using a serial to network bridge. Maybe this is different on a native networked BenQ projector or using ethernet instead of WiFi.
PJLink
This library does not implement the PJLink protocol, but a proparitary BenQ protocol instead. The PJLink protocol is covered by other libraries.
Supported projectors
The following projectors are known to work:
- MW519
- TH585
- W1070
- W1100
- W1110
- X3000i
The following projectors are not tested but use the same protocol according to the documentation:
Others in the L, P, T, W and X Series
Not supported:
- RP552
- RP552H
- RP840G
- RP653
- RP703
- RP750
- RP750K
- RP652
- RP702
- RP790S
- RP705H
Some projectors need to be on to be able to detect the model and the library to work.
Please let me know if your projector is also supported by this Python library so I can improve the overview of supported projectors.
Installation
To install the Python BenQ projector library use the Python package manager PIP:
pip3 install benqprojector
benqprojector
CLI
You can use the Python BenQ projector library directly from the command line to turn on and off your projector using the following syntax:
Status of the projector: python3 -m benqprojector serial <serial port> <baud> status
Turn on the projector: python3 -m benqprojector serial <serial port> <baud> on
Turn off the projector: python3 -m benqprojector serial <serial port> <baud> off
Monitor the projector status: python3 -m benqprojector serial <serial port> <baud> monitor
Where <serial port>
is the serial port your projector is connected to and <baud>
the baud rate
of the projector.
Or if your projector is connected using a serial to network bridge:
Status of the projector: python3 -m benqprojector telnet <host> <port> status
Turn on the projector: python3 -m benqprojector telnet <host> <port> on
Turn off the projector: python3 -m benqprojector telnet <host> <port> off
Monitor the projector status: python3 -m benqprojector telnet <host> <port> monitor
Where <host>
is the hostname or IP address of the projector and <port>
the optional port number
of the projector. If no port number is given the default port number 8000 is used.
Detecting your projector capabilities
The benqprojector CLI can detect the commands, sources and modes your projector supports. If you like to have your projector fully supported by this Python library please run this command and create an issue on Github with the output attached.
To examine your projector capabilities:
python3 -m benqprojector serial <serial port> <baud> examine
Your projector needs to be on and on an active source to be able to detect all your projector capabilities.
Troubleshooting
You can add the --debug
flag to any CLI command to get a more details on what's going on. Like so:
python3 -m benqprojector serial <serial port> <baud> status --debug
Support my work
Do you enjoy using this Python library? Then consider supporting my work using one of the following platforms, your donation is greatly appreciated and keeps me motivated:
Hire me
If you're in need for a freelance Python developer for your project please contact me, you can find my email address on my GitHub profile.
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 benqprojector-0.1.3.tar.gz
.
File metadata
- Download URL: benqprojector-0.1.3.tar.gz
- Upload date:
- Size: 508.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9e6143ee15d176dd76a9ebd40adf0496d4b275a1783be6ecc5ec5d72612e0c7 |
|
MD5 | aa6d1c74bb43faeef817e6db61132053 |
|
BLAKE2b-256 | c60e667ebe261acd0a76c7cad6ca7102f6586b0d72e6387cab74a33bc3e93bd3 |
File details
Details for the file benqprojector-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: benqprojector-0.1.3-py3-none-any.whl
- Upload date:
- Size: 27.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | be8cf508d374d24c5ad4713be9f194074553aa3366dbddc06142fc493430567d |
|
MD5 | 0e72f7b7bd927a1cf2a4e338027f7f7f |
|
BLAKE2b-256 | f1e6f083974853354491e232efb0de6beea5acd25c28cd29e193510857476d2c |