Announcement

Collapse
No announcement yet.

Thrag's Echo Plugin Discussion Thread

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Thrag
    replied
    Thanks for the feedback!

    What kind of utterance customization or aliasing did you have to do to achieve proper usability?

    While I'm here. Some updates on future plans.

    Utterance generation is a non-trivial project in itself. My plans for the next update are mainly in this area.

    First I'll fix event names to avoid duplicates by adding the group name when necessary. That's a must do.

    Next I am thinking about how to better control generation so it generates what you want and skips what you don't. My idea there is to have ini parameters that contain event groups, device locations, and device types to exclude (or include, but exclude feels like it would be better).

    I'm planning on altering the schema to facilitate more generic commands, and adding those generic commands for all device. I started with just my lights which is why the schema has OnOff, Dim, etc. I plan to consolidate on "Value" for numeric values, and "Command" for non-numeric statuses. Having these two for keeping data types separate still seems like a good idea as I confirmed that it absolutely helps with the recognition of numbers(*). For all devices I'll include two generic utterances for "set {device} to {value}" and "set {device} to {command}". I'll leave in the existing slot names for backward compatibility.

    Currently my utterance generation doesn't take into account the type of device. It sort of does in that it loops through all the command labels that the device api gives me for the device, however I am not taking it into account in any way in order to make a decision on what sort of utterances to generate. Which is why you may see commands for a thermostat like "Turn {Mode|Device} {heat|OnOff}". The most I'm doing is as I loop through the command labels I check to see if contains the word "dim" and if so I put out the specific dim command utterances which include the very important "percent" variation(*). I know I need to do more things like this, I just don't know what exactly as there are so many device types and thus so many possibilities. This is where user feedback on utterances and aliases would help a lot.

    Another utterance generation improvement I'm considering is to handle duplicate names better. Currently I do a simple single pass through devices. As an artifact of that when there are two devices with the same name the first one is only the name and the second one is location and name. They should probably both be location and name. If this sounds useful to any current or prospective users I'll get to it sooner rather than later. If utterance generation in this respect seems fine without it I may put this off under the "not broke, don't fix" philosophy of software development.

    Lastly, I've noticed that when I just load the instructions page first thing in the morning it takes a little while to load. I am wondering if the aspx page itself is not kept around and the initial delay is the page being re-compiled. This is my first ASPX page, I have no idea how the container it runs in works. I'm guessing it's some generic MS thing. Anyone familiar? I am wondering if it is nearing time to turn this into an actual plug in rather than a script page. Doing so would open a new can of worms, but one that'd be worth it to always have instant responses.

    *Funny story. So the sample utterances for dimming consist of pairs, one with "percent" at the end and one without. This is to facilitate natural speaking as I find myself adding the "percent" sometiems. During one night of editing I accidentally removed the "percent". I was testing my changes and gave the Echo a dim command with "percent" at the end. Rather than the number I said it was sending a four digit number starting with what I said. I thought maybe some background noise had gotten in the way so I made it quiet in the room and tried again. Still it is giving me a four digit number starting with the percentage I spoke. It drove me nuts to the point where Amazon now has some audio of my swearing nonsensically. Lesson learned, when it expects a number slot, it tries incredibly hard to interpret what you received as a number, and will take it as a number no matter what. This should be a good and useful thing.

    Leave a comment:


  • collegeboyslive
    replied
    For all those using my skill (I think there are as many as three of you now), please do post impressions so far.
    im loving it. on top of that Thrag has been very responsive to my questions both on the forum and in pvt which, I feel is super important when deploying any sort of plugin. it works well and I find I use my echos for voice control so much more thanks to this.

    10/10

    Leave a comment:


  • DevinH
    replied
    Originally posted by Thrag View Post
    For all those using my skill (I think there are as many as three of you now), please do post impressions so far.
    I'm seriously thinking about switching over and giving it a try. I mostly want to use device name aliases. But I've also been waiting to hear from homeseer folks on whether they're planning on any enhancements, or if what they've released is pretty much what they plan on providing for now.

    Leave a comment:


  • collegeboyslive
    replied
    for the most part i never need to say RUN as long as a script is there in H i can just say "ask claire to "name of script"" and it works

    apart for ones that begin with the word PLAY

    Leave a comment:


  • Thrag
    replied
    For all those using my skill (I think there are as many as three of you now), please do post impressions so far.

    I could use a lot of feedback on utterances to know what other kinds of things to include in the default generated set. Ideas for better interaction are also welcome. I want to make interaction as natural as possible.

    What is the latency like on your systems? I still notice a long latency the first time I use the skill, and it's just a gut feeling at this point but I think it got longer when I started using the huge list of generated samples. Which leads me to think that it is probably loading up and parsing the utterances, and unloading them when the skill hasn't been used for a long time. Fortunately after that it's just a second or two.

    Leave a comment:


  • Thrag
    replied
    Originally posted by collegeboyslive View Post
    not sure if this is a bug, a programming thing or what but trying to get hs plugin to do something music related it wont. trying to get it to run a script "play my music" in which i wanted it to turn on my squeezebox music system it wont, it wont, the command wont even display on amazons echo app. trying things like "listen to music" produce the same result. is the work music reserved?
    I currently have no intents involving music.

    If you have an event, you can say "Run play my music". If it's a device that takes a command labeled "play", I'll have to create some new phrasing for things like that in the sample utterances.

    You can add your own using the DeviceChangeIntent and passing the command (play, pause, etc.) in the OnOff slot.

    "OnOff" isn't really for just on and off. It's for any non-numeric command. So you can try "DeviceChangeIntent {play|OnOff} {itunes|Device}".

    If you have a device that represents the music player, you might already see in the sample utterances lines like (using itunes as the example device name) "DeviceChangeIntent Turn {itunes|Device} {play|OnOff}". I iterate across all existing devices skipping only those whose names can't appear in an utterance (i.e. has non-alphabetic characters in it). You can see in the log warnings lines for devices or command labels I skip over.

    Leave a comment:


  • collegeboyslive
    replied
    not sure if this is a bug, a programming thing or what but trying to get hs plugin to do something music related it wont. trying to get it to run a script "play my music" in which i wanted it to turn on my squeezebox music system it wont, it wont, the command wont even display on amazons echo app. trying things like "listen to music" produce the same result. is the work music reserved?

    Leave a comment:


  • Thrag
    replied
    Originally posted by sirmeili View Post
    I had some duplicates for the dimming of my kitchen lights (they were in a different section). I only have 1 device called "Kitchen lights"

    I had some duplicates for "Turn on TV" (I have outlets for the kids tv to shut them off at the. both outlets are called TV, but are in different rooms.
    The event one makes sense. I am spitting out all event names without regard for their uniqueness. I'll change it so that like devices, if a name comes up again I'll append the group name to it and see if that is unique.

    I'll have to look into the duplicate device issue. That one isn't obvious quite yet.

    Leave a comment:


  • sirmeili
    replied
    Originally posted by Thrag View Post
    Can you give me an example of the duplicates?
    I had some duplicates for the dimming of my kitchen lights (they were in a different section). I only have 1 device called "Kitchen lights"

    I had some duplicates for "Turn on TV" (I have outlets for the kids tv to shut them off at the. both outlets are called TV, but are in different rooms.

    Leave a comment:


  • TechHA
    replied
    Originally posted by Thrag View Post
    New version is up. Improved utterance generation and error handling.
    Thrag, the new utterance generation is working for me. Thank you!

    Leave a comment:


  • Thrag
    replied
    Can you give me an example of the duplicates?

    There is no context to re-prompts yet. So if it didn't understand the device name, you need to say back not just the device name but the whole command (minus the "tell {name} to" part as the plug in is already listening).

    That's sort of pattern is something I can look into integrating. However doing so is currently it is a bit difficult. Intents and therefore utterances are global and not contextual. There's way to, for example, define separate sample utterances as answers to questions asked by the Echo or even just to tell the echo not to try and parse the response to question and just send back the whole spoken text. It doesn't even know that you are asking a question. An intent is that nothing but a single slot can be problematic, and that's what would be needed for an intent that contained just a device name.

    In the meantime however I'll make the response more clear by making it read "please say the command again".

    Leave a comment:


  • sirmeili
    replied
    Yup, I gave it a try.... I set up an alias for my living room lights (like you suggested). Turning them off worked great! Turning them on however caused a mess...LOL

    It said it couldn't find the device "Living room lights on" and it asked what device and I said "Living room lights". It then said it couldn't find the device "room lights" and to try again... I gave up at that point

    I may need to go through the utterances at some point. I did however have some duplicates in mine that I had to remove, so you need to likely check your code that generates the utterances.

    Leave a comment:


  • Thrag
    replied
    Also to talk about future development for a moment.

    I looked into the Echo's "Connected Home" features and how program like the HA bridge are emulating them. I was able to find pretty good info on both Hue and WeMo emulation. Unfortunately it all seems very limited in a lot of way.

    The most significant of which seems to be a limit of 16 devices. That's it, sixteen devices. What the hell am I going to do with just 16 devices? While I really, really want to stop having to say "tell home seer to", having to remember which sixteen devices I can skip that for and which I can't defeats the whole purpose. So sadly for now I'm not going to even bother going down that road. People can always install one of the emulators alongside my skill if they want.

    I'm hoping for two things from Amazon. First, a protocol to discover skills on the local network. Second, a way to have different activation words (i.e. "Alexa" ) that go directly to different skills. So instead of "Alexa, tell home seer to", just saying "Home seer ...". These are pipe dreams at the moment, but one can hope (and post constantly on their developer forums).

    Leave a comment:


  • Thrag
    replied
    Originally posted by sirmeili View Post
    Any reason to update the config file or can we just do the aspx file?
    Just the aspx page, and make sure to reinitialize (or restart homeseer). If you want you can update your sample utterances. It's not required so if they are working for you, you can leave them alone.

    I forgot to mention one other small improvement I made. Aliases were still being read from the config file for each request. I moved them into memory as part of initialization. Which is why you should reinitialize after install. I haven't exactly been benchmarking this stuff, but the change should be at least a tiny performance improvement.

    Leave a comment:


  • sirmeili
    replied
    Originally posted by Thrag View Post
    New version is up. Improved utterance generation and error handling.
    Any reason to update the config file or can we just do the aspx file?

    Leave a comment:

Working...
X