Attribute Value Less Than X for Y Mins


I have some new TP-Link Energy Monitoring Smart Plugs (model HS110) and I am polling the current power usage for these plugs every minute thanks to the driver developed by @djgutheinz. I have setup a HE RM rule to monitor the power being used by my washing machine and to have a notification sent to my phone when it drops below 10w. After a relatively successful couple of loads of washing, it would appear the machine can dip below this on occassion throughout a wash cycle when moving between the different phases of washing, rinsing, spinning, etc.

Does anyone have any tips for being able to tell when a device attribute has stayed below a threshold for a period of time, e.g. in my case, the current power consumption of the smart plug is below 10w for 3 minutes?


1 Like

There is a community app that will do this without rule machine. Search for "Better Laundry Monitor". It has the options to count the cycles like you want.

Otherwise maybe use private boolean? I have a similar example in another thread but the short version is:

Trigger: Washing Machine Outlet CHANGED

  • IF power level of washing machine > 10
  • THEN set private boolean to TRUE
  • ELSE IF power level of washing machine < 0.5
  • THEN set private boolean to FALSE
  • END IF

I did this in a separate rule first, then gave the second rule permission to use this private boolean output. You would probably want to add some delays (I think immediately after the first THEN?) , that would take care of most of the cycling.

Couple links that may help. The first is my private boolean rule, the second link explains the delays and cancels better than I can.

You do not need to use private boolean for this. It is actually much easier than that.

Triggers:  Power changes.

If Power > 10 W
        Cancel Delayed Actions
        Delay actions for X mins
         Execute rest of rule

That's all you need to do.

Thanks for the tips @neonturbo and @Ryan780.

I'm probably leaning towards the "better laundry monitor" or some variation at this stage, I think the simpler power change and delay option may still fire if the power fluctuates below my 10W threshold. I'll have to do a few tests to work out what suits my setup.


1 Like

For those interested... I ended up using the better laundry monitor and so far so good.

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