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

**URL:** <https://community.particle.io/t/reliable-approach-to-determine-whether-devices-on-or-offline-resolved/26630>\
**Category:** Troubleshooting\
**Created:** [October 19, 2016, 10:28pm UTC](https://community.particle.io/t/reliable-approach-to-determine-whether-devices-on-or-offline-resolved/26630 "2016-10-19T22:28:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![armor](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/armor/32/18398_2.png) [@armor](https://community.particle.io/u/armor)\
**Post date:** [October 19, 2016, 10:28pm UTC](https://community.particle.io/t/reliable-approach-to-determine-whether-devices-on-or-offline-resolved/26630/1 "2016-10-19T22:28:02Z")

</div>

I am trying to ensure I have a reliable mechanism to determine whether devices are online or offline to a Web Console App. There are a couple of approaches I could use:

1. Particle List Cloud API command
2. Monitor spark/status event messages
3. Have devices all send a regular update event and if no event received within \>2 cycle time then assume device offline

I note there are threads that say 1. and 2. are not 100% reliable and that has been my personal observation.

Does the community have any advice about which method to use?

---

<div class="post-metadata">

**Author:** ![bleduc](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bleduc/32/11677_2.png) [@bleduc](https://community.particle.io/u/bleduc)\
**Post date:** [October 20, 2016, 1:19am UTC](https://community.particle.io/t/reliable-approach-to-determine-whether-devices-on-or-offline-resolved/26630/2 "2016-10-20T01:19:17Z")

</div>

I can second that observation. Currently, the console and command line say that my Electron is online, but I can clearly see it unpowered on my desk right now.

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [October 20, 2016, 5:48am UTC](https://community.particle.io/t/reliable-approach-to-determine-whether-devices-on-or-offline-resolved/26630/3 "2016-10-20T05:48:40Z")

</div>

> [@armor](#):
>
> 1. Have devices all send a regular update event and if no event received within \>2 cycle time then assume device offline

or  
4. Polling, whenever you actively want to know (per device via e.g `Particle.variable()` or for a fleet via an event all devices subscribe to and answer via `Particle.publish()`)

---

<div class="post-metadata">

**Author:** ![armor](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/armor/32/18398_2.png) [@armor](https://community.particle.io/u/armor)\
**Post date:** [October 20, 2016, 9:14am UTC](https://community.particle.io/t/reliable-approach-to-determine-whether-devices-on-or-offline-resolved/26630/4 "2016-10-20T09:14:09Z")

</div>

@ScruffR  
Yes, that’s a good idea. Thanks.

You are a very knowledgable person in the Particle community - do you agree that the methods 1 and 2 are not 100% reliable?

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [October 20, 2016, 9:17am UTC](https://community.particle.io/t/reliable-approach-to-determine-whether-devices-on-or-offline-resolved/26630/5 "2016-10-20T09:17:37Z")

</div>

Yes, this is fact - especially for the Electron that’s an inherent “problem” of the used UDP protocol and the call for minimal data consumption.

---

<div class="post-metadata">

**Author:** ![KyleG](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/kyleg/32/11077_2.png) [@KyleG](https://community.particle.io/u/KyleG)\
**Post date:** [October 21, 2016, 12:36am UTC](https://community.particle.io/t/reliable-approach-to-determine-whether-devices-on-or-offline-resolved/26630/6 "2016-10-21T00:36:40Z")

</div>

Thanks for the great suggestion @ScruffR!
