epson_projector icon indicating copy to clipboard operation
epson_projector copied to clipboard

Add support for LUMINANCE ?

Open gytisgreitai opened this issue 4 years ago • 6 comments

Basically LUMINANCE indicates the light "emit power" and at least on my projector has two modes: Eco(01) and Normal(00) .

Something in the lines of seems to be working, though not sure of the const.py structure

diff --git a/epson_projector/const.py b/epson_projector/const.py
index 17f2330..e0be19f 100644
--- a/epson_projector/const.py
+++ b/epson_projector/const.py
@@ -18,6 +18,7 @@ GET_CR = "?"+CR

 POWER = "PWR"
 CMODE = "CMODE"
+LUMINANCE = "LUMINANCE"
 SOURCE = "SOURCE"
 VOLUME = "VOLUME"
 MUTE = "MUTE"
@@ -57,6 +58,7 @@ EPSON_KEY_COMMANDS = {
     "PWR": [('jsoncallback', 'PWR?')],
     "SOURCE": [('jsoncallback', 'SOURCE?')],
     "CMODE": [('jsoncallback', 'CMODE?')],
+    "LUMINANCE": [('jsoncallback', 'LUMINANCE?')],
     "VOLUME": [('jsoncallback', 'VOL?')],
     "CMODE_AUTO": [('CMODE', '00')],
     "CMODE_CINEMA": [('CMODE', '15')],
@@ -77,6 +79,8 @@ EPSON_KEY_COMMANDS = {
     "CMODE_THEATRE": [('CMODE', '05')],
     "CMODE_THEATREBLACK": [('CMODE', '09')],
     "CMODE_THEATREBLACK2": [('CMODE', '0A')],
+    "LUMINANCE_ECO": [('LUMINANCE', '01')],
+    "LUMINANCE_NORMAL": [('LUMINANCE', '00')],
     "VOL_UP": [('KEY', '56')],
     "VOL_DOWN": [('KEY', '57')],
     "MUTE": [('KEY', 'D8')],

gytisgreitai avatar Dec 15 '20 20:12 gytisgreitai

do you want to add luminance to Home Assistant or just to this library?

pszafer avatar Dec 16 '20 08:12 pszafer

To Home Assistant ideally. I'm moving from another platform, and this is one thing that i'am missing automate brightness on/off based on time of day In Home Assistant afaik this could be implemented as cmode with select & server, though probably a better alternative would be a switch turn eco on/off ?

gytisgreitai avatar Dec 16 '20 12:12 gytisgreitai

do you know if all projectors support luminance?

pszafer avatar Dec 16 '20 12:12 pszafer

Not sure if all, but according to the spec from here https://download.epson-europe.com/pub/download/6332/epson633270eu.xlsx quite a lot of them

gytisgreitai avatar Dec 16 '20 13:12 gytisgreitai

I will try to add to HA this after Christmas time.

pszafer avatar Dec 20 '20 17:12 pszafer

Would it be possible to add a service that allows you to send any command?

xela1 avatar Sep 15 '22 19:09 xela1