Announcement

Collapse
No announcement yet.

how to get extra data store for a z-wave device

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

    how to get extra data store for a z-wave device

    I have a z-wave blind controller and I need to get at the information that (I think) is stored in the extra data store which is shown on the advanced tab to have 37 named entries. Is there a way to find out what these named entries are and what values they have?

    #2
    You would have to write a script to read them. They are just name/value pairs of data.
    This code will read the root device and all child devices, dumping PED if there are any available:

    PHP Code:
    Public Sub DumpPed()
            
    Dim d As Integer 0
            Dim y
    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 
    0 To assocDevices.Count 1
                dev 
    hs.GetDeviceByRef(assocDevices(y))
                If (
    dev IsNot NothingThen
                    lin 
    dev.Ref(hs) & " " dev.Name(hs)
                    
    PData dev.PlugExtraData_Get(hs)
                    If (
    PData IsNot NothingThen
                        pk 
    PData.GetNamedKeys()
                        For 
    0 To pk.Length() - 1
                            s 
    PData.GetNamed(pk(x))
                            
    lin &= " pk=[" pk(x) & "]  val=[" "]"
                        
    Next
                        Log
    (linLogType.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
      I'm having a problem with s = PData.GetNamed(pk(x)). The error is Conversion from type 'Byte()' to type 'String' is not valid. So, I'm assuming that GetNamed returns an array of bytes? I tried to find documentation on PlugExtraData_Get and GetNamed, but couldn't find it in the documentation.

      Comment


        #4
        I have also tried having the return from GetNamed return an array of bytes, but that doesn't seem to be working either.

        Comment


          #5
          Not sure - that code is from one of my plugins and seems to be working here...
          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


            #6
            And any idea where to find documentation on GetNamed or PlugExtraData_Get? Where did you find out how to use it?

            Comment


              #7
              Figured it out (and why your code works for you), the GetNamed returns whatever type that particular value is. Yours must all be strings, while mine are a variety of of types. Anyway, I should be able to make it work now. Thanks for the assist.

              Comment


                #8
                Originally posted by danhi View Post
                And any idea where to find documentation on GetNamed or PlugExtraData_Get? Where did you find out how to use it?
                Lots of debugging in Visual Studio
                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

                Working...
                X