[NO LONGER SUPPORTED] Ask Alexa

Hello, 1st of all the app is great but a couple of things seem broken, perhaps my fault when copying the code to IDE. The Settings and About sections immediately give me “An unknown error has occurred” and I can’t access either. I would like to delete the app and re copy/try it but when I go to IDE it says can’t remove b/c its installed by one or more users and I can’t get to the About section to remove it from either of my 2 devices that I use because of the unknown error. Is there another way to delete it in order to start over? Thanks for any info provided.

It is probably unlikely you need to uninstall it…simply copy the RAW code from GitHub and overwrite the existing code. The errors you mentioned may indicate you don’t have the OAuth enabled…I would check that first.

That seems to have did the trick, thank you sir!

1 Like

Excellent…good to know…Hope you enjoy the app!

1 Like

Hi Michael, just wondering if your app Ask Alexa can be used to trigger Alexa and make her alert you about something? Let’s say you have a door sensor connected to the Smart Things hub. When the door opens, can Alexa tell you that it’s been opened? I heard Amazon are working on this, but at the moment it isn’t available. That’s what led me to your app! I’m willing to purchase the Hub and use your app if Alexa can read out alerts real time… Please let me know!
Thanks Michael.

I’m getting an error. I can run a macro but if I ask to turn on some devices I get an error: “I had some problems finding the device you specified” (lights). But I can ask the status of a presence sensor and it’ll tell me present or not present. I’m sure I followed all the instructions and added each of the slots. Any thoughts?

Unfortunately, no Alexa can not “at will” pipe up and give you notifications of any kind. The invocation name is the only way to “activate” Alexa. There are great “reporting” capabilities within the ASK ALEXA smart app, however you would have to ASK ALEXA for the specific report or device state, or a “message” - Not she just chimes up as I think is your desire.
I do want to add - you specifically said “door opens” and just as a idea, if you have a “connected speaker” in the ST system you can set up something like a SONOS NOTIFY - I do this for door open/ closed; door locked/ unlocked; and garage door open/ closed - so I am always AWARE if any of these actions take place.

This is a known feature request to Amazon.

Correct. Biggest requested feature I have…Push notifications!

What is the name of the device? Is it multiple words or have a number in the name?

I have them as: Light One, Light Two. So the lights are named with two words. Is that what’s causing it? I see Alexa picking up what I said exactly, just not being able to find the devices

In addition to having them as Light One, Light Two, I also have one light I recently added (before installing ask alexa) that I haven’t changed the name to. It’s Sylvania Smart Flex RGBW.

In Switches/Dimmers/Colored lights, when that light is checked, I get:

"You have the following device(s) with a blank (null) label: SYLVANIA Smart Flex RGBW Be sure all of the devices are uniquely labeled and that none of them are blank (null).

Ah. Yes…I would first rename them without a number and then go into the IDE and ensure the label is set along with a name.

Question (more of a how does everybody else do it), when setting this up a lot goes into assigning a device to a device type (ie. lights vs. dimmers etc).
I set this up once before and I found that invocations and devices tripped me up.

Anybody have any tips on how they do it to maximize the setup and get it working the best. Also, I am curious to know what you all name devices within ST so Ask Alexa isn’t confused when asking to turn on a light.

Last: Is there a way to change the invocation from Smartthings to something else (ie. ask my home to turn on the kitchen lights)?

Just my 2 cents - but I have great success with naming (now) - using Proper names and steering away from numbers (1,2,3,4, etc), single words - again a proper name; and staying away from “light” “lights” “lamp” really helps … so make it fun …
IE: my kitchen - all names of my favorite chefs.
My guest room - names after my kids and their favorite tc show stars “john wayne” etc etc
My matador themed room … Corsica, Barcelona, Seville, and the MAIN ALL SPAIN

Hope that gives you food for thought … Keep it fun and when it they are things that mean something TO YOU it is easy.

That’s really cool that you do that… are those the names you give devices in the IDE or within Ask Alexa?

that is what I NAME the devices in SmartThings … You can “think” of steps with that type of naming convention too

SO say I have a room
each device is a city name
~ Phoenix
~Tucson
~Sedona
~Scottsdale
~Flagstaff

THen if Virtual switches are used to control groups, or MACROS or just the GROUP function natively in Alexa
You could name that room (which includes ALL of the devices) the name “ARIZONA” so turn off Arizona turns off all (or what you have selected to be in that group).

any "THEME " that strikes a chord and it is easy to remember then

Favorite movie and the stars that appeared
State over citties
Countries
HECK Politicians if you are brave in front of mixed company.

1 Like

Micheal, first off this is just fantastic!! I have it setup and running with my coopboss. I can say Alexa, tell SmartThings to close north coop. I can do the same with the south coop and it works great. The CoopBoss has several sensors on various ZigBee endpoints: lux sensor, inside and outside temperature probes, as well as the ability to control two relays that can be hooked to a coop light and small coop heater. I was able to modify your Ask Alexa SmartApp to report on these as extended values. So I can say Alexa, ask SmartThings to report on north coop. She will report the door status, lux level, inside coop temperature, and if the coop light and heater are on or off. You already had the lux and temperature reporting there I just added a few more. Awesome code by the way very straight forward and easy to read!!

I did come across a something I would more than likely be the only one to see. I setup an Ask Alexa voice macro to report on each coopboss. It fires as expected but when she comes to the part of telling me what doors are open she spells out the door names instead of saying the name. I did some digging and it appears to be happening around line 2136 of the Ask Alexa SmartApp. I think this may be unique to me because unlike most garage doors that are tied to a open close contact sensor the coopboss doesn’t use a contact sensor to know when the door is closed (the objected detection circuit handles that). So I bet the logic in line 2131 normally fires thus properly initializing the string array but in my case it didn’t fire so when line 2136 hits, for some reason it is creating an array of characters instead of an array of words. I created a workaround that fixed the problem by changing line 2136 from

listOpened += voiceDoorControls.findAll{it.latestValue(“door”)==“open”}

to

listOpened = voiceDoorControls.findAll{it.latestValue(“door”)==“open”}

This is just a workaround for me I’m good no need to change anything for me just thought I would share what I did. I didn’t have time to fix it right as you can see I’m just re-assigning the variable instead of appending it to itself.

Here is a screen shot of the log before the change and after:

Well I think this is ready for the big test. Going to show the wife how to use and and we will see how she is doing in a week. I think I’m going to make a one pager titled “Things your can tell Alexa to do”. Thanks for all the fantastic work!!

I’m getting the following error message when testing:
{
“errorMessage”: “RequestId: 5467b77c-e32f-11e6-be2e-fb953ec4de79 Process exited before completing request”
}

Any clues?

1 Like

You received this in the Amazon Developer console under the test tab / service simulator ?

Interesting…That does sound like it is unique to you, but I am not clear on WHY it would behave that way…are the individual devices named strangely that it would spell them out? Let me know as I am sure there is a compromise on how to modify code so it would work as default for you but also for other folks as your solution would not list all things that are open if you remove the “+”