rrooggiieerr / homeassistant-benqprojector Goto Github PK
View Code? Open in Web Editor NEWHome Assistant integration for BenQ projectors over the serial (and network?) interface.
License: Apache License 2.0
Home Assistant integration for BenQ projectors over the serial (and network?) interface.
License: Apache License 2.0
Hello,
When trying to install my projector, I got this error.
I use a usb-serial converter pl2303.
Core 2023.12.3
Supervisor 2023.11.6
Operating System 11.2
Interface utilisateur 20231208.2
First time I report a bug, let me know what you need.
Cheers
Logger: custom_components.benqprojector.config_flow
Source: custom_components/benqprojector/config_flow.py:65
Integration: BenQ Projector (documentation, issues)
First occurred: 22:34:48 (2 occurrences)
Last logged: 22:36:11
Unexpected exception: ('modelname', '?')
Traceback (most recent call last):
File "/config/custom_components/benqprojector/config_flow.py", line 65, in async_step_setup_serial
info = await self.validate_input_setup_serial(user_input, errors)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/benqprojector/config_flow.py", line 114, in validate_input_setup_serial
projector.connect()
File "/usr/local/lib/python3.11/site-packages/benqprojector/benqprojector.py", line 169, in connect
model = self._send_command("modelname")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/benqprojector/benqprojector.py", line 305, in _send_command
raise EmptyResponseError(command, action)
benqprojector.benqprojector.EmptyResponseError: ('modelname', '?')
Hey @rrooggiieerr, I realised the integration doesn't seem to be detecting the power status of my projector correctly.
My projector has been detected as 'on' even though it was off most of the time. At 6.09pm, I used the BenQ Projector Media Player card to turn off the projector. The projector turns off successfully, but the History states it's being turned on instead.
I am unable to turn on the projector after that through the media player card.
Integration finds and adds the projector. The projector also turns on when I hit the power button, but it doesn't seem to register any statuses and you can't then turn it off.
Hi rrooggiieerr, first of all I would like to say a big thank you for writing this integration for Home Assistant. I've been trying to write one myself but I haven't really figured out Python yet.
I am getting the above two errors when trying to add the integration to my HA. The log details are below:
--- No command echo received ---
Logger: benqprojector.benqprojector
Source: custom_components/benqprojector/config_flow.py:114
Integration: benqprojector
First occurred: 10:00:20 PM (6 occurrences)
Last logged: 10:10:30 PM
No command echo received
Response: *modelname=x3000i#
Unexpected response: []
--- Unexpected exception: Failed to retrieve projector model ---
Logger: custom_components.benqprojector.config_flow
Source: custom_components/benqprojector/config_flow.py:114
Integration: benqprojector
First occurred: 10:00:20 PM (2 occurrences)
Last logged: 10:10:30 PM
Unexpected exception: Failed to retrieve projector model
Traceback (most recent call last):
File "/config/custom_components/benqprojector/config_flow.py", line 65, in async_step_setup_serial
info = await self.validate_input_setup_serial(user_input, errors)
File "/config/custom_components/benqprojector/config_flow.py", line 114, in validate_input_setup_serial
projector.connect()
File "/usr/local/lib/python3.10/site-packages/benqprojector/benqprojector.py", line 133, in connect
assert model is not None, "Failed to retrieve projector model"
AssertionError: Failed to retrieve projector model
--- End ---
I note that the projector does reply correctly, but somehow an unexpected response was detected, preventing the script from going further. Please let me know what I can do to help troubleshoot the issue.
Hi I have a BenQ TK850i which looks like it might work with this nice integration. I was going to use an rs232 to network adapter would this integration be able to connect to the projector with HA running on a pi? I don't have local access to the rs232 as my pi is a long distance apart. Many thanks.
I use socat pty,link=/dev/virtualcom0,raw tcp:beamerctl:23
on my home assistant installation to make a tcp connection to a tcp2serial converter (hostname "beamerctl") on my Benq W1100.
Everything works, I can send commands with echo -e "\r*pow=?#\r" > /dev/virtualcom0
and receive answers from projector with cat /dev/virtualcom0
in a different terminal.
But when I try to give /dev/virtualcom0
into the device settings of the device assistant of homeassistant-benqprojector, I always get "Failed to connect" or "Unexpected error" (for instance when trying /dev/virtualcom0/
instead of /dev/virtualcom0
).
What am I doing wrong?
What is the right way of giving a (pty) serial port?
What would be the right baud rate to choose, if it is a pty serial port?
Hi - could you implement below commands for source set up
*sour=hdmi#
*sour=hdmi2#
*sour=hdmi3#
and way to set particular source at startup ?
Also - entity goes offline just after adding projector to HA
0.0.7 has problems with response handling for me because of echo.
newest version from pip works greate outside the home assistant integration.
pre-release of ha integration throws error "ModuleNotFoundError: No module named 'benqprojector.configs'" after getting model.
2023-10-26 13:35:44.624 ERROR (MainThread) [benqprojector.benqprojector] Unexpected response: b'\r' 2023-10-26 13:35:44.625 ERROR (MainThread) [benqprojector.benqprojector] Unexpected response: b'\n' 2023-10-26 13:35:44.625 DEBUG (MainThread) [benqprojector.benqprojector] command *modelname=?# 2023-10-26 13:35:44.640 DEBUG (MainThread) [benqprojector.benqprojector] Response: *modelname=?# 2023-10-26 13:35:44.640 DEBUG (MainThread) [benqprojector.benqprojector] Command successfully send 2023-10-26 13:35:44.642 DEBUG (MainThread) [benqprojector.benqprojector] Response: MODELNAME=MW519 2023-10-26 13:35:44.642 DEBUG (MainThread) [benqprojector.benqprojector] LC Response: modelname=mw519 2023-10-26 13:35:44.642 DEBUG (MainThread) [benqprojector.benqprojector] Raw response: 'modelname=mw519' 2023-10-26 13:35:44.642 DEBUG (MainThread) [benqprojector.benqprojector] Processed response: mw519 2023-10-26 13:35:44.644 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry BenQ ? /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A50285BI-if00-port0 for benqprojector Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 399, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/benqprojector/__init__.py", line 190, in async_setup_entry await projector_coordinator.connect() File "/config/custom_components/benqprojector/__init__.py", line 78, in connect if not self.projector.connect(): ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/benqprojector/benqprojector.py", line 224, in connect with importlib.resources.open_text("benqprojector.configs", "all.json") as file: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/importlib/resources/_legacy.py", line 25, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/importlib/resources/_legacy.py", line 63, in open_text return (_common.files(package) / normalize_path(resource)).open( ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/importlib/resources/_common.py", line 22, in files return from_package(get_package(package)) ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/importlib/resources/_common.py", line 53, in get_package resolved = resolve(package) ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/importlib/resources/_common.py", line 44, in resolve return cand if isinstance(cand, types.ModuleType) else importlib.import_module(cand) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1204, in _gcd_import File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked ModuleNotFoundError: No module named 'benqprojector.configs'
I am running HA in a Container, but everything else seems good.
Hi!
I have a W5700 with LAN support.
Want to figure out how to make it run? :)
Unfortunately the Web UI of the projector is done with adobe flash...
Do you have any idea how to send the commands to the projector over LAN?
Hey there @rrooggiieerr !
You mentioned in your readme that:
"The same commands should work over a network connection, but I don't own such projector and have not implemented any network functionality. Contact me if you have a network connected BenQ projector and like this to work."
I own a BenQ with LAN Connection and im totally intressted to integrated that with you togehter!
BR
Fabian
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.