Migrating from Alexa, planning expansion

First of all, I want to say I really appreciate this community. I have nearly written a dozen questions, only to find the answer already asked and answered. However, I think I'm at the point I want to get some validation on my plan/assumption.

A little context: I have done some home automation in the past with a patchwork between a bunch of systems (Wink, Alexa, Hue, Lutron Caseta, and more) but I'm building a new home and planning on putting in a lot of smart switches, a connected thermostat, and probably ease into some of the other functionalities (sensors, deadbolts, cameras, etc). I've bought a C-7 and have a Hue bridge and some Hue bulbs while I wait on my new house to be built, so I'm trying to plan out my organization and test out my rules.

My goal is to make many of the automations be triggerable from different methods. Maybe some trigger automatically based on a sensor, others by a certain button on a smart switch, and all of them available via routines from Alexa (as the familiar interface for my family). An example being, "good night" shuts off all the lights in the family rooms and exterior. This traditionally would have been triggered via a routine on Alexa, but I'd also like it to be triggerable via a smart switch on the edge of the family rooms. My instinct is to write these rules as a single source of truth and expose their trigger to multiple platforms.

So, I've configured a simple rule (using a nested group of indoor family room lights and exterior lights so I don't have to add every new device we get to every rule applicable) to be triggered by a virtual switch. I've set the switch to auto-reset after 1s. I expose that virtual switch to Alexa and she calls it in a routine. I also expose the individual devices to Alexa so we can continue managing them individually by name if that's so desired.

My assumption I'd like to validate is when I get into the new house, I'll set the smart switches to also trigger those virtual switches, so they invoke the automation the same way. Is that considered best practice? Are there better or other ways I should be considering?

Thank y'all and I look forward to growing in my home automation experience with y'all.

I see no issue with anything you mentioned except for the end. Use the smart switches as the trigger either with double tap or by time and position and the group as the target instead of the virtual switch. It's just not needed and adds a point of failure.

1 Like

As I understand it (and please correct me if I'm wrong on this, I'm still pretty new to the Hubitat system) Simple Automations can only have 1 trigger.

If that is accurate, would that result in 2 simple automations, one that is triggered from a virtual switch and 1 that is triggered from the smart switch? Or should I move them to the Rule Machine so I can have multiple triggers? The coder in me is reluctant to have 2 identical automations with simply different triggers from a maintenance standpoint.

I was too at first but rules are free and the simpler you can make a rule the better. Keep them in simple. Rule machine is a heavy app. You could stick the Alexa trigger in the bottom of the rule of you wanted also.

1 Like

Like Lewis, I don't see any glaring issues. I think you have the basic concept down correct anyway.

I don't mind having a switch trigger a virtual switch, but he is right that it adds another complication. I am not sure I would go so far as to write two separate rules for two separate devices though. They might interact in a way that won't work as intended.

As for Rule Machine, I don't usually recommend that as a first step. Start with the Simple Automations and Motion Lighting as much as possible. Once you outgrow that, THEN try Rule Machine.

But RM would keep things simpler in some ways. Like you suggest, you could have multiple triggers and a whole bunch of varied actions in one place. But be careful not to cram too many different things into a rule, that just makes things have to process more than needed. For example, a good night routine is probably fine, but don't add "good morning" and a "leaving the house" routine in this same rule.

2 Likes

Thank y'all so much for your feedback.

I did want to ask, both of y'all mentioned RM should be used only when necessary. Is this due sheerly to cognitive difficulty/complexity, or are there performance or other concerns with having jobs in RM. My gut instinct is to have a single rule (whether it be simple or in RM) for each "action" (going to bed, leaving home, arriving home, watch tv, dusk, etc). Each action may do multiple things, such as turn out the lights, lock the doors, set the alarm, turn down the thermostat (my thoughts on the going to bed action).

Am I thinking about this wrong?

It's a heavy app to launch for piddly rules, especially when you have a lot of them in there.

1 Like

Like Lewis mentions, it is sort of like using a sledge hammer on a picture hanger nail. It is just excessive for many use cases.

But yea, RM is a much more complex app to learn, and it is a bit more processor intensive depending upon what you are trying to accomplish. Like any new thing, you will have plenty of learning to do, so just take it slow and build it in pieces. More complex rules also makes troubleshooting tougher.

So in your example, you COULD have lights, door, thermostat in one rule. But at a minimum I would start out with say lights, and once I was happy with that you could add another layer. And I also would advise to clone the old rule, pause the original rule, and do all editing on the new (clone) rule so you have a backup in case you need to revert for whatever reason.

Or better yet, you could have two rules run in parallel, so you could be messing around with one rule and not have to alter the other. Or if you break the one lighting rule, the other separate lock rule would not be affected. I don't know of any reason you cannot trigger multiple rules from the same device or command, as long as the actions of the rule don't overlap.