[RELEASE] Dimmer Button Controller (configure Pico to emulate Hue Dimmer or any button device to easily control lights)

Log when trying to add dim up preference.

Ok Im guessing it doesnt work with a light group?

Nope, just a bug. :slight_smile: (It was trying to let you know your devices don't support startLevelChange() and stopLevelChange(), which isn't an issue if you don't use the "dim/brighten while held" option that depends on these commands; Hubitat group devices do not currently support this.)

I've uploaded v3.0.1 with a fix. Also fixed an unrelated issue I saw with HPM that might affect anyone doing a repair or re-install of v2 (now deprecated, but it would still let you do it). Thanks for the report!

1 Like

@bertabcd1234 Awesome. Thank you.

One more thing just curious. Is there any way you could add a preference to dim up even if lights are off? Seems like the only way it will dim up is if they are already on. I was hoping to be able to dim them up while they are off. If not I completely understand.

This wouldn't be impossible, but it's unlikely to work as you expect: when a switch is off, that is not level 0, so a "dim up by x" wouldn't necessarily dim up to a low level from nothing. On/off state is tracked via the "switch" attribute, which is distinct from "level," which generally tracks either the current level of the device (if on) or the last known level of the device (if off). You can play around with commands like "On," "Off," and "Set Level" on the device page for your bulbs or dimmers to see how these interact.

An alternative is to use the "dim while held" option, which uses the startLevelChange() and stopLevelChange() commands on the device. Your devices have to support these commands (Hubitat groups don't) and they have to have the behavior you want with these commands (in your case, turning on with a startLevelChange("up") even if they are currently off--which a lot of devices will do, though I happen to not prefer that behavior). This app currently just sends those commands regardless of whether the device is on given the behavior of Hue Bridge lights, which are not affected by these commands if off and what I mainly use this app to control.

2 Likes

Great App, thank you for developing this. It works much better than the other. I have one request... is it possible to allow a variable for the device "Level"? I have a variable for level that is based on illuminance. I would like the action to set to the level of the variable,

Probably! Maybe something like this for the UI? (Just started experimenting and came up with this...doesn't do anything yet. :smiley: )

1 Like

Looks perfect. Thank you!

I've released Dimmer Button Controller 3.1 with these changes:

  • new option to use hub variable for level (as discussed above)
  • optional preference to enable command metering (similar to the same option in Groups and Scenes--you can specify a delay between commands, which can be helpful if sending commands to a large number of devices and you're worried about flooding your network)

As usual, this can be installed manually (see first post) or via HPM. Let me know if there are any issues!

1 Like

Great idea off a app. like the variables for level. As a idea what about for colour temperature?

Noticed some thing when using a pre-set. I then tried to make changes and each time you ok'ed the change it took you to the pre-set page rather than the main page.

Also just had a idea, something like this would work for controlling a speaker, increasing volume play pause EX

Now that Hubitat has app cloning, I'm thinking about just getting rid of presets (any objections?), but I think there is something I can do about that issue.

As soon as I added variable level (literally as I was writing it), I knew someone would ask for CT. :joy: I can add that in in a similar manner sometime.

2 Likes

Under the heading "beggars can't be choosers", but.....any chance you'd be willing/able to do the same with Color Temperature? Love this app so much better than BC/ABC, but I can't keep my bulbs in sync with the circadian rhythm unless I can update CT with variable. Thanks for the consideration....

Yeah, if I wasn't clear above, I'll actually do that at some point instead of just joke about it. :slight_smile: I'll probably also take the opportunity to make some breaking changes that will make this easier if no one cares: removing the "send double commands" option (I used to need this for some bulbs that didn't respond to all of the commands that were sent; I'm thinking recent driver changes plus the ability to use metering in both this app--which I silently slipped into the last update --and Hubitat groups makes this workaround no longer necessary) and presets (you can clone apps now, so probably no need).

3 Likes

Another thing that would be useful as currently have to use RM and a variable. On my lights I have one button that controls the lights.

So press and if it's on turn it off, if it's off do X y z depending on conditions that's complex so has to stay on RM.

But the held is for dimming using raise dimmer and lower dimmer. In order to get this to work on the release I stop the dimming and I flip a bool variable to if true go false and I use that true or false to decide if it's raising or lowering. So basically it makes a single press switch work like any control system which each time you hold it dims or brightens. In order to keep it consistent aswell, after 5 seconds after a release it sets the variable to true. This way the first hold is always up for example.

So a toggle dim option would make this easy.

1 Like

This is a great app, really like how you can toggle through scenes.

Is there a way for one of the numbered button presses to be "off" command?

For example if you had 4 scenes triggered by 1st,2nd,3rd,4th then the 5th button press turn them off.

Maybe if you specify 0 for the level? (Or use a scene that does the same.) That wasn't really a goal given the behavior I was trying to emulate, but that should work...

1 Like

I’m getting an error in HPM when trying to update this app:

Any idea what would cause this? Am I the only one seeing this?

I tried both a new install and a repair (don't have anything that I could update, exactly) and both worked fine for me. If you're upgrading 3.x to 3.1, you can just grab the code manually from GitHub as a workaround for now and overwrite the old code. If you're updating from 2.x or newer, I'd suggest adding it as new app code, and you'll also need to update the parent app (in place).

1 Like

Thanks! I did a repair instead and it worked. I was on 3.X, repair added 3.1. Maybe that was the issue, but it seems to work now! :slight_smile: