Hi all
Has anyone one had a problem like this.
Node red been runni g on my rpi3 for few months no problem.
I had download about ten other nodes and i have two flows funning.
For some reason i lost conection to node red but the rpi3 Nd openhab still running.
I restarted the rpi3 as nodered setup to start on boot but it did not.
I had to start nodered from terminal. When it started i my nodes i had downloadex had gone and no flows were showing.
Any ideas as at the moment this is a test shstem but i want this to control a!l my home automtion.
I had a similar problem with my databank, there was the problem, that it was stored in volatile memory, but normally node Red is stored at the sd Card and also all the flows are…
But maybe you can check where your flows are stored…
@Andyk5 there are some limits to brand new users that go away after 24 hours - to discourage spam bots from flooding the forum.
But you have used up some of your replies by replying saying you can’t reply…
You can go back and edit your previous posts to provide more details.
One thing to be aware of is that Node-RED uses the hostname to generate the flow file name. If you changed your Pi’s hostname then it wouldn’t find your flow file anymore.
The flow files is stored in ~/.node-red/ and is called flows_<hostname>.json . Have a look in that directory for any JSON files with content.
Don't know, if you have ever solved this, but for others coming here for the same problem, I have just encountered the same issue.
Node-red running for months, and all of the sudden, the flows are gone.
Looking at the logs and configs, it quickly turned out I renamed my raspberry pi's hostname some weeks ago, and now Node-Red by opens a different default flow file (since the flow-file includes the hostname).
After renaming my existing flow-file in ~/.node-red to match my new hostname, everything was there again.
I just encountered the same problem. Node-Red running fine for months and all flows gone all of a sudden.
A look in the ~/.node-red folder revealed that there is a new flow-file called "flow_hostname_cred" which is the empty one.
I switched Node-Red to HTTPS with LetsEncrypt a few weeks/months ago and it seems node-red decided to create a new Flow-File because of that - at least that's what the suffix "cred" is suggesting.
Not quite. The _cred file is your flow credentials file. It is a companion file to your actual flows file that has the matching name without the _cred part.
As you'll have noted, the flow file includes the hostname by default. Have you changed hostname whilst setting up letsEncrypt?
When NR starts, it logs the name of the exact flows file it will use. Check if that file exists, or for any other json files in ~/.node-red.
The original idea/reason was back in the day, when i had about 20 devices in a field I could create a bunch of flow files, one per machine, and keep them all in the same .node-re directory... so I could then flash the same set of files to every machine before deployment (ie one master image). When the machine booted up it used its hostname name to pick its own flow file so they all ran their correct code. And likewise I could just walk round and back them all up to the same stick using an auto-insert script to copy the flow file (and data logs) into a directory on the stick. Works great if you use fixed hostnames.
That can be achieved by just changing the settings.js template that gets copied over to new workspaces, no code changes required. Just uncomment flowFile: 'flows.json' by default.
That will take effect only for new workspaces, and keep the existing ones untouched, as the settings.js is already there (and possibly customized).
You are right. That explains why replacing the *cred file with the actual Flow-file didn't do anything.
I got it working again by simply opening the flow file from my /.node-red folder and import it into node-red again. I checked where it stores the file: found it in node-red and it was called "start".
It seems because I started node-red from SSH via "node-red start" it created a new flow file called like that. Didn't knew that behavior and was pretty sure I already started NR like this, but well it seems the issue was self-created.