Push new code while device is prevented from publishing

We’ve on occassion had edge conditions where some code would result in enough publishes per second to get the device booted off the Particle Cloud.

I’m wondering, if there is a work around - or possibly a feature request… where:

We could push new code to a Particle device, while still having the Cloud block the excessive publish events?

Normally muting Particle.publish() should not result in loss of cloud connection.

If things haven’t changed considerably since I last looked at the code a - few months ago - Particle.publish() checks how many events were published in the last four seconds and if it’s equal (or greater) four the event won’t even be tried to publish, but is considered as if it was for the muting logic.

So in that scheme there is no reason for the connection ever to get lost due to excessive publishing attempts.

Actually the muting is done in Device OS and not by the cloud. This should prevent the cloud from ever being bothered by an overly chatty device.

1 Like

What ScruffR said. However, for safely I like to have a function that takes various options, one of which is to go into safe mode. This is handy if my firmware is acting badly and preventing remote flashing. Sometimes you can still get a function call in, and once in safe mode you can flash more easily.

2 Likes