Node-RED Projects & Config Node Issues?

I have a situation where I want to share/use the exact same flow across multiple devices... so naturally, using projects and then cloning to each device seems pretty straight forward.

The issue I run into is that each device has it's own config node settings for nodes like node-red-contrib-modbus and node-red-contrib-smb thus it is seemingly impossible to keep the GitHub repository in sync across all of the devices because when you select the correct config and save the flow there are changes to push to the project. And of course when you clone the project to a new device you have to remember to select the correct config setting in each related node.

Is there an obvious solution to this that I am not understanding or is it just a situation where it is what it is?

I wonder whether projects is the best approach here? Would it not be simpler and better to turn off projects and have the full userDir under git instead? You could easily adjust the .gitignore file to exclude temporary and transient files along with the node_modules sub-folder.

You could also exclude the normal flow and cred files and instead use scripts to control copies of them so that you only take a copy when they have really changed in a way that you want to sync.

You could possibly put the credentials in environment variables, so they are not contained in the flow files at all. You do have the issue of protecting those from prying eyes though.

Is there a way to pass in config node settings that I am unaware of?

I don't know if you are aware or not. Environment variables can be used in node properties. Using environment variables : Node-RED

1 Like

@Colin thanks for pointing me to this... I didn't realize the ${ENV_VAR} could be used anywhere... this solves my problem :slight_smile:

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