0-100 are valid values. Most RGB bulbs operate using Hue/Sat to set color instead of the hex representation of RGB, so that’s the format used in most device handlers. The color value in Rule Machine represents the Hue value (and assumes 100 Sat for full colors).
I believe Rule Machine also allows for Red and Green to be selected directly instead of custom color values, so that might be easier. Alternatively, you could find the colors you want with your bulb, then record the Hue values at those colors and use them.
It’s right. You can use either 32 or 33 for the color value in Rule Machine and it should give you something very close to that shade of green.
You have the one bulb that works a bit differently for color since it’s zwave, so the Aeon bulb calculates the Hue value in the device handler which is why it’s not an integer. Most color bulbs are zigbee.
With the Rule Machine, I’m trying to figure out how to have this run only when the light is on.
Or does that not really matter? Let it continue changing the color values even though the light is off?
Edit - found a solution. I created another virtual on off tile(vSwitch B). I created a rule that will turn vSwitch B off, when the light is turned on. Then turns vSwitch B on when the light is off. Finally on the original rule, under “Switch to disable rule when ON”, added vSwitch B. so when the Light is on, vSwitch B is off, and the color changing rule is enabled and runs.
Thanks for sharing this Bruce. I’m finding your app to be super powerful!
I’m, unfortunately, not well versed on virtual switches. Can the “Virtual Color Control” device be used to enable this scenario for more than 2 devices? (Not sure what “Virtual Color Control” really does and if Rule Machine even supports it)
Nope, the problem is getting 1 light strip to loop between 3 colors. With Bruce’s original post/solution only 2 colors are supported. Adding a 2nd virtual switch does add additional cases that MAY allow for a solution but it does become more complicated.
I have a modified version of the above that works:
virtual momentary button
One trigger per color: trigger is momentary on; conditions as needed to separate dimmer levels; rule as needed for same (e.g. x >10 AND x < 20); actions for true are delayed turn on of momentary button in 1 minute, set new color, set new dim level.
Each trigger will respond to the button push, but only the one with the right dimmer level will do anything. The one that runs changes the dimmer level, sets the color, and pushes the button 1 minute later.
You can push the virtual button in the mobile app to change the color whenever you want, but not too fast without odd behavior.
Interesting. One thing I’m confused about. In this example what would “virtual momentary button” map to in the “Type” list? I don’t see Simulated Momentary Button as an option but I do see Momentary Button Tile and Simulated Button.
My assumption is “virtual momentary button” == Simulated Button.
This is what you want. These are all “virtual” devices, that only exist in the cloud, but otherwise act like devices. So SmartApps can turn them on and off, and test their state, etc. The “momentary” part is that these particular devices turn themselves off after a couple of seconds. So you “push” the button, so to speak, it’s virtual switch turns “on”, and then turns “off”. That’s handy so you can use turning them on over and over to send a signal to an app or apps.
Hey Bruce, I got a chance to try you 2 color loop rule last night. Have you ever gotten reports of the rule getting stuck? At some point shortly after the rule started running, it stopped working for me.
Also, what’s generally the best way to diagnose these problems?
Yes, it can die. What happens is timer drift. At some point two timers sort of collide, and one of the triggers doesn’t run. This particular method is a bit prone to that. You can get it going by pressing the button. I spaced 3 out, 20 seconds apart, and they ran all night. Keep pushing the button to get them spaced out better. Later I’m going to try with six of them.
I had another method that was super reliable, but that uses an external timer source, which isn’t generally available (uses a ThingShield).