Help with Hue Dimming in RM

Hello, I am new to HE and just installed my hub today and I'm starting to migrate over. One reason I came to HE is to have faster device responsiveness and to hopefully be able to setup a dimming function with either Webcore (what I'm used to) or RM. Webcore on smartthings was too slow and it looks like Webcore on HE is also too slow but RM seems to be able to be fast enough, I just can't figure out the conditions.

I'm trying to set an Inovelli switch/dimmer to dim the lights up while I hold the up paddle and stop dimming when I release and vice versa for down. I have down working fine, but dimming up seems to have an issue due to both the switch and level needing changed.

Does anybody know how I would be able to turn Hue lights on from off to a low dim level in order for RM to then start dimming it up?

You can use Rule Machine for this, but Button Controller would also work. If you use Rule Machine, use the "Button Device" trigger capability and not plain "Button." The result of doing so will be nearly identical to the Button Controller UI and will work better (if you don't want to just use Button Controller itself) for what you want to do.

The key things you need to make this work how you want is that the device you're ultimately controlling needs to support the "Start Level Change" and "Stop Level Change" commands. If you're using Hubitat's built-in Hue Bridge integration, you're good to go. You can see the commands a device supports in the rows/columns of buttons at the top of its page under "Devices" in the Hubitat admin UI. You will note that Hue groups from Hubitat's built-in Hue Bridge integration do not support these commands, so you'll have to use either individual bulbs or a third-party integration if you want that. These are the commands that get you the smooth dimming you're looking for: the former will start raising or lowering the level until either the latter is called or it reaches the min/max level.

Then, you just need a way to call these commands at the desired time from Rule Machine or Button Controller. In either the Set Dimmers and Bulbs > Start raising dimmer level or Start lowering dimmer level actions will call the appropriately-parametered "Start Level Change" command, and Stop changing dimmer level will call "Stop Level Change." You'll just need to put them in the "Actions" list for your desired button event. If you're using Hubitat's built-in driver, this is "button 1 held" and "button 1 released" for hold and release, respectively, on the up paddle or the same with button 2 for the down paddle. If you're using Inovelli's custom driver, button 8 pushed is holding the up button, and button 6 pushed is the release, while button 8 held is holding the down button and button 6 held is the release (no, this doesn't make any sense, but it's one workaround for the fact that Hubitat doesn't natively support anything beyond double-taps and Inovelli's driver supports all taps/scene events the device offers). If you're using another custom driver, consult its documentation for the appropriate events, though most are closer to what Hubitat does for these.

1 Like

Thanks, that's more-or-less what I have but the issue is the "switch" within the Hue settings. Just doing it in the device controls...


  1. click "on"
  2. start Level change Down
  3. Start Level change Up
    -- I can stop it where I want it

Doesn't work:

  1. click "off"
  2. Start Level change Up
    -- Light does not turn on from off

I need a way to turn the light on to have that work as intended. I setup a condition in RM to turn the switch on and set the level to 0 only IF the switch is off and that mostly works, but whenever I then start a Level Change Up it returns to zero and goes up from there. Down works as desired because the switch will be on.

I think I got it. Playing around in Hubitat's device settings for my bulb I noticed that setLevel(1) will turn the bulb on from off, so now I just use setLevel(1) IF switch is off and then start level change up.

Edit: Welp. Got one switch (Inovelli Red On/Off) working. Went to duplicate it for a dimmer (Inovelli Red Dimmer) and I am getting

java.lang.NullPointerException: Cannot invoke method startLevelChange() on null object on line 5942 (allHandler)

Edit: Edit: I removed the rule and cloned the working one and changed the devices as requested and it is working without issue now, so I have no idea.

This is normal behavior for most bulbs, though it does depend on how the driver or device implement these features (e.g., the Generic Zigbee RGBW bulb drivers do indeed turn the device on in this case, though I'm not sure if that changed in hub firmware 2.2.5). If you want this to always happen, you'll have to add an explicit "On" command before your "Start Level Change." Personally, I like the behavior as-is because I can use it on a whole room or fixture without affecting bulbs that aren't on, but it sounds like you'd like it the other way, so that's how.

Me neither. :slight_smile: Sounds like a weird error. If you can figure out how to reliably reproduce it, staff would probably like to know how to replicate the problem so they can fix it. Otherwise, if you run into something like this, re-creating the rule/app is a (usually) easy way to see if it was just something odd there.

Glad you got something figured out!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.