One way: system.device.listDevices()
Another path:
[System]Gateway/Devices/DeviceName/Status
Third way (and best, IMO): use a heartbeat.