Ha Addon Devs - what folder should be used to transfer files to HA core?

Addon Devs:

For context :

Now that we’re through yesterdays happy fun time with Node Red 16.0.0 and Appdaemon both smoking configs (honest mistake just make sure the testing includes that condition next time and end users test your backups regularly…)

It brings a new paradigm where the addon has a folder in addon_config and is moved out of config.

The addon is now seeing a view of config as /homeassistant in its name space and it’s own addon config folder, and a few others like /media, NR at least has /share and read only access to /SSL. (hard to follow? Yes it is.)

So if im running in context of your addon and run something (like a NR flow) that writes to the filesystem… With intent it’s picked up by, maybe an automation that runs in context of core. (so far I see a lot of camera snapshots that went under /local subfolders or random JSON)

Where is the MOST APPROPRIATE, easiest folder to drop the file safely?

The new mode significantly limits writable space that is shared by core (don’t misunderstand this is a very very good thing) and the next big thing I see coming up are a lot of folks that did something like this and thier routines are now failing.

Do we need a dedicated
Folder in each name space that is shared by core? We can’t expect each end user to add tons of folder mapping to eachAddon config?

/share is the one to write to. All 3 of /media, /ssl and /share were designed in part to be a place shared between Home Assistant and Addons so multiple things could read and write to it and potentially communicate with each other. /share was kind of the bucket for files which didn’t fit the obvious types of the other two (media in /media, ssl-related files in /ssl, everything else in /share).

The problem was that we didn’t give addons a place where they could expose parts of their internal files/folders to users but not to anything else. This didn’t really fit any of the above, it wasn’t ssl-related, wasn’t media and wasn’t intended to be shared. It was often config related so it ended up getting put in /config a lot which created new issues:

  1. The addon can now see all sorts of internal and secure Home Assistant info
  2. It’s not backed up with the addon so a partial backup/restore of that addon doesn’t actually work

Now addons have this place they need and don’t have to try to fit another folder to this purpose. But just as Home Assistant config should not be shared with addons unless strictly necessary, addon config is not shared with Home Assistant. So if addons want to write something that Home Assistant sees, they should use one of the 3 folders I mentioned at the top, depending on what it is.