Announcement

Collapse
No announcement yet.

Thrag's Echo Plugin Discussion Thread

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

    Thrag's Echo Plugin Discussion Thread

    This is for discussing my Amazon Echo plug in page. Get the latest version here:

    http://board.homeseer.com/showthread.php?p=1213711
    Last edited by Thrag; December 10, 2015, 11:40 PM.

    #2
    Hi Thrag, although I did not have a chance to test your plug-in yet, I very much appreciated you doing it, it sounds great.

    Thanks,
    Aldo

    Comment


      #3
      Running Proxy ASPX on Mono

      Thanks so much for writing this - I've been waiting for this since I got my Echo!
      I got the Amazon piece all set up, though I'm having some issues getting the ASPX page running under Mono (Ubuntu).
      Not sure if you wrote/tested this on Windows, but was hoping you might be able to help me get it working under Mono. I'm getting the following error when I try to hit the page:
      at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath, System.CodeDom.Compiler.CompilerParameters options) [0x00000] in <filename unknown>:0
      at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00000] in <filename unknown>:0
      at System.Web.Compilation.BuildManager.GenerateAssembly (System.Web.Compilation.AssemblyBuilder abuilder, System.Web.Compilation.BuildProviderGroup group, System.Web.VirtualPath vp, Boolean debug) [0x00000] in <filename unknown>:0
      at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath vp, Boolean debug) [0x00000] in <filename unknown>:0

      Thanks!

      Comment


        #4
        Quick update

        IT seems like this is something in the way I have MONO configured. If I run the HS test.aspx, it does load. Only difference I noticed is that they use VB instead of C#. For kicks, I changed the language at the top of the Proxy aspx page to VB, and sure enough it "tries" to run, and obviously fails as it's the wrong language.

        Comment


          #5
          Thanks for the feedback. I did write and test this under windows as that is what my HS system runs on. I would like to make this work on mono as well. Some research will be necessary into if it is possible and how to make the C# code work with mono. I can't promise anything on that yet.

          Comment


            #6
            There's a new version for those willing to be guniea pigs.

            The main new features are:

            Proper registration!
            When you first launch the application Home Seer will speak (and print in the log) a number from 1-9999 which you then read back to the echo in order to authenticate with your homeseer system. You can alternatively hit the plug in page in a web browser to initiate registration and obtain a code. Additionally for security purposes the amazon user and application IDs are now encrypted in the config file rather than in plain text.

            Setting aliases on the fly via voice command!
            The plug in remembers the last device or event name you spoke but it could not find, and the name of the last device successfully change or event successfully run. You can then say to the echo "Create an alias" or "alias that" and it will alias the last wrong name to the last right name. so now when you say the name of a specific device wrong but and then correct yourself, you can instantly create an alias so next time it will recognize both ways of saying the name. (Aliases can still also be set manually in the config file)

            Minor performance optimization!
            Rather than read the config file on each request for every parameter, I do a proper initialization where I load parameters into memory and they are referenced from there. Now to load changes manually made to the config file ask the app to "reinitialize".

            Sample Utterance Generation!
            You will be able to hit the plug in page and it will generate a huge list of sample utterances based on your events and devices. The initial release of this is going to be a rough cut for "run (every event you have)", and on, off and dim for zwave binary and multilevel devices. Later I hope to add some ability to selectively create utterances for only those events and devices you want them for, and to expand the supported device types.

            Inline documentation!
            The documentation is not nearly finished, but it is now all contained withing the page itself. Everything you need, instructions, the intent schema, sample utterances, blank config file to copy from, all of it is accessible by just hitting the page once it is installed on your server.

            Comment


              #7
              how will it affect the previous scripts and code we put in on echo from your last plugin? do we remove all that and start over or keep it?
              detail of setup in profile. Link to videos of my projects there as well. Over 300 scripts running every min and counting

              Comment


                #8
                The .aspx page is all new. Replace your existing one with the one in the zip file. You will need to update the intent schema and sample utterances. For the utterances you just need to add the new ones from the top of the sample as there are new utterances for registration and creating an alias. You don't need to delete anything you've already created.

                There's also a small change to the config file. You should be able to use your current one, but you can and should remove the userID and appID from them. The new registration action will store those encrypted in a different section. So the current in the response config section are obsolete.

                Also, for you specifically, if the issue you are having persists you can work around it slightly by setting end session on success back to false but changing the re-prompt message to something shorter, or just ".". It will still listen after a command, but at least it won't say the whole long default re-prompt phrase.

                I just did some proofreading, added in some missing instructions, and put a readme and sample config file into the zip.

                Comment


                  #9
                  Will you have the ability of changing the name of the attention phrase?
                  Hector
                  ____________________________________
                  Win.2003 OS, HS3
                  BLDSC,BLstat,BLRadar,BLRamdom,BLOccupied
                  BLups,BLrain8,HSTouch,Ultrajones Weatherbug,
                  MyTrigger,ACRF2,W800,Zwave
                  AP800,Honeywell Stat

                  Comment


                    #10
                    The attention phrase as in "Alexa", no. Skills have no ability to do that. The only way to change that is in your Echo's settings, and the only current options are Alexa and Amazon.

                    If you mean the "tell home seer to" phrase yes. It can be whatever you want rather than "home seer" in that example. You configure that yourself as part of the setup.

                    I've already begged on the developer boards for the ability to set a custom wake work that goes straight to a skill. I don't hold out much hope for that one, but I'd like to be able to say, for example "house, turn on the office light" instead of "Alexa, tell house to turn on office light".

                    Comment


                      #11
                      Like change Alexa for something like "Vicky" is what I mean.
                      Hector
                      ____________________________________
                      Win.2003 OS, HS3
                      BLDSC,BLstat,BLRadar,BLRamdom,BLOccupied
                      BLups,BLrain8,HSTouch,Ultrajones Weatherbug,
                      MyTrigger,ACRF2,W800,Zwave
                      AP800,Honeywell Stat

                      Comment


                        #12
                        Nope, that's not possible in any way yet. Alexa or Amazon are the only choices.

                        Comment


                          #13
                          I'm curious, is there a reason why a proxy is absolutely needed? Is it because HS's SSL seems to be way out dated? (when I enable it, Chrome won't even open the HS administration page..I have to use IE.

                          Comment


                            #14
                            Originally posted by sirmeili View Post
                            I'm curious, is there a reason why a proxy is absolutely needed? Is it because HS's SSL seems to be way out dated? (when I enable it, Chrome won't even open the HS administration page..I have to use IE.
                            Another option is to do what other plugins have done and create your own web server in the plugin. I know the PHLocation plugin does this. I don't know if it's SSL or how hard that would be though.

                            Comment


                              #15
                              Originally posted by sirmeili View Post
                              I'm curious, is there a reason why a proxy is absolutely needed? Is it because HS's SSL seems to be way out dated? (when I enable it, Chrome won't even open the HS administration page..I have to use IE.
                              It is because for any page hosted within homeseer, login is required. I can't pass along login information as part of the endpoint URL (which if possible would still be a poor practice).

                              You can put up a custom home page in homeseer that does not require login, but it does not appear possible to make HS API calls from such a page.

                              So the proxy is needed to either bypass login or send the authentication info itself.

                              The former is possible if you host a proxy on your local network and check the option in HS setup to not require login for local connections.

                              The later can be done by having the proxy send an authentication header. Using Apache the later option does require you hardcode your login in the apache configuration, but that is at least on your local network and is a far far lesser security risk than having a plain text username and password hardcoded somewhere in the cloud like in the lambda proxy option.

                              Comment

                              Working...
                              X