Web IDE Devices section, showing Device in Safe Mode


#1

I have 3 Photons currently, in

SYSTEM_MODE(MANUAL);

These Photons are on and working as expected. However, one of them is showing up in the Web IDE in the Devices page with a breathing magenta icon (instead of the regular cyan) and it says “Device in Safe Mode”. So I have 3 questions

  1. How does the Web IDE know? I mean Wi-Fi and cloud connectivity are turned off
  2. Of the 3 devices, why does only one of them show up in the Web IDE Devices section in this mode?
  3. Why is it showing the device is in “Safe Mode” when in fact it’s on and working just fine?

#2
  1. It doesn’t know, it assumes from the last time it saw the device and didn’t have any message otherwise
    same for 2 & 3.

You can try CLEAR CACHE in Build, if this cure the wrong info.
Also check with

particle list

if this is a cloud or only Build “issue”

Also look at
https://api.particle.io/v1/devices/<yourDeviceID>?access_token=<yourAccessToke>
what the last status of the device was when the cloud saw it last.


#3

Doing a

particle list

Shows different results. The 3 Photons are not showing online, but my Electron is showing online. The Electron has been offline for about 5 hours now. On the Web IDE side, I’ve tried clearing the cache, refreshing the browser as well as clicking the refresh icon that’s available on the Devices page. It’s been showing the one Photon as online now (cyan) for hours.

Does definitely look like a caching issue. But not only a caching issue on the browser side. Using a different browser does show the correct status.

The API shows the same result as the CLI does.

@ScruffR, thanks for your reply. I learnt about the API and the particle list command. The API has a bunch of other information (and various endpoints) I could use to build my own dashboard of sorts. If only it provided more accurate and complete information.


#4

If the browser is Chrome, try incognito mode. Chrome really, really tries to cache stuff and is often wrong in my experience.


#5

I typically use Edge.

However, I do think the Cloud side is either caching or not updating frequently enough or both, since using the API or CLI is also not showing correct information If a device does not “ping” for 5 hours, I’d expect it to show offline.


#6

Hi @shiv

Since the Electron uses connectionless UDP to talk to the Cloud, the Cloud doesn’t really know if the device is online or not, so you cannot depend on that status for Electrons.


#7

I understand UDP vs TCP, that’s not the issue. If a device has not pinged “home” for a while, should we assume it is online or offline? There is a last_heard datetime that is being logged.


#8

The online/offline indication tells you (exactly) that there is an open TCP socket to that Photon/Core. There is no such thing for Electrons. I do not believe that the last heard field is being updated for electrons but I am not sure if that is by design or is a bug.


#9

Last heard is the better choice for Electrons, but Particle is aware of the problem and is on the search for a more reliable way.
But for that reason (wrong positives) the online indicator has been removed from Build for Electrons
Particle Tools Changelog