RM Towel Warmer off based on power consumption

Hi everyone.

This is my first post, so I would like to thank you all for your support in the forums. I tried to find troubleshooting around a similar case, and I found this topic, but I cannot adapt to my use case (and it's my first attempt with Rule Machine).

I am in the process of adding all my devices to Hubitat. I have around 50 Shelly devices, a Philips Hue hub and some lights, and some ZigBee sensors (and repeaters). They were all running (poorly) in Homebridge, with the sensors connected to a ConBee stick on a Synology NAS. Since Synology announced they would remove USB support for non-disk devices in the new OS, I decided it was time for a change.
And after many hours digging in the forums for solutions, I noticed a trend in which users and developers were shifting from ST to HE, so I decided this might be the best solution, and I am finding it amazing!!

Now, back to the Towel Warmer scenario:
When planning my home renovation, I decided to install Shelly devices on almost all the physical switches, and some Shelly 1 PM (power meter) in the Towel Warmers circuit (hidden, inside the wall).
The Towel Warmers have a button (on/off), but the Shelly 1 PM Switch is ALWAYS ON and can monitor power usage (when ON, it uses around 500W).

That way, I imagined creating a Rule to turn off the switch after 30 minutes when we forget the Towel Warmer ON (i.e., if the power consumption is above 100). After turning off the switch, the Towel Warmer restarts and the switch should be turned on again (so we can use it in the future).
The switch status (and power consumption) is refreshed every minute, but that granularity is enough for this Rule.

The Rule should also include the following: IF the Towel Warmer button is turned off before the timer ends [power consumption is null], RM should cancel the delay/timer.
That is to prevent the following: If someone turns on the Towel Warmer after some minutes, it should start the countdown from 30 mins again, instead of continuing the previous timer > that could result in having just some minutes remaining and could result in an inconsistent behaviour and my wife would not enjoy it :slight_smile:

So, the logic might be something like this?

The only thing working is the Trigger... I don't know if the Private Boolean is even necessary, and the IF ELSE logic is wrong... Please help!

I really appreciate any help you can provide.

Hi @Carl !
Thanks for your answer.

Well, yes, thatā€™s very important that the switch turns on, after turning off > so we can turn it on again as wanted (remember, the ā€œSwitchā€ is physical but is hidden inside the wall, with no button/actuator).

And thatā€™s why the whole ā€œcomplicationā€ of cancelling the timer if the power consumption stops (the Warmer is turned off) is necessary, so we can, i.e: turn it on again 15 minutes later after using it for 10 minute. If the ā€œtimer resetā€ doesnā€™t happen, the Towel Warmer would be on only for 5 minutes, because the original 30 mins timer was still running.

Any suggestions?

Personally I always use two rules for stuff like this. I have one rule that has the trigger, to monitor when the appliance starts. The problem with the trigger power > 100 is that while the warmer is on, the rule is constantly getting triggered. Every time your device reports a power > 100 there is a trigger.

So the first rule waits for the trigger > 100 then it runs the second rule. The second rule then pauses the first until the shutdown condition is met and then restarts it.

The two rules below are for a dehumidifier in my crawlspace. The unit will shut down when humidity levels are met, but it only shuts off for a short time and will restart. In an attempt to save energy, I created these rules to allow it to run for 1 hour unimpeded. After the hour I wait for the internal power to drop below 5 watts, this means the unit has shut it self down. I then kill power to it for another hour. I don't want to shut off power while the compressor is running, only when it has shut down on it's own. The only trigger in the second rule is if there is a system restart. This way I don't have to worry about what state the rule is in if I have to reboot the hub.

This is not really the same, but along the same principle as what your trying to do, so maybe it will give you some ideas.

1 Like