Particle not publishing online message when the lamp connects to Particle cloud

Whenever particle connects to particle cloud, it publishes an online event and an event describing the cause of last offline event. For example,

I usually see the following events as soon as the particle connects to cloud.

data: {“data”:“online”,“ttl”:60,“published_at”:“2017-09-19T23:24:01.600Z”,“coreid”:“420047001851353530333533”}
data: {“data”:“power_down”,“ttl”:60,“published_at”:“2017-09-19T23:24:01.748Z”,“coreid”:“420047001851353530333533”}

But sometimes I see that the online event is not getting published. What can cause this? I can confirm that Particle code is not stuck as I can signal it’s onboard LED.


Hi @dheerajdake,

Although the Particle cloud publishes the online / offline messages when your device starts a new session or ends a session cleanly, sometimes those events don’t always appear when you might expect, and behave slightly differently on the electron versus the photon / p1, etc.

I would recommend publishing your own event after connecting that you can track and adjust as needed. That way you have more control over the event, and you can set the criteria around when it’s published.



Thank you @Dave