Reliable approach to determine whether devices on or offline [Resolved]

Thanks for the great suggestion @ScruffR!