Announcement

Collapse
No announcement yet.

Jon00 Homeseer/Echo Skill Helper for Homeseer 3 & Homeseer 4

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

    #46
    There is no reason why not (It is written in pure VB.NET) but I have not tested this.

    If there are no entries in the log (normal/errors) then maybe HST have not included the script hook in the Linux version.
    Jon

    Comment


      #47
      Yeah this sucks .

      Have just added a hs.writelog into the check_vcmd.vb file and it isn't executed when I talk to Alexa. Will try and speak to Homeseer and see if it's anything they can sort out.

      I have tried manually executing the file and get some error messages. Thismay well be because of the way the script is being run but thought I'd show them to you anyway incase it's anything obvious:

      Oct-24 11:10:21 AM Error Compiling script Jon00Alexa.vben: 'ToList' is not a member of 'System.String[]'.
      Oct-24 11:10:21 AM Error Compiling script Jon00Alexa.vben: 'ToList' is not a member of 'System.String[]'.
      Oct-24 11:10:21 AM Error Compiling script Jon00Alexa.vben: Function without an 'As' clause; Object return type assumed.
      Oct-24 11:10:21 AM Error Compiling script Jon00Alexa.vben: Method 'Public Sub Trigger(P As Integer)' does not have the same signature as delegate 'Delegate Public Sub Invoke(state As Object)'.
      Oct-24 11:10:21 AM Error Compiling script Jon00Alexa.vben: Method 'Public Sub Trigger1(P As Integer)' does not have the same signature as delegate 'Delegate Public Sub Invoke(state As Object)'.
      Oct-24 11:10:21 AM Error Compiling script Jon00Alexa.vben: Method 'Public Sub Trigger(P As Integer)' does not have the same signature as delegate 'Delegate Public Sub Invoke(state As Object)'.
      Oct-24 11:10:21 AM Error Compiling script Jon00Alexa.vben: Method 'Public Sub Trigger1(P As Integer)' does not have the same signature as delegate 'Delegate Public Sub Invoke(state As Object)'.
      Oct-24 11:10:21 AM Error Compiling script Jon00Alexa.vben: Method 'Public Sub Trigger(P As Integer)' does not have the same signature as delegate 'Delegate Public Sub Invoke(state As Object)'.
      Oct-24 11:10:21 AM Error Compiling script Jon00Alexa.vben: Method 'Public Sub Trigger1(P As Integer)' does not have the same signature as delegate 'Delegate Public Sub Invoke(state As Object)'.
      Oct-24 11:10:21 AM Error Compiling script Jon00Alexa.vben: Method 'Public Sub Trigger(P As Integer)' does not have the same signature as delegate 'Delegate Public Sub Invoke(state As Object)'.
      Oct-24 11:10:21 AM Error Compiling script Jon00Alexa.vben: Method 'Public Sub Trigger1(P As Integer)' does not have the same signature as delegate 'Delegate Public Sub Invoke(state As Object)'.
      Oct-24 11:10:21 AM Error Compiling script Jon00Alexa.vben: Variable declaration without an 'As' clause; Object type assumed.
      Oct-24 11:10:21 AM Error Compiling script Jon00Alexa.vben: 42021
      Oct-24 11:10:21 AM Error Compiling script Jon00Alexa.vben: Variable declaration without an 'As' clause; Object type assumed.
      Oct-24 11:10:21 AM Error Compiling script Jon00Alexa.vben: 42021
      Oct-24 11:10:21 AM Error Compiling script Jon00Alexa.vben: 42021
      Oct-24 11:10:21 AM Error Compiling script Jon00Alexa.vben: 42021
      Oct-24 11:10:21 AM Error Compiling script Jon00Alexa.vben: The import 'System.Core' could not be found.

      Obviously this doesn't matter if Homeseer never runs the script anyway.

      Matt.

      Comment


        #48
        You would need to pass some text to the function to test it fully.
        Jon

        Comment


          #49
          Originally posted by jon00 View Post
          You would need to pass some text to the function to test it fully.
          I assumed as much and guessed that what most of the error messages are. It's the last line I was unsure about "The import 'System.Core' could not be found."

          This looks like a VB.net library isn't present in Linux or something.

          Anyway, I will look into that part if ever Homeseer fix the main problem.

          Thanks, Matt.

          Comment


            #50
            No, that is a standard error message you get now when a script errors. It is totally unrelated.

            I'll test the script on Linux when I can.
            Jon

            Comment


              #51
              OK, I loaded the script on to a Linux build and corrected a few things which it did not like. Appears to be working but I cannot test everything. I'll update the script tomorrow.

              If HST do fix the hook issue, it should be working.
              Jon

              Comment


                #52
                Originally posted by Croccy22 View Post
                Have just added a hs.writelog into the check_vcmd.vb file and it isn't executed when I talk to Alexa. Will try and speak to Homeseer and see if it's anything they can sort out.
                Matt,

                Did you contact HST about this? I've now corrected the Linux build errors so we should be good to go if they fix the hook.
                Jon

                Comment


                  #53
                  Originally posted by jon00 View Post
                  Matt,

                  Did you contact HST about this? I've now corrected the Linux build errors so we should be good to go if they fix the hook.
                  Yeah I did. Wade said he is working on other stuff at the moment so won't get to look at it for a few weeks. He didn't think there should be a problems with it.

                  However, I have tested by running an strace and upon giving Alexa a command, there is no request whatsoever for the script in question. So it definately isn't going to work until they make some changes.

                  This is a capture from the strace after giving Alexa a homeseer command:

                  Code:
                  [pid 19332] access("/usr/local/HomeSeer", W_OK) = 0
                  [pid 19332] access("/usr/local/HomeSeer", W_OK) = 0
                  [pid 19332] access("/usr/local/HomeSeer", W_OK) = 0
                  [pid 19332] openat(AT_FDCWD, "/usr/local/HomeSeer", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 47
                  [pid   709] access("/usr/local/HomeSeer", F_OK) = 0
                  [pid   709] open("/tmp/HomeSeerLog.hsd", O_RDWR|O_CREAT|O_LARGEFILE|O_CLOEXEC, 0644) = 47
                  [pid   709] access("/tmp/HomeSeerLog.hsd-journal", F_OK) = -1 ENOENT (No such file or directory)
                  [pid   709] access("/tmp/HomeSeerLog.hsd-wal", F_OK) = -1 ENOENT (No such file or directory)
                  [pid   709] access("/tmp/HomeSeerLog.hsd-journal", F_OK) = -1 ENOENT (No such file or directory)
                  [pid   709] access("/tmp/HomeSeerLog.hsd-wal", F_OK) = -1 ENOENT (No such file or directory)
                  [pid 19854] openat(AT_FDCWD, "/sys/devices/system/cpu", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 47
                  [pid 19854] openat(AT_FDCWD, "/sys/devices/system/cpu", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 47
                  So looks like we are out of luck for now which is a shame.

                  Matt.

                  Comment


                    #54
                    OK, thanks for the update. Let's hope he gets around to it soon.
                    Jon

                    Comment


                      #55
                      So I just installed this and started using it. My very first test trigger worked perfectly and I can see how this is far superior to the official skill.

                      Couple of questions as I familiarize myself with the script:
                      • When do I need to quote text? In the docs, the AlexaText option has one example that is quoted ("Kitchen Lights Off") and another that is unquoted (good night||goodnight||go to sleep).

                      • I saw the Replacement Variables section, but that seems to be limited to AlexaResponse. Any chance of being able to pass variables via AlexaText? One use case is not having to write a separate trigger for every single permutation of "Alexa, tell homeseer to turn off all the {room} lights."


                      Thanks!

                      Comment


                        #56
                        There is no difference if you do or do not use quotes i.e. they are optional.

                        I'm not sure I understand your second question. How would this work when you are setting the trigger to do something specific from a voice command.
                        Jon

                        Comment


                          #57
                          Originally posted by jon00 View Post
                          I'm not sure I understand your second question. How would this work when you are setting the trigger to do something specific from a voice command.
                          So I want to avoid the confirmation required with the official skill. e.g. when you say "turn off all the lights in the kitchen", Alexa says, "please confirm turn off all lights in the kitchen". I just want her to turn it off. Your script does that very effectively.

                          BUT....now I have to write a separate trigger for each grouping I want to have. Trigger 1 for kitchen lights, trigger 2 for master bedroom lights, and so on. Looking at my setup, I'd have to write something north of 20 triggers, one for each area in my house. Doable, but not ideal.

                          If I could use a variable instead, I'd only have to write one trigger. AlexaText would be "[room] lights off" or something similar, where '[room]' matches the room name listed in HomeSeer.

                          I could make do just fine with [room]. Others may want the specificity of [floor] as well, but you get the general idea.

                          Comment


                            #58
                            I do get that, however this is pretty dumb and has to be told what to do from a trigger. So for Kitchen that could be three lights, the Master Bedroom two lights etc. The script would have to scan all devices to know your setup and then parse specific room names before it would work.

                            I'm not for reinventing the wheel as the Homeseer skill has this available by default (apart from the annoying confirmation). It is just a helper application after all. It was really designed for better triggering and to allow customised responses back.
                            Jon

                            Comment


                              #59
                              Absolutely superb utility - works extremely well.

                              Quick question, is there any limit on the number of Triggers you can have in the Jon00Alexa.ini file?

                              Comment


                                #60
                                Thanks.

                                Yes, 2000, however it would get very slow to respond if you had that number!
                                Jon

                                Comment

                                Working...
                                X