Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for LUMINANCE ? #10

Open
gytisgreitai opened this issue Dec 15, 2020 · 6 comments
Open

Add support for LUMINANCE ? #10

gytisgreitai opened this issue Dec 15, 2020 · 6 comments

Comments

@gytisgreitai
Copy link

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')],
@pszafer
Copy link
Owner

pszafer commented Dec 16, 2020

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

@gytisgreitai
Copy link
Author

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 ?

@pszafer
Copy link
Owner

pszafer commented Dec 16, 2020

do you know if all projectors support luminance?

@gytisgreitai
Copy link
Author

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

@pszafer
Copy link
Owner

pszafer commented Dec 20, 2020

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

@xela1
Copy link

xela1 commented Sep 15, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants