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

If you add a virtual device, and specify the Lutron Shade driver, you will see that it implements much more than the standard Window Shade capability. Assuming the start and stop position change commands work with Serena, then there should be a way to issue these custom commands via Rule Machine’s custom actions using a ButtonDevice Trigger.

This is my current setup here, the full open and full close work, but that's it.

So, the first question is why not simply directly pair the Pico remote to the Serena shade, bypassing Hubitat altogether? It will respond much quicker and more reliably (assuming this is possible, as I do not have Serena shades... :wink: )

Seems like it is possible to directly control Serena Shades via a Pico Remote

I can do that, I was just trying to have everything at least visible and controllable in Hubitat, but at this point that seems like more trouble than its work for the shades+pico

Actually, you'd probably be disappointed with the performance. I know users who have tried the PICO->LutronHub->Hubitat->LutronHub->LutronDimmer have not had great success due to the fact that the LutronHub's telnet interface gets a little bogged down by all of the traffic. The direct Pico to LutronDimmer works perfectly.

1 Like

Continuing the discussion from Advanced Button Controller (ABC) concerning what color values mean for users of DBC (or really any app):

For hue and saturation, if you haven't figured it out yet, here are some things that might help:

  • Hubitat will report RGBW capable bulbs as being in one of two modes, RGB (color) or CT (color temperature, i.e., shades of white)
  • CT is a different model from the RGB (HSL) model, and there is no easy conversion between the two. To determine the relevant attributes that contribute to the current appearance of the light:
    • look at the "colorTemperature" attribute in Hubitat when in "colorMode: CT"
    • look at the "hue" and "saturation" attributes when in "colorMode: RGB"
  • The "level" attribute is just the brightness of the bulb/strip and is applicable to both.

As to what these attributes mean:

For RGB mode...

  • Hubitat's hue model goes 0-100 with both extremes being red
    • this is a scaled version of the standard 0-360° color wheel (so divide by 3.6 to get a Hubitat value; some devices also have a "use high-resolution hue" option, which does allow 0-360, though not all apps will necessary play well with those values)
    • device manufacturers do not have to "standardize" hue values, so a specific value on one brand/model might look different on another (e.g., Philips Hue vs. Sengled)
  • Saturation (0-100%) is basically the intensity of the color, so 100 will give you the reddest red (if your hue is near 0 or 100), bluest blue, etc.
    • note: some bulbs have specific weaknesses here, e.g., early Hue bulbs were widely reported to have weak/unsaturated greens and blues, but 100% would still get you the best they could do)
  • The "level" component of the color corresponds to the dimming/brightness value--Hubitat's color picker is a bit odd here because lower values become closer to black, which is probably the best approximation you can do but it really just means the light won't be as bright
  • All three of these parameters can be set individually ("Set Hue," etc.) or as part of a color ("Set Color"); the resulting effect should be the same, though if you're using app or rule and want them all to get set at the same time, "Set Color" is likely to be faster (but trying them individually is often easier for testing--or if you really do only want to change one value)

For CT mode...

  • This is standard color temperature in Kelvin. The lower the number, the "warmer" (oranger) the light appears, and the higher the number, the "cooler" (bluer) it appears.
  • Each bulb has a different range here, but something like 2000-something to 6000-something is a pretty common gamut. Casual Googling suggests Osram goes 2700-6500,
    • 2700 is about the standard warm white people are used to from incandescents
    • 4000 or even 5000 is what some people might associate with fluorescent office-type lighting

I wonder if something like this shouldn't go in an FAQ somewhere.... :thinking: It's not really DBC-specific, but unlike BC and some other apps, I don't provide pre-selected colors in a drop-down or anything (though with how much bulbs vary, I'm not sure if that is worth it).

2 Likes

Thanks for that. I’ll start toying with it again
I knew it wasn’t DBC related. But did kinda figure you might have an answer.
Regards.
Mac

2 posts were split to a new topic: Pairing Lutron Pico directly to Hubitat

I was setting up a pico remote with 10 button presses and got an error with button 3’s 10th iteration (colour bulb, each press is a different one). Any ideas?


2020-10-10 20:34:29.778 errorgroovy.lang.MissingMethodException: No signature of method: java.lang.String.right() is applicable for argument types: (java.lang.Integer) values: [1] Possible solutions: with(groovy.lang.Closure), length(), print(java.lang.Object), print(java.io.PrintWriter), getAt(int), getAt(int) on line 170 (pageButtonConfig)

