Have used rule machine for a while and have managed to do several useful automations with it. I am having issues coming up with a path to do the following:
Have hubitat monitor the power usage of a particular Shelly 1+ PM sensor.
When sensor shows power usage between 65-85 watts for a period of 15 - 20 minutes turns off the relay on the shelly.
After another 15 minutes it turns the relay back on.
Is rule machine the best way of doing this or any other suggestions?
I have some ideas, but will need to test/verify before offering them up. Should be just a little bit and I can propose something.
If no one else comes along before then...of course .
Have you tried sketching out some pseudocode defining more precisely what you want to accomplish?
For switching based on power use, I tend to prefer a recurring time-based trigger so that I can limit when the rule runs. But that's just me.
IF("power reading" between "65-85" AND "stays that way for XX minutes") THEN
Turn off the relay
Wait for 15 minutes
Turn relay back on.
Thanks @ FriedCheese2006
I didn't realize that we can hard code in Rule Machine.
You can't...I was just writing up pseudo-code of what my interpretation of your requirements are.
I think this will do it.
Definitely turn logging on.
I was confused. Yes your code is what I need to do. It'd be simple with an Arduino, and relay but I want the flexibility and reporting of the Hubitat.
Great! Rule Machine 5 is much more powerful. I appreciate your help.