Announcement

Collapse
No announcement yet.

Z-Wave Lock Events Script - Discussion Thread

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

    Yes, I'm perfectly comfortable in testing this. It seems like it fixed the error but now we have a new one: Details: error VBNC30456: 'Count' is not a member of 'System.String[]'.

    Comment


      Originally posted by Igorski88 View Post
      Yes, I'm perfectly comfortable in testing this. It seems like it fixed the error but now we have a new one: Details: error VBNC30456: 'Count' is not a member of 'System.String[]'.
      ok, try changing


      Code:
      		If PluginList IsNot Nothing AndAlso PluginList.Count > 0 Then
      to

      Code:
      		If PluginList IsNot Nothing AndAlso PluginList.Length > 0 Then
      Cheers
      Al
      HS 4.2.8.0: 2134 Devices 1252 Events
      Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

      Comment


        GREAT, it fixed the issue. But unfortunately now its coming back with a new msg: 'VbCrLf' is not declared. It may be inaccessible due to its protection level.

        Sorry to bother you with this again!

        Comment


          Originally posted by Igorski88 View Post
          GREAT, it fixed the issue. But unfortunately now its coming back with a new msg: 'VbCrLf' is not declared. It may be inaccessible due to its protection level.

          Sorry to bother you with this again!
          I suspect there will be quite a few more of these in both the aspx file and potentially in the script itself. With the VbCrLF thing, try one of the following:

          - add a line near the top under "Try"
          Code:
          		Dim VbCrLF As String = Chr(10) & Chr(13)
          - alternately, do a search and replace on the file and replace "& VbCrLf" with empty text.

          If you get more errors after that, I'll need to find a linux system to try it on. For the interim, it would be best if you grabbed a copy of your script from your other system and used it. Thanks for your patience!

          Cheers
          Al
          HS 4.2.8.0: 2134 Devices 1252 Events
          Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

          Comment


            Tried a couple of different things:
            Adding
            Code:
            Dim VbCrLF As String = Chr(10) & Chr(13)
            returned a "Chr is not declared" error

            So I went with option number 2:

            I replaced all the "& VbCrLf" with empty text and the error went away
            and I started to receive a new error: "Replace is not declared"

            So I then undid option # 2 to try the following:
            I added the following to the very top.
            Code:
            <%@ Import Namespace="Microsoft.VisualBasic" %>
            This solved the "Replace is not declared" error and "VbCrLf is not declared" error.

            But now im stuck with: Value of type 'Object' cannot be converted to 'System.String[]'.

            So yes I do understand that some testing may need to be done on a Linux device. If there is anything I can do to help you with that please know that "i'm in".

            Comment


              Originally posted by Igorski88 View Post
              Tried a couple of different things:
              Adding
              Code:
              Dim VbCrLF As String = Chr(10) & Chr(13)
              returned a "Chr is not declared" error

              So I went with option number 2:

              I replaced all the "& VbCrLf" with empty text and the error went away
              and I started to receive a new error: "Replace is not declared"

              So I then undid option # 2 to try the following:
              I added the following to the very top.
              Code:
              <%@ Import Namespace="Microsoft.VisualBasic" %>
              This solved the "Replace is not declared" error and "VbCrLf is not declared" error.

              But now im stuck with: Value of type 'Object' cannot be converted to 'System.String[]'.

              So yes I do understand that some testing may need to be done on a Linux device. If there is anything I can do to help you with that please know that "i'm in".
              Can you try the attached files to see if that works better on linux? I was able to test the script, but not the aspx files as I could not get any aspx file to work on the linux system I'm testing on.

              If you get more errors, can you post them?

              Thanks
              Al
              Last edited by sparkman; March 19, 2017, 07:34 PM.
              HS 4.2.8.0: 2134 Devices 1252 Events
              Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

              Comment


                Man you work fast!

                I updated both and the doorlock.aspx spit out: error VBNC30451: 'Split' is not declared. It may be inaccessible due to its protection level.

                Comment


                  Originally posted by Igorski88 View Post
                  Man you work fast!

                  I updated both and the doorlock.aspx spit out: error VBNC30451: 'Split' is not declared. It may be inaccessible due to its protection level.
                  I happened to be at home with the flu, so had some time to kill

                  Can you add the reference to visual basic back in as a test?

                  I had updated the split command as some versions of mono don't like .split, so I used Split() instead. Split is a VBScript command in theory, so should not work on any versions of mono, but it works on mine without the reference to visual basic. Also, can you try running the script file to see if it returns any errors?

                  Thanks
                  Al
                  HS 4.2.8.0: 2134 Devices 1252 Events
                  Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                  Comment


                    Well I hope you get better soon!

                    After the Vb reference it get rid of the "split" error and spits out: error VBNC30311: Value of type 'Object' cannot be converted to 'System.String[]'.

                    The script spits out one error as opposed to the 5 before your update: Running script /usr/local/HomeSeer/scripts/doorlock.vb :Exception has been thrown by the target of an invocation.Cannot find the requested class member.

                    Comment


                      Originally posted by Igorski88 View Post
                      Well I hope you get better soon!

                      After the Vb reference it get rid of the "split" error and spits out: error VBNC30311: Value of type 'Object' cannot be converted to 'System.String[]'.

                      The script spits out one error as opposed to the 5 before your update: Running script /usr/local/HomeSeer/scripts/doorlock.vb :Exception has been thrown by the target of an invocation.Cannot find the requested class member.
                      Thanks!

                      In the script file, can you change:

                      Code:
                      			Dim ValueAction() As String = Split(ValueAction2,"|")
                      To

                      Code:
                      			Dim ValueAction() As String = ValueAction2.Split("|")
                      To see if the error goes away?

                      I'll have to figure out why aspx files are not running on my system at all. The error messages have all been pretty strange.

                      Cheers
                      Al
                      HS 4.2.8.0: 2134 Devices 1252 Events
                      Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                      Comment


                        Ok, I was able to get aspx files working (not sure what I did to do that ). The attached works on my system. Let me know if it works on yours.

                        Cheers
                        Al
                        Last edited by sparkman; March 19, 2017, 10:27 PM.
                        HS 4.2.8.0: 2134 Devices 1252 Events
                        Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                        Comment


                          YOU ARE THE MAN! doorlock.aspx officially works on Linux.

                          The script however is still throwing a "Running script /usr/local/HomeSeer/scripts/doorlock.vb :Exception has been thrown by the target of an invocation.Cannot find the requested class member." error.

                          Please drop me your venmo username or PayPal email in a privet msg I'd like to buy you a beer!

                          Comment


                            Originally posted by Igorski88 View Post
                            YOU ARE THE MAN! doorlock.aspx officially works on Linux.

                            The script however is still throwing a "Running script /usr/local/HomeSeer/scripts/doorlock.vb :Exception has been thrown by the target of an invocation.Cannot find the requested class member." error.

                            Please drop me your venmo username or PayPal email in a privet msg I'd like to buy you a beer!
                            Great and thanks for the offer. I'll take you up on that when we get the script part is also working . The aspx page doesn't do you any good without a working script. Can you post a screen shot of your event that you are using to call the script?

                            Cheers
                            Al
                            HS 4.2.8.0: 2134 Devices 1252 Events
                            Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                            Comment


                              Originally posted by sparkman View Post
                              Great and thanks for the offer. I'll take you up on that when we get the script part is also working . The aspx page doesn't do you any good without a working script. Can you post a screen shot of your event that you are using to call the script?

                              Cheers
                              Al
                              Cool here it is: Click image for larger version

Name:	20170319_221701.png
Views:	1
Size:	114.0 KB
ID:	1190278

                              Sent from my SM-G935V using Tapatalk

                              Comment


                                The script needs to be called with one parameter, which is the name of the door. See the first screen shot in this post: https://forums.homeseer.com/showpost...47&postcount=1. It should trap that in the script though, but can you try that and see if it makes any difference?

                                Thanks
                                Al
                                HS 4.2.8.0: 2134 Devices 1252 Events
                                Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                                Comment

                                Working...
                                X