Sleep after publish, updates?

@RainerR

I’d rather have a deterministic solution

In my experience using cellular data comms isn't deterministic, WiFi is somewhat deterministic and ethernet pretty much deterministic.

I do a lot of publishes just before calling sleep on battery powered devices and don't have this problem with WiFi or Ethernet comms.

Aware of what the docs say..but have you tried waiting for; bool success = Particle.publish("Before Sleep", mainPayload, WITH_ACK);

I use a send buffer, initial one I created myself and more recently the library from Rick - publishQueueAsyncRK GitHub - rickkas7/PublishQueueAsyncRK: A library for asynchronous Particle.publish This appears to work reliably and then you could simply check that the send queue was empty before calling sleep.

2 Likes