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.