Dimmer(s) not keeping their set value


Okay, I am stumped. Of course, it doesn't take much to stump me. I have narrowed down a problem I am having to the following code

There is more too it than this snippet. This is where my problem lies.
The intent is to turn all the Kitchen lights off and then only turn certain lights back on at a dimmed level. It works but the lights selected continue on to full brightness only briefly stopping at the dimmed level. Now if I leave the light at their current brightness and just give the dim command everything works okay.
The question is not if this is the best way to accomplish this, the question is why does it not work? I would like to know why the lights are being commanded back to 100%



This might be a silly question, but have you verified that the devices in question aren't in use by another automation that could be causing this? Go to the device page and check the "In Use By" section. If there is anything more than your "Good Evening" rule, see what that does and make sure it wouldn't be trying to do the same, and if they're part of any groups, check the groups too.

If that doesn't work, I don't have any hard-wired Lutron dimmers to test with, but I wonder if they maybe didn't have time to complete the "off" before the "dim" got sent and if that might confuse them. The Lutron integration, as you know, works over telnet, which should be pretty fast on your LAN, but most Lutron dimmers I've seen have a cute "ramp rate" and I wonder if the "dim" might be tripping it up while it's still trying to fade out from the "off." This is a total guess. :slight_smile: I'm also not saying it should happen or isn't a problem. But you could humor yourself by putting a small delay, say a few seconds, between the Off and Dim actions to see if the behavior changes.


No Humor here :sleepy:

Further Troubleshooting has shown that:

  1. This happens with RM3 or RM4

  2. It is NOT just associated with Lutron Dimmers but others dimmer as well (I think GE)

  3. This happens whenever Light ABC is turned off and light ABC is DIMed back on to x%, the light briefly pauses at x% then continues on to 100%.
    OFF: ABC
    DIM: ABC:10
    Does not work

  4. If light DEF is turned OFF followed by light ABC DIMed to x%. It works
    OFF: DEF
    DIM: ABC:10
    Does work

  5. Delay Commands placed anywhere within actions whether part of a statement or its own line has no effect. Delays up to 30 seconds were used.

  6. If GHI Group contains light ABC along with several other lights and outlets ABC DIMed does not work
    OFF: GHI Group
    DIM: ABC:10
    Does not work

  7. Finally, the percentage of dimming has no bearing on the functioning of the rule. Of course if you DIM: 100 it works every time :face_with_raised_eyebrow:



3 out of 4 of the lights you are turning off are then turned back on again. Why is that? Why not just dim them to 10 directly rather than turning them off?


Thanks Ryan, as I said in my original "The question is not if this is the best way to accomplish this, the question is why does it not work?" With as elegant as Hubitat is, I am quite sure that there are just about as many ways to accomplish a given task as there are users of Hubitat.

But to answer your question, I am playing, seeing what works what does not etc.


The problem is that doing it this way might be the problem. You are trying to send telnet command to lutron to both turn off and set level on the same dimmer simultaneously. If you put a short delay in between those commands and it works then that is your problem.


Did that Ryan. See item 2 and 5 in my reply above.



Can you show logs? Because I just built the exact same rule and it worked perfectly for me when i have a delay of 1 second between the commands. As I said, issuing both commands simultaneously has mixed results which usually end up with the light not matching the light's actual state.


Ryan, Here you go
Capture 1 second Delay
Capture1 10 second Delay

Somehow it is getting a turn on & set level command 10 100%


Do you see that the order of set level is coming after the level is actually set. That doesn't make any sense. Can you show the edit device page for Kitchen sink as well as any other apps listed on that page? I bet there is something else that is setting the level of that dimmer. I just did the exact same thing and it works fine.

Did you turn on logging for the rule? That would also be helpful.



I may have found the problem. I have simple lighting rules for all of my lights. When I change the Kitchen Sink Simple Lighting Rule. My Rule follows. Why? Is this normal? It looks like anytime Kitchen Sink is mentioned it fires all through HE


You never said whether you looked at the "In use by" section on the device page. It sounds like you almost certainly have another app or rule that is responding to some event, possibly the Kitchen Sink light turning on, and causing other things to happen, perhaps turning them on and setting the level to 100%. Looking at this section would have been a useful way to see this sooner--it tells you what apps your devices are used by and won't tell you exactly what's happening but can be useful for finding places to look.

But...app 409 looks like a likely candidate from your logs, assuming that isn't this rule. Going into your apps list and finding one with "409" in the URL, or navigating to a page like http://your-hub-ip/installedapp/configure/409 may take you directly to the offending app.


Yep Thats it. But why? Sorry I missed the other Apps thing question


Yes. Hubitat is Event Driven. And any change to Kitchen Sink is an event and EVERYTHING that subscribes to Kitchen Sink will run... more or less simultaneously.


Hopefully @csteele's response above answers this question, too, but if not: pretty much the same reason. :slight_smile: A common pattern for apps in Hubitat is that they listen for ("subscribe" to) events from one or more devices and are configured to perform a specified set of actions when that happens--more or less like what you're able to do with a rule, which is basically just a super-customizable kind of app (a lot of "regular" apps are more or less templates where you can plug in devices and values to create specific types of automation).

It sounds like you have an app subscribing to either an "on" or "set level" event from your lights, which must in turn be configured to set the level on the same light(s) and/or others when that happens. You'll have to use a combination of your knowledge of what apps you set up, the "In use by" section on the device page, and live or past logs (as you've done) to help figure out what exactly is going on. It sounds like this isn't something you actually want. If the "offending" app is performing a function you otherwise believe you do want, feel free to ask for help with that and there should be a way to make it do what you want but only when you actually want that.


I appreciate the amount of talent in this group to no end. Hopefully one day I will be half the knowledge as you folks have shown I know I am in good hands with my learning.

The miscreant App 409 is a Simple Lighting App which I have apparently set it and 20 some others like it wrong. They were set "on & set level". I changed to "ON"

With "On & Set Level" I am failing to see how requesting a light turn off, then dimming it causes HE to turn the light to on to 100%
OFF: Light
DIM: Light 10
= Light comes on uncommanded at 100% (in the background)
When I ask for the light to turn off HE tells it to come back on in the background

Dim: Light 10
= Light Stays DIMmed at 10
When I ask for the light to DIM (w/o the OFF: cmd), HE lets it stay DIMmed even with the setting of "on&set level"

Regardless, it is what it is and something to add to the memory banks. Many Many Thanks to all for steering me in the right direction. All is working as expected


Many dimmers and especially bulbs, come On with a setLevel command.

I can't say I like it. I'd rather set a Level when it's OFF then turn it on and have it go to that level. Same with RGB(W) products. But they are all dimmers in one way or another, and they work the way the manufacturers built them. :slight_smile:

I have a Hank RGBW bulb here beside me and from the Device Info page, if I click Set Level or Set Color, the bulb comes On and at the requested level/color. In fact, I suggest you give that a try... (although I know that now it's working for you...) the Device Info page's buttons will show you what is intended by the driver. RuleMachine, Simple/Motion Lighting just 'click the buttons for you' in a sense.


Thanks I have played around with the device page and it is a help and thank you for yours