Announcement

Collapse
No announcement yet.

Thrag's Echo Plugin Discussion Thread

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

  • #46
    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.
    Thanks,
    Frank

    Comment


    • #47
      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.

      Comment


      • #48
        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?
        detail of setup in profile. Link to videos of my projects there as well. Over 300 scripts running every min and counting

        Comment


        • #49
          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.

          Comment


          • #50
            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.

            Comment


            • #51
              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
              detail of setup in profile. Link to videos of my projects there as well. Over 300 scripts running every min and counting

              Comment


              • #52
                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.

                Comment


                • #53
                  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
                  detail of setup in profile. Link to videos of my projects there as well. Over 300 scripts running every min and counting

                  Comment


                  • #54
                    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.

                    Comment


                    • #55
                      Thrag, I'm also actively using your latest plugin via the Apache proxy and its working great, thanks !

                      Comment


                      • #56
                        How much did you know about setting up Apache before trying? Were the instructions simple and easy or is there anything I should think about adding?

                        Comment


                        • #57
                          Not attempted setting up Apache before, was pretty straight forward, I really don't think you missed any steps. Would be great to have it authenticate to HS, I've not had the time to look into that as of yet, don't want it open to users on my LAN.

                          Oh and i'm in the unfortunate position of having hyphens in most of my event names which doesn't help the utterance import..

                          Comment


                          • #58
                            Originally posted by mikesnook View Post
                            Not attempted setting up Apache before, was pretty straight forward, I really don't think you missed any steps. Would be great to have it authenticate to HS, I've not had the time to look into that as of yet, don't want it open to users on my LAN.

                            Oh and i'm in the unfortunate position of having hyphens in most of my event names which doesn't help the utterance import..
                            Good to hear about the smooth setup. This reminds me to figure out how to and include directions for setting up a header in the Apache config to send basic authentication so that you don't have to check the no login via lan option.

                            For event and device names with dashes and other characters, that will get better. The decision to reject is just an artifact of my desire to get something working first and then see what improvements it really needs. I will eventually add an option to have utterance generation parse and scrub such names to create a acceptable name and then automatically set an alias for it. Dashes and other things can convert to spaces or their equivalent words where applicable (% to percent, & to and). Numbers to the equivalent words.

                            Comment


                            • #59
                              Actually, let me give you a totally untested off the top of my head procedure to try.

                              In the Apache config, make sure the LoadModule line for mod_header is the not commented out.

                              The username and password in the header need to be base64 encoded. To do so you go to this page https://www.base64encode.org/ (which is just the first such page I found searching on the internet) and put in your info in the form "usernameassword" (damn emoji, just put a colon between your username and password ) and encode it. Once you have the encoded string, place it in the config file, inside the block with the proxy lines, like this:

                              Code:
                              ###<###Location "/HS3EchoPlugin.aspx"###>###
                              RequestHeader set Authorization "Basic dXNlcm5hbWU6cGFzc3dvcmQ="<code></code></location><code>
                              ###<###/Location###>###
                              Put in your own base64 encoded string here after "Basic
                              Remove the #s. (How the hell do you escape greater than and less than in this forum?)

                              To further lock things down, you try can closing off get requests by including this line in the location section.

                              Code:
                              Require method POST
                              This should prevent any outside get requests to pages like the instructions, sample utterance generator, initialize, etc. You will need to hit those pages on homeseer directly rather than through the Apache proxy if you set this.

                              Comment


                              • #60
                                Originally posted by Thrag View Post
                                Utterance generation is a non-trivial project in itself. My plans for the next update are mainly in this area.

                                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 ended up creating my own utterance generator. It's not in the form of an HS plugin, but as a small desktop app that connects to HS through the JSON API to retrieve all the devices, device types, locations, events, etc.

                                I have a column that displays a list of every device type that exists in your list of devices. Selecting a device type brings up a text box for entering in whatever sample utterances you want for controlling that type of device.. using tokens such as {room}, {location}, etc. The text box saves its sample utterances as it's own text file (separating the utterances based on device type).

                                Finally, you can click generate utterances which brings up a window displaying a list of device types that you've created at least one sample for, with all checked by default. If you uncheck any, it won't generate the utterances for that type. Then it just loops through each text file (device type), and loops through each sample utterance in that file, and substitutes device values for every device you have matching that type.

                                The only part I'm still pondering is how to implement utterance generation for TV stations (I'm using the DirecTV plugin to have Alexa change channels). I think I need to create a section that allows you to enter channel number and channel name pairs so I can use commands like "Change the channel to HBO east". Right now I'm manually entering those utterances for the few channels I care for.

                                Comment

                                Working...
                                X