Announcement

Collapse
No announcement yet.

Turn off logging for all z-wave devices

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

    Turn off logging for all z-wave devices

    Hello, does anybody know how I can turn off all logging? I've been trying this script with limited success:

    Code:
    sub Main(ByVal Parm As Object)
    
    Try
    'run through the enumerator, remove the location two strings
    
    Dim dv As Scheduler.Classes.DeviceClass
    Dim EN As Scheduler.Classes.clsDeviceEnumeration
    
    EN = hs.GetDeviceEnumerator
    
    Do
    dv = EN.GetNext
      If dv Is Nothing Then Continue Do
      If dv.Interface(Nothing).ToLower = "z-wave" Then
          hs.writelog("Log ZDev Start", "Device: " & dv.Name(Nothing))
          dv.MISC_Clear(hs, Enums.dvMISC.NO_LOG)
          System.Threading.Thread.Sleep(50)
      End If
    
    Loop Until EN.Finished
    
    Catch ex As Exception : hs.writelog("Device Clear", "Exception: " & ex.message)
    End Try
    
    End Sub

    #2
    Originally posted by widert View Post
    Hello, does anybody know how I can turn off all logging? I've been trying this script with limited success:

    Code:
    sub Main(ByVal Parm As Object)
    
    Try
    'run through the enumerator, remove the location two strings
    
    Dim dv As Scheduler.Classes.DeviceClass
    Dim EN As Scheduler.Classes.clsDeviceEnumeration
    
    EN = hs.GetDeviceEnumerator
    
    Do
    dv = EN.GetNext
    If dv Is Nothing Then Continue Do
    If dv.Interface(Nothing).ToLower = "z-wave" Then
    hs.writelog("Log ZDev Start", "Device: " & dv.Name(Nothing))
    dv.MISC_Clear(hs, Enums.dvMISC.NO_LOG)
    System.Threading.Thread.Sleep(50)
    End If
    
    Loop Until EN.Finished
    
    Catch ex As Exception : hs.writelog("Device Clear", "Exception: " & ex.message)
    End Try
    
    End Sub
    I think what you are doing wrong is clearing the Enums.dvMISC.NO_LOG flag. You want to Set the flag if you don't want the device to log commands.

    Steve

    Comment


      #3
      Originally posted by SteveMSJ View Post

      I think what you are doing wrong is clearing the Enums.dvMISC.NO_LOG flag. You want to Set the flag if you don't want the device to log commands.

      Steve
      Oh, embarrassing, thank you!

      Comment

      Working...
      X