HU felirat & EN subtitle!
Synology DSM supports Docker with a user interface, so you can easily install Home Assistant using Docker without using the command line.
Home Assistant description:
[ Ссылка ]
You can see this installation in my previous video:
Installing Home Assistant on a Synology NAS in a Docker container
[ Ссылка ]
The Synonolgy NAS Docker UI does not allow you to add a device to the container.
First, you need to add the USB device to your Synology NAS.
Watch my previous video:
Install SONOFF ZigBee 3.0 Dongle E USB on Synology NAS above DSM 7 version
[ Ссылка ]
Second, start the container with the docker run command with device parameter.
[ Ссылка ]
Sample Home Assistant command:
sudo docker run --restart always -d --name homeassistant -v /PATH_TO_YOUR_CONFIG:/config --device=/PATH_TO_YOUR_USB_STICK -e TZ=Australia/Melbourne --net=host ghcr.io/home-assistant/home-assistant: stable
My own command as a sample:
sudo docker run --restart always -d --name homeassistant -v /volume1/docker/homeassistant/config:/config --device /dev/ttyACM0:/dev/ttyACM0 -e TZ=Europe/Budapest --net=host ghcr.io/home-assistant/home-assistant:stable
Docker run command references:
[ Ссылка ]
I will show you 3 ways to run the docker run command
1) In a terminal via SSH
2) Synology Task Scheduler with user-defined script
3) In Portainer application with docker-compose file
1) In a terminal via SSH
Synology description for terminal login:
[ Ссылка ]
CMD command:
ssh yourNASusername@yourNASip -p22
In the examples, I gave the basic command I used, not the versions used in the video. (different names for containers and config directories)
sudo docker run --restart always -d --name homeassistant -v /volume1/docker/homeassistant/config:/config --device /dev/ttyACM0:/dev/ttyACM0 -e TZ=Europe/Budapest --net=host ghcr.io/home-assistant/home-assistant:stable
2) Synology Task Scheduler with user-defined script
docker run -d \
--restart always \
--name homeassistant \
-v /volume1/docker/homeassistant/config:/config \
--device /dev/ttyACM0:/dev/ttyACM0 \
-e TZ=Europe/Budapest \
--net=host \
ghcr.io/home-assistant/home-assistant:stable
(same command broken into multiple lines with a backslash (\)
3) Portainer Stacks with docker-compose file
You can translate the docker run command to the docker-compose.yml file on the following website
[ Ссылка ]
version: '3.3'
services:
home assistant:
restart: always
container_name: homeassistant
volumes:
- '/volume1/docker/homeassistant/config:/config'
devices:
- '/dev/ttyACM0:/dev/ttyACM0'
environment:
- TZ=Europe/Budapest
network_mode: host
image: 'ghcr.io/home-assistant/home-assistant:stable'
The script to install Portainer:
docker run -d --name=portainertest \
-p 8000:8000 \
-p 9100:9000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /volume1/docker/portainertest:/data \
--restart=always \
portainer/portainer-ce
Portainer documentation:
[ Ссылка ]
The system used for the demonstration:
Synology DS718+, Intel Celeron J3455, 2048 MB, DSM 7.1.1
Docker 20.10.3-1308
SONOFF Zigbee 3.0 USB Dongle Plus E
Home Assistant 2.2.2023
Ещё видео!