Energy usage based rule issue

I am having an issue with an energy usage rule I’ve put together.

I have a device that draws ~500w consistently when operational, but will draw less when something is wrong and needs to be taken a look at. Basically, I’d like a notification whenever the power drops below 450w, but only if it stays below 450w for 5 minutes.

Right now, I have the rule configured as such:

Trigger(s):
Event trigger: Energy changes and is less than 450w

Flow:
Delay: 300 seconds

If: energy is less than 450w
Then: email notification

The problem is I get notifications about every 5 minutes, regardless of the fact that it is indeed drawing over 450w. Checking the power meter from within smartthings shows that is true as well. It seems as though when the rule is enabled, the first time it drops below 450w, it gets stuck in a loop.

Any ideas?

Thanks!

Hi @Cronald, welcome to the community, I would suggest you to break this into two rules, and use the True/False variable to achieve what you wanted - only get the notification when the energy has stayed below 450W for 5 minutes.

See below for the rule examples:

  1. Rule 1: update the isLowEnergy variable based on the energy reading. (You can create the True/False variable by tapping the ... in the rule editing or rule list page.) This rule will be triggered whenever the energy reading changes, and I used the context variable to determine the event value and set the isLowEnergy varialbe accordingly.

  2. Rule 2: send email notification when the isLowEnergy value has stayed true for 5 minutes. Note the operator is stays in the trigger.

FYI, you can use the “Rule Screenshot” feature to save sometime by taking the rule screenshot when posting your rule logic in the community.

Let me know if this helps.

–EDIT–
I had the wrong logic in my previous rule example screenshot and assigned the variable value in the opposite way. Updated the rule example screenshot to correct the logic.

1 Like

Awesome, it worked!

Thanks a ton, James

1 Like

Well, it no longer changes the isLowEnergy value between true and false respectively, as I’ve manually gone about testing it.

Here’s what my rules look like:
Rule 1:

Rule 2:

What’s your Rig Plug - energy value now? Is it possible it is reporting something less than or equal to 0?

-EDIT-
The reason why I asked is because the Rule 1 will only be triggered if the energy value is changed to anything above 0. If, for any reason, the energy value reported is below or equal to 0, you can add another trigger in your Rule 1 when energy is less than or equal to 0, so it should cover any cases no matter what the value is reported.

According to Smartthings, it’s reporting 485.4w

Can you check the energy value reported in SharpTools? Go to the User Page, tap the ... next to your location, select the Rig Plug device, and check energy attribute’s value? Does the reported value is in sync with the value you saw in SmartThings’ app? (So we can narrow down if the issue was because the event not reported as expected or the trigger logic needs to be updated.)

Ahh, interestingly, it shows 15.9

Update: the rule is working as expected after the logic is corrected. The screenshot in the post above was updated for the correct rule logic.