Installing on Synology DS216j - hass-daemon: command not found

Hello,

I am trying to install on my diskstation. I used: this tutorial to install. But I get stuck at the end. It says: Copy your configuration.yaml file into the config folder That’s it… you’re all set to go.

Doesn’t the yaml file gets created when I start homeassistant?

When I try: sudo /volume1/homeassistant/hass-daemon start it gives an error
sudo: /volume1/homeassistant/hass-daemon: command not found

Hope someone can help me! Thanks!

run this command
cd /volume1/homeassistant
ls -la

This will give you a list of files in that folder and its authorities.

If you followed the documentation Installation steps then you should find hass-conf. check if it list to something like this:
-rwxrwxrwx 1 homeassistant users 2061 Feb 3 14:01 hass-daemon

The rwxrwxrwx is modified when you issue the command chmod 777 /volume1/homeassistant/hass-daemon

You should also find configuration.yaml in the list from above.
FDJ

1 Like

Great! Thank you very much, I was able to start home assistant without errors. Now lets see if I can get it configured.

I have exactly the same problem as AndyM, however, after checking your solution I get:

root@Wings:/volume1/homeassistant# ls -al
total 48
drw-rw-r-- 2 homeassistant users 4096 Feb 4 20:03 .
drwxr-xr-x 26 root root 4096 Feb 4 07:31 …
-rw-rw-r–+ 1 admin users 3764 Feb 4 19:57 configuration.yaml
-rwxrwxrwx 1 homeassistant users 2062 Feb 4 07:39 hass-daemon
-rw-rw-r-- 1 homeassistant users 12288 Feb 4 10:59 .swo
-rw-rw-r-- 1 homeassistant users 12288 Feb 4 10:51 .swp
root@Wings:/volume1/homeassistant# hass-daemon start
-ash: hass-daemon: command not found

Can you suggest what I should try next please?

Many thanks!

type
./hass-daemon start

For autostart the one in the documentation didn’t work for me so I followed the instructions to autostart scripts in synology forum:
https://forum.synology.com/enu/viewtopic.php?t=51025

So here is what I did:

sudo -i
cp /volume1/homeassistant/hass-daemon /usr/local/etc/rc.d/hass-daemon.sh
chmod 777 /usr/local/etc/rc.d/hass-daemon.sh

I created my hass-daemon file using Notepad++ and then copied it to the Home Assistant folder using the File Station GUI as I’m rubbish with Vi. Of course, now the file permissions are all screwed up and when I run sudo /volume1/homeassistant/hass-daemon start I get sudo: unable to execute /volume1/homeassistant/hass-daemon: No such file or directory. Below is a picture of my permission structure for the homeassistant folder. Any idea of the best way to fix that?

I am at the same point as you… I think the issue is with creating the hass-daemon file… what extension did you use in Notepad++?

No extension. Created it as *.txt file the removed the extension.

DSM 6.1.4-15217 Update 2
DS216j

Hi,

I have exact same problem without solution or idea.

I have created hass-daemon file on windows with notepad++ and saved in shared folder /volume1/homeassistant

I can’t start it :

root@Serveur:/volume1/homeassistant# sudo /volume1/homeassistant/hass-daemon start
sudo: unable to execute /volume1/homeassistant/hass-daemon: No such file or directory

CHMOD :

root@Serveur:/volume1/homeassistant# chmod 777 /volume1/homeassistant/hass-daemon
root@Serveur:/volume1/homeassistant# ls -la
total 24
drw-rw-r--  4 homeassistant users 4096 Dec 12 21:06 .
drwxr-xr-x 20 root          root  4096 Dec 12 19:44 ..
drw-rw-r--  3 homeassistant users 4096 Dec 12 19:44 @eaDir
-rwxrwxrwx  1 homeassistant users 2162 Dec 12 21:06 hass-daemon
lrwxrwxrwx  1 homeassistant users   75 Dec 12 20:20 homeassistant -> /volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/homeassistant
lrwxrwxrwx  1 homeassistant users   37 Dec 12 20:20 python3 -> /volume1/@appstore/py3k/usr/local/bin
drw-rw-r--  3 homeassistant users 4096 Dec 12 21:06 #recycle
root@Serveur:/volume1/homeassistant#

did anyone manage to get this working? Spent a couple of hours on this and can’t get it to run on my Synology DS216j

Probably a file format issue…

Open your script with vi and enter command mode (key ESC), then type this:

:set fileformat=unix
Finally save it

:x! or :wq!

1 Like

I have the same issue.
I am using windows 10 notepad++ to create this file and copied it to the homeassistant folder. However, by default, the line ending is in windows format.

I have to use notepad++, edit->EOL conversion->unix(LF) and save file again!

Then it is working now.

i try on same device maybe abyone can help what i do wrong - Synology DS216j DSM 7.1-42661 Update 4, pip install fail - No working compiler found - #2 by vingerha

An a side note… I had it installed on a 218+ but in docker/container
I did not want to have the HA software to interfere with the DS operating system as my DS is a NAS first, HA second. As you may known, docker allows to add/delete in a separate environment that you can update / change without damaging the core OS.
In the end, after I installed surveillance station, the DS218 (6Gb) was not able to keep up anymore, I have 5 containers running and write-to-disk was massively disturbed by the Surveillance station. I moved all HA containers to a NUC