RM to control modes instead of Mode Manager, need Help with HOLIDAYS

especially since if there is an "if" scenario, usually one half of the condition is met more frequently, and seems fine, and then all of a sudden weeks later I'll hit the other condition and can't pinpoint what went wrong and why it didn't work.

Please either recommend a good testing method, or just best way for me to learn conditionals and if/if-else etc.. (I have watched the hubitat videos, but need more complex examples)

Can I just ask a question? Why are you overthinking modes? IMHO - that's exactly what's happening. When I started home automation I tried to figure out modes for every. Single. Thing. EVERYTHING. Do you know how difficult that becomes when you have 150+ devices and you decide that you need to add a mode because your movie got interrupted on the 185th day in the Month of May 2020 during quarantine? (sorry I couldn't resist the reference). But geesh. If you put too much stock into modes, you'll have a mess to sort out later because modes will collide.
I got some great advice early on and an edict from my husband that he will put no effort into pushing a button or issuing a voice command. DONE
The advise I got was to set modes according to when you're home/sleeping/away/ and maybe quiet time. (kids in bed, you're awake).
THAT'S really all you need to make things run efficiently without trying to keep track of every little thing. Micromanaging in a way.
So, I'm going to lay down the same advice here. My house has 4 modes. Away/home/night/quiet.
Away- we're gone - things are off. HSM is armed and notifications are set up.
Home - We're here. Things are interacting with us. Base lights on activities. Harmony controls the lights when the tv is on, these types of controls will be way easier to manage. Don't try to predict what you'll be doing every minute of the day. If you're home holiday or not, you're still using the house like any other day when you're home.
Quiet time - This is a special one for me becuase I modified phone chargers with contact sensors to change this mode. If one person is in bed, quiet time engages. The bedroom lights DON'T turn on bright. They're blue. The kitchen lights don't turn on to shine into the bedroom. Things interact in the house in a muted manner. TV's still interact and life goes on even when someone is in bed.
Last is night mode. - both adults in bed. Lights turn off. Night indirect lighting turns on in needed areas and nothing interacts in bright ligths. Except for the basement lights. Quiet time is also in the morning. Same concept. Don't wake the spouse. You just have to think about how you USE you house. Not about mapping every minute of every day excluding the 100th day of May, 2020.
Just some food for thought.

3 Likes

HAHA I appreciate the sentiment.

My Modes are just DAY, EVENING, NIGHT, WEEKEND that is it. (Truth is evening is probably superfluous, but it kinda came in the default and I left it)

Because of the nature of who is home on various days of the week and at various times different devices need to be on/interactive, whereas on other times if they are on it will be intrusive.

Almost every rule and automation is NOT based on a Mode. For the most part, modes mostly just impact how bright the lights get in certain parts of the house based on the timing. In addition, our weekday and weekend routines are very different and so having the "weekend" mode allows me to modify some of the rules such that it allows for a lazier morning and alters some of the motion parameters.

Just trying to solidify the rules I have no so they just go automatically. I do have a few rules that are based on Modes, but really only like 2-3.

Perhaps you are right and I'm just sucked into the rabbit hole and keep tinkering.

Appreciate your views!

1 Like

Oh be still my heart. You are one that actually wants your house to look and interact like an old married couple. I like your way of thinking. You - are on the right track. I will come edit this post after I go and grab my screenshots of my mode rules. I will post all of them for you. I DO hope this helps you to better understand the concept of changing modes through rules.
This rule controls home and away. I still haven't edited this rule. The life 360 is included in combined presence and should be removed as a trigger event.
image
This one changes modes according to phones being docked in the bedroom. My favorite automation.
image
these two rules govern my home. I hope it helps.

very interesting, what is the "phone contact sensor"?

This

1 Like

cool project!!

Would it not have been easier just to use a smart plug and measure the power being drawn through them?

Most of my rules that are based on modes are mainly for lights as well. I have a kitchen automation that the lights above the cabinets are on after sunset, but dim down to 15% when there is not activity in the kitchen and brighten to 100% when there is. This keeps the big lights for turning on for a drink of water. In night mode, one strip turns off and the other strip dims to 50% when someone is rooting around in the middle of the night and down to 15% inactive. It's very muted and keeps the HAF at an optimal level.


