Zigbee button to cycle through bulb colors?


Is it possible to use a zigbee button to slowly transition through bulb colors if pressed and held, and stay at the current color when released?

It is possible, but some of the cheaper buttons do not supply the "Released" signal.
The only button I have that supports Released is the Philips Hue Smart Button.

Thank you! Do you have any Idea how to set that up?

I'm eyeing this: Z-Wave Plus Remote Switch, Scene Wall Switch Controller, 4 Z-Wave Button, Work with Z Wave Hubs(MR40Z): Amazon.com: Tools & Home Improvement

Sorry, not something I've done, but have a look at Room Lighting and Rule Machine aka Rule 5.1.
I'm sure one of those can do everything you're looking for.

The Third reality buttons support held and released.

1 Like

Any chance you could point me in the right direction to create that automation?

It's possibly do-able with two pretty convoluted rules in RM (probably also button controller). Alternatively, a custom app could do it. Neither paths are for the faint of heart. The best I can think of would be:

  1. Create a hub variable. We'll call it "buttonReleased". Set the type to boolean.
    Rule A Set the hub variable to true when the button is released; give a 15 second cooldown, then set it to false.
    Rule B Once the button is held, change the color every 5 seconds until the button is released.

This is untested, but I think it should work. There's probably gaps in the logic that I'm not immediately thinking of. The most prevalent issue is that you'll have no control over the color. If you wanted to cycle through specific colors, then you'd need to list each one out with a delay and put them in order. Each line would need to have a condition to check the variable. Like this:

The nice thing is the copy/paste feature in RM means you only have to fully define the first set from IF to Delay. Then you can just copy those four lines, paste them in at the end, and change the color selection.

The problem with the logic is that if you don't let go of the button before it gets to the last color, then it's going to stay on the last color. You'll need to start it back over. If you go this route, you'll probably also want to update the first rule to this:

Adding that "Cancel Timed Actions" line will help ensure the second rule stops when it's supposed to.

1 Like

I'll have something in a minute... inspired by @FriedCheese2006 's solution.

2 rules... first is triggered by the button being held, turns on a virtual switch, and controls the execution of rule 2. The timeout just prevents rule 2 from looping indefinitely.

Second is a simple hue-based color cycle. As long as the virtual switch is ON, the loop increments the hue by 5 each iteration and goes back to 0 from 100. Need to make sure your bulb is able to transition fast enough so it's done before the next repeat action.

releasing the button turns off the virtual switch (rule 1) and the loop stops. Could also use a hub variable instead of a virtual switch...

I tested the color cycle successfully... rule 1 released was simulated but should work.

For an extra $5 you could get a ZEN32. Supports the released capability, has 5 total buttons, controls lights or fans, and is a mains powered repeater. Just not portable.

@FriedCheese2006 @dylan.c Thank you both! This is more than enough to get me started down the rabbit hole! :grinning:

1 Like