How to differentiate between away and leaving work for home

I'm struggling to create a clean automation that can tell the difference between when I leave home mode to away mode and when i leave work mode to go home but technically would become away as well as i travel home.

As of right now I have no automations set for away mode and i created a rule that basically starts at home mode and waits all day until i depart to switch to away mode. Ugh it's confusing even explaining. Attached is a screen shot. The problem I have with away is I need very different things to happen when i leave from work as opposed to leaving from home.

Here's what I need too happen for now when I got to work.

This is all so inelegant and i feel like there may be conflicts occuring. Any thoughts on how I can improve this?

If I understand, your daily schedule is Home --> Away --> Work --> Away --> Home? And you want different things to happy if you are leaving home to go to work, vs leaving work to go home?

I'm not sure I understand your "Mode Home to Away Routine." The first action is the wait for mode to become Away. Why aren't you just using "Mode becomes Away" as the trigger?

I am not so concerned with going to work. That is just fine being just plain old away. But work triggers certain situations, namely for now, lowering thermostat and recovering an hour before i get off work

That home to away keeps an away mode from triggering after i leave my work Geofence. Eventually i would like certain automations based on away status but that's where i am struggling. I cant have that triggering when i leave work.

I guess that brings up another question. If you statuses come in conflict with each other, example away and work, but are technically active when im at work. away is triggered by my phone presence in Hubitats app and work is triggered by my presence of the Joe Page dashboard. What decides the order of precedence in modes?

It might help if you showed your mode manager page. I'm still unclear about what you are trying to do or how your Modes are triggered.

You can only have one mode active at a time, and it's basically the last one that was triggered.

If you need different things to happen when you have left home and going to work, vs when you have left work and going back home, there's no reason you can't have two different "Away" modes: Home Away and Work Away, or something similar. You can have as many modes as you want and call them anything you want.

I tend to keep the mode manager to indicate the house’s status (IE it is Day, Night, etc. at the house, or everyone is Away from the house.)

I also prefer to set my own status separately (at home, not at home, etc.). You could track your personal status separately using a Hub Variable and update it with a Rule. It could indicate if you are Home, At Work, somewhere else. Alternatively, some presence devices could be setup for each location like “jnosa899 home”, “jnosa899 at work”, etc. and those could be present or absent based on your presence at those locations.

Then a rule could be set so activate when you are at work that waits until you are no longer at work and execute a specific set of commands at that point.

2 Likes

Owntracks allows me to see 'I'm at work'. I'm at my GF's. I'm at home. You can define location specifics there. I use it all the time... maybe take a peek? It runs on your phone and has been incredibly accurate and stable. the dev who created it also has extended it. might want to peek!

2 Likes

Mode manager just doesn't work. I just created a bunch of basic rules to cover my mode and the various methods to enter such mode. Keep it simple

I think mode manager actually could work and it might be more simple than what you are doing now.
Start with the timed modes for Day/Night/Etc.... Just make sure your "work", "away", and "leaving work" modes all say "Don't change" and "skip" in the table. (Similar to my Vacation and Yard Work modes in the image)

Timed Schedule

Then, for your presence, make sure your "work" and "leaving work" modes say the same thing and have "skip" checked.

Presence Settings

For the meat of the "work" and "leaving work" modes, you will let your triggers in RM flip switches (or buttons) instead of controlling the modes directly. In your case, you would probably want your "work" mode to be like my "vacation" (Yellow Highlight) where it is only triggered to the mode when the switch goes on. Your "Leaving Work" mode would be more like my "Yard Work" mode (Green Highlight).

I have my vacation switch set to turn off automatically after a second, but it leaves the mode in vacation until I have another trigger act upon it (Vacation is ignored in the two previous sections). For me, I have specific reasons of when I put the house back into away mode a few hours before we get home. So, I do it manually. But, you could just as easily set up an RM rule to do what you need.

Switch Settings

image

Doing it this way, logic would be:
House is humming along in whatever timed mode you have
Presence leaves -> "Away Mode"
RM Rule kicks on Work Switch when you get to work - >"Work Mode" (Switch turns off after a second)
RM Rule Kicks on Leaving Work Switch when you leave work -> "Leaving work mode" (Switch stays on)
Here is where you need some method, such as RM when presence returns to Kick the Leaving Work Switch off. Once the switch goes off, it resumes the timed schedule.

Also, if you are using some sort of presence to detect when you are at work, then you could create a virtual Presence tied to that and just use "work presence" arrives to trigger "work" and "work presence" departs to trigger leaving work. Not sure how you were detecting that though. If you did that, you would not need the switches setup. You would have to be careful though. You might be triggering leaving work when going to lunch if you eat somewhere other than the work place.

I personally prefer the switches as it leaves me a way to easily make a manual override. I just keep the switches on a "Presence" dashboard that is an easy click on my phone.

Manual Presence Dashboard

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.