How to make routines change mode?

I’ve had a ticket open with support ever since migrating from v1 hub to v2 a few weeks back. Initial problem I reported was that my power allowance smart lighting smartapps were triggering in Home mode even though they are configured to only trigger in Away or Night mode (and of course my smartapps that were configured to only run in Home mode, were not triggering at all when I expected them to).

Over the course of communication with support I have determined that the problem is not with smartapps, but rather with routines often not changing mode. I see this lack of mode change within the Location event history, but within the mobile app the mode does appear to be updated.

Anyway, here’s the evidence from Location event history:

Last night, I executed Goodnight routine with minimote, all is well:
2016-05-16 12:27:52.795 AM PDT
18 hours ago LOCATION /LOCATION_MODE_CHANGE LOCATION_MODE_CHANGE mode Night 2Home is now in Night mode
2016-05-16 12:27:52.750 AM PDT
18 hours ago LOCATION /API routineExecuted 4e1ee37e-b1bd-460a-83c7-7d991… Goodnight2 was executed

This morning Good Morning routine executes when things start happening but no corresponding mode change is logged, and even though my location appears to be in Home mode, my smart lighting smartapps think the location is still in night mode (Interestingly, non local smartapps like Lighting Director run as if in Home mode)
2016-05-16 6:47:04.026 AM PDT
12 hours ago LOCATION /API routineExecuted 385e7bbb-2eca-4547-8d39-5e8c3… Good Morning WD! was executed

This afternoon I test and let Goodnight routine execute when things quiet down: Mode changes to night. Smart Home monitor does not alert me to anything when I open and close doors, but smartapps configured to notify me when doors open in Night or Away mode do send me notifications when I open doors.

2016-05-16 3:59:29.218 PM PDT
3 hours ago LOCATION /LOCATION_MODE_CHANGE LOCATION_MODE_CHANGE mode Night 2Home is now in Night mode
2016-05-16 3:59:29.173 PM PDT
3 hours ago LOCATION /API routineExecuted 4e1ee37e-b1bd-460a-83c7-7d991… Goodnight2 was executed

Then I manually execute I’m Back routine, but there is no corresponding log of a mode change from Night to Home (I’m Back is configured to change mode to Home regardless).

2016-05-16 4:41:53.438 PM PDT
2 hours ago LOCATION /API routineExecuted 4e23fbcc-6129-447e-b0fe-b3174… I’m Back! was executed

In this state after the above, Mobile app location shows as Home mode, but once again my Away/Night only configured Power Allowance smartapps keep turning off the lights.

Then I manually change mode from Home to Away and back to Home again in SmartTiles dashboard, and suddenly all is well, all my locally running smartapps run with correct mode recognized and my lights stay on.

2016-05-16 6:00:34.204 PM PDT
30 minutes ago LOCATION /LOCATION_MODE_CHANGE LOCATION_MODE_CHANGE mode Home 2Home is now in Home mode
2016-05-16 6:00:31.890 PM PDT
30 minutes ago LOCATION /LOCATION_MODE_CHANGE LOCATION_MODE_CHANGE mode Away 2Home is now in Away mode

So the question is, what am I doing wrong? How do I fix this? I should mention that all of these routines are configured to change mode as you would expect. Goodnight routine to Night Mode, GoodMorning routine to Home, I’m Back to Home, Goodbye to Away etc. And I’ve tried removing and reinstalling them multiple times over the past few weeks with no luck. Support suggests recent platform changes may have resolved the problems but they have not…


A number of people have reported this problem, but I don’t think anyone has found a cause or a fix yet.

Some people have suggested that since mode change is the last thing that happens, maybe the routines are timing out. That might be true some of the time, but is not true all of the time.

Some people have very simple routines and And still find that everything works except the mode change.

@slagle might know more.

We’re doing a deep dive into routines and their reliability starting this week. More info and improvements to follow.


Support had me remove Nest to see if that solves it. It didn’t. Also removed Blue Iris profile smartapp and Smart Home Monitor since it is also not arming/disarming with routines. But still no luck, fails to properly change mode…

I remember when I setup smartapps and devices on v2 there was often a long delay when the mode list was loading in the mobile smartapp. Like when setting “Only when in mode” in the smart lighting smartapp. 2 or 3 times after a long wait, the the mobile app would load my previous/old location’s list of modes for a split second before displaying the new location’s list of modes. I’m wondering if my migration to v2 was cursed from the start.

This has been broken for several months and I have opened multiple tickets about it. Some releases they will fix it, other releases they will break it all over again. Supports fix is same line of BS they gave us about SHM. Fire to a different routine then fire the one you actually wanted (repeat until it actually works). The most recent ticket I’ve opened on this: #214627. Previous ticket numbers: #129816, #182092, #176780, #129816

@slagle I finally solved this by removing (turn off) Harmony activities from my Goodnight and Goodbye routines and disassiating virtual and cloud devices (virtual switches and nest) from the hub in device settings.

Now routines run and modes change, fast! (Even with Nest in in the routine).

Good to know! So it was virtual switches that have a hub associated to them?

It may have just been turning off Harmony activities in a routine. First I reset the virtual switches to not be attached the the hub. Didn’t fix the problem. Then I removed Harmony Activities from routines, and it worked.

I just tested with a new virtual switch attached to the hub and turned on/off on routines and the problem did not return. However, one difference is since I now deleted my old location (after finishing the migration to hub v2 a month ago) now there was no selection to assign location to the new virtual switch in the device settings. I’m 98% certain I deleted the old virtual switches when migrating to hub v2, rather than just moving the virtual switches from the old location. But since those now removed virtual switches were created when I still had the old location + new location, they continued to show the drop down location selection as an option in “Edit” device settings. They were assigned to my new/current location though.

So the only thing I proved for certain was that Harmony Activities turned on/off in routines cause routines to hang. And… by the way, they also prevented SHM from arming/disarming in routines. Now everything including SHM seems to be working as expected.

I had simular issues with Routines and having web based devices in the routine with z-wave/zigbee. After I removed the web based (Blink Camera’s) and put them in their own separate routine I have not had any issues with Routines changing modes. This was 4-5 weeks ago and it has been great at my house with things working automatic and I don’t have to keep opening the app ti check the mode.

1 Like

Yeah, the best part is the stuck routines failing to change local hub mode are no longer impacting locally running apps. I can now use Smart Lighting app with power allowance etc. That along with SHM working for the first time since I upgraded to hub v2 solves my home automation problems. What a relief!

1 Like

Thanks a ton for the feedback guys! I’ll make sure the eng team knows this on Monday :smiley: