[How to] recreate Philips Hue Dimmer Switch functionality with RuleMachine

I actually think I just worked it out. Was not using the button device option and had a search around as the other thing that was hanging me up was how to get the ELSE-IF option, but also found that. Thanks though :slight_smile:

1 Like

Hi all, I'm new to Rule Machine, and can't seem to find where/how to base actions on my device button presses.

I set OR triggers for each button press (1-4), but then for actions, I want to define these for each button. Can't seem to navigate to that :slight_smile:

Can anyone help?

Are you sure you used a "Button Device" trigger instead of just "Button"? (If the screenshot above is yours, you did, but I'm asking because I'm not sure if you were showing that as an example of what you did want.) "Button" makes you set regular triggers; "Button Device" will radically change the UI and give you separate actions section for each button event/number you specify, with no need to create triggers manually.

Yeah, found this thread: Found the fix here: Button Device Disappears From Trigger Menu It looks like button device is only in the trigger menu when you create a brand new rule.

All good now :slight_smile:

Hi,
Anyone can explain how to configure the PushCounter to add 1 when push the button? I can't find it anywhere....
Thanks

First, you need to create a local variable (the name "pushCounter" is arbitrary but just as good as any). That's what the "Create, set or delete local variables" section does in the screenshot above. Then in your rule actions, you can manipulate the value of this variable (so what you're specifically asking about) using Set Mode or Variables, Run Custom Action > Set Variable.

Also, I hate to use this thread to plug yet another custom app I wrote, but Dimmer Button Controller can do this for you without needing to use RM or "track" a variable's value, though RM would give you more power. I wrote it to emulate the behavior of a Hue Dimmer on Hue (with a few optional extra features) if that's what you're after. If you use Hue groups, you'll need to pair it with CoCoHue (or, in general, devices that support startLevelChange and stopLevelChange, which individual Hue bulbs with the stock integration can still do) to get the full effect, otherwise you're stuck with "stepping" up or down by a specific percent on groups. So, one or two options that might help you with this if you're not opposed to custom code or are RM-averse. :slight_smile:

1 Like

Thanks for your answer,
I installed ur app and it's very good...easy to use :slight_smile:

One question, Could get rid of the Hue hub and install Hue bulbs and Hue Dimmers directly to HE? What would be the problem if so?

Hue bulbs will be problematic if you have other Zigbee devices. This is a genteel problem with many Zigbee bulbs -- they don't repeat well for other devices and may cause problems. You can find several forum posts about it, and it's also summarized in the docs. If you only have bulbs and no other Zigbee devices (the Dimmer might be OK), this could work; otherwise, keeping them on their own network is good. That's why I still use a Hue Bridge myself.

The Hue Dimmer can pair directly to Hubitat; but some people appear to have problems keeping it paired. I'm not sure what is going on there. But since I use a Hue Bridge and these can pair directly to that network (and Hubitat had a multitude of button devices that work well with it), I haven't tried; mine are paired to Hue. Basically, I use DBC to help me emulate Hue Dimmer behavior with a Lutron Pico via Hubitat; I still have a few Hue DimmerS, but they're on Hue where u don't have to set that up this way. :slight_smile:

I was just reading about the issues u just descrived with hue bulbs, but ur explanation is much better, thanks :slight_smile:
I liked the romantic idea to have all the devices on same hub and so...I have one hue dimmer paired with Hubitat for some months and didn't have any issue so far, but it was a secondary dimmer i didn't use much, I added it to a room now and will use it as main switch and see how it works.
As well I like the idea to have dimmers on HE so I can program the buttons to interact with anything linked to HE...I'm sure there is a workaround to do it even if the Dimmers are on Hue hub...But as I'm an amateur I would like to keep things as simpler as posible.

Thanks again for ur answer @bertabcd1234 you helped me a lot.

Hi,

maybe I’ve a small improvement for your Rule.

You can substract the number -1 from the variable pushCounter (this decreases the push counter)
After that just make another if condition to check
IF pushCounter < 0 THEN
pushCounter = 0
End IF

When using this, the pushCounter remains on the same level as it was when switched off.

2 Likes

i cant set it up either

I didn't find this till after I got mine working. I basically did what @Ken_Fraleigh mentioned. I re-created scenes to match the ones I had in the Hue app. What hung me up for a while is that when you change the bulbs to what you want and try to capture it, it won't work unless you first go to the Hue bridge (in devices) and refresh. Then you can capture the scene. Here is how I configured them.

1 Like

Hi,

I have been able to get the Phillips hue dimmer, button device rule setup, and working the Rule Machine. Things appear to work well in emulating similar functionality to if the dimmer were paired with a hue hub. I am trying to add a new function based on button 4 being held down. However, it appears this event is never triggered. I have tried to set up a separate rule based on button 4 being held down. I still do not receive the event. Any thoughts on why this may be?

Thank you!

Misbah

Do you see the event firing off in the log?

I do not see the event firing in the log.

Buttons 1 & 4 do not support held, only 2 & 3.

Why is that? What is the limitation?

It is what it is and that is the limitation.

trying to recreate this same functionality without anything fancy. Works like charm so far, but "button held" functions are not working. if I long press, nothing actually happens (neither increase nor decrease - buttons 2-3). short press couple of time works but long press is not.

any ideas?

Thx. Oliver looks interesting.

Would I be able to use your method to control my Sonos speakers w. the Philips Hue Dimmer switch?

Thx.
/Jan