Announcement

Collapse
No announcement yet.

Passcode screen with multiple passcodes?

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

    Passcode screen with multiple passcodes?

    I'm playing with a passcode screen right now, have it working so I can passcode a screen, and the Passcode screen pops up correctly, and lets me in if I do the correct passcode.

    However, I'd like to be able to have more than one passcode for the screen - ie. multiple users, different passcodes, but it's of course the same passcode screen. The idea is that when the passcode screen pops up, you could punch in anyone of, say, 3 different passcodes, and they'd all work.

    In that way, if I want to 'remove' a user, I can remove that person's code without everyone else having to learn a new one.

    Any ideas if this is possible to rig?

    #2
    Bump - anyone ever tried to do this?

    Comment


      #3
      I don't have answer for you but I was wondering if you have made something from scratch or if you have used something pre-defined from HS Touch.

      Same thing is next on my list.

      Comment


        #4

        Comment


          #5
          Bump on this. Was just looking for similar. Wanting multiple codes to access HSTouch security screen for alarm system, as an alternative to trying to script passing keypad values for specific alarm panel arm/disarm functions.

          Comment


            #6
            I have never encountered this kind of situation before with my HS3. I would recommend you to get in touch with the technical team of Homeseer. They can help you out with an exact solution.
            Regards,
            Lewis

            Comment


              #7
              I have tested successfully Matrix keypad with software from zumungo.com It is not a screen. It is $5 piece of plastic with 16 keys. Attached to WiFi controller ESP32 that runs zumungo.com software. They support multiple passwords, time schedules, owner, guest and employees passwords etc. The protocol is open, well documented and I managed to integrate it with HS3 very well using Big5 plug-in. Now that the integration is done and I have a pilot unit working I'm thinking of making a small batch of 6 to 10 units to spread around the property. I have gone full circle from simple keypads as UI trough screens around the house with GUI and about a dozen of GoogleHome units for control by voice. I realize that each technology has it's own space.

              Comment


                #8
                I have done this (and am still using it). I have HSTouch pass the code entered to a script, and that determines if it is one of the correct codes and then there is an action back to HSTouch based on that.

                Comment


                  #9
                  Originally posted by joegr View Post
                  I have done this (and am still using it). I have HSTouch pass the code entered to a script, and that determines if it is one of the correct codes and then there is an action back to HSTouch based on that.
                  Care to Share...

                  Comment


                    #10
                    Originally posted by sirbooker View Post

                    Care to Share...
                    Code:
                    Const Fname As String  = "Security.vb"                  ' this file name
                    Const Lcolor As String = "#00bf00"                     ' log color for normal
                    
                    Public Sub Main(ByVal parm As Object)
                    End Sub
                    
                    Public Sub AlarmDisarm (ByVal parm as Object)                      ' Disarm the alarm if the correct passcode is entered (in the argument)
                                                                                       ' and the alarm is armed.  This is called directly from HSTouch
                    
                    Try
                    
                        dim passwrd as String
                        dim Dref1            = hs.GetDeviceRef("s20")                  ' alarm arm mode
                        dim Dref2            = hs.GetDeviceRef("s26")                  ' disarm reason string
                        dim Dref3            = hs.GetDeviceRef("s21")                  ' current alarm status
                        dim disarm as string = hs.DeviceString(Dref2)                  ' any other existing disarm reasons
                        dim mode             = hs.DeviceValue(Dref1)
                        dim status           = hs.DeviceValue(Dref3)
                        passwrd = parm(0)
                    
                        if mode > 0 then                                               ' only do anything if the alarm is currently armed
                    
                           if (passwrd = "xxxxx") then                                 ' disarm if code 1 is entered.
                              hs.SetDeviceString (Dref2,disarm & ", Code 1 entered on touchscreen",true)
                              hs.WriteLogDetail(Fname,"Alarm disarmed by code 1 entered on touchscreen", Lcolor, 9,Fname & ":AlarmDisarm",1)
                              if mode = 100 or status = 3 then
                                 hs.TriggerEvent("Alarm Disarm")
                              else if mode = 90 then
                                 hs.TriggerEvent("Home Armed off")
                              end if
                    
                    
                           else if (passwrd = "yyyyy") then                            ' disarm if code 2 is entered
                              hs.SetDeviceString (Dref2,disarm & ", Code 2 entered on touchscreen",true)
                              hs.WriteLogDetail(Fname,"Alarm disarmed by code 2 entered on touchscreen", Lcolor, 9,Fname & ":AlarmDisarm",1)
                              hs.SetDeviceValue("s20",1)
                              if mode = 100 or status = 3 then
                                 hs.TriggerEvent("Alarm Disarm")
                              end if
                    
                           else                                                        ' wrong code entered
                              hs.WriteLogDetail(Fname,"Wrong code entered: " & passwrd, "#FF0000", 5,Fname & ":AlarmDisarm",2)
                    
                           end if
                        end if
                    
                    Catch Ex As Exception
                          hs.WriteLogDetail(Fname,Ex.Message, "#FF0000", 1,Fname & ":AlarmDisarm",9)
                    End Try
                    
                    End Sub
                    Click image for larger version

