Announcement

Collapse
No announcement yet.

Locks in HSTouch

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

    Locks in HSTouch

    All,

    Does anyone have any experiences creating locks to appear in HSTouch? I've written the Garadget plugin which has a device to open/close/stop your garage door motor. I've set the control use pairs to door unlock and door lock. I thought that this would get it into HSTouch in the default screen but it appears not.

    There's no documentation in the HSTouch file about locks, I've searched through the SDK and there is no mention. I've also searched the help file and can't find a mention. I've checked the device type/sub type API and there is nothing undocumented that might give suggestion how to get a device recognised. I don't suspect there is a great deal of plugin developers who have written plugins that support door locks or similar devices but figured it was worth an ask...

    Thanks.

    #2
    I looked at my Schlage lock and none of the devices have Control Use set.

    I wonder if the HSTouch plugin is using PED to identiry the lock?
    I have a little sub to dump the PED values of a device - might be worth a shot to see.
    You pass it the root node and it dumps the PED for all child devices:

    Code:
    Public Sub DumpPed()
            Dim d As Integer = 0
            Dim y, x As Integer
            Dim pk() As String
            Dim s, lin As String
            Dim dev, pDev As Scheduler.Classes.DeviceClass
            Dim assocDevices() As Integer
            Dim PData As clsPlugExtraData = Nothing
    
            pDev = hs.GetDeviceByRef(gparentDeviceRef)
    
            assocDevices = pDev.AssociatedDevices(hs)
            For y = 0 To assocDevices.Count - 1
                dev = hs.GetDeviceByRef(assocDevices(y))
                If (dev IsNot Nothing) Then
                    lin = dev.Ref(hs) & " " & dev.Name(hs)
                    PData = dev.PlugExtraData_Get(hs)
                    If (PData IsNot Nothing) Then
                        pk = PData.GetNamedKeys()
                        For x = 0 To pk.Length() - 1
                            s = PData.GetNamed(pk(x))
                            lin &= " pk=[" & pk(x) & "]  val=[" & s & "]"
                        Next
                        Log(lin, LogType.LOG_TYPE_DEBUG)
                    End If
                End If
            Next
        End Sub
    HS4Pro on a Raspberry Pi4
    54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
    Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

    HSTouch Clients: 1 Android

    Comment


      #3
      Thanks for the reply Rob, I think I figured it partially out (re-installed HSTouch to get the projects) - the screen has to be called 'DoorLock' and then there is a entry in the DeviceTypes that is called Z-Wave Door Lock. Mine is not Z-Wave so I've added the device type and it makes the device appear. The status graphics are set to 0 being unlocked and 255 being locked, the lock and unlock buttons seem to be using CAPI controls to look for the control labelled lock and unlock.

      Makes you wonder what the point of the control use pairs is (which I do set to the appropriate CAPI controls on my devices) because this is forcing people who may want to have their own locks into having the values dictated by HS and the same with the CAPI controls, unfortunately I have already written the plugin and chosen my own device values (which are not the same) and controls (which lock/unlock would not look right as it is a garage door so they are open/close).

      Let alone how you would get this added to the default project if the user did not have the designer to use to deploy!

      Comment


        #4
        Just talking to myself here but I guess the workaround is to have a virtual device that has the same device values/device controls as what HSTouch expects and set the device type to Z-Wave Door Locks. Then it would appear to HSTouch as a door lock in the default page and could use events to control my own plugin device, not really ideal and not what I want but guess it could work at a push. Not sure if setting the Device Type String is going to have any sort of additional implications however...

        Comment


          #5
          Originally posted by mrhappy View Post
          Thanks for the reply Rob, I think I figured it partially out (re-installed HSTouch to get the projects) - the screen has to be called 'DoorLock' and then there is a entry in the DeviceTypes that is called Z-Wave Door Lock. Mine is not Z-Wave so I've added the device type and it makes the device appear. The status graphics are set to 0 being unlocked and 255 being locked, the lock and unlock buttons seem to be using CAPI controls to look for the control labelled lock and unlock.

          Makes you wonder what the point of the control use pairs is (which I do set to the appropriate CAPI controls on my devices) because this is forcing people who may want to have their own locks into having the values dictated by HS and the same with the CAPI controls, unfortunately I have already written the plugin and chosen my own device values (which are not the same) and controls (which lock/unlock would not look right as it is a garage door so they are open/close).

          Let alone how you would get this added to the default project if the user did not have the designer to use to deploy!

          "Mine is not Z-Wave so I've added the device type and it makes the device appear" Could you explain how you got the device to show up and how you got this working please ?

          Comment

          Working...
          X