Rule Machine Feature Request


#1

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.


#2

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

:slight_smile::slight_smile:
I am of course joking... Rules are FREE


#3

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.


#4

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


#5

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.


#6

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!


#7

@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


#8

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?


#9

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.


#10

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:


#11

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


#12

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.


#13

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:


#14

@bravenel any chance start lower and start raise can be added to RM? It's in the button controller but not RM.

I would like to have a rule that does if button X is pressed and switch variable is ON then start lower then set switch variable to OFF, else start raise set switch variable to ON. Then in the button controller the release button stops the level change.

I may have to create another rule for the release and move the variable switch to that though.


#16

There is a way around this...if you create a virtual button device and have the start lowering under that. Then pressing that button is exposed to RM. You can always have your release be the stop. Even if the lights just turned on, it won't hurt anything.


#17

Sorry not following, the device in question is a button already? When it's held its sends a button and when released it sends a button command. I need the release to always do the same thing (easy) but the held button command to trigger one thing if the switch is on and another if it's off.


#18

Yes. Pressing that button will be picked up by a triggered rule instead of a button Controller. But before doing that, set up a virtual button in button Controller that starts raising (or lowering) the dimmer you want to control. We'll call that VB1. The real button we'll call RB2. So, your triggered rule has for the trigger RB2 is pushed and then the conditions you want. In either true or false action you have the action be to press VB1, therefore getting the start raising command to fire. Then in Button Controller you set up release of RB2 to stop raising that dimmer.


#19

so if button pressed and condition true press this button else press that button? A Lot of work /processing to get to something simple.


#20

got it working but the long way round see below the set up needed.

To turn the light on of off if a physical wall button is pressed. The (SmB) raise/ lower is the variable it needs to start as on to give the setup some consistency, the reason it's on the off as well is, I have GH and motion sensors. I could put a timer on the switch to make it go back to on or off after a set time that might be better?


To deal with the stop dimming command and the other presses.


Because raise or lower isn't in RM


Because i couldn't get toggle to work, I could do with a virtual switch that supports toggle

and finally the rule

if anyone has some advice how to simplify, i'm all ears as i have a 4 of these to do!


#21

You're making it way more complicated than I intended but part of that is probably because you have so many modes. HOLY crap! LOL