mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 01:06:52 +00:00
Add documentation for media_dirs and new more-info messages (#14513)
This commit is contained in:
parent
628b918255
commit
3088af6895
@ -23,6 +23,9 @@ homeassistant:
|
|||||||
- /tmp
|
- /tmp
|
||||||
allowlist_external_urls:
|
allowlist_external_urls:
|
||||||
- "http://images.com/image1.png"
|
- "http://images.com/image1.png"
|
||||||
|
media_dirs:
|
||||||
|
media: /media
|
||||||
|
recordings: /mnt/recordings
|
||||||
```
|
```
|
||||||
|
|
||||||
NOTE: You will not be able to edit anything in Configuration -> General in the UI if you are using YAML configuration for any of the following: name, latitude, longitute, elevation, unit_system, temperature_unit, time_zone, external_url, internal_url.
|
NOTE: You will not be able to edit anything in Configuration -> General in the UI if you are using YAML configuration for any of the following: name, latitude, longitute, elevation, unit_system, temperature_unit, time_zone, external_url, internal_url.
|
||||||
@ -84,6 +87,10 @@ allowlist_external_urls:
|
|||||||
description: List of external URLs that can be fetched. URLs can match specific resources (e.g., `http://10.10.10.12/images/image1.jpg`) or a relative path that allows access to resources within it (e.g., `http://10.10.10.12/images` would allow access to anything under that path)
|
description: List of external URLs that can be fetched. URLs can match specific resources (e.g., `http://10.10.10.12/images/image1.jpg`) or a relative path that allows access to resources within it (e.g., `http://10.10.10.12/images` would allow access to anything under that path)
|
||||||
required: false
|
required: false
|
||||||
type: list
|
type: list
|
||||||
|
media_dirs:
|
||||||
|
description: A mapping of local media sources and their paths on disk.
|
||||||
|
required: false
|
||||||
|
type: map
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
## Reload Core Service
|
## Reload Core Service
|
||||||
|
42
source/more-info/local-media/add-media.markdown
Normal file
42
source/more-info/local-media/add-media.markdown
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
title: "Adding local media"
|
||||||
|
description: "More information on how to add local media to Home Assistant."
|
||||||
|
---
|
||||||
|
|
||||||
|
In order to see your local media in your Home Assistant media browser, you'll
|
||||||
|
need to add media to your media folder.
|
||||||
|
|
||||||
|
If you haven't set up a local media folder yet, check out this page on
|
||||||
|
[setting up the local media source][setup-media]
|
||||||
|
|
||||||
|
## Home Assistant OS & Supervised
|
||||||
|
|
||||||
|
If you are running Home Assistant OS or Supervised, you can access your
|
||||||
|
(automatically) created media folder using the Samba add-on.
|
||||||
|
|
||||||
|
If you haven't installed the Samba add-on yet, you can do so by browsing to
|
||||||
|
the Supervisor panel by clicking "Supervisor" in the sidebar. Next, click on
|
||||||
|
the "Add-on store" tab and search for "Samba" and click on it.
|
||||||
|
|
||||||
|
On the Samba add-on page, you can find a tab called "Documentation" with
|
||||||
|
the add-on installation and usage instructions. After that, you can copy/move
|
||||||
|
media onto your device using drag and drop in your file explorer.
|
||||||
|
|
||||||
|
Other add-ons are available, for example, SSH and others provide access to the
|
||||||
|
media folders as well.
|
||||||
|
|
||||||
|
## Home Assistant Docker
|
||||||
|
|
||||||
|
After you have [set up a local media][setup-media] folder, you can add
|
||||||
|
any media to that folder you have mounted in.
|
||||||
|
|
||||||
|
Your media will show up in the Home Assistant frontend automatically.
|
||||||
|
|
||||||
|
## Home Assistant Core
|
||||||
|
|
||||||
|
After you have [set up a local media][setup-media] folder, you can add any
|
||||||
|
media to that folder you have set up.
|
||||||
|
|
||||||
|
Your media will show up in the Home Assistant frontend automatically.
|
||||||
|
|
||||||
|
[setup-media]: /more-info/local-media/setup-media
|
77
source/more-info/local-media/setup-media.markdown
Normal file
77
source/more-info/local-media/setup-media.markdown
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
---
|
||||||
|
title: "Setting up local media sources"
|
||||||
|
description: "More information on how to set up local media sources in Home Assistant."
|
||||||
|
---
|
||||||
|
|
||||||
|
In order to use the media browser with Home Assistant, it needs to know where to
|
||||||
|
find you local media.
|
||||||
|
|
||||||
|
## Home Assistant OS and Supervised
|
||||||
|
|
||||||
|
No action is needed from your end to set it up. Home Assistant will
|
||||||
|
automatically use the "media" folder that is provided on these systems.
|
||||||
|
|
||||||
|
## Home Assistant Container
|
||||||
|
|
||||||
|
If you run the Home Assistant Container in, for example, Docker, you'll need to
|
||||||
|
add a Docker volume mount to the Home Assistant container, to mount in
|
||||||
|
your local media.
|
||||||
|
|
||||||
|
The default path Home Assistant will try to use, is `/media`.
|
||||||
|
|
||||||
|
For example, if you are currently using this command for Docker:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -d --name="home-assistant" \
|
||||||
|
-v /PATH_TO_YOUR_CONFIG:/config \
|
||||||
|
-v /etc/localtime:/etc/localtime:ro \
|
||||||
|
--net=host \
|
||||||
|
homeassistant/home-assistant:stable
|
||||||
|
```
|
||||||
|
|
||||||
|
You'll need to change it to this:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -d --name="home-assistant" \
|
||||||
|
-v /PATH_TO_YOUR_CONFIG:/config \
|
||||||
|
-v /PATH_TO_YOUR_MEDIA:/media \
|
||||||
|
-v /etc/localtime:/etc/localtime:ro \
|
||||||
|
--net=host \
|
||||||
|
homeassistant/home-assistant:stable
|
||||||
|
```
|
||||||
|
|
||||||
|
If you are using Docker compose, you can add a volume to your composition file
|
||||||
|
in similar fashion as listed in the command above.
|
||||||
|
|
||||||
|
## Home Assistant Core
|
||||||
|
|
||||||
|
If you run Home Assistant Core directly in, for example, a Python virtual
|
||||||
|
environment, you'll need to create a media folder yourself.
|
||||||
|
|
||||||
|
By default, Home Assistant will look for the `media` folder inside your current
|
||||||
|
Home Assistant configuration folder.
|
||||||
|
|
||||||
|
For example, if your current configuration folder is stored in:
|
||||||
|
|
||||||
|
`/home/frenck/.homeassistant/`
|
||||||
|
|
||||||
|
The you'll need to create a media folder in that same path:
|
||||||
|
|
||||||
|
`/home/frenck/.homeassistant/media`
|
||||||
|
|
||||||
|
## Using custom folders
|
||||||
|
|
||||||
|
It is also possible to set up custom and additional media directories. To do
|
||||||
|
so, you'll need to adjust the [core configuration][basic-configuration].
|
||||||
|
|
||||||
|
This example adds the two media folders to Home Assistant:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Example configuration.yaml
|
||||||
|
homeassistant:
|
||||||
|
media_dirs:
|
||||||
|
media: /media
|
||||||
|
recording: /mnt/recordings
|
||||||
|
```
|
||||||
|
|
||||||
|
[basic-configuration]: /docs/configuration/basic/#media_dirs
|
Loading…
x
Reference in New Issue
Block a user