I am using PI System Explorer Analysis Templates to notify whether a device is online or offline and also when it entered either state.
I have two expressions that help me format the uptime for a device:
timeCameOnline is the equation that checks if it is online, if so then we output the timestamp that shows since when it went online:
I also want to notify when the device goes offline, see timeCameOffline. Very similar to how timeCameOnline is setup
Everything works as expected:
However, I am uncertain whether timeCameOffline would work in the event of a device going offline. It works for online since this is currently true, but I don't have a way to check for the second case.
The big question is whether the offline condition will actually take effect when it is true. Whether the device goes back online almost instantly, I am still interested of timestamping the event and record it.
Is this setup correctly?
How can we check for these conditions without having to make one of the devices go OFFLINE?