2021-01-15 — Due to outdated docker version (and other issues on Synology DSM) is this solution no longer possible to run. Please use the officially supported Docker solution instead .
I’ve built a native Synology DSM package for running hass.io. It is using Docker so that package needs to be installed and running first. It’s been tested on various x64 based versions running DSM 6.2 or more.
Everything is quite straightforward but make sure to create a Shared Folder to use for data storage and select that in the first dialog.
Installation is made trough Synology’s Package Center via SynoCommunity. Just make sure to install the Docker package first.
To run zigbee2mqtt and get a serial device you might have to install this package: http://www.jadahl.com/drivers_6.2/ to enable the kernel modules. (Thanks @raphii for finding this). Also make sure to run:
Synology packages that show network information such as the VPN and Surveillance Station package does not play nice with the way the hassio network is created. The workaround is to remove the hassio network from the Docker -> Network panel and create a network with the same settings (IPv4, Subnet: 172.30.32.0/23,IP Range: 172.30.33.0/24, Gateway 172.30.32.1) and assign all related Home Assistant containers to that network.
2020-05-30: This is not the case in DSM 6.2.3-25426, instead open a terminal to your NAS and remove the Docker network hassio and recreate the network with:
sudo su -
# Stop the containers and remove them from the hassio network.
HASSIO_CONTAINERS=$(docker network inspect hassio |\
jq -r '[.[0].Containers[]|.Name]|join(" ")')
docker stop $HASSIO_CONTAINERS
for CONTAINER in $HASSIO_CONTAINERS; do
docker network disconnect hassio $CONTAINER
done
# Recreate the hassio network (remove it and create it again).
docker network remove hassio
docker network create -o com.docker.network.bridge.name=hassio \
--driver=bridge --subnet=172.30.32.0/23 --ip-range=172.30.32.0/24 \
--gateway=172.30.32.1 hassio
# Add the containers to the new network and start them.
for CONTAINER in $HASSIO_CONTAINERS; do
docker network connect hassio $CONTAINER
done
docker start $HASSIO_CONTAINERS
#Restart just to make sure things are going the right way.
docker restart hassio_supervisor
If everything is OK, you need to see following containers running, after Supervisor restarts:
hassio_audio
hassio_cli
hassio_dns
hassio_multicast
Those containers are directly controlled by hassio_supervisor.
Plus of course homeassistant and any addon_* containers you have
Current issues
You can expect a message like Your installtion is running in an unhealthy state, as Synology is not a supported platform (the real reason for this issue is that Docker should be version 19.x but that have not been released from Synology). This issue prevent the Supervisor to update (itself and other parts of the hassio family).
A workaround is to create a jobs.json file with the following content and place that file in the hass.io folder (where you also can find the config.json and dns.json files).
{"ignore_conditions": ["healthy"]}
The installation process does not play nice with the Synology Firewall (or Adguard/PiHole) and could show errors like this below. Make sure to disable the Firewall before starting the installation (thanks @ohminy for pointing this out).
[hassio.utils.dt] Can’t fetch freegeoip data: Cannot connect to host http://ip-api.com/ ssl:None [Try again]
[hassio.updater] Can’t fetch versions from https://version.home-assistant.io/stable.json: Cannot connect to host version.home-assistant
Sometimes there are communication issues between Home Assistant and hass.io, with this error message: Unable to load the panel source: /api/hassio/app/entrypoint.js. Restarting the package seems to fix this or follow the fix below. Fix:(I don’t think it is possible to make this automatic atm)
Stop the package (from Package Center).
Go to the Docker package page and find the hassio_supervisor Container (under the Container tab).
Stop the hassio_supervisor (if it still is running), right click and choose Action -> Clear.
Make sure that the homeassistant container is stopped.
Wait a minute and make sure that the homeassistant container is started (in the Docker package) or start it manually.
Starting addons when using USB devices (see above and make sure to run version 20191006-3c5c9bce).
The Synology VPN-server package is conflicting with hassio, investigations are being made by @bartaspoz, (see 362 for more info). see fix above.
Some USB2Serial Connectors like FTDI, arduino, esp8266 etc. are not working (esphomeyaml) (Containers wont start). this is fixed in latest version together with the serial drivers.
Google cast devices might not work, discussion here and here on how to fix it.
The official deCONZ addon does not work on most Synology models as they are running a too old kernel, send a PM to @fredrike for more instructions on a workaround. It fails with an error like this:
deCONZ: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory
Working addons (most addons should work though, just make sure that the addons' ports are not already used)
Appdeamon, make sure to change port from 5000 as that is the default port of DSM.
Plex server, make sure to stop the native package if installed and add shared data locations (check with @a5pire).
Nginx with Let’s encrypt support (more info is needed from @dearlk).
Node-RED.
PiHole
Adguard
SSH & Web Terminal (make sure that the host key have the right permission)
Maybe not an issue related to your hassio package, but when I`m trying to install VSCode i got this errormessage:
19-07-10 07:01:15 ERROR (SyncWorker_3) [hassio.docker] Can’t start addon_a0d7b954_vscode: 404 Client Error: Not Found (“linux runtime spec devices: error gathering device information while adding custom device “/dev/serial/by-id/usb-RFXCOM_RFXtrx433_A1XZHX4D-if00-port0”: lstat /dev/serial/by-id/usb-RFXCOM_RFXtrx433_A1XZHX4D-if00-port0: no such file or directory”)
One workaround I see is to manually created the symlink and I was then able to start my addons.
Got the same message. I had running homeassistant in a Docker container an the Diskstation. I stopped and removed the container. So I did not get the message anymore.
I was able to install (took more than 10 minutes on a DS916+), but in the UI when I click on hass.io I get this message: Unable to load the panel source: /api/hassio/app/entrypoint.js.
will this work with the usb-ports on the synology so you can connect z-wave usb stick and other peripherals? I’ll need to connect 2 ports for z-wave and power monitoring, and my synology has 2 usb-ports, so should work.
Also, can you update hass.io like you normally would?
Dont update hassio plugins, the plugins dont work any more after updating plugins. (I have now 3 plugins who doesnt start anymore) I will test it at my nuc to check if its system related.
EDIT:
At my nuc there is no problem after updating.
Log file hassio at my syno:
19-07-10 17:59:28 ERROR (SyncWorker_0) [hassio.docker] Can't start addon_a0d7b954_vscode: 404 Client Error: Not Found ("linux runtime spec devices: error gathering device information while adding custom device "/dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0018ED36A9-if00": lstat /dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0018ED36A9-if00: no such file or directory")
When i want to start the plugin (vscode) in docker i get the error: docker doenst exist.
My installation was doing the same thing. I restarted the package a couple of times and nothing changed. But… while working on this my home lost power due to a thunderstorm and when everything came back up, it worked… like magic
Cool beans! Was looking into this a while back and never finished it, would be nice to see it on DockerHub. I personally use portainer to manage my docker stuff on Synology as I have found the Synology docker UI cause more harm then good.
Has anyone had any issues with the add ons? I installed motioneye and node red. Motion eye works fine, but node red won’t start up.
I looked in docker on the Synology, and the containers are there. When I try start the node red container via the docker interface it says image could not be found. But it is there in the images… is anyone else running node red?