Guaranteed Delivery from Particle Cloud to Particle Device

Dear All,

I would like to implement the following Publish/Subscribe scenario with guaranteed delivery:

  • Particle Device is Off for 15 mins.
  • While Particle Device is off a message is sent from the Web to the Particle Cloud
  • The message is kept in the cloud until retrieved by the Particle Device as it cannot be delivered (Particle Device is off)
  • After the Particle Device is back On, the Particle Device receives the message/takes the message from the Particle Cloud, reacts appropriately and turns itself off

How can I implement this using the current cloud API?

As what I understand, cloud variables unfortunately are only uni-directional, so I cannot change Cloud Variables through the API and let them read out by the Particle Device (which would solve the above problem)

Thanks, in advance for any suggestions & best regards,

There isn’t a way to do this with the cloud by itself (yet). I know it’s a planned feature, but there is no timeline for it. You may have to roll your own solution with webhooks, though. I know it’s been floating around in the back of my mind. When your device wakes up, it fires a webhook that calls a script on your remote server. The server replies with one of your queue up commands, and your device reacts appropriately. Maybe part of your return payload could be the number of items in the queue so your device knows how many webhooks it needs to call to get all the data.

You could use the “online” SSEs for this, couldn’t you? Have it listen to the event stream for online messages, and queue up calls for those devices which get executed when the event is received.

It looks like another thread popped up today along the same lines as this one. And the response I just posted there may be of interest to you.