No announcement yet.

VB.Net Immediate Script Generates Log Entry

  • Filter
  • Time
  • Show
Clear All
new posts

    VB.Net Immediate Script Generates Log Entry

    I have recently discovered that using a VB.Net "immediate" script(&nhs.xxxxxx) in an Event that has been set to "Not Log" still generates a log entry when the script runs. A VB script(&hs.xxxx) does not.
    Can others confirm this unusual behavior???

    ExampleThe second entry is the result of the script(&nhs.WriteLog (xxx, xxx, xxx)

    Jun-30 10:28:34 AM On-Off Delay OnDelay= 0 OffDelay= 0
    Jun-30 10:28:34 AM
    Info Running immediate script: C:\HomeSeer HS3\Temp\K1.vb

    Yep - been that way for a LONG time.
    HS4Pro Running on a Raspberry Pi4
    68 Z-Wave Nodes, 175 Events, 359 Devices
    UPB modules via OMNI plugin/panel
    Plugins: Z-Wave, OMNI, HSTouch, weatherXML, EasyTrigger
    HSTouch Clients: 3 Android, 1 Joggler


      So should we be using &hs or &nhs then?

      HS3PRO 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.


        Originally posted by langenet View Post
        So should we be using &hs or &nhs then?

        nhs is executed as whereas hs is executed as VBScript, I don't think there is guidance over what should be used and both are I would imagine going to be in HS for some time so I would say you can carry on but if something does not work with hs then try nhs.


          I see this problem whether it is &hs. or &nhs. The log I see is:

          Jul-05 5:14:14 PM Info Running immediate script: /tmp/K2.vb

          The event is below. So is there a way to stop these logs? Any help is appreciated. Thanks.


          Edit: FWIW, when I disable logging completely in Setup, it does not write the same logs when the event runs.

          Click image for larger version

Name:	Immediate script event.png
Views:	1
Size:	45.2 KB
ID:	1186179


            Copy the contents of your /tmp/K2.vb and place this in a script file and then run the script as your Then action vice the immediate script. I needed up doing that because of countdown timers that started out as immediate scripts and clutter up the logs every second when running.