[RELEASE] Ask Alexa


(Micheal ) #1

All, this is a new thread from my conversation in the Alexa Helper area ([RELEASE] Alexa Helper)

I am officially announcing my new Ask Alexa Smart App. This is what a lot of us have been looking for when it was announced that SmartThings would work with the Amazon Echo (‘Alexa’). Unfortunately, the integration was one-way and limited. You could not query your devices to find out their status, and you had NO access to modes, SHM or routines. I attempted to fill the gap with Alexa Helper, and it did a great job at giving you additional control over items using simple on/off commands. I even got into the ‘feedback’ piece by sending a voice output to a Sonos speaker. But, I always felt this was a ‘hack’…why ask a speaker (Alexa) to report out on another speaker.

Well, with the guidance of @N8XD I was able to finally get the Alexa to behave the way I always wanted it to…as a fully input and output device. Now I can not only control my devices, but ask them their status. And, I brought over the voice reports from Alexa Helper…so now I can get a ‘whole home report’ about various devices with one command. Simply by saying “Alexa, ask SmartThings…” my entire system is now accessible…switches, thermostats, locks, doors, etc. I even address some of the security concerns of having locks and doors accessible by adding an option for a PIN when working with these devices.

I plan to release the app within the next couple weeks. I am not going to offer any private beta…when I post it everyone will have access and we can see how it behaves. I have a basic framework for the documentation here: http://thingsthataresmart.wiki/index.php?title=Ask_Alexa. It is VERY rough right now… @bamarayne has volunteered to work on some of the AWS/Lambda documentation, but if anyone wants to edit my doc feel free. I know it will be difficult without the app in front of you, but if you find a blatant issue with misspelling or logic, please correct it.

Finally, this will not be an easy app to install…you will need to have an Amazon developer account opened with the same user name you added your Alexa to, and you will need an AWS account to hold the Alexa code. I WILL be offering a small donation service to host the code myself so you will always be up-to-date, but if you want to host it yourself you will need to open your own account. There will not be a cost to you to open it…just if you exceed the million access per month limit (unlikely)…however, you WILL need to provide them with a credit card ‘just in case’.

Let me know your thoughts and use this thread for questions. I will change the title to “RELEASE” when it is ready.

As always, if you feel like making a donation for these community efforts: https://www.paypal.me/mstruck


