Cloud API "connected" status error

I am polling my Electrons to see if they are online. The “connected” field does not report correctly. I have some devices that have been offline for over 10 days, are not in a cellular session but are still showing “connected = true”. I am using a 3rd party SIM, not sure if that is the issue or not. The “last_heard” seems okay.

The Cloud API documentation states that connected “Indicates whether the device is currently connected to the cloud”.

Am I misunderstanding the usage of connected? Or is it broken?

This has been asked rather often already

1 Like

Sorry I missed that. Thank you for the link.

Does the last_heard update on any communication received from the Electron?

If I set Particle.keepAlive(120) will that guarantee the last_heard will update at least every 120seconds?

Since so many people have stumbled over this already, Particle is thinking up a more reliable way to get an on-/offline indicator, but currently IIRC last_heard refers to the last cloud handshake and not each and every conntact.