amosyuen / ha-epson-projector-link

Home Assistant Epson Projector Link
Apache License 2.0
13 stars 6 forks source link

Cannot retrieve the Error property #100

Open jeroen-smit opened 7 months ago

jeroen-smit commented 7 months ago

Version of the custom_component

v1.0.0

Describe the bug

The integration cannot successfully retrieve the Error property/attribute. After including "Error" for "Additional properties to poll" in the configuration UI panel, it shows property_error_error on Submit and will not proceed/save. See screenshot & debug log.

Note: This is with the Epson TW9400 (= 5050UB). The other properties retrieve just fine, and overall the integration seems to work wonderfully. It is however the Error property I'm particularly interested in, specifically "No signal", and for which I installed this integration :-)

Screenshot 2024-04-16 at 09 42 35

Debug log

2024-04-16 09:38:11.839 DEBUG (MainThread) [custom_components.epson_projector_link.projector.projector] _send_request: command="PWR?"
2024-04-16 09:38:11.839 DEBUG (MainThread) [custom_components.epson_projector_link.projector.projector] connect
2024-04-16 09:38:11.849 DEBUG (MainThread) [custom_components.epson_projector_link.projector.projector] connect: response="ESC/VP.net " response_bytes_hex=4553432f56502e6e6574100300002000 len=16
2024-04-16 09:38:11.886 INFO (MainThread) [custom_components.epson_projector_link.projector.projector] connect: Connection opened
2024-04-16 09:38:11.887 DEBUG (MainThread) [custom_components.epson_projector_link.projector.projector] _listen: Listening to connection
2024-04-16 09:38:11.889 DEBUG (MainThread) [custom_components.epson_projector_link.projector.projector] _listen: response="PWR=01
:" response_bytes_hex=5057523d30310d3a len=8
2024-04-16 09:38:11.889 DEBUG (MainThread) [custom_components.epson_projector_link.projector.projector] _handle_property: prop=PWR value="01"
2024-04-16 09:38:11.889 DEBUG (MainThread) [custom_components.epson_projector_link.projector.projector] _update_property: prop=PWR, value=on
2024-04-16 09:38:11.889 DEBUG (MainThread) [custom_components.epson_projector_link.projector.projector] _send_request: command="LAMP?"
2024-04-16 09:38:11.893 DEBUG (MainThread) [custom_components.epson_projector_link.projector.projector] _listen: response="LAMP=478
:" response_bytes_hex=4c414d503d3437380d3a len=10
2024-04-16 09:38:11.893 DEBUG (MainThread) [custom_components.epson_projector_link.projector.projector] _handle_property: prop=LAMP value="478"
2024-04-16 09:38:11.893 DEBUG (MainThread) [custom_components.epson_projector_link.projector.projector] _update_property: prop=LAMP, value=478
2024-04-16 09:38:11.893 DEBUG (MainThread) [custom_components.epson_projector_link.projector.projector] _send_request: command="IRIS?"
2024-04-16 09:38:11.896 DEBUG (MainThread) [custom_components.epson_projector_link.projector.projector] _listen: response="IRIS=00
:" response_bytes_hex=495249533d30300d3a len=9
2024-04-16 09:38:11.897 DEBUG (MainThread) [custom_components.epson_projector_link.projector.projector] _handle_property: prop=IRIS value="00"
2024-04-16 09:38:11.897 DEBUG (MainThread) [custom_components.epson_projector_link.projector.projector] _update_property: prop=IRIS, value=Off
2024-04-16 09:38:11.897 DEBUG (MainThread) [custom_components.epson_projector_link.projector.projector] _send_request: command="ERR?"
2024-04-16 09:38:11.900 DEBUG (MainThread) [custom_components.epson_projector_link.projector.projector] _listen: response="ERR
:" response_bytes_hex=4552520d3a len=5
2024-04-16 09:38:11.900 WARNING (MainThread) [custom_components.epson_projector_link.projector.projector] _handle_err: Received error response for command="ERR?"
2024-04-16 09:38:11.900 ERROR (MainThread) [custom_components.epson_projector_link.projector.projector] _send_request: command="ERR?" error=Received error response for command="ERR?"
Traceback (most recent call last):
  File "/config/custom_components/epson_projector_link/projector/projector.py", line 228, in _send_request
    return await request.future
           ^^^^^^^^^^^^^^^^^^^^
custom_components.epson_projector_link.projector.exceptions.ProjectorErrorResponse: Received error response for command="ERR?"
larhedse commented 7 months ago

I have the same challenge on my Epson EH-TW9400W.

larhedse commented 6 months ago

By the way, there are a few more error codes nowdays, one might add the last few lines into /homeassistant/custom_components/epson_projector_link/projector/const.py:

PROPERTY_ERR_CODE_MAP = { "00": ERROR_NONE, "01": "Fan error", "03": "Lamp failure at power on", "04": "High internal temperature error", "06": "Lamp error", "07": "Open Lamp cover door error", "08": "Cinema filter error", "09": "Electric dual-layered capacitor is disconnected", "0A": "Auto iris error", "0B": "Subsystem Error", "0C": "Low air flow error", "0D": "Air filter air flow sensor error", "0E": "Power supply unit error (Ballast)", "0F": "Shutter error", "10": "Cooling system error (peltiert element)", "11": "Cooling system error (Pump)", "12": "Static iris error", "13": "Power supply unit error (Disagreement of Ballast)", "14": "Exhaust shutter error", "15": "Obstacle detection error", "16": "IF board discernment error", "17": "Communication error of Stack projection function", "18": "I2C erro", "1A": "Lens shift error", "1B": "Quarts N Polarizer error", "1C": "No lens error", "1D": "Subsystem error 2", "1E": "Power supply voltage error", "1F": "Other error", }

Btw. I can not find the "ERR?" command - or I can not read python code maybe is more correct...