supervisor icon indicating copy to clipboard operation
supervisor copied to clipboard

RFC: Add-on configs

Open pvizeli opened this issue 5 years ago • 4 comments

Context

Every Add-on have a differen aproach to solve the issue if people need to be able to edit files. All the approach have the same issue, that the data are not part of the snapshot/restore/cleanup. It make also that is part feel as foreign body.

Decision

We add a new config helper they can be requested by Add-on. /config will be show internal inside Add-on and for the user they will have a new /config/**add-on** folder structure for edit files. /data stay internal while /config can be access from outside. The old /config will be expose as /core and need mapped with core flag if you want have all add-on config, the flag is data.

For the first 2 month, we make an fallback to avoid breaking or missing folders for a soft migration.

pvizeli avatar Jul 18 '20 22:07 pvizeli

Is /config shared between Home Assistant and add-ons?

balloob avatar Jul 20 '20 21:07 balloob

I think we should avoid renaming the current /config to /core. While it makes more sense, it does impact all documentation and can be breaking for automations or things people do with hardcoded paths (e.g. running shell command, using ssh keypair and whatever else they think of).

As a counter-proposal, the /addons folder has been misunderstood in general quite a bit. I often have had question about that folder (e.g, "What is it for?", "I've installed this add-on and nothing shows up there"). So, maybe use /addons/**add-on** as the public data configuration folder instead and move the local (custom) add-ons folder to /custom_addons (which matches the expectations with the custom integrations method).

frenck avatar Jul 20 '20 22:07 frenck

Let's avoid making breaking changes. We can add an /addons_config ?

balloob avatar Jul 21 '20 01:07 balloob

The repurposing of /addon should not be a breaking one.

frenck avatar Jul 21 '20 07:07 frenck

while be very important to be abel to edit/manipulate the addons config file, like core file.

for debuging/troubleshooting, fixing problem, configuring some custom part that are not for the moment managed by the addon ui config part...

For exemple nginx proxy manager does not provide for the moment a way to reset lost password... if the database are sqlite (the default) you need to access with sqlite3 cli to modify the database to reset the password...

on haos for the moment there no simple solution available to do that...

on haos the solution for the moment is to use ssh & terminal addons to dive into the nginx proxy manager container with docker exec... add sqlite package, and modify the file with sqlite cmd...

map config attribut permit to map "addons" (that map to /mnt/data/supervisor/addons/local), but is not an access to the addons configuration directory (/mnt/data/supervisor/addons/data) where this type of file are (like the database.sqlite of nginx proxy manager addons).

Propositions :

  • i thinks a news value like addons_config (need to be different than addons to avoid bracking thing) to map /addons_config to '/mnt/data/supervisor/addons/data' in addons container that set to true.

  • or new subdirectory in /config like addons can be more simple. and can be hardlink (from /mnt/data/supervisor/addons/data to /mnt/data/supervisor/homeassitant/addons) for the moment. in that way while be abel to access to addons config file with the existing addons (file editor/samba/vstudio/ssh&webterm...).

mcarbonneaux avatar Mar 13 '23 17:03 mcarbonneaux

This has been implemented by #4650 🎉

mdegat01 avatar Nov 02 '23 17:11 mdegat01