FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We will start the migration process in one hour.
The community will be then in READ ONLY mode.
Read more: Important
information on the platform change.
07-22-2024 03:21 PM
Hello,
Is it possible to make the flow and globals persistent variables in a NodeRed program (keep value on reboot)?
I have seen some tutorial in the NodeRed documentation, with context variables but it forces to modify the settings.js file which is not in the NodeRed directory.
Working with context : Node-RED (nodered.org)
Any ideas?
Thanks.
Solved! Go to Solution.
07-22-2024 04:19 PM
Hello,
Local file system storage is enabled on the ctrlx Node-RED distribution. Every 60s the Node-RED file context is saved to the Node-RED app data /context directory.
contextStorage: {
default: 'memoryOnly',
memoryOnly: {
module: 'memory'
},
file: {
module: 'localfilesystem',
cache: true,
flushInterval: 60
}
},
You can write values using the change node. Example below.