Name:	passcode.png
Views:	272
Size:	313.2 KB
ID:	1355687

                    Comment


                      #11
                      Thank You
                      one could also use the keypad to enter a code that would trigger an event / or trigger an event to turn a device on.

                      Comment


                        #12
                        Originally posted by klafollette View Post
                        Bump on this. Was just looking for similar. Wanting multiple codes to access HSTouch security screen for alarm system, as an alternative to trying to script passing keypad values for specific alarm panel arm/disarm functions.
                        Sorry for the delay here, somehow I missed your bump and only saw this now when cleaning up my email. I eventually ended up writing my own script to do the job, kind of a similar fashion to what joegr did, except that I didn't want to have to hit ENTER - I wanted the keypad to behave more like a hardware keypad, hit the four numbers and boom, alarm disarms. It's also used to enter the security panel on the ipad - ie when you hit the Security button on the ipad, it asks for a code before letting you in to "Do things" to security. The script determines if it's being called to just go into the panel, or if it's being called because the keypad was popped up due to the security system being triggered, and acts appropriately.

                        Code:
                        Sub Main(ByVal Parm() as String)
                        
                        
                            Dim NumArray() as String = {"1111", "2222", "3333", "4444", "5555", "6666"}
                            Dim NumMaxLen = 4
                            'Dim Client = Parm(1) & ":" & Parm(1)
                            Dim Client = "hallway:hallway"
                            Dim Box = "Passcode:Text Box 001"
                            Dim Fail = "Passcode:Fail"
                            Dim logName = "Security Passcode"
                            'Dim Debug as Boolean = True
                            Dim Debug as Boolean = False
                            Dim Success = "False"
                            Dim Keyed = Parm(0)
                            Dim Disarm = "manual"
                            If hs.DeviceValue(870) = 100 Then
                                Disarm = "disarm"
                            End If
                        
                            If Debug Then
                                For i As Integer = LBound(Parm) To UBound(Parm)
                                hs.writelog(logName, "P" & i & ": " & Parm(i))
                                Next i
                            End If
                        
                            If Debug Then hs.writelog(logName, "Passed value is " & Keyed)
                            If Debug Then hs.writelog(logName, "Client name is " & Client)
                            If Debug Then hs.writelog(logName, "Disarm passed is " & Disarm)
                        
                            For Each value as String In NumArray
                                If Debug Then hs.writelog(logName, "Found " & value & " in NumArray")
                                If value = Keyed Then
                                    Success = "True"
                                    hs.writelog(logName, "Code entered matches list")
                                End If
                            Next
                            If Success = "True" Then
                                hs.PluginFunction("HSTouch Server","", "ClientAction", New Object() {54, Client, Box, ""}) 'Clear Text Box
                                hs.PluginFunction("HSTouch Server","", "ClientAction", New Object() {60, Client, "Security", ""}) 'Switch to Security Screen
                                hs.writelog(logName, "Opening Security Screen on " & Client)
                                'If we were called via the Door Trigger Popup Event, auto-disarm the alarm
                                if Disarm = "disarm" Then
                                    hs.CAPIControlHandler(hs.CAPIGetSingleControl(560,true ,"Set Standby",false,true)) 'Set to Standby
                                    hs.writelog(logName, "Disarm is true so automatically disarming alarm")
                                End If
                            ElseIf Len(Keyed) >= 4 Then
                                hs.PluginFunction("HSTouch Server","", "ClientAction", New Object() {35, Client, Fail, ""}) 'Clear Text Box with Fail sound
                                hs.writelog(logName, "Failed " & Client & " security passcode attempt with code: " & Keyed)
                            End If
                        
                        End Sub
                        It's a little bit more work, because you need to add the script to every key on your keypad, but the results are great. I also have it play a short 'beep' on each keypress, and if the person puts in an invalid code it immediately sends a loud buzz and clears the code so you can try again.


                        Click image for larger version

Name:	keypad1.png
Views:	171
Size:	629.2 KB
ID:	1362234


                        Click image for larger version

Name:	keypad2.png
Views:	266
Size:	30.3 KB
ID:	1362232


                        Happy to provide more info if desired....

                        Paul
                        Attached Files

                        Comment

                        Working...
                        X