core
core copied to clipboard
PJLink Integration is broken since 2024.3
The problem
pjlink: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 682, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1264, in async_device_update await hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/pjlink/media_player.py", line 127, in update self._attr_available = self._setup_projector() ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/pjlink/media_player.py", line 101, in _setup_projector inputs = projector.get_inputs() ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pypjlink/projector.py", line 210, in get_inputs param = self.get('INST') ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pypjlink/projector.py", line 132, in get success, response = protocol.send_command(self.f, body, '?', self.encoding) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pypjlink/protocol.py", line 71, in send_command resp_body, resp_param = parse_response(f, encoding) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pypjlink/protocol.py", line 30, in parse_response assert header == '%' AssertionError
What version of Home Assistant Core has the issue?
2024.3
What was the last working version of Home Assistant Core?
2024.2.5
What type of installation are you running?
Home Assistant OS
Integration causing the issue
PJLink
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
configuration.yaml
# Beamer
media_player:
- platform: pjlink
host: 10.10.10.65
Anything in the logs that might be useful for us?
pjlink: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 682, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1264, in async_device_update
await hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/pjlink/media_player.py", line 127, in update
self._attr_available = self._setup_projector()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/pjlink/media_player.py", line 101, in _setup_projector
inputs = projector.get_inputs()
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pypjlink/projector.py", line 210, in get_inputs
param = self.get('INST')
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pypjlink/projector.py", line 132, in get
success, response = protocol.send_command(self.f, body, '?', self.encoding)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pypjlink/protocol.py", line 71, in send_command
resp_body, resp_param = parse_response(f, encoding)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pypjlink/protocol.py", line 30, in parse_response
assert header == '%'
AssertionError
Additional information
No response
I have the same issue, I found that my optoma projector is returning two '/r' characters in stead of one at the end of a command response
If you also have an optoma projector and run into this issue, here's the workaround I'm using: https://community.home-assistant.io/t/optoma-projector/82740/13
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
still not working with latest HA. Please reopen.
I got this working with an Optoma UHD60 by adding the "name:" attribute to the Homeassistant config. eg:
media_player:
- platform: pjlink host: 10.10.10.65 name: optoma_uhd
Without "name", I would get the AssertionError. Took me an entire afternoon to figure this out! Hope this helps someone or to narrow down the error.