[RELEASE] Alexa Helper
Amazon Echo - Current summary of what/how it integrates with ST? (May 2016)
[SHARE] Ask Alexa Skill - How are you using Echo?
Alexa Smart Home Extensions to Skill Kit
Performance Tracker (Final)
Amazon echo for late adopters?
[RELEASE] Resilient - My Ecobee Device & ecosystem v5 - The smartest thermostat under ST with new "comfort tips" features and Unique Integration with Echo/Ask Alexa
Can Alexa tell me the temperature?
Google Home Assistance - problems with ST - KNOWN issue to Google
Teach Alexa new tricks
Amazon Echo and Virtual Switches stopped working
Best Garage Door Setup?
[RELEASE] Alexa Helper
Alexa, Honewell, and permanent hold?
Log events to Google Sheets [see post 154 for current Github repo and v1.1]
GE Ceiling Fan Switch Custom Device Type - Low, Med, High buttons w/no slider!
Developers who changed the way we do things
CoRE and Piston Rules Engine, first design steps
Amazon Echo report with switch trigger
Smart Things Hub at two locations
Alexa and a routine
Unable to get Alexa to turn off lamp I'm Routine
Echo Show integration
[RELEASE] Lock Manager
Alexa commands to Smartthings
Any closer to open close commands on Alexa?
Garage Door "Switch capability" setting?
Alexa, Google Home and Thermostat Humidity Reporting
[DEPRECATED] Ask Alexa 2.3.6
Anyone any experience in UK with Echosistant?
Echo reporting?
Alexa and locks
[DEPRECATED] Ask Alexa 2.3.4
Sport Notifications SmartApp [BETA]
Calling Routines with Echo Dot Alexa
Smart thing can see the iris open/close but echo doesn't
Alexa - problems with Smartthings
Alexa home control with SmartThings? (Specifically locks)
[SOLVED] Getting useful output back from a group of sensors (Alexa)
Amazon Echo device discovery issue
Possible to ask alexa when the last time a sensor toggled?
[DEPRECATED] Ask Alexa 2.3.5
SmartThings app will receive a major overhaul in Q1 2018
[DEPRECATED] Ask Alexa 2.3.7
Need help adding Nest, August, ceiling fans, Arlo, etc
Ask alexa - can't find device alias option
[RELEASE] MyQ Lite Door and Lamp Control (for Liftmaster/Chamberlain)
Released DHs and local execution?
Alexa: Why bother with ST integration?
Smartthings+Echo+Harmony Hub = Voice Controlled TV! (2016 version)
What do you use IFTTT for with SmartThings? (Examples and Ideas) 😎
Alexa open my garage
[RELEASE] Enhanced Linear GD00Z-4/GD00Z-5/GoControl/Iris/others Device Handler with Switch and Automated Garage Door Open/Close when People Arrive/Leave/Timer
[DEPRECATED] Ask Alexa 2.3.8
Amazon alexa reduced compatiblity
Creative ways to set night mode on alarm?
Echo Hue Colour
[RELEASE] Enhanced Linear GD00Z-4/GD00Z-5/GoControl/Iris/others Device Handler with Switch and Automated Garage Door Open/Close when People Arrive/Leave/Timer
[PRE-RELEASE] EchoSistant V5 - Evolution
AskAlexa to read back a voice report?
Arming Alarm Via Amazon Echo?
Alexa Notifications/Remote Control?
Any way to make Xiaomi sensors appear as Alexa Device?
Alexa opening and closing garage door?
[RELEASE] Ask Alexa 2.3.9
[RELEASE] Device Monitor - Get Notified if Devices Stop Reporting
How to send commands to Alexa using Core
[RELEASE] Xiaomi Sensors and Button (beta)
Smart Oil Gauge - Web Scrape?
Pause Plex or AndroidTV through Harmony/St and Alexa
Using SmartThings to control Echo
SmartThings + Kwikset Locks + Alexa = No control
Alexa: Modifying the ST phrases?
(Fred Schmitthammer) #2

I am ready when you are.


(Micheal ) #3

Made excellent progress today with both the documentation and the back end Lambda code. Coming soon!


#4

The documentation looks great. I haven’t looked at any of your work before today, but you definitely put a lot of effort into this, and I can’t wait to see this one. Thanks, Michael.


(Micheal ) #5

Thanks…Glad you had a look…a LOT more to add and fix in the documentation, but getting there…


(Micheal ) #6

Here is a look at the interface


(Tim Slagle) #7

Nice job dude!


(Micheal ) #8

Thanks…it is one thing to create the interface, but it is another to have the app function. The good thing is that I believe I have both…

This is coming together quicker than I thought and will be ready to release very soon. I may actually add basic speaker control to this before I release it. Basically, play, pause, stop, next track, previous track stuff. Nothing fancy like play this track (simply because there doesn’t seem to be a unified standard from Sonos to Bose to Samsung).


(Glenn) #9

Can’t wait!!


(Eric) #10

Would love to see speaker control eventually, even if it doesn’t make the launch cut. Using a virtual dimmer to raise/lower Sonos volume is one of my most used features from Alexa Helper.

Great job so far. It’s incredible how fast you’re making progress.


(Marc Connors) #11

Looks incredible. You always seem to take it up a notch. I cannot wait! I assume we retire the Alexa Helper app and transition to this correct?


(Micheal ) #12

