Announcement

Collapse
No announcement yet.

Z-Wave Lock Events Script - Discussion Thread

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

    Z-Wave Lock Events Script - Discussion Thread

    This is the discussion thread for the Z-Wave lock events script located here:

    http://board.homeseer.com/showpost.p...47&postcount=1

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

    #2
    This really isn't a bug, but just how the comments in your script are written out. In my Schlage lock, i have "slots" ranging from 0 -> 40. It doesn't really start at 1 and HS appears it will let me put a code in slot 0 (I never use it since when adding the codes through the lock, it put the first code in slot 1). Perhaps slot 0 is the programming code or something?

    Anyways, it appears that "slot 1" for my lock actually maps to 6001 and not 6000 (like the same for locking, but I don't use the locking with pin feature).

    So when I (slot 1) unlock my door with your case statement unaltered it say "Mary" and not "John" unlocked the door.

    Just a heads up. I'm sure that no one will really have a hard time figuring it out, but you never know



    Notice: This has changed sometime in the past few days for me. My lock no longer has a slot "0" in the z-wave settings for the lock. I also no longer have 40 slots (only have 30 now). I don't know what changed. However what has not changed is that slot 1 maps to 6001 and 5001.

    Comment


      #3
      Oh, yeah, and I found a bug. You were missing a SELECT CASE statemetn in your code under the Yale case. I'll put a screenshot. Wasn't that hard to find, but you may want to update the script in the other thread
      Attached Files

      Comment


        #4
        Originally posted by sirmeili View Post
        Oh, yeah, and I found a bug. You were missing a SELECT CASE statemetn in your code under the Yale case. I'll put a screenshot. Wasn't that hard to find, but you may want to update the script in the other thread
        Thanks, will fix tonight.

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

        Comment


          #5
          Originally posted by sirmeili View Post
          This really isn't a bug, but just how the comments in your script are written out. In my Schlage lock, i have "slots" ranging from 0 -> 40. It doesn't really start at 1 and HS appears it will let me put a code in slot 0 (I never use it since when adding the codes through the lock, it put the first code in slot 1). Perhaps slot 0 is the programming code or something?

          Anyways, it appears that "slot 1" for my lock actually maps to 6001 and not 6000 (like the same for locking, but I don't use the locking with pin feature).

          So when I (slot 1) unlock my door with your case statement unaltered it say "Mary" and not "John" unlocked the door.

          Just a heads up. I'm sure that no one will really have a hard time figuring it out, but you never know



          Notice: This has changed sometime in the past few days for me. My lock no longer has a slot "0" in the z-wave settings for the lock. I also no longer have 40 slots (only have 30 now). I don't know what changed. However what has not changed is that slot 1 maps to 6001 and 5001.
          Thanks, will update that too.

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

          Comment


            #6
            Bug fixes have been made. See here for the updated script:

            http://board.homeseer.com/showpost.p...47&postcount=1

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

            Comment


              #7
              Found another bug related to the pushover stuff. you have only 7 params in your array object to send as parameters, and it requires 8. I changed the file to this (changes in bold):

              Code:
              Sub Main(ByVal Parms As Object)
              
              	Dim ParmArray() as String
              	ParmArray = Parms.tostring.split("|")			'split parameter into an array
              	Dim subject = ParmArray(0)					
              	Dim message = ParmArray(1)						
              	Dim priority = ParmArray(2)						
              	Dim sound = ParmArray(3)						
              
                  Try
                      [b]Dim CO(7) As Object 'changed from CO(6)[/b]
              
                      CO(0) = "All Clients" 'must be matched with a device name already in the plugin or 'All Clients' CASE SENSITIVE
                      CO(1) = message 'message body
                      CO(2) = subject 'message text
                      CO(3) = priority 'low/normal/high/emergency
                      CO(4) = sound 'message sound from list already in HomeSeer - must match
                      CO(5) = Nothing
                      CO(6) = Nothing
              	[b]CO(7) = Nothing[/b]
              
                      hs.PluginFunction("Pushover 3P", "", "Pushscript", CO)
              
                  Catch ex As Exception
                      hs.WriteLog("", "Exception in script: " & ex.Message)
                  End Try
              
              End Sub

              Comment


                #8
                Something is still not quite right I guess...now I don't get sounds from pushover (yes, I changed it from 'none' to 'pushover' in the script).

                Comment


                  #9
                  Originally posted by sirmeili View Post
                  Something is still not quite right I guess...now I don't get sounds from pushover (yes, I changed it from 'none' to 'pushover' in the script).
                  Nevermind, I guess low priority messages don't get a sound even if you send them.

                  Comment


                    #10
                    Originally posted by sirmeili View Post
                    Found another bug related to the pushover stuff. you have only 7 params in your array object to send as parameters, and it requires 8. I changed the file to this (changes in bold):
                    Thanks for posting that. Mine is working fine with 7 parameters, not 8. Which version of the Pushover plugin are you running?

                    Cheers
                    Al
                    Last edited by sparkman; November 28, 2015, 02:31 PM.
                    HS 4.2.8.0: 2134 Devices 1252 Events
                    Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                    Comment


                      #11
                      [QUOTE=sparkman;1182134]
                      Originally posted by sirmeili View Post
                      Found another bug related to the pushover stuff. you have only 7 params in your array object to send as parameters, and it requires 8. I changed the file to this (changes in bold):

                      Thanks for posting that. Mine is working fine with 7 parameters, not 8. Which version of the Pushover plugin are you running?

                      Cheers
                      Al
                      I am on 0.0.0.12. I found someone else having the same issue with pushscript and the issue was 8 params instead of 7 so I gave it a try and it worked. Maybe a recent update added the 8th?

                      Comment


                        #12
                        [QUOTE=sirmeili;1182303]
                        Originally posted by sparkman View Post

                        I am on 0.0.0.12. I found someone else having the same issue with pushscript and the issue was 8 params instead of 7 so I gave it a try and it worked. Maybe a recent update added the 8th?
                        When I added support for more than one application I had to add the ability to send the application name by script which needed an extra parameter, this came at version .10 I believe - I think I changed the scripting parameters when I released it but can't remember exactly.

                        Comment


                          #13
                          I've been using this for a bit now and it works great. I have some early Schlage Locks don't seem to log the user correctly or send tamper messages?
                          I think it has to do with the user code slot? The new schlage locks use slot 5001 on for lock, and 6001 for unlock. I saw this in some of sirmeili's post.

                          The lock log:
                          Here is the order I entered the user codes so I could see how they show up in the log.
                          First: User Code 1, Second: User Code 2, Third: User Code 3, and Fourth:I put invalid codes to trigger the Tamper Lock Out

                          Code:
                          User Code 1 Entered (1),2015-09-11,19:12:41
                          User Code Entered (20),2015-09-11,19:12:53
                          User Code Entered (20),2015-09-11,19:13:04
                          Tamper Lock-Out (96),2015-09-11,19:14:50
                          My lock has this under the Lock Notification device( First Pic). Second one is z-wave door lock device.
                          Attached Files
                          Tom
                          baby steps...starting again with HS3
                          HS3Pro: Z-NET & 80 Z wave Devices,
                          HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
                          Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
                          In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
                          System: XP on Fanless Mini-ITX w/ SSD

                          Comment


                            #14
                            Originally posted by TomTom View Post
                            I've been using this for a bit now and it works great. I have some early Schlage Locks don't seem to log the user correctly or send tamper messages?
                            I think it has to do with the user code slot? The new schlage locks use slot 5001 on for lock, and 6001 for unlock. I saw this in some of sirmeili's post.

                            The lock log:
                            Here is the order I entered the user codes so I could see how they show up in the log.
                            First: User Code 1, Second: User Code 2, Third: User Code 3, and Fourth:I put invalid codes to trigger the Tamper Lock Out

                            My lock has this under the Lock Notification device( First Pic). Second one is z-wave door lock device.
                            Hi Tom, yes the script could be updated to accommodate those locks. I'll try to do the update tonight or tomorrow.

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

                            Comment


                              #15
                              Thank you Al. When ever you get a chance is fine


                              Sent from my iPhone
                              Tom
                              baby steps...starting again with HS3
                              HS3Pro: Z-NET & 80 Z wave Devices,
                              HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
                              Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
                              In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
                              System: XP on Fanless Mini-ITX w/ SSD

                              Comment

                              Working...
                              X