-
Posts
933 -
Joined
-
Last visited
Everything posted by blueman2
-
How To Guide: Getting Alexa to provide verbal responses
blueman2 replied to blueman2's topic in Amazon Echo
THIS! The thing I am really waiting for is the ISY being able to tell Alexa to say something or give a response without me having to talk to Alexa. But in the mean time, being able to give "Alexa, ask XXXXX" where XXX can be anything you want is a nice feature. It is still complex to get working and only for the do-it-yourself-er, but it is cool nonetheless. -
How to use the 3PO-Labs Responder to make Alexa talk back to you The Alexa Responder tool created by 3PO-Labs allows anyone to create customized responses from Alexa to questions about status of anything controlled by the ISY. Some examples I am currently using with this tool are: · Alexa, Tell Me the inside Temperature (based on my Insteon thermostat) · Alexa, Tell Me Security Status (based on my ELK) · Alexa, Tell Me House Fan Speed (speed of my whole house fan that I run at night) · Alexa, Tell Me Pool Pump status (linked to my Pentair pool pump) · Alexa, Tell Me Power Usage (based on my AEON labs Home Energy Montor) · Alexa, Tell Me ISY options (you can set this up with a help message on all the things you can ask Alexa to tell you) NOTE: Amazon as of Aug 7, 2018 has stopped allowing the use of invocation word 'me'. So 'Tell me' no longer works. I switched to 'Bob', so now I say "Alexa, ask Bob ....". But use whatever word you want. Just no 'me' anymore. Basically, with a little programming in the ISY, you can have Alexa give verbal updates to anything that your ISY links to or knows about. Possibilities are endless. You can chose your own command words, and decide how she responds. If you want to add humor, add references to your dog, have her talk sweet talk to you, or whatever, it is up to you. You can have 100% control of what Alexa says. To set this up, you will need to: Sign up for an Amazon developer account (it is free) and Create an Alexa Skill (free and easy) Open the skill you created using your Echo in order to get the Skill ID number (for use with the ISY) Create Network Resources on the ISY for each item that you want Alexa to respond to. You will need the Networking Module in ISY, either by purchasing it or the Portal. Create programs on the ISY to trigger the Network Resources when things change (Optional) Spend countless hours setting up different responses for Alexa for every conceivable thing you want her to respond to. There is no need for any home server or Raspberry Pi, nor is there the need to sign up for the ISY Portal (which I still recommend you do anyway). So there is no additional cost for this capability. 3PO-Labs has a good summary of steps 1 and 2 for generic use, but I have tailored those instructions for use with the ISY here. Their site is: http://www.3po-labs.com/responder.html June 2018 update: Amazon has greatly improved their skill creation tool. Upside is that it is much easier to create your own skills. However, the instructions below are somewhat out of date now. They still work, but the screens will look different and you will have to translate a few things into the way Amazon now does it. STEP 1: Create your Alexa Skill If you have not done so already, go to https://developer.amazon.com/edw/home.html#/skills/list to sign up for a developer account with Amazon. Select “I am a new customer” and follow the sign up process. Enter the same credentials as you use for your Echo account. With your account created, now sign in. https://developer.amazon.com/edw/home.html#/skills/list Once you have signed in, select “Alexa” from the top bar, and then in the box below called “Alexa Skills Kit” select “Get Started”. This will bring you to the “Building Alexa Skills” page. Should look like this, but with no skills listed yet. As you can see, I have already created 2 skills. Let’s focus on the “Tell Me” skill which you will want to create. Click on “Add New Skill” in the upper right. You will see this page: This is the page where you tell let Alexa know what word(s) to use to respond to ISY commands. I will go into the many options you have here later, but for now, let’s have Alexa respond to “Alexa, Tell Me xxxx”. Fill out these 2 fields: · Name: “Tell Me” (omit the quotes) · Invocation Name: "me" (again, omit the quotes and do not use any caps here) You can come back later and change these if you want to have a different way to address your Alexa. Select “Next” in the lower right. This will bring you to the “Interaction Model” page. This is where you will tell the Skill what Intentions to respond to. The upper area is where you define what set of responses you plan to have Alexa provide. For now, let’s put these in, but you will add to these over time. { "intents": [ { "intent":"INSIDETEMP", "slots": [] }, { "intent": "WHATISMYID", "slots": [] }, { "intent": "AMAZON.HelpIntent", "slots": [] } ] } And in the lower box, add these sample utterances (just copy and paste the following): INSIDETEMP inside temperature INSIDETEMP indoor temperature WHATISMYID my id WHATISMYID my id number AMAZON.HelpIntent what you can do AMAZON.HelpIntent what i can ask Notice that you can change the words beside each Intent to ensure that Alexa understands your intention. These words are called sample utterances. I recommend keeping these simple and with fewest words possible. The more words you add, the more easily Alexa gets confused. Use the KISS principle. Click on the “Next” button in the lower right. This will bring you to the Configuration page. Click on “AWS Lambda ARN”, select “North America”, and fill in the box with: arn:aws:lambda:us-east-1:413543783734:function:ASK_Responder Click on “Save”. Congratulations. You created your first Skill! Probably, this is the only skill you will need. But you will be coming back and editing/adding to this skill many times in the future. STEP 2: Register your new Skill and get the Skill User ID number Activate the skill so the server will record your Echo ID and give it back to you. Talk to your Echo and activate the skill: "Alexa, Open Me" If this is the first time you have accessed this skill, it should then respond with your Echo ID, and a series of instructions on how to use it. Your ID is a unique identifier that will look something like this (0fabacdd-d3ea-48a7-98bc-7d518a19b7c1). You will want to copy/paste it out of your Alexa App so you can use it later. Remember, if at any time you forget what your ID is, you can always ask the skill "Alexa, Tell Me what is my id?" Remember when we were setting up the Skill and had the Intention called WHATSMYID? Well, that is why we added that so you can get your ID again in the future. STEP 3: Set up Variables and Network Resources in ISY First, since we will be asking Alexa to tell us Temperature, we will need to have a variable for Temperature. In this case, I am using State Variable #17 to hold temperature from my Insteon thermostat. Note that in ISY, variables can be accessed using the format “${var.2.17}” where 2=state variable and 17=variable number. We will use this format later. This next step will require you to have the Networking Module. If you are using the ISY Portal, you will already have this. If not, you must purchase the Networking Module from UDI. What you will be doing is creating the words that Alexa will speak back to you when you ask her a question. We will do two of these to start off. You can add more as you need. In ISY, select “Configuration”, “Networking”, “Network Resources”. Select “Add” at the bottom. A new line will be created. Give it a name such as “Inside Temperature”. Then click on the column to the right of the name, and it will open a new box. Here is what my Temperature example looks like: Most of this you can see from this image capture, but for clarity: Host = responder.3po-labs.com Port = 80 Path = /responder/users/userID/intents/INSIDETEMP Replace userID with the long number you got at the end of step 3). So the actual Path will look something like: /responder/users/0fabacdd-d3ea-48a7-98bc-7d518a19b7c1/intents/INSIDETEMP As you may notice, the end of the path includes the ‘intent’ term that we used in the Alexa Skill and matches the Sample Utterances which will trigger this response. Select Content Type: application/json NOTE: As jndsoccer discovered, it might be better to use "Raw Text" rather than "C Escpaped" setting. Raw Text will maintain the format of the body posted below and will allow for easier editing later. C-Escaped puts everything on one line after you save it, making editing a bit more complex. But either will work. In the body, paste the following: { "version": null, "response": { "outputSpeech": { "type": "SSML", "id": null, "ssml": "<speak>The current inside temperature is ${var.2.17} degrees. </speak>" }, "card": { "type": "Simple", "title": "Inside Temperature", "content": "${var.2.17} degrees" }, "shouldEndSession": true }, "sessionAttributes": null } Of course, change the ${var.2.17} to whatever variable you have put your temperature in. Then select Update, then Save. And while we are here, let’s create a second Network Resource as a HELP function. Similar to that above, but change the path to: /responder/users/userID/intents/AMAZON.HelpIntent (again, putting your userID in) And put this in the Body: { "version": null, "response": { "outputSpeech": { "type": "SSML", "id": null, "ssml": "<speak> I can provide the status of the following devices in your home. . . House Fan speed, Security Status, Pool Pump Status, power usage, inside temperature, and outside temperature. Just say, tell me, followed by the item.</speak>" }, "card": { "type": "Simple", "title": "Help", "content": "Help" }, "shouldEndSession": true }, "sessionAttributes": null } This is directly from my program which includes these other commands. If you choose, remove everything except for Inside Temperature for now until you add more. Or leave as it just for experimenting. Notice also the section called "card". This will cause a note to be sent to the Alexa App so that you can debug the speech if needed. This section is optional. Again, select Update and then Save. Back on the main Networking Resource page, click SAVE to save the 2 resources we just created. Select the name of each resource and click TEST. Do the same for the other resource. This should give you a dialog box like this: If you do not get the HTTP/1.1 200 OK, then you did something wrong with the network resource. Go back and check everything. Now let’s see if these really worked. Say to your Echo: “Alexa, tell me what you can do” You should get the response that you put into the body of the HELP network resource. “Alexa, tell me inside temperature” You should get a response of the inside temperature. If your variable was not populated with a program, it might just say zero. STEP 4: Create programs to update Variables and trigger the Network Resources in ISY I won’t go into detail on this step, but you can now create programs that will update any variable you are using and have the ISY send the updated information to Alexa by triggering the Network Resource. The key thing to understand here is that you need to send an update to Alexa every time something changes that you care about. So if the temperature changes, you need to update Alexa. Here is my program to do this: If $Inside_Temperature > 0 Then Resource 'Inside Temperature' Else - No Actions - (To add one, press 'Action') This will cause the resource to be updated on any temperature change. THIS IS VERY IMPORTANT: If you are using variables, the Echo has no idea that a variable has changed and will continue to give you old/stale data when you talk to her. It is up to you to send to the Echo, using the network resources you created, the latest updates and variable states. STEP 5: Add more Intents! Now that you have the idea, go back and add more Intents! Here is what my Alexa Skill looks like right now: Intents: { "intents": [ { "intent":"POOL", "slots": [] }, { "intent":"INSIDETEMP", "slots": [] }, { "intent":"OUTSIDETEMP", "slots": [] }, { "intent":"POWER", "slots": [] }, { "intent":"SECURITY", "slots": [] }, { "intent":"WHFAN", "slots": [] }, { "intent": "WHATISMYID", "slots": [] }, { "intent": "AMAZON.HelpIntent", "slots": [] } ] } Sample Utterances: AMAZON.HelpIntent what you can do AMAZON.HelpIntent what i can ask POOL pool pump POOL pool pump status POOL pool pump speed POOL poupon POOL poop INSIDETEMP inside temperature INSIDETEMP indoor temperature OUTSIDETEMP outside temperature OUTSIDETEMP outdoor temperature POWER power usage POWER energy usage POWER home power POWER house power SECURITY security status SECURITY security WHFAN house fan speed WHFAN house fan status WHFAN fan speed WHFAN fan status WHATISMYID my id WHATISMYID my ID number One of my most used responses is "Alexa, tell me security status". I have programs set up to update my security status based on my ELK and other sensors. For example, one program is: House Secure and outside lights off - [ID 00AB][Parent 00AA] If Elk Area 'Main House' 'Arm Up State' is Ready To Arm And '@ Z-wave Devices / ZW 09 Garage Door Lock' Status is Locked And '@ Z-wave Devices / ZW 22 Front Door Lock' Status is Locked And '@ Z-wave Devices / ZW 23 Den-Garage Door Lock' Status is Locked And Status (Old) '@ Inside Devices / Den Sliding Door Unlocked' is Off And Program 'Test Exterior Light On?' is False Then Resource 'Alexa House Security secure ' Else - No Actions - (To add one, press 'Action') and then I created a network resource for this program called Alexa House Security Secure: { "version": null, "response": { "outputSpeech": { "type": "SSML", "id": null, "ssml": "<speak>Your house is secure. All doors are locked and all windows are closed</speak>" }, "card": { "type": "Simple", "title": "Security Status", "content": "House is Secure" }, "shouldEndSession": true }, "sessionAttributes": null } In all, I created about 6 of these for various states of secure / not secure. You can do that same thing for queries such as "Alexa, tell me what lights are on", for example. Note that in these cases, there are no variables used. You only use variables when they make sense to use. But you can add just about anything you want. After updating the Skill list of Intents and Sample Utterances, just add the Network Resource to go with it and you are set! BTW, notice my sample utterances under POOL. This is for my pool pump status. For some reason, Alexa gets very confused when I say "Tell me pool pump status". If you go into the Alexa App, you can see what words she THINKS you said. She always thinks I said "poupon" or "poop on" rather than Pool Pump. So rather than argue with her, I just added those into the list so that she understands me intent. And it works! About 3PO-Labs: I cannot thank the kind folks over at 3PO-Labs enough for making all of this possible. They originally created the Responder tools to allow developers to more quickly test how Alexa speaks sample text phrases to see if they sound right. When I let them know about how we wanted to use this in our home automation world, they enthusiastically responded by expanding the tool and customizing to our needs. I recommend that people read their blogs and support them in any way you can. http://www.3po-labs.com/ About Alexa Syntax: I am not an expert on this, and probably have some of the terminology wrong, but here is what I have learned so far. Let’ use an example: “Alexa, Tell Me the Inside Temperature” Wake Word: Alexa Action Word: Tell Invocation Name: Me Intention: Inside Temperature For wake word, there are (maddeningly) only 3 options today. Alexa, Amazon and Echo. Hopefully Amazon will allow more soon. For action word, there are quite a few. You are already familiar with actions such as ‘Turn On’, ‘Turn Off’, etc. For our custom skill, the Action words available to us include: · ask · begin · do · launch · load · open · play · resume · run · start · talk to · tell · use For Invocation Name, we have (almost) complete control. I chose 'Me" but you can choose whatever you want. But it has to pair nicely with the Action Word you decide to use. For me, logical pairs are: “Tell Me” EDIT: note that as of Aug 7 2018, we can no longer use 'me'. Amazon stopped allowing use of 'me' for some reason. “Ask Izzy” “Ask ISY” “Ask House” But you can use whatever pairs work for you. One downside for my choice of "Tell Me" is that it prevents you from doing other Alexa skills that also use this pairing. For example, you cannot use the "Alexa, Tell me a joke" skill. The custom skill you have created will always take precedence over other skills. So just be aware of that. The Intention word(s) can also be anything you want. You can (and almost certainly will) have many of these. One for each item you want to get a response for. Each Intention Word will be associated with one or more Network Resources on your ISY. For each Intention Word, you will create a list of “Sample utterances” that the Echo will use to do its speech recognition. So for the Intention Word “Inside Temperature”, you can add sample utterances such as “inside temperature”, “what is the inside temperature”, “the current inside temperature”, “the damn inside temperature”, or whatever.
-
Great to see another app supporting ISY!! Before I install it, can you confirm what the cost is of the app? Is it one time or monthly?
- 23 replies
-
- Agave
- home automation
-
(and 1 more)
Tagged with:
-
Do you mean multiple buttons? For example, I like to tell my Echo "turn on CNN" and it will change the TV channels to 202 for DirecTV. To do this, I use the HA-bridge interface from a web browser to set multiple button presses for a 'device' named CNN. It is detailed on the BWSSystems home page and on the GitHub page for HA-bridge.
-
Ah, OK. So the only time you need to use Izzy is when you ask a question? For example, I think with the Portal, you can ask for the thermostat temperature. I assume that requires a 'ask izzy' type of command?
-
jratliff, That is crazy cool!!! How are you creating the skills? Is there a primer I can read somewhere on how to create my own skills? Also, do you not run into issues with Skills naming conflicting with other Alexa skill names or protect words??
-
Barry, Since you have moved on the the ISY Portal, I wanted to better understand what benefits you see with the Portal service instead of using a Pi-based emulator. What can you do with the Portal that you cannot do with the emulator? The only thing I see is being able to ask Izzy questions and get responses, such as temperature, etc. But I find the whole "Alexa, Ask Izzy to...." phrasing to be overly complex. My wife has gotten very used to simply saying " Alexa, turn on Kitchen Lights" or "Alexa, set temperature to 71 degrees". Adding another person (Izzy) to the conversation just seems awkward. Given that, I do not see any benefit to going with the Portal. Especially since I still need to run the Pi for other uses, such as Harmony control to change TV channels and adjust TV Volume with more than one button press. Curious on your thoughts.
-
Thanks, Michel. That is good news for me. I wanted to keep the N/W module and so I can! Blueman2
-
Barry, I am successfully using your new 6.0.3 version with the HA-bridge 2.0.7 version. It now reads all the multi-button press data and allows me to copy from one bridge instance to another. For those who are new to this, the multi-button press for the harmony allow me to say "Alexa, turn on CNN" and it will change channels of my DirecTV receiver to CNN channel using Harmony Hub. It also allow me to say "Alexa, turn on loudness" to increase the volume by 5 button presses, or down by saying turn it off. Thanks so much!! I am a very happy camper again. I plan to stay on HA-bridge 2.0.7 for now on out, perhaps until I finally move completely to the Portal. But for now, my system is tweaked just right and I plan to leave it alone and just enjoy it! Thanks again, Barry. You are very generous with your time and skills. I am even more in your debt!! Blueman2
-
This is what I am trying to confirm, but reading the Wiki, this seems to be the situation. But my math tells me Networking Module = $50 when I need to buy it again. 1 year extension of Portal (I bought N/W module July 2015) is only $25 value. So I would rather keep my N/W module. But I need confirmation from UDI that I can do that.
-
I bought the networking module less than 12 months ago and I use it extensively. Could someone please confirm my understanding of the impact of subscribing to the Portal? Per the Wiki, if I buy the Portal service I get the fully networking module functionality, but when the Portal subscription expires the networking module will not come back. So I will have to buy the networking module all over again in 2 years if I stop using the Portal service, even though I already bought a permanent license? Is there an option to keep my module rights (have the module re-installed) after my portal subscription expires? I know that UDI is offering a 1 year extension of the portal service, but can I decline that extension and still keep my Networking Module permanent license?
-
rossarmstrong, Looking at your log file from prior post #1165, everything seems fine and it says that AWS-config launched. But the image with the parsing error messages in post #1163 shows it crashing early in the process and not starting. Are you sure you included the right log file? Not sure how the log can show the system launched just fine, yet the screen showing it crashed early in the process (during Harmony data read). ???
-
Thanks once again, Barry!! You are amazingly generous with your time and skills, especially given that you are not really using this tool yourself anymore.
-
Update. I found the issue with my HA-bridge not being discovered as a device on my Harmony Hub. When starting the HA-bridge, I was using $_IP variable to set the local IP address of the bridge emulator (the Raspberry Pi in my case). But for some reason it was not working. So I just used the full xxx.xxx.xxx.xxx IP address in the startup command and all works fine. So I am back in business. Only issue now is that Barry's AWSconfig does not support the HA-bridge-2.0.7.jar version, but is not a big issue. I will continue to run 2 HA-bridge-v1.1.0 instances with barry's tool, and one HA-bridge-v2.0.7 for any special needs and manage that from its web page. So I am back in business! Well, that is, until I eventually move over to the ISY portal.
-
Yes, this is one of the reasons I want to move to 2.0.7 version of the HA-bridge. It has amazing flexibility in terms of interfacing to just about anything! And BWSSystems, as you say, is incredibly great to work with and very responsive.
-
Yes, they (or he, I think he is a sole developer) are amazingly great to work with. He replied back within a day on the issue regarding the Harmony Hub no longer being able to discover the HA-bridge emulator. He is working on it, but no ETA.
-
Barry, I was just looking into that. If they have any sort of REST interface, that would make things much easier. I will let you know, and also what I hear back from BWS. Thanks again!
-
Barry, you are truly an IR guru! Sounds like an amazing home setup you have. BTW, I communicated with BWSSystems and they said others have reported issues with the Harmony Hub linking to the HA-Bridge emulator and they are looking into it. Harmony made some change recently that broke the linking ability. But it still works the other way (you can control the Harmony with the Echo/ISY, but cannot control the ISY with the Harmony).
-
As jratliff points out, the combination of BWSSystems ha-bridge 1.1.0 and Barry's AWS_ Bridge 5.0.63 still works great. Has been completely bullet proof in my home for many many months. Echo never misses a command and responds promptly. So I would encourage people who are control freaks and/or just want to get more hands on with your own Pi based emulator to use the software listed in my sig below. But certainly the ISY portal and skill offering has progressed alot and offers a great solution to those who just want it to work and can live with less customized integration.
-
Thanks, Barry. I missed your latest post somehow and just read it. I agree I need to move over to the cloud based platform. But there is something in me that just likes to also have my own emulator running. I guess partly I am a control freak, and partly I just like to tinker. Yes, if you are able to get your AWS_config working with the v2 BWS software, I would definitely appreciate it and would use it! But don't waste too much of your time on it. Thanks!
-
AWS_Alexa.zipBarry, I am using 5.0.63, which is the latest I could find. Here is the log file. I see that it actually does talk to the BWS emulator and get some Harmony data, but crashes with error '424', Object Required. Not worth worry about though. I will just remain with the older 1.1.0 version of BWS. The only big change that I would have liked is that now the BWS software supports multiple button presses in one command. So I can have my TV tune to Channel 202 with on command rather than 3 commands.
-
Thanks for the reply, Barry. Great to hear from you! I have not been on this forum as much over the past few months due to 1) lots of travel and work, and 2) my Pi based system using BWSSystems software and your great configuration software have been working 100%. Yes, I probably should migrate to the ISY supported method, but I just like the idea of having more control over my system. Also, I will still need to run the Harmony emulator and a few other programs for various reasons so the Pi is still needed. The issue still would be having my Harmony control ISY devices. As far as I know, Harmony will not control ISY directly in any case, so I will still need something to bridge my ISY to a Hue which the Harmony can then control. At least, that is my understanding. BTW, I think your AWS program is failing because BWS changed their version to 2.0. Your program stops at "looking for version" and goes no further. I was trying to view the log but realized for some reason the log is not being created. I need to look into why that is happening. Glad you have your system working well, and I truly appreciate the great work in did on AWS Config. It has been serving me well!
-
For those still using the HA-Bridge emulator from BSWSystems, I noticed my Harmony no longer is able to discover devices on the emulator. The Harmony just sits at "Your Hue has been found. Please press the center button on the Hue to link to Harmony" or something like that. Anyone have any ideas? I am using V1 of the HA-Bridge because I cannot get the AWS tool that Barry created to work with V2.
-
Maybe I am an outlier, but I MUCH FAVOR the new ding response. Why? Because Alexa has trouble understanding OFF vs ON when I speak. Sometimes I will say "Alexa, turn off outside lights", only to find in the morning She thought I said "turn ON outside lights". Sure enough, I go back into history and listen to what I actually said (you can play back many weeks of prior commands using the Echo web interface), and I said OFF but she says "I heard 'turn on outside lights". Now, with the new sound, it is clear what she is doing. Better for me. I would say Alexa gets OFF and ON confused about 10% of the time for me.
-
No, I just ordered a complete set of low ESR capacitors because I do so much capacitor repair on different electronics. But any 10uf 35V or more capacitor will do. Low ESR caps will probably last longer.