Flows lost after power loss

When I build a flow, and I leave the pi turned off for a while (Day or more), I turn it back on and the flow is gone.. any help/advice. New to NodeRED btw

luke

If you turn the pi off for 20 seconds (disconnected from power) and then power it up again is the flow gone?

How do you start Node-RED?
If you don't name the flow in the startup command, nr uses the host name to name the flow file. It is possible that on your network, the name of the device has changed so when NR starts there is no flow file by the new name.

If you look at the startup log yo will see the name of the flow file file being used - for example
8 Jan 05:44:30 - [info] Flows file : /home/pi/.node-red/test.flow
If you go to the .node-red folder, you can look at the names of the files there and see if you can find the original flow file.

You can also start node-red using the name of the flow file:
node-red my_great_flow.flow

still there after 20 sec..

ah!... so if pi gets a diff IP address (as its dynamic) same thing??

It would not normally get a different host name when it got a new ip, so there is something unusual about your setup. Did you install node-red using the recommended method?

Also you can follow @zenofmud's suggestions to work out what is happening.

It's the hostname that is the key. On the Pi, it shouldn't change but show us what is in the .node-red folder

cd $home
ls .node-red -al

Ok thanks everyone - I'll try giving it a name :slight_smile:

Have you looked in the .node-red folder, as suggested, to try and work out what is going on?

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