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

Got it, thank you for the tips, that makes sense.

I have updated the child app to v1.9a, which has a small fix for this issue.

FWIW, it is a warning, not an error. :slight_smile: (Or really it's an error that is handled by my app, not the platform throwing its own from an unhandled exception, which are the kind I'd be concerned about...just defending myself a little here. Haha.)

@bertabcd1234, have some consistently odd behavior going on with DBC and Pico remotes with hue lights. On and off is rock solid but the brighten and dim do not work consistently. I enabled debug logging and found that after I press on all Brighten or Dim are ignored until I see a basic get request for all the hue bulbs. I assume this is coming from CoCo Hue. After that request both dimmers are rock solid.

I haven't seen that before, but if you provide the logs (here or PM if you want), I might be able to figure something out. Thanks!

Will do. Heading out but will do later today. Is there a preferred method of providing logs?

Screenshot or text fine with me, as long as the text is cleaned up if you go that way. :slight_smile:

I tried but the log is multiple screen shots and a PIA. Isn’t there a log export/sharing app?

Nope, screenshots or text it is. :slight_smile:

Well that sucked. If there is api or access to the database I am going to write something to share logs.







The interesting thing is this only happens on the button 2&4 dim and brighten. The 2nd press on button 1 is fine. And it’s reproducible on all dimmers all the time.

I'll dig into this later, but in the meantime: what is device 101? Could it be the Bridge? Are you sure it's a CoCoHue Bridge device if so? Also, could you share your setup for DBC to see if I can replicate?

Ya 101 is CoCo Hue bridge. Will get DBC setup


I'm missing part of your configuration, specifically "Select lights to turn on/off and dim with below actions." You need something selected there, even if all of your "on" actions involve scenes. There is also a problem with Button 3 pushed in that you either didn't select a scene or the one that was originally selected no longer exists, but it shouldn't be causing problems with buttons 2 and 4. If all of your "lights to turn on/off."

If all your devices are CoCoHue bulbs and groups or just stock Hubitat Hue bulbs (no groups), I'd also recommend checking the "dim/brighten while held" option unless you only want to set up/down dimming a certain percentage with each press (works well with setting this on press with the fast driver or hold with the regular Pico driver). Tonight I'll verify whether I can reproduce this behavior without this option checked, a configuration I don't personally use anywhere (but should still work).

Lights on is for a Hue group imported by CoCo Hue.

I removed actions for button 3 and didn’t change behavior.

I tried the while held setting and it does not exhibit the behavior where the presses won’t work until CoCoHue polls. However the brighten or dim would not stop when I release the button.

I just set up the same with a Pico remote and a CoCoHue group and am unable to reproduce the problem. The logs might be less chatty if you turn off debug logging for the Bridge device (not sure there is anything useful in there for this as far as I can see right now).

My guess is that there might be some problem doing setLevel() on the group. If you try it manually from the device page, do you see the same thing? I suppose there could also be a problem reading the current attribute value. If you create a Rule (or Button Controller if you still have that) that does an "adjust dimmers' action and change it by some amount like 15 or -15, you might be able to see if the same thing happens there, in which case it might be something I could look into with the group (and if not it may be this app).

I will try that but I want to make sure you were not confused by what I wrote, it seems confusing to me. :slight_smile:

The problem disappears when the “dim while held” setting is on. However that raised a new problem where the light old continue to dim (or brighten) to max despite having released the button.

I saw that too but guess I never responded. :slight_smile: I'm not sure what would be going on there, but it's either one of three things:

  1. the button itself is not sending a released event
  2. DBC does not think it's supposed to do anything on the released event (I'm not able to reproduce this, and checking the "dim while held" box you did works for me on devices that send both pushed and then released like the fast Pico or held and then released like the regular Pico driver)
  3. the group (or bulbs or whatever) are not responding to stopLevelChange

The latter seems most likely to me--seems like there might be some things that are lost or delayed over the network between the hub and the Bridge for some reason, but that's just a guess. Looking at the logs as you try might provide some clues. Manipulating the device yourself--sending a startLevelChange and then a stopLevelChange might also work, which is what DBC does for these events--and might help you see if that's where the issue lies instead.

Will try that too.

I was wondering if the issue was due to the bridge not thinking the light was on, until the first sync happens. As I understand it the dim/brighten will only fire against lights that are on. Anyway that’s just my guess.

Hmm, you may be on to something. The actions that call setLevel only affect lights that are on, so if the CoCoHue bulb or group device isn't correct, DBC won't act on them. The startLevelChange/stopLevelChange commands are just blindly issued because Hue doesn't do anything if they're off, so I don't bother checking.