Ran into a number of issues, but finally seem to have pip going and home assistant installed; however, when I try to start Home assistant for the first time, I get permission denied on the log file:
root@DiskStation:/volume1/homeassistant# sh hass-daemon start
Starting Home Assistant …
sh: /volume1/homeassistant/home-assistant.log: Permission denied
Any ideas on what can help? I went in to DSM and tried to explicitly set read/write privileges for the homeassistant user on this directory, but I get the same error message.
As a follow up, I got past this error by deleting the homeassistant directory the instructions told me to create through ssh and instead created the directory through File Station in DSM, setting permissions there. In my research, it appears DSM is tightening security restrictions, so a number of things people could do are harder to do now (for example, for me to install a number of things, I had too ssh in as admin then use sudo -i to change to root. You can’t ssh in as root anymore, and admin wouldn’t install the files).
Now everything loads! However, now no dependencies are getting installed.For example, in the log file:
16-05-01 10:58:19 homeassistant.util.package: Attempting install of netdisco==0.6.4
16-05-01 10:58:20 homeassistant.bootstrap: Not initializing discovery because could not install dependency netdisco==0.6.4
At the start of the log, I have an error:
/volume1/@appstore/py3k/usr/local/bin/python3: Error while finding spec for ‘pip.main’ (<class ‘ValueError’>: invalid literal for int() with base 10: ‘20-2014’); ‘pip’ is a package and cannot be directly executed
Not sure if all that is related. So I’m looking into everything…any advice would be appreciated!
While trying to get this working, I upgraded pip to 8.1.1, and now pip is no longer working at all on the machine. I’m getting nearly the exact same error in Home Assistant as before (and it matches the error if I try to run pip), so my hope is that if pip can get working again then I can get Home Assistant working. For reference, the error is now:
/volume1/@appstore/py3k/usr/local/bin/python3: Error while finding spec for ‘pip.main’ (<class ‘ValueError’>: invalid literal for int() with base 10: ‘20-2014’); ‘pip’ is a package and cannot be directly executed
Fortunately, the folks working at pip have made a fix, but it hasn’t been released yet. Looks like it’ll be in 8.2 of pip. So for now, I’m going wait until that release until I try anything else.
I just got my Home Assistant installed onto my Synology NAS running DSM5, and I ran into a couple of problems you described.
First up, I had Python to installed. Another package needs it. So now my NAS has both Python 2 and Python 3 running.
For Home Assistant, I had to do a couple of things differently from the setup guide.
I had to use python3 -m pip install homeassistant to get it installed on the correct version of Python. I also had to enable the “users service”, which was causing some “folders not found” errors I was getting.
For the netgeo error, I too am getting that. For now I’ve disabled the discovery service and hardcoded my Sonos and Plex IPs. To install the netgeo service (and there’s another service nmap for network sniffing), you need to install ipkg: http://rescene.wikidot.com/synology-ipkg
I haven’t done this yet, but will probably try that to at least get nmap installed so I can see devices on my network.
Success! Pip 8.1.2, released a week ago, integrated the bug fix I mentioned, and I was able to get this version of Pip installed under Python3 DSM 6. With it installed, Home Assistant started and dependencies could be downloaded and installed.
Now I’m going to start looking into getting everything setup. Phil, thanks for your reply and the heads-up that you couldn’t get discovery going with the netdisco error. I’m still seeing that, but like you, if I put in a component directly it seems to work so far (like the Hue lighting component- it would download, install, and start seeing my lights).
This is the direct download link to pip 8.1.2. Recall my old pip was all screwed up and wouldn’t run at all due to how DSM names some of it’s component (this was a bug submitted to pip). Running python3 -m ensurepip wouldn’t update anything. Just running easy_install pip only installed the new version in Python 2.7. Running python3 -m easy_install pip gave me an error that pip was not a recognized archive type, so I went to the direct download.
As an update for my install, I got discovery and Zwave working by running Home Assistant through a Docker Image. So that might be another option for people to use as well.
I’m running into issues with the discover component in HA running on my DSM as well.
I get “Not initializing discovery because could not install dependency netdisco==0.6.1” in the log and know that I need to install python3-dev package to correct this (as per https://home-assistant.io/components/discovery/).
Trouble is it won’t install with ipkg and I’m not sure where I can get the package from and where to unpack it. Has anyone done this before?
My first post here, so bear with me. Just started 2 weeks ago with HASS…
I was able to “install” netdisco (and it’s dependencies) on my DS411j (which does not support docker). It took me a full weekend of hacking, but at the end, the solution is quiet simpel…
For those that are still interested in this, here is a small procedure. It is not a detailed procedure since I just kept going but feel free to ask in this thread if you would run into problems:
The goal is to install a system into our DS so we can build like we want to…
Since this Debian is a Jessie release, it has Python 3.4, while our DS has 3.5. So we need to upgrade to Stretch release. Do this inside Debian Chroot
a. vim /etc/apt/sources.list. Comment all Jessie, uncomment all testing
b. vim /etc/apt/preferences.
Packages stable should have priority -10
Packages testing should have a priority 900
c. apt-get update
Now we need to install python3.5.
a. apt-get install libpython3.5-dev (not sure if this is needed)
b. apt-get install python3.5
Let’s install netdisco on our debian
a. python3.5 -m pip install netdisco
All files are now installed inside debian. We just need to copy them over to our DS.
Inside SSH of DS:
cd /volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/
cp /usr/local/debian-chroot/var/chroottarget//usr/local/lib/python3.5/dist-packages/* . -R
Thanks molano, with your help I could get it running.
As I run into some problems, I update your steps how it worked for me:
Install Debian Chroot from SynoCommunity. I could not use the guide provided above. But just install Debian Chroot, then use following command to go into the chroot: /var/packages/debian-chroot/scripts/start-stop-status chroot
I had to go into the bin dir: cd /usr/bin/
Since this Debian is a Jessie release, it has Python 3.4, while our DS has 3.5. So we need to upgrade to Stretch release. Do this inside Debian Chroot. (I had to use vi, no vim there)
a. vi /etc/apt/sources.list. Comment all Jessie, uncomment all testing
b. vi /etc/apt/preferences.
Packages stable should have priority -10
Packages testing should have a priority 900
c. apt-get update
Now we need to install python3.5 AND python3-pip
a. apt-get install libpython3.5-dev (not sure if this is needed)
b. apt-get install python3.5
c. apt-get install python3.5-pip
Let’s install netdisco on our debian
a. python3.5 -m pip install netdisco
All files are now installed inside debian. We just need to copy them over to our DS.
Inside SSH of DS:
cd /volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/
cp /usr/local/debian-chroot/var/chroottarget//usr/local/lib/python3.5/dist-packages/* . -R
Please forgive me if this is off-topic, but I had such a hard time both trying to (1) compile an updated package for Home-Assistant (using the spksrc repository) and (2) manually install home-assistant on the Synology host OS, that I evetnually broke down and went the Docker route, which has been a cakewalk in comparison (for me).
If you’re interested in pursuing this approach, it was very easy using the official Synology Docker package, together with the “homeassistant/home-assistant” image on the official docker hub registry. The only wrinkle was having to access the Synolgoy via SSH to issue the command “docker pull homeassistant/home-assistant:latest”, since the web UI for the Docker package wouldn’t download the most recent version available. Installation then only required mapping a local directory to “/config” for the image, and setting up a port to forward to the image’s port 8123.
I do fully agree that docker is much more simple, but the problem is that “older” Synology’s do not support docker.
For me it’s a no go, that’s why I had to do it manually.
But in the meantime, I have bought myself a Raspberry Pi and I am setting it up as we speak.
Hi All! Sorry for the noob question, I’m using an old Synology which doesnt support docker i suppose. I follow the installation guide from homeassistant and when I wanted to start the hass-daemon, i got the error below, a very noob question, how do I create this pid file or what does it contain? Thanks.
cat: /volume1/homeassistant/home-assistant.pid: No such file or directory
Hello, i am new and i need help .
i have a synology dS112 and dsm 6.1 beta ( is this a problem ? )
i install normal over paket center and i take a configuration from broadlink switch
i wrote ip and mac adressebut i get error
homeassistant: hass.local_api is deprecated. Use hass.config.api
the same by limitless light
is something wrong or i have to install some other things ?
Thanks for Help
I also had problems with installing Home Assistant on my Synology NAS for the first time.
After following the installation guide, I got the error home-assistant.log: Permission denied.
The solution for this problem was to create the errors with File Station in DSM, als @Lanky mentioned above!
An update to the process now that stretch is stable release. Got this going with the following steps:
Install Debian Chroot from SynoCommunity
SSH into Synology DiskStation. Use this command to go into chroot: /var/packages/debian-chroot/scripts/start-stop-status chroot
cd /usr/bin/
I prefer nano which was thankfully available but vi should do the job (vim was not available). nano /etc/apt/sources.list
Change all “jessie” sources to “stretch”. Thats it, no messing around with preferences.
Installing python and pip:
a. apt-get install libpython3.5-dev
b. apt-get install python3.5
c. apt-get install python3-pip (note: no 3.5)
Copy all packages: cd /volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/ cp /usr/local/debian-chroot/var/chroottarget//usr/local/lib/python3.5/dist-packages/* . -R
Restart home assistant /volume1/homeassistant/hass-daemon restart (assuming that’s where you put it).
I had an issue installing Python3.5 using apt-get update, I managed to build the package manually using:
sudo apt-get install libssl-dev openssl
wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
tar xzvf Python-3.5.0.tgz
cd Python-3.5.0
./configure
make
sudo make install