Photon shows offline, but its really online and running fine

@steelydev @Brian

we are working hard on this issue as it came in in the IOS and android apps as well. Devices would appear online as it sat in front of the customer but on the app it showed offline.

very similar to the readouts you are getting. Our primary cloud engineer is and already has been looking into this.

Please stay patient as we try to debug this issue.

-Corey

I’m sure it works, but who knows it seems random when these cores report offline but are online.

Are you talking about a core or photon?

Any updates on this issue? I’m experiencing the identical symptoms with a Photon (0.4.5) where the device shows offline with the app, but is indeed online and operating just fine, periodically POSTing to a database.

have you tried logging out of the app, closing it out, and logging back in? Basically clearing the app’s cached memory.

-Corey

Thanks @corey, that seems to have taken care of it. (Only curious thing is that my Photon is now being indicated as a Core on the app, but that appears to be an issue for this thread).

Thanks again.

@ido any reason this has been happening? I’ve seen this issue more than a dozen times in the last couple of weeks?

I am still experiencing this issue, How does the particle cloud know a photon is online? I assume there is some ping going between the photon and the particle cloud.

If I call a function to a photon that is showing offline, and it works shouldn’t that update the particle cloud that the photon is online ?

My post here is related to this thread. It explains our experience with the same bug.

Just saw this issue again today on a Photon running 4.7.

Hitting the /devices endpoint on the API I get:

...other devices},
{
    "id": "380XXXXXXXXXXXXXXXXX738",
    "name": "office_neo_ph_013",
    "last_app": null,
    "last_ip_address": "70.81.163.236",
    "last_heard": "2015-12-21T23:06:26.382Z",
    "product_id": 6,
    "connected": false,
    "status": "normal"
  },
{ other devices...

But hitting /devices/380XXXXXXXXXXXXXXXXX738 I get

{
  "id": "380XXXXXXXXXXXXXXXXX738",
  "name": "office_neo_ph_013",
  "connected": true,
  "variables": {
    "version": "string",
    "system": "string",
    "starttime": "string",
    "localtime": "string",
    "schedulelist": "string",
    "lastsync": "string",
    "boxorder": "int32",
    "boxtotal": "int32",
    "rssi": "int32",
    "ssid": "string"
  },
  "functions": [
    "transmit",
    "setschedule",
    "setvariable"
  ],
  "cc3000_patch_version": "wl0: Nov  7 2014 16:03:45 version 5.90.230.12 FWID 01-4310973",
  "product_id": 6,
  "last_heard": "2015-12-22T16:46:07.260Z",
  "status": "normal"
}

And both function calls and variables reads are working fine. I assumes the /devices endpoint keeps track of device status via online/offline events (and missed one?), while the device/DEVICE_ID endpoint hit the device directly…
Thoughts?

1 Like

Mine is doing this. Any update on this bug and how to move past it?

Also seeing this happen for several of my Photons.

Oh, I totally just created another topic with the same symptom. Oops. It’s at “devices” API is ill-informed on connected status

This remains a significant problem for us, and appears to have gotten worse with 4.9.

1 Like

This is a good question for @Dave

I assume there is some sort of caching going on between the …/devices end-point and the /devices/<> end-point.

1 Like

Hi All,

Thanks for reporting this, I wasn’t aware this was an ongoing issue, I’ll look into this. If you could send me firmware or details on reproducing this issue (listing all devices vs. get device attributes, etc), that would help.

Thanks,
David

2 Likes

Dave -

It doesn’t appear to be user code related. We have about 20 Photons regularly connected in the field, and 10 or so more in various test devices. We’ve seen this happen regardless of the user code they’re running. I believe I’ve even seen it with Tinker.

I’ve been logging the event stream. Several of our devices publish a lot of online/offline events, probably due to local network connectivity issues. The connection status discrepancy seems to occur more frequently in situations where the devices have been losing their cloud connection. I’ll be able to confirm that with data in a few days.

1 Like

I have seen this a lot, and have usually cycled the power of the photon to resolve. However, this time, I let it run, and to my surprise it has appeared back online. I saw the comments on shutting down the app etc. I’m pretty sure I tried that in the past and it didn’t work.
I’m using Android BTW.

I’ve had this issue happen to me sporadically, but it seems to happen more often where spotty WiFi coverage is an issue. To get around the problem of seeing Photons lose their “visible” status in the Dashboard and/or CLI, I’ve recently added a small routine to be processed one time per loop execution. Try adding a small timeout function that would poll the return value of Particle.Connected() like so:

if (Particle.connected == false){
WiFi.off();
delay (100);
WiFi.on();
delay (100);
WiFi.connect();
delay (100);
Particle.connect();
delay (10000);
}

While running SYSTEM_THREAD(ENABLED) should keep your Photon online all the time, I don’t think the back end that Particle servers run to check if Photons are alive is quite robust enough to rely solely upon SYSTEM_THREAD(ENABLED). That’s at least been my experience. Please correct me if I’m wrong, Elites.
~thomas

I’m getting this exact issue with 2 out of my 3 photons running 0.6.1 firmware. I’ve tried resetting them, removing and reconnecting to wifi, restarting the ios app… Nothing works. One is an internetbutton and it’s always connected, but just suddenly went offline, along with another one that I had been recently pushing new code to. Now I can’t get either of them to show online again, even though they’re LED is breathing cyan, and everything else appears to be working fine. But I can’t flash new code to them which is the real problem. Please help if there’s a fix for this! Thanks,
Jeremy