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

Added Home Assistant media storage and updated Home Assistant #1067

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

highghlow
Copy link
Contributor

This commit adds a a new volume:

${UMBREL_ROOT}/data/storage/home-assistant-media:/config/media

as requested in getumbrel/umbrel#1800

This PR also updates hass for the change to apply. There is a conflict though, so I think you should apply umbrel-app.yml version change and docker-compose.yml version change (because this is required for clients to receive the update), but not apply the changelog (it didn't change between the repo version and the PR version)

@highghlow
Copy link
Contributor Author

It turns out the contributor can resolve conflicts themselves.

@nmfretz
Copy link
Contributor

nmfretz commented May 15, 2024

Great idea, I had not realized this was a use case that people wanted. Thanks for keeping your eyes out for these types of requests.

This commit adds a a new volume:

${UMBREL_ROOT}/data/storage/home-assistant-media:/config/media

I think the default media path in Home Assistant is /media not /config/media:
https://www.home-assistant.io/more-info/local-media/setup-media

So what we want for this to work automatically is:

<path-to-persistent-media-storage>:/media

But just a thought here on where the persistent storage on the host lives:

How would most Home Assistant users use the media folder in HA? @TowyTowy I'd love to hear your thoughts here as well.

With most apps on umbrelOS, we make it so that app data is stored within the app data directory. That way, if an app is deleted by a user, that app's data is deleted too and doesn't stick around and confuse users by continuing to take up disk space. If that's how we want the media folder on Home Assistant to function, then we want to bind it to the host like this:

${APP_DATA_DIR}/data/media:/media

Under this scenario, users would use the Home Assistant UI to view, add, and remove media. If the user then deletes Home Assistant, all media they have added through the UI will be deleted.

Alternatively, if users are wanting to have access to all media on their umbrel device regardless of whether it was added via Home Assistant or by some other app instead like one of the *arr apps, then we should probably bind this to the entire downloads folder like we do for Plex, Jellyfin, etc. In that case, we would want to bind:

${UMBREL_ROOT}/data/storage/downloads:/media

Under this scenario, HA would have full access to the downloads folder and all subfolders that get generated by other apps (movies, shows, incomplete, etc). It would behave like other media apps on umbrelOS, where any media files added through the Home Assistant UI would persist if the user deletes Home Assistant.

@highghlow
Copy link
Contributor Author

I don't really know what the media folder is used for, but I moved it to $storage/downloads

@TowyTowy
Copy link

I personally used it for a sound effect that I wanted to play in one of my automations. But I'm guessing there's a big variety of use cases for it.

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

Successfully merging this pull request may close these issues.

None yet

3 participants