Announcement

Collapse

Contacting HomeSeer This Week

HomeSeer is open and operational this week. All orders are being processed and shipped as usual. However, some staff are working from home. If you need to contact HomeSeer for support or customer service, please use our Email or Chat options. https://homeseer.com/contact-us/
See more
See less

Disable logging of a device in a script

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

  • Disable logging of a device in a script

    I would like to turn off device logging when controlled in a script, but wouldn't mind leaving it logging in all other cases.
    I know I can disable logging of a device through the properties of the device itself, but as expected, this is global. I just want it disabled when my script runs

    Is this possible?

    Robert
    HS3PRO 3.0.0.500 as a Fire Daemon service, Windows 2016 Server Std Intel Core i5 PC HTPC Slim SFF 4GB, 120GB SSD drive, WLG800, RFXCom, TI103,NetCam, UltraNetcam3, BLBackup, CurrentCost 3P Rain8Net, MCsSprinker, HSTouch, Ademco Security plugin/AD2USB, JowiHue, various Oregon Scientific temp/humidity sensors, Z-Net, Zsmoke, Aeron Labs micro switches, Amazon Echo Dots, WS+, WD+ ... on and on.

  • #2
    I think you can but I have not tried this. This is from the help manual

    Property NoLog() As Boolean Purpose

    This property allows you to get or set whether logging is to take place on the process this property is set from. If you set this property in a script, then all logging entries from procedures run from the script are stopped. If this property is set from a plug-in, then logging from that plug-in is prevented until NoLog is reset or the plug-in is shut-down and restarted.
    Note: Log entries (e.g. WriteLogDetail) which include a Priority value of 1 (highest) are always written regardless of the NoLog setting.

    Parameters

    Parameter: NoLog
    Type: Boolean
    Description: When set to True, logging for the process thread is turned off. Returns

    Return value: NoLog
    Type: Boolean
    Description: Provides the current NoLog setting for the process the property is retrieved from. Example

    To disable logging for the current process thread (script, plug-in, event):
    hs.NoLog = True

    Comment


    • #3
      Yeah thanks but it didn't work. I'm using capi in this case on an X-10 dimmer.
      HS3PRO 3.0.0.500 as a Fire Daemon service, Windows 2016 Server Std Intel Core i5 PC HTPC Slim SFF 4GB, 120GB SSD drive, WLG800, RFXCom, TI103,NetCam, UltraNetcam3, BLBackup, CurrentCost 3P Rain8Net, MCsSprinker, HSTouch, Ademco Security plugin/AD2USB, JowiHue, various Oregon Scientific temp/humidity sensors, Z-Net, Zsmoke, Aeron Labs micro switches, Amazon Echo Dots, WS+, WD+ ... on and on.

      Comment


      • #4
        Something like this should work:

        Code:
        Sub Main(ByVal Parms As String)
            Dim rDV As Scheduler.Classes.DeviceClass
            Dim DV As Integer = 1234
        
            rDV = hs.GetDeviceByRef(DV)
            rDV.MISC_Set(hs, Enums.dvMISC.NO_LOG)
            'do a bunch of stuff
            rDV.MISC_Clear(hs, Enums.dvMISC.NO_LOG)
        End Sub
        Change 1234 to the reference ID of your device.
        HS 3.0.0.548: 1990 Devices 1172 Events
        Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

        Comment


        • #5
          Al... once again, you're my hero!

          Thanks works perfectly!

          Robert
          HS3PRO 3.0.0.500 as a Fire Daemon service, Windows 2016 Server Std Intel Core i5 PC HTPC Slim SFF 4GB, 120GB SSD drive, WLG800, RFXCom, TI103,NetCam, UltraNetcam3, BLBackup, CurrentCost 3P Rain8Net, MCsSprinker, HSTouch, Ademco Security plugin/AD2USB, JowiHue, various Oregon Scientific temp/humidity sensors, Z-Net, Zsmoke, Aeron Labs micro switches, Amazon Echo Dots, WS+, WD+ ... on and on.

          Comment


          • #6
            Originally posted by langenet View Post

            Thanks works perfectly!
            Great, glad I could help Robert!
            HS 3.0.0.548: 1990 Devices 1172 Events
            Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

            Comment

            Working...
            X