Not so much…While I may eventually add ‘groups’ or ‘Macros’ to Ask Alexa, in its initial state it controls one device at a time, where as Alexa Helper can do all kinds of fancy stuff with HTTP requests, delays, etc. If you are simply looking for control, then you MAY be able to eliminate Alexa Helper. For me, I eliminated 3 of the 7 scenarios I have, so that is cool…


(Micheal ) #13

Ask and ye share receive…


(I got a hair cut from Alexa) #14

Awesome job Michael!


(Kavvy) #15

Im in for the long haul with this one! This is amazing work @MichaelS (and @N8XD)!!

Would this be able to tell Alexa to turn off this light and that light? Or is it still a single request at a time (like it is now)?

What about getting Alexa to tell you the average temp based across a group/all of the temp sensors in the house (or by floor)? Like, “Alexa, ask Smartthings what the temperature is upstairs.” It averages any sensors you have for this command. Anything like this possible?


(Micheal ) #16

@Turb02

Good questions…the big thing in this release (coming soon) will be to just get the basics functioning…this means single device, single command. The exception to this is in reporting…I brought over the reporting from Alexa Helper so you can set ‘groups’ of reports to send to the Echo. I use this for a nightly report to go over all of the windows and switches that I can’t see from the bedroom to ensure they are closed or off. I will replace this reporting with a ‘macro’ child app in the next release that will CONTROL groups of items, similarly to how the reporting reports of groups of items (reporting will still be there, and will be a ‘macro type’). This will all be dependent on the popularity of what I release soon and the demand for that kind of stuff. My ultimate goal is to be able to replace Alexa Helper completely in functionality. In reality, however, many people will not like saying “ask SmartThings” and simply want to turn stuff on or off easily. However, for the power users this new app will be where the majority of my development will be on.

Regarding, your suggestion about the average, I think that is a fantastic idea…that definitely falls into the scope of the reporting function, and I will spend a couple hours this afternoon working through implementing this BEFORE the full release. GREAT SUGGESTION!

More to come…


(Kavvy) #17

Can this phrase be replaced with anything? Like “The house” or “The Mistress”, or “The woman who listens” :stuck_out_tongue_winking_eye:

Could this also be done for contact sensors? Say you want the evening security report. You dont need to hear the name of each one and its status. Rather an “All secure” or could it report just the ones that are open? I have quite a few contact sensors and it would degrade the WAF if Alexa “rambled on” (her words). If not possible, no biggie. Ill suggest the wife go to be early if she doesnt want to hear it! Might be an easier solution :worried:

This app will be a HUGE hit!


(Micheal ) #18

Well, that took like 5 minutes…I basically took the reporting variable (%temp%) and allowed for multiple inputs. If it is more that one device to report on, it automatically reports just the average of those devices. Same with humidity.

Again, great suggestion.

Regarding the name, yes…you CAN do that…it will be on the Amazon side when setting the app up, but once you prove it is working you can change it to whatever works (some names are reserved by Amazon).

For the things like contact sensors, this is already built in…you can either report each device, or you can consolidate most of them…for example, if you are monitoring 20 switches you can have them called out individually, or you can ask for a summary (or more correctly, only ones that are on).

Keep those suggestions coming!


#19

This is awesome! The work you and @N8XD have been doing with this is great. If either of you figure out how to implement this into harmony where I can have harmony turn up volume or change channels, you can point me straight to your Paypal account! Keep up the good work!


(Kavvy) #20

Can this app intercept ST reactions?

Thinking SHM and its lack of delays for entries/exits. Alexa tell smartthings to arm home" Response of “Arming home in 30, 29, 28…” The reverse would be if a presence sensor wasnt caught or someone without one, unlocked the front door, Alexa would countdown from a user defined time (15 sec?) before triggering the alert in SHM. If a security PIN is either entered into a pinpad, or spoken (like your garage door scenario) “Alexa, disarm home password 1234”

Doubtful but hopeful on this one.