# Did the spark/status offline event timing change?

**URL:** <https://community.particle.io/t/did-the-spark-status-offline-event-timing-change/63324>\
**Category:** Cloud\
**Tags:** photon\
**Created:** [October 13, 2022, 3:23pm UTC](https://community.particle.io/t/did-the-spark-status-offline-event-timing-change/63324 "2022-10-13T15:23:40Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![boddeke](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/boddeke/32/28034_2.png) [@boddeke](https://community.particle.io/u/boddeke)\
**Post date:** [October 13, 2022, 3:23pm UTC](https://community.particle.io/t/did-the-spark-status-offline-event-timing-change/63324/1 "2022-10-13T15:23:40Z")

</div>

hello,

we are using the spark/status offline event to know when a device goes offline

this used to sent a couple minutes after the device (with p1) actually goes offline which is fine

but recently we noticed it takes way longer (like next day or so)

did something on the particle side change?

thanks  
frank

---

<div class="post-metadata">

**Author:** ![Colleen](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/colleen/32/26785_2.png) [@Colleen](https://community.particle.io/u/Colleen)\
**Post date:** [October 14, 2022, 9:48pm UTC](https://community.particle.io/t/did-the-spark-status-offline-event-timing-change/63324/2 "2022-10-14T21:48:54Z")

</div>

Hi Frank-  
That sounds like a frustrating issue. Has anything else changed with the device you’re using? How’s your wifi signal? Have you had this issue with multiple devices or just one?

Thanks,  
Colleen

---

<div class="post-metadata">

**Author:** ![boddeke](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/boddeke/32/28034_2.png) [@boddeke](https://community.particle.io/u/boddeke)\
**Post date:** [October 16, 2022, 11:01am UTC](https://community.particle.io/t/did-the-spark-status-offline-event-timing-change/63324/3 "2022-10-16T11:01:57Z")

</div>

hi colleen

we did change around the device os version as we are preparing p1 end-of-life (going back to 2.1 because of the green-led problem)

we have seen this with multiple devices. wifi cannot be a problem? it is the particle cloud that should detect the device not being online - that does not seem to work anymore?

thanks  
frank

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [October 16, 2022, 11:56am UTC](https://community.particle.io/t/did-the-spark-status-offline-event-timing-change/63324/4 "2022-10-16T11:56:44Z")

</div>

It will take longer for the P2 to detect it’s offline, two times the UDP keep-alive value, which should 25 seconds, so around one minute. It should not take a day.

The P1 uses TCP transport, which has a 10 second ping interval. So that should detect offline faster,

If the P2 device went offline gracefully the interval will be shorter. If it was just unplugged or the Internet went away, it should still be around one minute.

---

<div class="post-metadata">

**Author:** ![boddeke](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/boddeke/32/28034_2.png) [@boddeke](https://community.particle.io/u/boddeke)\
**Post date:** [October 16, 2022, 12:24pm UTC](https://community.particle.io/t/did-the-spark-status-offline-event-timing-change/63324/5 "2022-10-16T12:24:23Z")

</div>

i am talking about p1 and it does take very long. it did not use to take this long - did something change on the particle cloud side?

we were relying on the spark offline event but now have to do it ourselves

i did check the console and do not see the offline event (tested with at least 2 devices)

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [October 16, 2022, 1:11pm UTC](https://community.particle.io/t/did-the-spark-status-offline-event-timing-change/63324/6 "2022-10-16T13:11:43Z")

</div>

Oh, sorry, I confused two different posts.

I was able to reproduce the problem you are seeing with the P1/Photon. I sort of know why it’s happening, but I’m not positive it was intentional. Some more investigation will be required, but if you have a workaround, that’s probably the best solution for now.

---

<div class="post-metadata">

**Author:** ![boddeke](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/boddeke/32/28034_2.png) [@boddeke](https://community.particle.io/u/boddeke)\
**Post date:** [October 16, 2022, 1:39pm UTC](https://community.particle.io/t/did-the-spark-status-offline-event-timing-change/63324/7 "2022-10-16T13:39:56Z")

</div>

thanks rickkas7

we are always anxious if things stop working: can you tell us why this is happening?

thanks  
frank

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [October 16, 2022, 2:14pm UTC](https://community.particle.io/t/did-the-spark-status-offline-event-timing-change/63324/8 "2022-10-16T14:14:53Z")

</div>

There was case where if a TCP device (Photon/P1) was moved to a different server, the old server would emit an offline event even though the device is still online, but on a different server; this was fixed. When I unplug a TCP device now, the cloud is detecting that the device disconnected, but not sending the offline, which I can see from the internal cloud logs from my test device. This seems wrong if the device is actually offline, but I’m not a cloud engineer, which is why more investigation is required.

---

<div class="post-metadata">

**Author:** ![lanceseidman](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/lanceseidman/32/26439_2.png) [@lanceseidman](https://community.particle.io/u/lanceseidman)\
**Post date:** [October 17, 2022, 6:23pm UTC](https://community.particle.io/t/did-the-spark-status-offline-event-timing-change/63324/9 "2022-10-17T18:23:36Z")

</div>

Hi Frank,

Can you message me a Device ID you’re using?

---

<div class="post-metadata">

**Author:** ![boddeke](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/boddeke/32/28034_2.png) [@boddeke](https://community.particle.io/u/boddeke)\
**Post date:** [October 17, 2022, 7:49pm UTC](https://community.particle.io/t/did-the-spark-status-offline-event-timing-change/63324/10 "2022-10-17T19:49:58Z")

</div>

this is my test device (p1): 3c0032000747393035313137  
it is offline now

---

<div class="post-metadata">

**Author:** ![boddeke](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/boddeke/32/28034_2.png) [@boddeke](https://community.particle.io/u/boddeke)\
**Post date:** [October 19, 2022, 4:31pm UTC](https://community.particle.io/t/did-the-spark-status-offline-event-timing-change/63324/11 "2022-10-19T16:31:01Z")

</div>

@[lanceseidman](https://community.particle.io/u/lanceseidman): assuming you can see some kind of logging: you want me to get this device online for a specific time and duration?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/3/2/3291e3c9351789fe8620ae5bcec8d3fec67ff221.png) [@system](https://community.particle.io/u/system)\
**Post date:** [April 20, 2023, 4:31am UTC](https://community.particle.io/t/did-the-spark-status-offline-event-timing-change/63324/12 "2023-04-20T04:31:36Z")

</div>

Closed on April 20, 2023, 4:31am UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
