Hi everyone,
I've been trying to figure out how to do this for free (not a premium customer, not planning on becoming one).
Old technique (Particle OS v0.6.1)
I used to just have all my devices subscribed to a private "fleetReset" event that I would manually publish to my product's event stream using particle API, and that would cause every device in my fleet to reset at the same time. After reset, they would connect to the cloud again and at this point they would receive a firmware update. So I would "release" firmware to my fleet, and then cause all connected devices to reset simultaneously, which would result in coordinated fleet-wide firmware update to all my devices. Any device not connected at the time of the "fleetReset" publish would simply automatically receive firmware update next time it connected due to cloud handshake.
This technique does not work anymore (Particle OS v1.0.1)
When I try this technique now that I have upgraded all my fleet from 0.6.1 to 1.0.1, I am dismayed to find that a device reset does not result in a cloud handshake (now, the session is preserved across resets, so no handshake on reset, thus no firmware update).
Calling Particle.disconnect()/connect() does not force handshake (Particle OS v1.0.1)
In a post in this thread (above), @ScruffR said:
You can just Particle.disconnect()
, wait a few seconds and Particle.connect()
again.
I had the idea of refactoring my "fleetReset" logic to a "fleetHandshake" logic, based on the idea that if I call Particle.disconnect()
, wait a minute, and then call Particle.connect()
, the Electron should be forced to handshake with the Particle cloud on reconnect.
This is not the case. The new product default firmware does not get downloaded by using this technique, because this technique does not force a handshake with the cloud.
How to immediately flash to all my devices for FREE
It appears that the only option for forcing a firmware update to the fleet that is free is:
- Use the Particle API to loop through each device in the fleet and send an API request to flash new firmware to each device
@jeiden is my understanding correct?