Thanks for the report! (It was an error converting "10" to "10th" for purposes of displaying the number of button actions it takes to get to that particular configuration.) I've fixed this in...

Version 2.1.2: Minor bugfix for display of action numbers >=9. Available on GitHub (see first post) or Hubitat Package Manager.

1 Like

Ah! Good to hear it was a quick fix!

I have converted quite a few lights to bulbs controlled by buttons (hue Pico Remotes) instead of switches and I really adore how your app works! It is absolutely awesome! Makes the light super easy and intuitive to control!

Thanks! Sounds like exactly what I wrote it for! :smiley: (I use it with a few other devices, but Picos are what I had in mind, and I missed both the behavior of Hue Dimmers on Hue as well as not having to specify the lights for every single button/event.)

1 Like

Hey! I was hoping for some assistance.

I have a IKEA Tradfri Smart Plug that is not visible to the "Select lights to turn on and dim" dropdown, but it is visible in the "Select lights to turn off" dropdown. I suspect this is because I cannot dim a plug, but I would still like to be able to map it to a button (simply). Is there something I can do to add it here? Or perhaps this is a feature request?

Thanks, and keep up the good work

A workaround would be to create a group and put the switch in the group. Group capabilities don’t change based on the actual abilities of devices in the group, so you should be able to select a. group that includes the switch in the app.

Otherwise, I would just use either the built-in button controller or Advanced Button Controller.

I don't support selecting switch-only devices in the "main" list because the actions are capable of doing things like "Set Level" that the device needs to support, though if you don't use those actions, it won't really matter (and I suppose I have bulb-y commands for color/CT too and don't check that specifically, but I didn't want to be that restrictive). If you really wanted to, you could change "capability.switchLevel" on line 83 to "capability.switch", but if you update the app in the future, you'll have re-do the same change at an appropriate spot.

I might ask what the use is for a switch-only device with app like this. My intent was to allow Hue-Dimmer-style functionality, e.g., multiple presses to cycle through different scenes (or color/CT as specified without a "real" scene, etc.) and easy up/down dimming for the same devices with other buttons on the device. This works well for Lutron Picos, Eria Remotes, Hue Dimmers, and similar as the button device and smart dimmers, smart bulbs, and similar as the lights. If you just want a single button press to turn on or off a switch, I might recommend one of the above simpler apps instead since I'm not sure you'd really get any use out of these features, but maybe I'm missing a possible use case.

Hey! Thanks you both for the reply. I probably should have mentioned that I am very new to HE.

@EdMcW, the group suggestion was great, but I have actually set up the built-in button controller as suggested. Just as simple! Thanks very much.

@bertabcd1234 as for my use case, there is nothing special. I have a lamp plugged into it, so in my head it is a "light", but I understand the reason not to include it. I have a Hue Dimmer, and it was super simple to configure, so I wanted it for my lamp. Before Ed mentioned the other options, I used rules to tie these together.

I think I'm good now, and thank you both for the help.

2 Likes

I was trying to read the whole thread and I may have missed this, will this work for fan control? I have an Inovelli Fan and light switch and would love to set this up to change the speed fans and lights on and off. I have this working on some smart bulbs to turn on and off and dim, but I haven't seen the ability to select fan speeds.

There is no "native" support for fans, but if your fan driver implements the "Set Level" command, then you should be able to use it in the same way as a dimmer. Some drivers do this since it makes them more compatible with a wider variety of apps (and I'm not sure Hubitat's fan capabilities were as clearly defined in the early days), but some don't, likely trying to be "pure" fan drivers with only the "Set Speed" command, so your luck may vary. There are certainly ways you could achieve the same ends with a rule if needed, or likely even Button Controller (if it supports cycling speeds; can't remember off the top of my head).

Thank you @bertabcd1234. I will test it out and see.

Just discovered this thread.
I have a house full of Fibaro dimmers - which allow you to use a secondary physical switch (I use retractive switches) as a button for triggering other stuff - in my case for controlling other Fibaro dimmers.

Until now, I've been using RuleMachine to process the button presses.
This app certainly saves the pain of writing lots of IF-THEN-ELSE blocks - or needing multiple rules.

But sadly the Fibaro dimmers dont appear to support the dim until released option.
Thats a shame, but its still better than what I had before this app.

Great app, glad somebody had the presence of mind to think of it.