Switch Activates Home Phrase not working

I have never used the smartapp Switch Activates Home Phrase. When I went to add it, it says “sorry but there was an unexpected error” So I tried to add it again but the same thing happened. I tried it a few more times but again the same thing happened. Now I have multiple instances of it in my apps and I cannot remove them.

I looked at the live log to see what came up when i opened it and all that shows is this
trace [null, Good Morning!, Good Night!, Goodbye!, I’m Back!]
trace getPhrases(), state.welcomeIssue = null

That is it. Nothing else. How can I get this fixed?

have you tried

My location/

to delete the routines?

I dont see how to delete it from there. I tired adding other applications like the jawbone sleepy time smartapp and it had the same issue. It appears something is wrong with my hub or account.

Turns out the app has issues with my phone. I was able to install it using a different device.

I can’t get it to work either on two devices, one android, one ios. Have to remove manually…

Is there another way to do this?

Tagging @MichaelS

The app has no ties into the type of device you are using…it is compatible with ANY SmartThings implementation; however, that is not to say the ‘base’ (the SmartThings app itself) isn’t causing the issue.

First and foremost, since the apps have been published by SmartThings, they are supportable by support@smartthings.com…I am only mentioning this as most people don’t know this about the published apps. However, I am interested in the root cause here. I did try this on my phone and the app works great. I did recently troubleshoot an issue in another thread where the phrases they had created were actually causing the issue; a NULL had crept in there, causing the app to crash. When he deleted that, it worked fine. That may be the issue here.

Unfortunately, since the code it published you have no way of putting in the traces to figure out if that is the issue. I have updated the app so it wouldn’t hurt to see if this fixes your issues. Just save and publish this in the IDE and see if this one crashes as well. If so, at least we can put a line or two in the code to figure out why.

I just had the same issue today that @dom89 previously described when trying to add the Switch Activates Home Phrase smartapp. Unlike @dom89, however, I previously had one instance of the smartapp installed and running without problems for months. When trying to add another instance of the smartapp today, I received the same error as described. After several other tries, I had 3 new instaces of the app, all of which were not working. I successfully removed the new, broken instances of the app using the IDE.

The instance of the app that I had been using months still executes successfully but it throws the error when I try to pull up its details on my phone so I do not have the ability to view or modify it anymore.

@MichaelS I saved and published the code you put on github. However, I get the same error, “sorry but there was an unexpected error,” when trying to use your code.

Appreciate any ideas on how I might get this working as I would like to add this capability to several new virtual switches that I have created.

Quick Update: I was using an Android. A friend just came over with an iPhone. I was able to add the Switch Activates Home Phrase on the iPhone without any error.

I apologize. I jumped the gun a bit on saying that it was working from the iphone.

The iphone does not throw an error. However, neither the “Switch Activates Home Phrase” or the “Switch Activates Routine or Mode” apps provides options to choose from under the “Perform the following phrase when…” and the “Perform which routine when…” input prompts, respectively. The Switch Activates Routine or Mode app does have the correct inputs displayed if I wanted to use it to switch a Mode (Home, Away, etc.). However, I’m trying to control routines that I have added.

Based on the above, it appears an error is occurring when trying to grab the list of routines to choose from perhaps? Welcome ideas @MichaelS on how to get past this issue. Thanks!

I know this is not what you want to hear, but I loaded up this app fresh from my GitHub above, installed it, and it worked the first time.

Looking through the code, this stuff is really simple. If I had to bet, I am almost sure your issue is a null phrase within your account. While a different SmartApp, the instructions here will describe it. You will need to find the null phrase and delete it to get this working

http://thingsthataresmart.wiki/index.php?title=Ask_Alexa#Troubleshooting (third bullet point down).

You nailed it! A null phrase was creating my issue. I am able to get it working now! Thanksfor your assistance.

1 Like

I keep saying I need to fix that in my apps…maybe I will do it this time :wink:

1 Like

This helped me out as well on my original device. Thanks!

The issue here is I have not idea how all of you are creating null routines…any suggestions so I can test for them?

The only thing I can think of is that at one point I deleted all routines and modes. I then manually reacted some of them. Before I deleted them all I had not tried to install this. Maybe deleting them causes ST to create a null routine?