Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Public Addon Config #75

Open
goebelmeier opened this issue Nov 10, 2023 · 11 comments
Open

Implement Public Addon Config #75

goebelmeier opened this issue Nov 10, 2023 · 11 comments

Comments

@goebelmeier
Copy link
Contributor

There is a new preferred way to store configs. We should implement that and somehow provide a migration for legacy installations

https://developers.home-assistant.io/blog/2023/11/06/public-addon-config/

https://developers.home-assistant.io/docs/add-ons/configuration/#add-on-advanced-options

@thecem
Copy link
Collaborator

thecem commented Nov 10, 2023

Some add-ons need access to all these add-on-specific config folders. For example:

  1. Samba
    
  2. SSH
    
  3. Studio Code Server
    

When those updated I will update the addon and release notes.

@thecem
Copy link
Collaborator

thecem commented Nov 11, 2023

implemented

@goebelmeier
Copy link
Contributor Author

Don't you think we should consider a non-breaking migration?

@thecem
Copy link
Collaborator

thecem commented Nov 11, 2023

whats your proposal?

@bjwo
Copy link

bjwo commented Nov 11, 2023

So I could migrate my evcc.yaml file to the new /addon_configs/ folder - but I have lost my complete history from the evcc.db. Any clues how to restore that?

@thecem
Copy link
Collaborator

thecem commented Nov 11, 2023

You have your db in /data/evcc.db?

IMG_0040

Find your old DB and copy it to /addon_configs/<addon_id>_evcc

#72

@goebelmeier
Copy link
Contributor Author

goebelmeier commented Nov 13, 2023

whats your proposal?

My proposal is to first of all roll back to /config, because of all the confusion this generates - see evcc-io/evcc#10744

The HA Supervisor Team got that too and will push out an update which makes /config and /addon_config side-by-side and this will allow us to do config migration in the background. See home-assistant/supervisor#4697 and https://github.com/home-assistant/developers.home-assistant/pull/1975/files#diff-9ae15e79c349af300614e97def45c1260fcde69f1f194c7a169f5ac2843cb898R62 for details

@thecem
Copy link
Collaborator

thecem commented Nov 13, 2023

old status, next try will be when HA has fixed there problems. I will leave this open.

@goebelmeier
Copy link
Contributor Author

goebelmeier commented Nov 15, 2023

Currently frenck is doing a hacky migration, see https://github.com/hassio-addons/addon-appdaemon/pull/285/files#diff-a3cb8f1cd3251bfb32a8e374ec6ce13a10be81b009300b9f570d5b6fd70f0352R8

https://github.com/hassio-addons/addon-appdaemon/pull/289/files#diff-a3cb8f1cd3251bfb32a8e374ec6ce13a10be81b009300b9f570d5b6fd70f0352R18

So what they do:

  • map homeassistant_config:rw into the addon
  • change mapping from config:rw to addon_config:rw
  • migrate the config file(s) from /homeassistant/ to /config/
  • ... some weeks/months/years later, you should be safe to remove homeassistant_config:rw

I'll try this inside my own fork and will monitor the official HA addons what they're doing.

@hzpz
Copy link
Sponsor

hzpz commented Jan 5, 2024

Hello everybody and first of all: thank you for providing evcc as this wonderful Home Assistant add-on! 👍

A few days ago I tried to install the add-on by following the installation instructions in the README and unfortunatelly I have to say, that I got very confused 🙈 The instructions still tell the user to copy evcc.yaml to the /addon_configs/<your addon's slug> directory. After I figured out, how to access this directory, I realized (from the discussion over at the main repository) that you reverted the change in the add-on and I had to use /config after all.

Finally, after some rather frustrating tinkering, I got the add-on to work properly 🎉 To spare future users this ordeal, please fix the README 🙏

Since almost two months have past since your last comments, I got curious what the state of affairs was. The revert mentioned above (home-assistant/supervisor#4697) was reverted yet again (home-assistant/supervisor#4702). So it seems that was Frenck is doing in his add-ons (mapping addon_config plus homeassistant_config and moving existing configurations from /homeassistant to /config) is the way to go.

If you find the time to implement that, you could just leave the README as is 😄

@Frintrop
Copy link

Is there any idea out there? It looks like that evcc.db in /data is not persistent in docker host (Home Assistant) instead its only locally store in docker container, or where to find it on the host ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants