Rule Machine Feature Request


I would love to see an enhancement/change to how the "push button per mode" feature works in RM.

I'd like to be able to have RM press a specific button of a specific sevice per mode.

EX. Press button 1 of device A if in mode day
Press button 1 of device B if in mode night
Press button 1 of device C if in mode twilight

With the current implementation I need three rules to achieve this.


Rules come in handy 10 Packs you know.. much cheaper that way.

I am of course joking... Rules are FREE


You can already do this, but it takes a couple of extra things:

First, create a Virtual Button device. Next, create a Button Controller instance for the Virtual Button device that pushes the buttons you want for each mode, where each one is just assigned arbitrarily by you to one of the buttons of the Virtual Button. Finally, in RM do Buttons Per Mode on the Virtual Button device, pushing the assigned button for each mode as you set them up in Button Controller.

This effectively maps the modes to different button pushes using the Virtual Button go-between and Button Controller instance. Now, just one rule -- albeit with one virtual device and one Button Controller instance.


Genius Bruce, I had a feeling someone would have a solution for this!


With Button Controller in the mix, you may be able to just do "action per mode" instead of "button per mode", since Button Controller has a full complement of actions available. So whatever button 1 of device B would do in night mode, could just be done directly by Button Controller when the Virtual Button for night mode is pushed by RM.


I went with the first method described. It works perfectly for my needs and makes the rules a lot easier to setup. With the exception of not having a in-rule description of what each button number represents.

I went with:

  1. Day
  2. Night
  3. Sleep
  4. Twilight

That way I can use the same numbering scheme across several button controllers for consistency.

Thanks again for the great support!


@bravenel could I request scene's be added to RM please :slight_smile: currently I have to use WC for this but it would be great if it was in RM. I have attached a piston to show how its used


I'm a little confused....can't you set up the scenes you want in Groups/Scenes and then activate those scenes via Button Controller/Rule Machine?


it's not a scene it's the fibaro scenes input when you do certain things IE double tap that sends a scene ID out on the network and with the DH and webcore you can use this as a trigger.

EDIT: I may have a solution using buttons within the DH i just can't get it to work yet.


I was able to do this in the end using button controller. It was the driver that just need fixing to get it to work :slight_smile:


@bravenel is it possible to have run custom commands per mode added?


Haha, funny. Sure, I'll take a stab at that. I'm laughing because when we first did custom command, we had no idea that anyone would use it other than for the most bizarre stuff -- maybe Maxwell did, but I didn't. That was his contribution to RM.


It will be mostly for when the RGBW controller is released I have just removed WC and done a temp RM rule for each of them lights. But if I did what I wanted I would have to do 10 rules per light!

Im hoping that once the driver is there i will be able to set whitelevel output per mode as well as lightfade for partly mode and fireplace for another mode that's what I had in WC :wink: