Particle-cli announce Electron online but not powered on

image

What is your question? If you want to know why the discrepancy, consider that the cloud can easily detect when a device is powered on. When the device handshakes with the cloud, you can see and event registered in the console. But how would the cloud detect if a device abruptly loses power? After all, the device is no longer communicating to the cloud. In that case, the cloud might report the device still online but the device is indeed powered off. If that was not your question, please state it explicitly.

2 Likes

@ninjatill
Ok it s clear I tough maybe a communication pipe was made between device and cloud .
Maybe I ll do this different , when you did not received an handshake ,consider device is off

Thank you for reply
Br

There is no "pipe" between cloud and device for cellular devices.
In order to reduce data consumption Electrons use connectionless UDP hence there is no way to tell when a connection is lost as that's the default state after all.

2 Likes

Ok but if you don’t receive data from Electron since one minute or anytime, it s look like it is not connected.
I mean what is the period Electron communicate with platform.

Br

So ?

If you device firmware would be sending data every minute, then yes. But have you written your firmware that way?
The device OS does not do that.
If users only want to transmit once per hour, why should the device OS waste precious data on just pinging the cloud every minute for no reason then letting the world - who isn't always interested - know that it's still connected?

It's on demand, not periodic (apart from the Particle.keepAlive() periode for the sake of UDP hole punching, which does only concern the cellular network but not the cloud).

1 Like

Ok let be honest about the Particle platform , It s just a "management platform for , I dont know"
Actually Photon or Electron communicate with my Mqtt platform so I know all data, if it is not reply , it is offline , Keep it simple as simple.
You speak about wasting data when pinging the cloud every minute, but I don’t care if my device ping the cloud, I care about when my cloud do not receive health data from device.

Br

Then you could simply make your own cloud function to ping your device and not rely on the Particle Cloud automatically guessing if your Electron is online.

1 Like

Yep your are right , but I tough this Particle platform was right for my needs, It s really interesting hardware but finally I can manage data from my own platform and I ll manage health ping.
Finally what is the difference with a wifi board and a Particle photon if you manage everything

Br

That might be true for you, but not for most other people who care about their data quota to get mostly used for actual data rather than background communication.

If health data is important for you, you can just Particle.publish() it regularly from the device - that does not require you to have any other service than the Particle cloud.

1 Like

That’s like saying "if you're not talking, you must be asleep". A device can be online without continuously telling the cloud about it. Every time it lets the cloud know it's online, it used up (valuable) data. Depending on your use case, that might not be needed. You can have the device measuring stuff, and only broadcasting when something interesting happens. There's no need for the device to tell the cloud it's online non-stop. If at any given moment you need to know if the device is online, then ping the device from the cloud side. Then you're only using data when it matters and not just to update a status you won't look at.

3 Likes