Trying to write a Basic Rule to replace a working RM 5.1 rule

I have a rule that turns a virtual switch on and off when the blower for my water heater operates which is used in Hubigraphs. I have it operating well in RM but thought I'd try and learn a little about Basic Rules. So far I'm not succeeding, must be a forest for the trees problem. The Basic rule will turn on the switch when power exceeds 25 w but will not turn it off when power drops below 10 w. The logs show that when power drops below the threshold it actually turns the virtual switch on again.
RM

Basic Rule

Log

Is app 1715 the RM instance? The logs don't look like RM logs to me.

Did you pause the Basic Rule and install the RM rule?

Have you changed the rule since you created it? Maybe hit "Done" just to re-initialize things.

Right; if I'm understanding correctly, the intent was to re-create the Rule as a Basic Rule.

the log entry is from the Basic rule. RM rule disabled.

Yes, I had forgotten Basic Rules existed, saw a reminder on FB yesterday so I was trying to recreate a not too complicated but not overly simple rule that I know works. Pretty sure I clicked done numerous times as I played with this but I just gave it another go. I'll advise if that solves it.

Ooops...my bad. Definitely thought you were trying to go the other way around.

This seems to work here......

@support

Looks like this may be a bug.
01_test is an omni device
01_test_switch is a virtual switch.

Basic Rule
image

Logs

App Settings

The Rest

Looks to be essentially the same. I rewrote mine exactly as before. I'm curious to see if it works and I somehow managed to corrupt the first one when I was editing it. I'll know in the morning.
Below is the log from the fresh new Basic Rule. When power drops below 10 watts the virtual switch is being turned on instead of off.

I created it twice using virtual devices that I could easily manipulate and ended up with the same results.

@bravenel please see above. Appears to be a bug. Basic Rule doesn't seem to want to turn off a virtual device. Instead it turns it on. If I'm doing it wrong please advise.
Thanks,

Looks to me as though this rule is being re-triggered before the Wait is done, and it never gets to the turn off. At least that is what your logs show. The sequence is event, followed by turn on, followed by wait until below 10. That is what is repeated.

If anything, there is something very odd about why it triggers when power switch power is below 25, as it should not. I tested this yesterday, and for me that test works as expected. But for you, it fails. I don't know why.

Turn Off definitely works.

For this simple test:

These are the logs:

Notice that values below 25 do not trigger it, while the one value over 25 did trigger it. What driver is in use for the Zooz power switch? Would you please post the device events from its device page Events button (at top of device page).

OK, the bug appears to be associated with how the Wait is getting setup. I can reproduce the problem once I added the wait to my test app. Will find out why.

3 Likes

Bug found and fixed for the next release. It was a simple typo sort of thing for power in a wait.

3 Likes

Thanks, and all along I've been telling people typos are a feature. bobbyD launched me on the Basic Rule experiment with a recent FB comment. I had completely forgotten about it.

Download the Hubitat app