Rule to turn off “missed” switches

Hi everyone. I was wondering if you could point me in the right direction.

My z-wave network is robust, but I’m in a multi-unit location with lots of external interference

My HA occasionally misses a few switches when, for example, I set the mode to night and everything turns off.

I’ve set up a rule to run when all lights go off. The rule waits for a minute, then if any switch is still on, it turns all the switches off again.

This backup rule generally works okay, but it’s big, clunky, and sometimes misses switches too.

How would you set up this rule? When I am ready to call it a day, I like the place really dark so I can get a good night’s sleep.

Thanks so much. Hope you all are doing great. :slight_smile:

1 Like

I am a long time HE user and found I had "rule sprawl" with switches and locks triggering off modes. Last summer I requested that a table like interface be created where you could simply check which switches turn on/off by mode and Bruce created Mode Switches. You can read about this app in this thread.

I improved upon it adding dimmer and lock capabilities and recently added a retry since I was also having a few switches not get set. It will loop through the switches and if it is not in the appropriate state it will try it again.

You can find my version of the app called Mode Device Manager here:
https://raw.githubusercontent.com/mlritchie/Hubitat/master/Apps/Mode%20Device%20Manager/mode_device_manager.groovy

1 Like

Another option is to use @bravenel's app to turn off a lot of devices with retry.....App to turn off a lot of devices with retry

This app is triggered by a virtual switch that you can use in your rules. I use it in my goodnight rule.

1 Like

This works well especially for a good night type routine. I do wish however things were a bit more stable and an "off" that is sent was actually tracked to see if the light really turned off. AKA it might be nice if this were built into the driver somehow.

Thanks so much, guys.

Yes, I definitely have a bad case of rule sprawl. Like here to Tallahassee and back, LOL

@ritchierich I am unclear about something. If I select a certain lock and click the mode boxes I am expecting the lock will be locked. What if I want the lock to be unlocked?

Correct the lock will lock when mode changes to that mode.

This isn’t currently implemented. I haven’t had a need to automatically unlock the locks for a mode as I use a switch instead where say Terminix or HVAC is coming over and needs access to my crawl space. I have a switch to take care of that.

Rule Machine can meter the on/off commands. I find that 50 milliseconds works well in my rules. If that's something you want to try, it can be found under Run Custom Actions. You set the metering but don't set any parameters.

1 Like

Thanks guys. I used @bravenel ’s app and it works like a champ. Highly recommend.

1 Like