How can I ensure that my device always gets a param update even if it is offline when I trigger it?
If your use case requires updating parameters even when the device is offline, you have two options:
1. Enable CONFIG_ESP_RMAKER_MQTT_PERSISTENT_SESSION – The node will receive any messages it missed if it reconnects within 1 hour. This 1-hour window is defined by AWS IoT and cannot be changed. Note that only messages sent before the device was marked offline (as per the keep-alive logic) will be delivered—messages sent after that are discarded by the backend. This can have unexpected consequences: the device may receive on/off or other operations at odd times if it had disconnected when those operations were triggered.
2. Use param updates via Command-Response – Added in v1.7.3 of the esp_rainmaker component. This lets you use regular set-params for day-to-day operations and Command-Response for scenes and schedules. Command-Response supports a timeout of up to 30 days, or -1 so that commands never time out. For details, see Command-Response Usage.