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

Bounds for LED Brightness incorrect #294

Closed
tommycw1 opened this issue Dec 31, 2020 · 2 comments
Closed

Bounds for LED Brightness incorrect #294

tommycw1 opened this issue Dec 31, 2020 · 2 comments

Comments

@tommycw1
Copy link
Contributor

I noticed that when setting LED backlight brightness, setting to values < 16dec or 0x11 results in 0x11 still being sent to the device and the brightness not changing.

Looking at the code, I see the following note:

# Bound to 0x11 <= level <= 0xff per page 157 of insteon dev guide.
# 0x00 is used to disable the backlight so allow that explicitly.

Looking at the dev guide I see the following on page 157

image

Note: this bounds the upper limit to 0x7F, not 0xFF

I can also state that from experience, setting this to a value > 0x7f does not result in a brighter LED.

I also see this in the dev notes for the keypad and a micro dimmer module

image

image

There is also a problem with the lower bound. The lower bound in these documents is stated to be 0x11. However I can achieve incrementally lower LED brightnesses all the way down from 0x11 to 0x00, using Insteon-Terminal (which does not implement a boundry). This is the case for both the 2477D Dimmer as well as the 2334D Keypad.

Lastly, setting the LED to 0x00 does NOT actually disable the LED, it just sets it to a very low level. You need to set operating flag 9 for on or 8 for off:

image

From Insteon-Terminal:

        def setLEDOff(self):
                """setLEDOff()
                This disables the backlight LED"""
                self.querier.setMsgHandler(DefaultMsgHandler("Set LED OFF"))
                return self.querier.queryext(0x20, 0x08, [0x00, 0x00, 0x00]);

        def setLEDOn(self):
                """setLEDOn()
                This enables the backlight LED"""
                self.querier.setMsgHandler(DefaultMsgHandler("Set LED ON"))
                return self.querier.queryext(0x20, 0x09, [0x00, 0x00, 0x00]);
@tommycw1
Copy link
Contributor Author

tommycw1 commented Jan 1, 2021

I originally thought this effected only the dimmer. Inspecting the code more closely - I see the switch was also effected by both the upper and lower bound issue and the Keypad was effected by the lower bound issue, but had the correct upper bounds. I'm submitting a patch to also fix these issues in these additional devices.

@tommycw1
Copy link
Contributor Author

tommycw1 commented Jan 1, 2021

Wanted to note that this issue also exists in Outlet.py. I HIGHLY suspect this applies here as well, but I am not going to submit a patch for this file as I don't have the associated hardware to check functionality.

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

Successfully merging a pull request may close this issue.

2 participants