Hi all, in one of the recent v2.90 betas we changed the setup of config files a bit. Goal of that change is to be better prepared for any future requirements
In this post I’m explaining how it now works, which is in v2.90 official release and onwards.
Warning: the vast majority of systems using (the amazing power of-) Node-RED will not and (should not !!) have to modify anything described here. Venus OS itself, including Venus OS large and Node-RED, is made such that its not necessary to dive into the command line.
Anyone that does go in and change them needs to be prepared for things going wrong, for example after a firmware update. The information here provided is for the benefit of the handful of users that do need (or want) to change them; and to put it bluntly: know what they are doing and are prepared to spent hours and hours fixing issues without getting any help.
On startup of Node-RED on Venus reads three settings files:
1. /usr/lib/node_modules/node-red/venus-settings.js is read first. Never change this file as it will be overwritten by a Venus OS update.
2. /data/home/nodered/.node-red/settings-venus.js is used to override and/or extend the first file and will survive Venus OS updates. Do not edit this file as this is for Victron to use.
3. /data/home/nodered/.node-red/settings-user.js is used to override and/or extend the second file and will survive Venus OS updates. You are allowed to edit this file if you please, but don't be too surprised if that causes Node-RED to break after an upgrade.
There are more configuration files in /data/home/nodered/.node-red/. You might not have all of them on your system or even some more if you installed one or more of our candidate releases.
- flows.json - This is the flowFile, which is used to store your flows. You can also export this file from the Node-RED menu.
- flows_cred.json - If your flows contain credentials/login information, these get stored in this file.
- .config.* - These files are for Node-RED to store its settings.
For more information on configuring Node-RED, you might want to take a look at https://nodered.org/docs/user-guide/runtime/configuration.
Above information will be added to the Venus OS large manual. In case of any things or issues, perhaps you can then help each other here.
Have a good weekend, and fingers crossed for v2.90 official release in coming week! Matthijs