That is correct. I can modify the script so that it only changes with a device status change.
Alternatively you could trigger an event when the script detects a device status change for away. With this event, add an action to set a delay for 3 minutes. Then a second action to run the following vb.net script which calculates how long the device has been down in minutes:
You would need to set the device1data to the respective device number you want to monitor and set the 'your event' to the actual event you want to trigger when away.
Alternatively you could trigger an event when the script detects a device status change for away. With this event, add an action to set a delay for 3 minutes. Then a second action to run the following vb.net script which calculates how long the device has been down in minutes:
PHP Code:
Sub Main(ByVal Parm As Object)
Dim PingLastdowntime As DateTime = hs.GetIniSetting("Device1Data","PingLastdowntime","","Jon00RCCNM.ini")
Dim Result As String = DateDiff(DateInterval.minute, PingLastDowntime,now()).ToString
If Result => 3 then hs.triggerevent("your event")
End sub
Comment