Suddenly lost access to /config from Node-Red Add-on

I first asked this question on the Node-Red Forum but they directed me towards this one and I hope someone can help.

I’ve been running my Home Automation application using the Node-Red add-on in Home Assistant very successfully for about 18 months now and its been under continuous development. Suddenly last night it stopped working and I found that it seemed that none of the Node-Red Read/Write file nodes were capable of finding any of the data file in the /config directory. I can still edit these files both with the Home Assistant File Editor and also from VS Code on my client.

My server is an HP Laptop running Linux Mint 6.1.59 with Home Assistant core-2023.11.2 inside VirtualBox 6.1… I had not performed any sort of update to Home Assistant or Add-ons for several weeks before the sudden loss of service and have since resorted to a 3 week old back up and applied all the latest updates. Neither of these actions has restored the situation

I wonder if anyone can offer a solution and maybe guide me if more information is required

Thank you in advance

1 Like

Please search before posting - go here:
After update to 16.0.0 all flows and notes are gone - Third party integrations / Node-RED - Home Assistant Community (home-assistant.io)
Also turn off auto updates :slight_smile:

I had this same problem. All of my flows were available and running but the ones that tried to store files/data to /config/… paths didn’t work. I had to change them to /homeassistant/… and then they started working. I went through that entire thread that @NathanCu pointed you at and I didn’t see it mentioned but I could have missed it since it’s a big thread.

Already discussed: Where did my Node-Red folder go? - Configuration - Home Assistant Community (home-assistant.io)

I didn’t see a solution to this particular problem there either.

However, I left it overnight.

When I came to it this morning the Node-Red Ingress dashboard would not allow me to deploy after making a change to a node and the root directory in HA File Editor was /homeassistant.

I restarted Node-Red

Edited my Readdir node to point at /homeassistant instead of /config and ran my simple inject>Readdir>debug flow which showed me 90 files rather than the 19 I was able to see last night.

I edited all my flows which read or wrote files to use homeassistant rather than config and everything now works.

But my Node-Red folder is still empty so I need to look at that but I CAN see the javascript for all my functions

mmm, not sure if we have the same issue, but I have changed the path as well, using /homeassistant instead of /config but I get this error:

Cannot write /homeassistant/my_path/gate_state.jpg`, no access to path; allowlist_external_dirs may need to be adjusted in configuration.yaml"

I can see them if I acess to the container, not sure if maybe is the user that doesn’t match (the file I’m trying to modify is root:root).

Did you just change the path?

1 Like

not all paths are writable anymore in the new paradigm /homeassistant is marked +rw (read/write) in the container for NR but anything under it is not - Working with someone else last night it seems there’s no recursion down the tree and every folder needs to be explicitly specified.

Which was the reason for my post here yesterday:
Ha Addon Devs - what folder should be used to transfer files to HA core? - Configuration - Home Assistant Community (home-assistant.io)

Because the idea of dropping random crap in my config folder scares the bejeebus out of me.

Yes I did but I haven’t tried writing to a sub_directory of /homeassistant.

Have you tried creating a new my_path directory and trying to write your gate_state.jpg file there? I’ve just created a folder in /homeassistant using via a Samba share on my windows client. written a text file to it, opened that file in HA File Editor and overwriting it. All successfully

Before this morning when I found that all my files were accessible in /homeassistant I could only find one or two in /config and /homeassistant was not found. In trying to find where my flows are actually stored i have found one of my datafiles in /addon-configs/a0d7b954-_nodered. Confused

This is part of an intended change in addons going forward (short version it’s safer) That’s the equivalent of your NR folder going forward. Because this:

I’m afraid that rather goes over my head Nathan. I’m 75 years old and started serious programming 54 years ago and made a living that way for 35 years. But that was all quite different from the way things are done now. Just under 2 years ago I bought some Smart TRV’s to control my central heating system and I didn’t like the app that came with them. Since then I have for the first time in my life learned enough about Linux, Virtualbox, Home Assistant, Node Red, MQTT, Javascript, HTML to write my own Home Automation System. But the memory isn’t so good these days and I continually have to refer to examples to understand the way to build things. Oh incidentally although I was always very much into software I’ve actually built IoT devices using ESP8266 and Arduino so have also learned C++ to a certain degree. My system works well I think, last winter I used 1000 litres less oil than the previous one even though it was colder. This is my dashboard

After this event I have exported all my flows to another system.

My backup was so out of date because Google Backup had allowed more than the limit of the number of backups to be exceeded but then wouldn’t delete more than one and was refusing to make further backups without any sort of warning