Does RPC Function Work for Queuing Commands When Device is Offline?

Hello,

I have a device that sends data once a day and I would like to send it commands when it’s offline. My main question is whether the RPC (Remote Procedure Call) function supports queuing commands when the device is offline. Specifically, I would like the device to execute the queued commands once it wakes up and connects to the network.

Has anyone successfully used RPC for this purpose, or is there a recommended approach to handle this scenario where commands need to be sent to an offline device and executed upon wakeup and connection?

For reference, I’m using the Golioth platform, and I’ve reviewed the RPC documentation, but I’m not sure if queuing commands is supported or how it behaves when the device is offline.

Any insights or suggestions would be greatly appreciated!

Thanks in advance!

Hey @sebastian,

RPCs are synchronous commands that are executed in real time only when the device is online and available. RPC does not support queuing commands for offline devices—if the device is not connected when the RPC is sent, the command is effectively lost.

Depending on what you aim to achieve with the RPC command, you can consider using the Settings Service or LightDB State Service, which are designed for asynchronous communication between devices and the cloud.

thank you Marko,

did the workround with settings!

I completely agree!

While testing the RPC functionality, I realized that the device needs to be online at the exact moment I trigger the method. This meant repeatedly pressing “Call Method” and hoping to catch my sleepy device at the right time.

It would be a fantastic feature if RPCs could be queued in the cloud and automatically pushed to the device when it comes online next.

Particle IoT introduced a similar concept last year with Ledgers, which allows commands and configurations to be stored in the cloud and delivered during the device’s next connection cycle.

Is there any chance we could see something like this in a future release? It would make remote device management much smoother! :slight_smile: