Announcement

Collapse
No announcement yet.

Z-wave - too much logging

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

    Z-wave - too much logging

    Hello,

    My HS3 log file gets filled with tons of Z-wave log entries that I don't care to see, and I can't figure out how to eliminate them. When I control a Z-wave device via a script, I get 2 entries for the same action. Example:

    Code:
    [COLOR=#000000]Jan-27 7:12:04 PM [/COLOR] [COLOR=#000000]  [/COLOR] [COLOR=#000000]Z-Wave [/COLOR] [COLOR=#000000]Device: [COLOR=#000080]Upper Master Bedroom MultiSensor: Color[/COLOR] Set to [COLOR=#008000]0[/COLOR] [/COLOR]    
    [COLOR=#000000]Jan-27 7:12:04 PM [/COLOR] [COLOR=#000000]  [/COLOR] [COLOR=#000000]Z-Wave [/COLOR] [COLOR=#000000]Device: [COLOR=#000080]Upper Living Room MultiSensor: Color[/COLOR] Set to [COLOR=#008000]0[/COLOR] [/COLOR]    
    [COLOR=#000000]Jan-27 7:12:04 PM [/COLOR] [COLOR=#000000]  [/COLOR] [COLOR=#000000]Z-Wave [/COLOR] [COLOR=#000000]Device: [COLOR=#000080]Lower Living Room MultiSensor: Color[/COLOR] Set to [COLOR=#008000]0[/COLOR] [/COLOR]    
    [COLOR=#000000]Jan-27 7:12:04 PM [/COLOR] [COLOR=#000000]  [/COLOR] [COLOR=#000000]Device Control [/COLOR] [COLOR=#000000]Device: Upper Master Bedroom MultiSensor: Color to Off (0) by/from: CAPI Control Handler [/COLOR]    
    [COLOR=#000000]Jan-27 7:12:04 PM [/COLOR] [COLOR=#000000]  [/COLOR] [COLOR=#000000]Device Control [/COLOR] [COLOR=#000000]Device: Upper Living Room MultiSensor: Color to Off (0) by/from: CAPI Control Handler [/COLOR]    
    [COLOR=#000000]Jan-27 7:12:04 PM [/COLOR] [COLOR=#000000]  [/COLOR] [COLOR=#000000]Device Control [/COLOR] [COLOR=#000000]Device: Lower Living Room MultiSensor: Color to Off (0) by/from: CAPI Control Handler [/COLOR]
    Is there any way to eliminate one of these? I've tried disabling logging on the event but that only seems to disable logging of the event trigger itself.

    Also, when polling via HS3 events, I get 'set to' log entries even when nothing changes. Example:

    Code:
    [COLOR=#000000]Jan-27 7:25:28 PM [/COLOR] [COLOR=#000000]  [/COLOR] [COLOR=#000000]Z-Wave [/COLOR] [COLOR=#000000]Device: [COLOR=#000080]Upper Kitchen MultiSensor: Temperature[/COLOR] Set to [COLOR=#008000]64.94 (F)[/COLOR][/COLOR]
     .......
    [COLOR=#000000]Jan-27 7:20:28 PM [/COLOR] [COLOR=#000000]  [/COLOR] [COLOR=#000000]Z-Wave [/COLOR] [COLOR=#000000]Device: [COLOR=#000080]Upper Kitchen MultiSensor: Temperature[/COLOR] Set to [COLOR=#008000]64.94 (F)[/COLOR] [/COLOR]
    Oddly, when I poll via script using:

    ri = hs.PluginFunction("Z-Wave", "", "PollDevice", New Object() {refId})

    I don't get 'set to' log entries UNLESS it changes.

    Any way to fix these 2 issues? Not the end of the world, of course. Just looking to eliminate entries I don't need to see.

    Thanks!
    HS4, Insteon, Z-wave, USB-UIRT, Harmony Hubs, Google Hub/Chromecasts/Speakers, Foscam & Amcrest cameras, EZVIZ DB1 doorbell
    Plugins: BLLAN, BLOccupied, BLUSBUIRT, Chromecast, Harmony Hub, Insteon, Jon00 Homeseer/Echo Skill Helper, Harmony Hub, Jon00 DB Charting, MediaController, NetCAM, PHLocation2, Pushover 3P, weatherXML, Z-wave

    #2
    You can disable logging on each device under the configuration for the device - "Do not log commands from this device:".

    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	73.3 KB
ID:	1188711

    I run a script that turns off logging for all Z-Wave devices and another that turns it back on if I need it for troubleshooting. The best thing to do is turn all of them off with a script, then turn individual devices back on that you want to log.

    Script to enable logging on all Z- Wave devices
    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)
                End If
    
            Loop Until EN.Finished
    
        Catch ex As Exception : hs.writelog("Device Clear", "Exception: " & ex.message)
        End Try
    
    End Sub
    Script to disable logging on all Z-Wave devices
    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 Stop", "Device: " & dv.Name(Nothing))
                    dv.MISC_Set(hs, Enums.dvMISC.NO_LOG)
                End If
    
            Loop Until EN.Finished
    
        Catch ex As Exception : hs.writelog("Device Clear", "Exception: " & ex.message)
        End Try
    
    End Sub
    Just one difference between the two "dv.MISC_Clear" vs "dv.MISC_Set".
    Last edited by randy; January 27, 2017, 09:18 PM.
    HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

    Comment


      #3
      Thank you for the suggestion and script samples! I don't wish to eliminate logging altogether for these devices. I just want to eliminate the redundancy outlined above. Any suggestions toward that end?
      HS4, Insteon, Z-wave, USB-UIRT, Harmony Hubs, Google Hub/Chromecasts/Speakers, Foscam & Amcrest cameras, EZVIZ DB1 doorbell
      Plugins: BLLAN, BLOccupied, BLUSBUIRT, Chromecast, Harmony Hub, Insteon, Jon00 Homeseer/Echo Skill Helper, Harmony Hub, Jon00 DB Charting, MediaController, NetCAM, PHLocation2, Pushover 3P, weatherXML, Z-wave

      Comment


        #4
        Unfortunately it is all or nothing. A Z-Wave device will generate two entries unless the device is set disable logging. It will generate a Device Control entry when the device command is sent and a Z-Wave response when the device reports back. You cannot get just one or the other unless there is a method of which I am unaware. The polling reports are also suppressed when the logging for the device is disabled.

        That is why I disable all logging of the devices, except for those I want to follow.
        Last edited by randy; January 28, 2017, 10:58 AM.
        HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

        Comment


          #5
          Originally posted by rprade View Post
          Unfortunately it is all or nothing. A Z-Wave device will generate two entries unless the device is set disable logging. It will generate a Device Control entry when the device command is sent and a Z-Wave response when the device reports back. You cannot get just one or the other unless there is a method of which I am unaware. The polling reports are also suppressed when the logging for the device is disabled.

          That is why I disable all logging of the devices, except for those I want to follow.
          Sometimes, it generates a lot more than two entries. I sometimes see a whole column of duplicates for some device - 10 to 20 of the exact same entry. There seems to be no pattern to this.

          Comment


            #6
            When do you propose to run your 2 scripts? and how? at start of homeseer? manually?

            Comment


              #7
              randy

              Before I go and break something...do these scripts still work with z-wave devices created in both HS3 & HS4? I'll back up first, regardless, but thought I'd ask. Thanks.


              Originally posted by randy View Post
              You can disable logging on each device under the configuration for the device - "Do not log commands from this device:".

              [ATTACH]59131[/ATTACH]

              I run a script that turns off logging for all Z-Wave devices and another that turns it back on if I need it for troubleshooting. The best thing to do is turn all of them off with a script, then turn individual devices back on that you want to log.

              Script to enable logging on all Z- Wave devices
              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)
              End If
              
              Loop Until EN.Finished
              
              Catch ex As Exception : hs.writelog("Device Clear", "Exception: " & ex.message)
              End Try
              
              End Sub
              Script to disable logging on all Z-Wave devices
              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 Stop", "Device: " & dv.Name(Nothing))
              dv.MISC_Set(hs, Enums.dvMISC.NO_LOG)
              End If
              
              Loop Until EN.Finished
              
              Catch ex As Exception : hs.writelog("Device Clear", "Exception: " & ex.message)
              End Try
              
              End Sub
              Just one difference between the two "dv.MISC_Clear" vs "dv.MISC_Set".
              -Wade

              Comment


                #8
                Originally posted by Wade View Post
                randy

                Before I go and break something...do these scripts still work with z-wave devices created in both HS3 & HS4? I'll back up first, regardless, but thought I'd ask. Thanks.



                Yes, they still work. I still use them from time to time.

                HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                Comment


                  #9
                  Originally posted by randy View Post
                  Yes, they still work. I still use them from time to time.
                  Thanks.
                  -Wade

                  Comment

                  Working...
                  X