I recently got the new mesh devices and have been upgrading my code base for one of my projects to take advantage of them. One thing I noticed is that once a mesh device successfully connects to the cloud, it’s status will be “connected” forever. I have one device (Argon) that has been powered off and disconnected for over a week, and the device status shows connected. Similar results for the Boron and Xenon devices (though, less time). The older photon devices that I have did update to show they were offline after an amount of time (half hour?), which was acceptable for my use case.
Pretty much, I have a program that dips down to call functions on the devices at various times of day. I first check to see if they are connected, and if they are, I then make the call. If the cloud shows it is online, but the device is not, it can take > 15 seconds for the call, which really lags the workflow of the server-side app.
The online indicator for mesh devices (and also cellular devices like the Electron and E series) always will show online. Basically, they’ll never go offline.
The online indication made sense for the Photon/P1/Core that has an always open TCP connection, since there was a pretty good indication of whether it is connected or not.
Since the Boron in particular only communicates with the cloud every 23 minutes, it’s impossible to know whether it’s online or not in that period. Since it’s not all that useful, it’s just never updated.
In order to eliminate the delay for calling functions or variables, you could periodically publish from the device and subscribe to the SSE event screen from your server.
Any chance of updating the API so that it still updates if it hasn’t been heard from in 30 minutes or an hour? That would still be useful for those of us looking to see if a device has been offline for an extended period of time.
Failing that, any chance of updating the documentation to reflect what is occurring in the real world? Right now, the docs say that the status should reflect if the device is connected to the cloud – but does not make the exception that this is only for the P1/Photon/Core devices, and should be ignored for all others.
Sure, the documentation can be updated to indicate that. It’s possible that in the future the online status could be made more accurate (at least to the keep-alive interval) but this would be a long-term project, not a quick fix as the change isn’t as trivial as it seems.