Vera convert - Reactor type rules question

I know this is probably simple and I can search around but I'm not really finding it. I'm, migrating a big system from Vera where I was a heavy Reactor user. I am trying to replicate the feature where I can have one set of actions for when a particular condition(s) is met and then another set when the same condition is no longer met. Playing with rule machine, I'm only seeing the ability to turn something on based on a trigger but not turn it back off when that trigger is no longer true.. or should it be a condition?

Do i need to make two separate rules for everything?

Can anyone point me in the right direction?


Trigger is the initial event that will trigger your actions. You can add to your actions:

  • Wait for event (or wait for expression)
  • The event could be something turning off, the expression could be a combination of things.
  • Add your remaining actions

TY.

So. Trigger is Switch 1 turns On (conditional of time range)

|Repeat every 0:30:00||||||:scissors:||
||Toggle: Bath Fans||||||:scissors:||
||Wait for event: Switch 1(off) turns off||||||:scissors:||
||END-REP||||||:scissors:||

Does this look right?

If you were comfortable creating automations in Reactor, why not continue using it? @toggledbits has created Multi-System-Reactor that supports multiple platforms, including Hubitat.

You'll have to run it on separate hardware, but even something like an RPi will be amply sufficient.

https://reactor.toggledbits.com/docs/

1 Like

I'm tempted, the Rule Machine seems overly complicated

Well, anything new takes getting used to.

I have jumped around automation engines a few times after moving to Hubitat. Right now, 95% of my needs met by apps that run on Hubitat, particularly Rule Machine.

But Hubitat's strength is that it easily supports external automation engines, including MSR and Node-RED.

For sure... And I don't know that I am up for setting up another external device to do this. My rules are not overly complicated but they generally have and on and off action tied to the same condition's true or false status. I'm struggling with that here as it seems to me that I have to rewrite the conditions for both on and off.

Simple example:

I have two weather conditions that when true should trigger a virtual switch called Sunny Day. Using the rule, how do I toggle that virtual switch back to off when neither of those conditions are still met? (It is two or three conditions and it seems that I have to rewrite them all for the off too?)

This is actually quite simple in Rule Machine.

Something like this:

Trigger:
Weather-1 is on
OR
Weather-2 is on

Conditions:
Weather-1 is off
Weather-2 is off

Actions:
On: Sunny Day
Wait for expression (Weather-1 is off AND Weather-2 is off)
Off: Sunny Day

once you explain it :slight_smile: Thanks - I think I can build from here now that I understand the concept a little better.

1 Like

We've all been there for all sorts of things :grin:

One of the best things about Hubitat is this community. Please make use of it!

These are actual term evaluations - as in contains "clear" or contains "partially cloudy". So for the Conditions, is there any way to call the inverse of those or do I have to write them both out again?

Yes.

NOT weather is clear
and
NOT weather is partially cloudy

When you set the conditions up, you will have the option of selecting a little toggle switch that setup up the "NOT".

Right, But I have to rewrite the attributes completely and then choose NOT. I cannot simply point to the first trigger and say NOT that? Correct?

Yup.

To be clear, you don't have to set any conditions (what you term as attributes) for your Trigger. You need them only for the body of the rule where you evaluate "state".

So you have to set the conditions just once.

So what would trigger the rule to run in the first place?

What ever you set as the trigger. Picking a trigger is not the same picking a condition.

So this maybe:

Trigger : Periodic every 10 minutes

Actions:
IF (OpenWeatherMap-Alerts Weather Driver condition_text(Few clouds) contains Clear(F) AND OpenWeatherMap-Alerts Weather Driver condition_text(Few clouds) = partly-cloudy-day(F) [FALSE]) THEN
On: Sunny Day
ELSE
Off: Sunny Day

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.