[DEPRECATED] Ask Alexa 2.2.6


(Micheal ) #1

Announcing version 2.2.6 of Ask Alexa

I am pleased to announce the 2.2.6 version of Ask Alexa. In this version I continue (along with help from the community) to evolve the application to allow more conversational syntax, along with adding more functionality for existing and new devices. This is JUST an IDE update with all extensions getting an update along with a new extension. While the Lamda was upgraded (now to version 1.2.6), it is NOT necessary to update if you don’t want to (but if you plan to get a Show it will be nice to have). Either way, you WILL need to go through Settings>>Setup Variables for the new functionality to operate. This is very important and about 50% of the problems I see are people not updating their slots after an upgrade.

I am slowing down updates as I move forward. However, I will push bug fixes out if you report them to me! And I will always be on the forum to harass :smiley:

PLEASE NOTE: Now that this app is rather stable (It is now almost 1 ½ years old!) now I will be updating it less frequently except for bugs and new features. I am waiting for Amazon to release their ‘push’ notifications (which this new version has various references to internally) where some amazing stuff will happen with this app. Until then, if you do have a great feature idea for this app, just let me know.

Other additions to this new version include:

  • Bug Fixes - The normal things…silly misspellings, logic errors, bug reports. Thanks to @flexyneat for pointing out an issue with additional attributes and contact sensors (the fact they weren’t listed).
  • Code Optimization - Always finding better ways to do things in a shorter about of code.
  • Ask Alexa Extensions - To allow for even more options in the future, the architecture of Ask Alexa is evolving to allow what I am calling ‘extensions’ to be accessible via the main app. Just like child apps in other applications, these can be added to Ask Alexa to give even more functionality to the main program.
  • Documentation Optimizations - The main document (http://thingsthataresmart.wiki/index.php?title=Ask_Alexa) was getting too big so I split out the extensions into their own area. This helped streamline the installation instructions and get you up and running faster.
  • Scheduler Extension - This is the extension some of you have been waiting for! Surprisingly, Amazon just came out with similar functionality (http://www.businessinsider.com/amazon-echo-update-features-reminders-named-timers-2017-6 A LOT of folks e-mailed me that knew about the schedules app when they heard this news thinking I would be upset. However, I am thrilled! Ask Alexa is not just duplicating functionality of Alexa, but enhancing it. After playing with this native feature a little bit, I still feel Ask Alexa has the upper-hand for flexibility. Now you can schedule actions (and reminders BEFORE the action, something that is quite important!) within Ask Alexa. While most will use the “action” to be just a verbal reminder, Ask Alexa can actually schedule REAL actions (run CoRE Macros, play a voice report, turn on lights, etc.) Of course, the classics uses are still here… For example, let’s say you have an annual event (i.e. birthday and anniversary) of someone in your family. Simple use your app to set a reminder and a new message will appear in the message queue you designate to remind you of this. In addition, for those of you in volatile weather areas, you can also utilize the advisory weather report to play (on ST connected speakers or put a message in your message queue) when adverse weather is forecasted. While Amazon allows you to set reminders via voice, I actually feel setting up complex schedules with the app (i.e. VISUALLY) is the way to go. There are SO many things you can do with this extension, and a plethora of ways you can set a schedule (one time, recurring, even real CRON expressions). Be sure to read the section here:http://thingsthataresmart.wiki/index.php?title=Ask_Alexa_-_Schedules as I am not doing justice to what this feature can do here.

Your move, Amazon…

  • Message Queue Extension - Added new parameters for Ask Alexa’s partner apps (like Device Manager…thank you @erocm1231 and @storageanarchy for the suggestions) that allow for message to have expiration dates, remove dates from playback, or just notify without adding to the message queue (for future extensions). In addition, you can now have a predesignated sound alert you to messages (or prepend them to your verbal announcement). If you have sounds clips that are ‘family friendly’ and you feel they would benefit others, please send me suggestions and I may include them in future releases.
  • Random Replies - As most people know, you can use variables in the text fields within most of the areas of the extensions (voice reports, Acknowledgement text in Extension groups, etc.) Added a %random{1-3}% flag variable. When set up in the Settings>>Text Field Variables, you can have Alexa reply with one of 3 responses you program in. Let me know if you need more than 3 responses. I currently use this for my good night routine so it says random things each time.
  • Weather/Voice Report Restrictions - When I removed the voice and weather reports from the main macros in the last revision, I couldn’t think of a use case where I needed to keep the restrictions for those reports. Thanks to @Xtropy for a couple really good use cases. The restrictions have been added back in.
  • Utterances - Thanks again to @m3rocket for adding new utterances that allow for even more compound (i.e. multiple actions) per command. There are also some new natural speech things (i.e. “How cold is it outside” where “outside” could be an alias). He also spent considerable time organizing the utterances into logical order and building up variation (he almost doubled the number of utterances!). If you find something doesn’t work the way you expect it, it may not be the code but the lack of an utterance. Let me know and I can add that into future releases without having to re-code the app.

Installation
For those with IDE integration with GitHub, simply update the repository and you will have the latest code for the SmartApp itself. However, for ALL aspects of the application follow the original instructions for installation to ensure you get everything updated properly:
The wiki for this app is here: http://thingsthataresmart.wiki/index.php?title=Ask_Alexa

Support
All of you have been great in asking very relevant questions and making suggestions that I end up using. Here are some helpful tips on usage and support:

  • Sometimes it works best if I can work real time with you. To facilitate this, I have created a Slack channel: https://askalexa.slack.com. Using this tool is easy and will allow for real-time collaboration to solve the problems faster. To use this feature, I must invite you to the Slack channel. This will not be for normal questions; please use this forum for that function.
  • The Echo, as it is designed currently, cannot react to switches opening or other actions within SmartThings. She will do things for you, but only at your direction and at the time of the request. The delay timer mentioned in the control macro happens at the SmartThings hub, not within the Amazon Alexa control. See the new Message Queue functions for similar functionality with Big Talker!
  • When evaluating new features I will typically ask for a valid use case. If it can be used by others to bring them value I will put it on my list of future revisions. Not all suggestions will be used and many times I add aspects of the request.
  • There are no dumb questions, but many of the questions you may have were probably answered in the year since the initial release. Please take some time to go through the forum and the wiki if you have issues. And don’t be offended if I give you the specific area of the manual that answers your question. I have spent almost as much time on the documentation as I have on the app. Finally, there are some big fans of Ask Alexa that know almost as much as I do. They can also help.
  • Feel free to send me forks of utterances or even code revisions. As mentioned above, if it adds value to the overall program I will try to include it. This also goes for the wiki documentation…while I have spent over a year creating this document, I am open to it being improved; I know there are probably still grammatical errors or syntax issues…If you find them, fix them…I will include your name (if I can) in any fixes submitted.
  • If you find a bug or a consistent crash please help me track it down by giving me repeatable steps to reproduce it. A non-reproducible bug, many times, indicates other areas that may be at fault besides the app. If you watch the live logging and see a red error with a line number, that is very helpful to me! However, I will need a full screenshot and not a copy/paste of the text. But be careful about revealing your OAuth and AppToken in your public posts. People can control you house with that information. You may want to blur that out.

As mentioned above, revisions will be less and less now. And with the code base now unified, I expect less and less additions…especially as I partner with other application developers to ensure their strengths can be brought into the notification model of Ask Alexa . Any and all suggestions are still on the table for addition.

To prep for the next version, be sure to take some good notes about any weather voice reports you have set up…I will be moving the weather piece to it own extension app. However, it will still be able to work in any voice report you have set up. Then, the fun begins with addition another extension after the next one!

As always, I appreciate any public accolades or even donations to my PayPal account: https://www.paypal.me/mstruck . And, if you are so inclined, I also will accept bitcoins (or fractions thereof) if you have any laying around. My wallet ID is: 1CMgaiKgBfojTBCLpHLfa9KvcrW3cNxVpm
Enjoy.


[RELEASE] Ask Alexa
[DEPRECATED] Ask Alexa 2.2.5
(Nathan Davis) #2

I have a weather report set up and I would like it to be announced when I activate my good morning routine in SmartThings. Could someone get me in the right direction on how to set that up?

Thanks.


(Micheal ) #3

Nathan,

For clarity, WHERE would you want this announced at? Alexa can not YET awake and give you a announcement, but we can come close with external speaks (i.e. Sonos or voice synth devices), or texting you, or posting the weather report to the message queue (but this eliminates the ‘real time’ aspect).

In addition, does the ‘good morning’ routine happen at the same time every day? Or do you initiate it?

Let me know your use case, but there are a couple solutions I can suggest using Ask Alexa or even the Talking Alarm Clock app I developed.


(Nathan Davis) #4

I use Big Talker to announce all events to my mounted android tablet; that’s also where I activate my good morning routine every morning.


(Micheal ) #5

Ok…Final question…You activate the good morning routine via Alexa, or is Alexa even involved in this equation?


(Nathan Davis) #6

No, I use ActionTiles on my tablet to activate my routines. Sorry, should have clarified that. However, I do use webCoRE if setting up a piston would help communicate with Ask Alexa…


(Micheal ) #7

ok…but you DO have an Alexa…is the goal to output to the same tablet device or for all of the output to go to Alexa? (Sorry…THIS should be my last question :))


(Nathan Davis) #8

Yes, I have two Echos. I would prefer the output to go to the tablet.


(Micheal ) #9

Ask Alexa was really designed to send the output TO Alexa specifically based on a command. While sending your output to the tablet isn’t impossible, it is a bit more work. If you are up for it (and you are willing to change your processes a little) we can get this to work.

First, the assumption is that you change your house mode when you run your good morning routine.

Second, you will set up a message queue with the tablet device as the output.

Create your weather reports and then create a schedule. Here is where it gets interesting and I need to set proper expectations. Since schedules are based on time and not events, you will want to set up a range of time where you typically run your good morning routine. For example, if you always run it between 7 and 8 am, I would set up an a complex, every-minute schedule but set up the restrictions to only have it ‘active’ on the certain days of the week between 7 and 8 am. I would then also set up a restriction for the mode (if it truly changes when you run your routine).

So the process flow would be this: you get up, activate your morning routine…this changed the mode, which then activates the schedule. Within a minute the weather report runs and plays through the speaker. Now, here is where it is interesting…it will play EVERY minute during the time frame. The resolve to this could be to simply tell Alexa to turn off the schedule (after you hear the report), or have some sort of ancillary mode that you press a button on your tablet once you hear the report.

Again, this is NOT really how Ask Alexa was designed, but this is possible with a little change to your workflow. You have given me some interesting ideas about scheduling and outputs, but see if this makes sense for you and let me know if I need to clarify anything. I will also continue to noodle on this a bit…Talking Alarm Clock (my other app) would be perfect for this if your tablet appears to be a Sonos speaker to SmartThings. If it does, then this will work. If not, I am planning an update to this app eventually to utilize the Alexas as output devices.


(Nathan Davis) #10

That’s…interesting. Haha. I guess with all the talk of Alexa’s new features I was hoping for more of a push notification type of thing. I will still give this method a shot and see how it works for me. Thanks for putting in the time to assist!


(Micheal ) #11

Oh…push is coming…probably NOT what you envision with the speaker randomly talking to you without input, but probably a green light and a tone…This will take you to the message queues.

However, if you REALLY want to change your process (and keep commands simple) you could use the flash briefing feature. Once set up you simple say “Alexa, flash briefing” and it can run your routine plus give you a weather report in real time. Not through your tablet, but this would give you a real time response to your actions…

Thanks for the feedback.


(Nathan Davis) #12

Hmm, that sounds like a simpler method that could work for me. Thanks for the suggestion.


(Barry) #13

For those interested, I have today released an update to my FREE Ecobee Suite that now integrates your Ecobee Alerts and Reminders with Ask Alexa Message Queues. You can find more information here:


(Micheal ) #14

Barry,

Thanks for being such a great supporter of Ask Alexa and the functionality I have put in there. There are some good things being produced by this community!


#15

Maybe I missed something but is there a difference between askAlexa and Alexa Helper apps? There seem to accomplish the same tasks but I could be overlooking the differences. If askAlexa is installed will be Alexa Helper be needed and visa versa?


(Micheal ) #16

It really depends on your needs and how you want the integration to work. Alexa Helper works WITH the native SmartThings integration (via virtual switches) to give you more control over items that the Alexa can not natively control like routines with locks or door controls. It does NOT improve the feedback from Alexa on your household items.

Ask Alexa, on the other hand, can REPLACE your native integration, but the caveat is that you must put the skill name into the command (i.e. Alexa tell SmartThings to open the door). The huge advanatge if you need it is that you can have real time custom reports about your devices and household.

Let me know if you that helps at all…


#17

That helps clear it up some. It starts to get confusing with a variety of apps that do similar things but slightly differently ie Echosistant, Alexa Helper, and askAlexa.

I updated Lambda code and can run macros again. As soon as I can get my Nest manager to start playing nice again my current setup should be usable for me with askAlexa.


(Micheal ) #18

Excellent…glad to hear it. And yes…there is a similarity on the surface with these, and the difference is really what YOU want to do in your environment. NST Manager is a partner to Ask Alexa, so that is a good combination to put together.

Even for myself I have completely replaced Alexa Helper in my household. And WebCoRE eliminated a need for my OWN app for bathroom ventilation, so I literally only have a few apps in my IDE!


#19

It’s funny that the developer has replaced his own app for another developer’s app. Along the same line, if Amazon ever starts to actually work on Alexa apps that integrate better with ST then that might make the community developer made apps obsolete.


(Micheal ) #20

You know, you are the 5th person to say that this week, and people are always surprised by my answer…I HOPE SO! While this is all ‘fun’ for me, I don’t have my ego or life wrapped into doing these. I actually enjoy programming and more specifically, creating something that others find useful. That being said, I am a user of my own app in the case of Alexa and at the end of the day, that is really who I made this for. But, if my stuff was just a duplication of what Amazon was doing (without a value add), I would really need to take a good look in the mirror to see WHY I would be doing this.

A good point is the bathroom ventilation app I wrote a couple years ago…When Core came along and gave me an opportunity to eliminate one of my apps, I jumped at the chance as I try to keep things clean and simple. I already used Core for other automations, so it was a natural progression to get it to duplicate what I coded. I am always pleased we have developers like Adrian in our midst as I just want my home automation to work the way it should without me having to ‘fiddle’ with it all of the time.

Thanks for installing the app and the feedback!