# How to recall the latest parameter values after restarting the computer?

**URL:** <https://discourse.nodered.org/t/how-to-recall-the-latest-parameter-values-after-restarting-the-computer/65209>\
**Category:** General\
**Created:** [17 July 2022 11:35 UTC](https://discourse.nodered.org/t/how-to-recall-the-latest-parameter-values-after-restarting-the-computer/65209 "2022-07-17T11:35:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AK51](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ak51/32/8438_2.png) [@AK51](https://discourse.nodered.org/u/AK51)\
**Post date:** [17 July 2022 11:35 UTC](https://discourse.nodered.org/t/how-to-recall-the-latest-parameter-values-after-restarting-the-computer/65209/1 "2022-07-17T11:35:27Z")

</div>

Hi,  
I have a flow with many setting inside. (i.e. scroll bar, data from MQTT...) Right now, I wrote a button to save all these parameter in my json file and once the computer is restarted, the function in the flow reads back the parameter from the json file.  
Is there a better way to do it?  
Thx

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [17 July 2022 11:47 UTC](https://discourse.nodered.org/t/how-to-recall-the-latest-parameter-values-after-restarting-the-computer/65209/2 "2022-07-17T11:47:41Z")

</div>

As you are using mqtt, you could have them stored by retained subscription. When a payload is retained mqtt will republish to the device, when a device reconnect to the mqtt server., i.e. at restart/reboot.

---

<div class="post-metadata">

**Author:** ![AK51](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ak51/32/8438_2.png) [@AK51](https://discourse.nodered.org/u/AK51)\
**Post date:** [17 July 2022 11:52 UTC](https://discourse.nodered.org/t/how-to-recall-the-latest-parameter-values-after-restarting-the-computer/65209/3 "2022-07-17T11:52:41Z")

</div>

Oh yes, MQTT has retain option. :\>  
Thx E1cid

---

<div class="post-metadata">

**Author:** ![chrisn-au](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/chrisn-au/32/25504_2.png) [@chrisn-au](https://discourse.nodered.org/u/chrisn-au)\
**Post date:** [17 July 2022 22:48 UTC](https://discourse.nodered.org/t/how-to-recall-the-latest-parameter-values-after-restarting-the-computer/65209/4 "2022-07-17T22:48:36Z")

</div>

If it is essential to save context data, you could save important data to context variables and have NR persist it to disk for you. On the restart, it will be available.

[https://nodered.org/docs/api/context/store/localfilesystem#options](https://nodered.org/docs/api/context/store/localfilesystem#options)

Should be a pretty simple implementation

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [15 September 2022 22:49 UTC](https://discourse.nodered.org/t/how-to-recall-the-latest-parameter-values-after-restarting-the-computer/65209/5 "2022-09-15T22:49:02Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