I removed a trigger and the or stayed, but it's solid. Maybe you'll get some ideas?

I have an entirely different use case, for setting my exterior lights to certain colors at night for different holidays (red/pink for Valentine's, green for st. Patrick's, red white and blue for memorial day, 4th of July, veterans day, etc). Since both use cases involve determining when the holiday is, I thought I would share my approach - it's worked well for me so far. I have a global variable (boolean) for holidays, and a separate rule which triggers on "periodic schedule" entries that align with the desired holidays, to set the global var true/false. My other rules (to set a scene, etc) then check this global var. The same can be done with your virtual switch, to have one rule that checks each of the relevant dates (or Monday in the last week of May, for memorial day or other holidays that aren't a specific date) and toggles your switch accordingly. Just my 2 cents.

I'm kind of surprised nobody else has pointed out this fatal flaw.

  1. Evening: At Sunset -31min on Sun, Mon, Tues, Wed, Thurs turn on "Evening" Mode
  2. Night: At 8pm on Sun, Mon, Tues, Wed, Thurs, turn on "Night" Mode

What about those summer months when the sun only sets at 9pm? Your house will go into night mode, then into evening mode and never go back into night mode.

As someone else has also mentioned, presence should probably be the #1 factor of house modes. You don't want lights and music coming on at 6am during a holiday, but what about when you're sitting on a beach somewhere down south? I'd recommend the first condition that's checked on your rules be presence.

Personally, I think everything you're trying to do here can be accomplished in mode manager with a couple simple rules to control things like a holiday switch. I'd keep it as simple as possible instead of trying to re-invent the wheel.

Thanks for catching the Evening/Night issue..

The 8p was more about my kids bedtimes than anything else.. I'll need to adjust things to make sure evening comes first!

I'm interested in something like this as well. (Long time lurker - I have a few rules but not many).

My issue is that I have some motion sensors, but I am Jewish and on Sabbath we can't use motion sensors. It's easy enough to schedule the motion sensors to be off from Friday evening to Saturday night, but the issue is that when Holidays fall on weekdays. So I would love a way to set up automatic "Holiday" modes based on a calendar, that allows me to enter "Sabbath" mode and pause my other modes.

Presence is awesome, but unfortunately not able to be used on Sabbath and Holidays..

1 Like

Welcome to the community... very friendly here

Hopefully we find a way to search calendars for dates to enable modes.

You can use a rule in Rule Machine to do this, based on dates. I guess it would be a bit of a hassle as the dates vary, so the rule would need updating from time to time to have the right dates. But, you could certainly have a Holiday mode, and use that mode to disable those automations that should not run during that mode.

@dannyzen ported a SmartThings app that uses the Hebcal.com API for Sabbath and holidays.
hubitat_shabbat/shabbat-and-holiday-modes.groovy at master · Dannyzen/hubitat_shabbat · GitHub

2 Likes

thanks! my app does work for holidays during the week which prohibit the usage f electricity (yomtov) as it gets candle lighting times from hebcal.com. if you need help lmk, happy to lend a hand for setup.

3 Likes

now that I'm thinking about it. importing calendars could be interesting functionality. just a thought.

1 Like

Thanks so much!!! Not sure how many people will find this of value, but I'm very appreciative!

So at candle lighting it turns on a mode and at Havdala returns the mode back to "___"? So for a 2-3 day holiday, the mode change happens daily or just once?

I have Sabbath start based on times every Fri and end on Sat evening. So I have rules that say when Sabbath starts set the lights in such a way. If your app changes the mode on a Monday, that would do the same thing for my rule, but it won't help on Tuesday night.

Do you know a way to set a rule to "check" a mode status, instead of being triggered by a "rule change"?

Also, does your app distinguish between Yom Tov and non-restrictive dates, like chol hamoed/Purim, etc?

Thanks
(Sorry not sure why my messages keep getting listed as SPAM @bravenel?)

So glad you're interested. I've updated the readme and hope that it answers all of your questions :slight_smile: