hassio-addons / addon-appdaemon

AppDaemon4 - Home Assistant Community Add-ons
https://addons.community
MIT License
141 stars 45 forks source link

HACS & AppDaemon Addon Version >= 15 #295

Closed joBr99 closed 8 months ago

joBr99 commented 8 months ago

Problem/Motivation

Opening a new Issue for this, as it's kind of off topic in the other issue.

Downloading and updating AppDaemon Scripts is an important convenience feature, so it would be nice if we can find a way to keep it working. Especially for updating apps with multiple files it's way better than messing with the files directly.

With the folder change HACS stopps working as it is downloading apps to /homeassistant/appdaemon/apps and the appdaemon addon is no longer looking at that directory.

Also HACS cannot download to the appdaemon folder as it's running in homeassistant and doesn't have access to the HACS Folder

Proposed changes

This are the options that came into my mind:

  1. Do the following on startup (requires to restart appdaemon after an update in HACS):

rm -rf /config/apps/apps-from-hacs && cp -R /homeassistant/appdaemon/apps/ /config/apps/apps-from-hacs/

  1. Alternatively this could be archived by adding rsync to the container and syncing the folder though rsync every couple of minutes.

  2. I tried symlinking within the appdaemon container to the folder below /homeassistant and that one doesn't work as appdaemon is apparently not following the symlink.

AppDaemon doesn't care about the location of the Apps, they can be in a subdirectory, this way other custom apps in the apps folder are not affected.

This would allow to keep downloading AppDaemon Scripts within HACS. (with the downside that the appdaemon container is still accessing the home assistant folder)

frenck commented 8 months ago

Downloading and updating AppDaemon Scripts is an important convenience feature, so it would be nice if we can find a way to keep it working.

Sorry, this add-on cannot support that.

If you want to have that solution, this add-on is no longer the best option for you.

../Frenck