two variables that I enter in a form on the dashboard, should retain their values even after restarting node-red. It's not working in my project, so I will show you what I have done and hope you can give me a solution. Node-Red is running on a raspberry.
I have change the settings.js context storage property to:
I have write a function to store the values in a global array using global.set:
// after click on submit button the function get executed
// msg.payload = contain values written by user in form
ip_api=[ ]; // global array to store ip address and api-key provided by user
ip_api=msg.payload["easyE4 IP-Adresse"];//storing the ip address in global array.
ip_api=msg.payload["easyE4 API-Schlüssel"];//storing the API-Key in global array.
global.set("ip",ip_api); // method to set global varible/array
global.set("api",ip_api); // method to set global varible/array
msg.payload = ip_api;
Everything is working fine in my project, but after restart of the raspberry I have to enter values again.
What have I done wrong?
I hope, I can get a little support from the community.