Hello!
I have Epson EH-TW5350 projector connected via Wi-Fi. I tried to use HA Epson controls for it, but when it is off it is not connected to wi-fi so I can’t turn it on. So I ended with turning it on via Broadlink RM Mini and turning off via HA Epson projector controls (because when you turn in off via IR you have to push the power button twice, over wi-fi it is easier).
I also get projector state by simple ping sensor.
Here are my config parts.
Check if the projector is on by ping
binary_sensor:
- platform: ping
host: 192.168.1.161
count: 2
name: epson_projector
scan_interval: 10
HA Projector control (i hid it because “turn on” isn’t working) and universal projector entity (i show it in UI)
media_player:
- platform: epson
host: 192.168.1.161
name: epson_projector_lan
- platform: universal
name: epson_projector
commands:
turn_on:
service: broadlink.send
data:
host: 192.168.1.30
packet: 'JgCQAAABJYwYNBU1FRAVEBUQFBEUERQ1FTUUERQ1FRAVNRUQFDUVEBUQFRAVEBQRFDUVEBUQFTQVNRU1FTQVNRUQFTUUNRUQFQAFNgABJ5AVNRU1FRAUERQRFBEUEBU1FTQVERQ1FRAVNBURFDUVEBUQFRAUERQRFDUVEBUQFTQVNRU1FTQVNRUQFTQVNRUQFQANBQAAAAAAAAAA'
turn_off:
service: media_player.turn_off
data:
entity_id: media_player.epson_projector_lan
volume_up:
service: broadlink.send
data:
host: 192.168.1.30
packet: 'JgCQAAABI5AWNBU0FhAVEBUQFQ8VEBU1FTQWDxY0FRAVNBYPFjQVEBUQFRAVEBU0FjMWEBUQFTQVNBU1FjQUERUQFTQWNBQRFAAFNwABJpEWMxQ2FRAVEBQRFBEUERQ1FDYWDxQ1FhATNhMSFDUUEhQRExEUERQ1FDYUERMSEzYUNhQ2EzYWEBMSEzYTNxMSEwANBQAAAAAAAAAA'
volume_down:
service: broadlink.send
data:
host: 192.168.1.30
packet: 'JgCQAAABI5EVNRU0FREUERMSExEUERQ2FTQVEBU1FBETNhQRFDYUERM2FBITERQ2EzYUEhMRFDYUERM2FTUUERMSEzYUNhQREwAFNwABJpIVNRM2FRAUERQRFBETEhQ1FTUVEBQ1FREUNRUQFDUVERQ1FRAUERM2FTUVEBQRFDUVERQ1FDYUERMSFDUVNRMSFAANBQAAAAAAAAAA'
attributes:
state: binary_sensor.epson_projector
BroadlinkRM Mini and projector switch for HomeKit use
switch:
- platform: broadlink
host: 192.168.1.30
mac: 'C8:F7:42:62:EB:60'
timeout: 15
- platform: template
switches:
epson_projector_switch:
friendly_name: "Проектор"
value_template: "{{ is_state('binary_sensor.epson_projector', 'on') }}"
turn_on:
service: broadlink.send
data:
host: 192.168.1.30
packet: 'JgCQAAABJYwYNBU1FRAVEBUQFBEUERQ1FTUUERQ1FRAVNRUQFDUVEBUQFRAVEBQRFDUVEBUQFTQVNRU1FTQVNRUQFTUUNRUQFQAFNgABJ5AVNRU1FRAUERQRFBEUEBU1FTQVERQ1FRAVNBURFDUVEBUQFRAUERQRFDUVEBUQFTQVNRU1FTQVNRUQFTQVNRUQFQANBQAAAAAAAAAA'
turn_off:
service: switch.turn_off
data:
entity_id: switch.media_outlet
But I have one problem. When the projector is off I have error messages from HA Epson projector control component. I think they don’t have any effects on HA work, but maybe someone knows what I did wrong or how to fix it?
Error message:
Update for media_player.epson_projector_lan fails
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/epson_projector/main.py", line 129, in send_request
headers=self._headers) as response:
File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 1005, in __aenter__
self._resp = await self._coro
File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 476, in _request
timeout=real_timeout
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 522, in connect
proto = await self._create_connection(req, traces, timeout)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 854, in _create_connection
req, traces, timeout)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 974, in _create_direct_connection
req=req, client_error=client_error)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 924, in _wrap_create_connection
await self._loop.create_connection(*args, **kwargs))
File "uvloop/loop.pyx", line 1894, in create_connection
File "uvloop/loop.pyx", line 1883, in uvloop.loop.Loop.create_connection
concurrent.futures._base.CancelledError