Home Assistant Supervised (previously known as Hass.io) on Synology DSM as native package (not supported or working atm)

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.

Installation dialogs:


If you have issues please read post #2 first.

Alternative download link (version 20200910-2) : https://packages.synocommunity.com/hassio/2/hassio.v2.f22259[apollolake-avoton-braswell-broadwell-broadwellnk-bromolow-cedarview-denverton-dockerx64-geminilake-grantley-purley-kvmx64-x86-x86_64].spk

There is a great video explaining the process here: https://youtu.be/QdBYUbj0B5Q


If you like this package, why not buy me a coffee beer.

63 Likes

The hassio-supervisor container will show some warnings during startup, this is normal.

NOTE

  • 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:

    sudo insmod /lib/modules/usbserial.ko
    sudo insmod /lib/modules/ftdi_sio.ko
    
  • 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)
    1. Stop the package (from Package Center).
    2. Go to the Docker package page and find the hassio_supervisor Container (under the Container tab).
    3. Stop the hassio_supervisor (if it still is running), right click and choose Action -> Clear.
    4. Make sure that the homeassistant container is stopped.
    5. Start the Hass.io package from Package Center.
    6. 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)
14 Likes

Great work! I still use your packages without any problem!

So does this get around the python 3.5 issue somehow? Meaning can the latest version of HA be run using this method?

Yes, it will give you the full hass.io experience with all bells and whistles.

2 Likes

I am currently running a VM with HassOS on my Synology but I will definitely gives this a try.

The supervisor will that be updated in the same way as the “normal” hass.io installs?

1 Like

image

What port is needed by default?

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.

1 Like

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?

2 Likes

Yes it works with USB devices, and yes you can update as usual in hassio.

Fredrik Erlandsson you are a LEGEND

8 Likes

It is kinda magical but try stopping and starting the package. If that doesn’t help send me a pm and we’ll investigate further.

Port 8123.

1 Like

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.

I will try it without usb-device…

It doesn’t looks to be Synology related perhaps something else in your setup. Have you consulted the hass.io community?

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?