Photon breathes cyan but is offline

Following our test-fleet of Photons through their boot-cycles on the Dashboard, I’ve noticed the following issue:

Occasionally, the device comes online (publishes Device Online), then immediately publishes Device Offline, but continues to “breath cyan”. It appears as offline on Build, and through the CLI command particle list, however, I can still flash the device and call functions/variables.

Investigating further, I noticed that if I hit the Cloud at /devices the device will be listed with {connected:false}, but if I check the Cloud at devices/ITS_DEVICE_ID it will tell me it is connected.

So it seems like whatever is keeping track of the Photons’ online/offline state is getting messed up because of a faulty Device Offline publish.

Another annoying bug, is that the response JSON from devices/ITS_DEVICE_ID only contains the field last_heard when the device is connected, which is annoying for obvious reasons… :stuck_out_tongue: