Expert Needed - Transfer rule from WebCore

Hello I need help from someone that knows WebCore and Rule Machine well. I need to move a rule from WebCore to Rule Machine and it has variables and such and heed help.



In the spirit of helping us to help you, could you give a summary of what you are trying to do with this? It's not so much that we can't pull it from the what's above. It's more about creating as optimized a solution as we can for you.

I've never used WebCore, but from a quick look seems that you just need Hubitat Saefty Monitor Hubitat Safety Monitor - Hubitat Documentation with maybe some custom rules in Rule Machine?

So what this does is if HE changes status to ArmedAway the it checks to see if any devices (Doors Sensors) that I select are left open, It also check to see if any devices (Window Sensors) that I select are left open. and finally it checks for unlocked doors.

If noting was left open then I get a notification that the "System is Armed", but if anything was left open, then it sends a message of what was left open.

It is broken down with variables, so the notification starts out with ":bell: System Armed :bell:"
if there are doors open it adds to the variable notification that ":door: Door(s) Left Open :door:" and then it adds the name of all door contacts that were left open. then it checks the windows, and if any are left open it adds to the variable notification that ":framed_picture: Window(s) Left Open :framed_picture:" and then adds the name of all windows left open. Then it checks to see if any locks were left unlocked and if so adds to the variable notification that ":key: Lock(s) Left Unlocked :key:" and then adds what locks were left unlocked.

This also says if status changed to disarmed then set variable to ":no_bell: System Disarmed :no_bell:" instead.

then after all the checks send the notification to me.

I don't know or understand how to use variables and add to a variable based on multiple conditions.

This might not yet be possible with Rules 3.0 and might have to wait until a future one. This is just one of two reason I still have ST connected to HE. (this one rule, and limit on daily texts)

I have something close. The first trigger checks to see what windows are open. If they are, it populates room variables based on what room has open windows or doors. If they are closed, I put a space in the variable. It was great idea from @halfrican.ak and I'll explain why later. Instead of using full blown IF...THEN statements, you could probably just get away with a series of simple conditional statements:

This rule separates out the windows I have covered by a monitored service. I'm okay with leaving for short periods of time with those open:

Here's the trigger rule. If the windows are open, then my front porch light turns red and I get a read out of all the rooms with open doors/windows. This is where the space comes in. It reads the entire string, but only will announce a variable filled with something besides a space. If my monitored windows are open, the light turns orange and still sets an arming variable to "yes." If any non-monitored windows are open, it turns the light red and set the arming variable to "no":

The actual arming comes from a triggered rule where the trigger is the closing of the front door while the condition is the arming variable set to "yes":

I will work on this later this week when I get time. I will let you know how it goes. Thanks for your help.

No worries. I hope it helps. The trick for me was setting up the logic and the variables. Once I decided on the rooms instead of individual windows and then named the variables, the rest was a bit of tedium in clicking through the IF-THEN-ELSE statements. Good luck!

I think this is a built in feature of HE. Maybe not exactly like you have but if any contacts are open that I have assigned in HSM I get a notification when the house arms that they are open.

Maybe this will work for you.