Looking for help replicating piston in RM

Hello wonderful community!

I am looking for some assistance from a Rule Machine Guru to help me convert a WebCore Piston I had running in Smartthings to Rule Machine.

I'm honestly not even sure where to start on this one as it has many conditions and a couple of triggers.

1 Like

First things first, I would break it into 1 Button Controller child or rule per button.

I agree, I already moved Button 1 and Button 4 on that piston to the button controller app. Button 1 toggle's the ceiling light on/off. Button 4 toggles a lamp on/off.

Edit: I have also re-uploaded a non-obscured picture of the piston so it makes more sense to everyone.

I still think they each get broken into individual triggered rules that evaluate each thing.

I mostly do triggers, not triggered rules...
Therefore I'm not the expert in triggered rules but my gut tells me some of those belong as such.

Trigger: button.
Rule: if condition true.

Maybe just a Rule does While.

I honestly wish Rule Machine spoke in traditional programming terms...

Maybe you just need some sticky notes that can hide the screen's words and overlay them with yours :smiley: :smiley:

51%20PM

hehehehe

2 Likes

Yikes.

As said above, start by splitting them into separate flows. You have like 4 or 11 things in one piston there. Each one of those 11 action sets will likely become a separate rule. Looks like a variety of standard rules and triggered rules.

Yeah I'm really struggling with RM. A simple WebCore piston like the one above could be whipped up in a few minutes, but not with rule machine...

Is the purpose of the Button2 and Button3 variables just to separate the naptime and bedtime actions from each other? In other words...if you split that piston into two, one to handle the naptime actions and another to handle the bedtime actions, could you get rid of the variables? That's what I'm seeing...

Also, what is this device and what is the asleep() command? Thermostat?
image

Ok try this on for size:

NapTime Rule 1: Standard rule

  • Conditions
    -- NapTime switch on
  • Rule
    -- NapTime switch on
  • Actions when True
    -- Turn off Nursery Blind and Nursery Light
    -- Run asleep() on the thermostat (not sure what this means but copying the action from the piston)
  • Actions when False
    -- Turn off Nursery Fan and {:f305} device
    -- Run resumeProgram() on the thermostat

NapTime Rule 2: Triggered Rule

  • Trigger
    -- NapTime switch turns on
  • Conditions
    -- Thermostat humidity <= 45
  • Rule
    -- Thermostat humidity <= 45
  • Actions when True
    -- Turn on {:f3057} device

BedTime Rule 1: Standard rule

  • Conditions
    -- BedTime switch on
  • Rule
    -- BedTime switch on
  • Actions when True
    -- Turn off Nursery Blind and Nursery Light
    -- Turn on {:d1ab} device
  • Actions when False
    -- Turn off Nursery Fan and {:f305} device

BedTime Rule 2: Triggered Rule

  • Trigger
    -- BedTime switch turns on
  • Conditions
    -- Thermostat humidity <= 55
  • Rule
    -- Thermostat humidity <= 55
  • Actions when True
    -- Turn on {:f3057} device

NapTime or BedTime Rule: Triggered Rule

  • Triggers
    -- NapTime switch turns on
    -- BedTime switch turns on
  • Conditions
    -- Thermostat temp >= 75
  • Rule
    -- Thermostat temp >= 75
  • Actions when True
    -- Set Nursery Fan to 20% (you shouldn't need a separate Turn On command like you have in the piston, setting the level also turns the device on)
1 Like

That device is my Upstairs Ecobee Thermostat.

@destructure00 Thank you for your assistance! I got everything setup except forcing the Ecobee into Sleep mode as apparently the native driver doesn't support this operation yet?

1 Like

There is a port of Ecobee Suite from ST that supports setting the mode through a custom command from Rule Machine. Just have to make sure that you use the correct parameters. You need to use 2 of them, first the mode, with correct capitalization. So Sleep, Away, Home, etc. And the second is the hold time. It too must be the correct capitalization: indefinite, nextTransition, holdHours. If you use hours, you need a third parameter, the number of hours to hold. Unfortunately, you have to save all the parameters with the command. So, I have 6 custom commands, two each for each mode (I don't use hours).