How to install HA on QNAP

Aeotec z-wave stick works great and was easy to install.

1 Like

So you plan to install Hass.io on a QNAP?
Is that possible ā€¦I understood hass.io more like an OS with hass on topā€¦rather than an add on.

Not sure if this is what you meant but you CAN have two zwave controllers. One is Primary and One is secondary. On my Odroid C2 I originally had my zwave network running from an Aeon Zstick but then wanted to play with zigbee. So I installed the HUSBZB-1 in another USB port and (somehow) managed to get it joined to the network. It joined as a secondary and later I was able to promote it to primary, thus demoting the zstick. Later I removed the zstick and removed it from the zwave network.

Iā€™m pretty sure I did everything in ozwcp.

Hope this helps

Did anyone succeed in passing a USB device to the Home Assistant docker instance?

Iā€™m trying to hook up my smart meter via a USB cable, which I think is connected to /dev/ttyUSB0. (I see it on my NAS and this would be exactly the same as when I hosted this on my Raspberry PI)

I guess the following UI allows me to hook up devices from my host (a TS-453BMini as well), and choosing TTSY (4) looks like my best bet.
image

However when I try to access the device, I get the following error:

serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'

Just to be complete, Iā€™m using the DSMR or Slimme meter sensor

Is there a way to debug to see of the device is mounted in the Docker image instance?

(Please forgive me if Iā€™m using incorrect Docker terminology, Iā€™m a newbie)

Youā€™ll need to use the command line to create the Docker container. For example, I run the following to create a new container mapping my USB-Serial adapter and USB zwave stick to the container:

docker run -d --name="hass" -v /share/Docker/HASS:/config --privileged -v /dev/ttyACM0:/dev/ttyACM0 -v /dev/ttyUSB0:/devttyUSB0 -p 8123:8123 homeassistant/home-assistant:0.56.2 python -m homeassistant --config /config
1 Like

Thanks @johnnyletrois for the near-instant reply. Thatā€™s what I read on generic Docker solutions. Do you maybe now if I can create such a container which is then still manageable in container station?

I have a QNAP running Container Station and the above is how I create my new HomeAssistant container. Itā€™ll appear in Container Station just like any container created in Container Station.

And instantaneous too! Very cool, thanks! The container has to run in privileged mode in order to be able to access this device I think.

And Presto!

Operations have been resumed, and I have just gained a Raspberry PI which I can remove from my smart meter!

1 Like

Iā€™ve installed ā€œhomeassistant/armhf-homeassistantā€ image from Docker Hub in a QNap TS128. When I try to start the container it says:

starting version 3.2.2
Fatal Python error: failed to get random numbers to initialize Python

Can anyone help me?

Has anyone received the ā€œAccess deniedā€ error?

I tried to setup the container (setting the network to Host and adding a SharedFolder for /config), but everytime I tried I keep getting this error.

Does anybody know how to fix this?

I would really appreciate any help on this.

Thanks!

Hi

Iā€™ve followed the instructions and installed the container successfully however when try to log on I dont know what the default password is Iā€™ve tried my qnap admin password but that doesnt work.
If I set the password in the configurations.yaml file then the page will not work at all ā€œCannot access http://xxx.xxx.xxx.xxx:8123ā€. There is a secrets.yaml file too with line http_password: welcome. I tried welcome as the password but this doesnt let me in either. I have to add the # back in front of the api_password: line before I can again access the web page but again iā€™m prompted for a password.
Any help will be much appreciated.

Thanks
Tony

You shouldnā€™t have a password set in the config file and the secrets file. The config file should only link to the secrets file it would look like this

http:
  api_password: !secret WhatEverNameYouCalledIt

Iā€™m getting a ā€œAddress already in useā€ exception, looks like from the discovery component. Anybody know which ports may collide between home-assistant (v0.60.1) and QNAP (TS-251+) via Container Station?

I followed @niknoā€™s installation instructions (thank for posting those!) and the web UI runs without a hitch on port 8123, but the console spits out:

    2018-01-06 07:32:08 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/asyncio/tasks.py", line 182, in _step
        result = coro.throw(exc)
      File "/usr/src/app/homeassistant/components/discovery.py", line 130, in scan_devices
        results = yield from hass.async_add_job(_discover, netdisco)
      File "/usr/local/lib/python3.6/asyncio/futures.py", line 327, in __iter__
        yield self  # This tells Task to wait for completion.
      File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
        future.result()
      File "/usr/local/lib/python3.6/asyncio/futures.py", line 243, in result
        raise self._exception
      File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/usr/src/app/homeassistant/components/discovery.py", line 156, in _discover
        netdisco.scan()
      File "/usr/local/lib/python3.6/site-packages/netdisco/discovery.py", line 69, in scan
        self.daikin.scan()
      File "/usr/local/lib/python3.6/site-packages/netdisco/daikin.py", line 32, in scan
        self.update()
      File "/usr/local/lib/python3.6/site-packages/netdisco/daikin.py", line 46, in update
        sock.bind(("", UDP_SRC_PORT))
    OSError: [Errno 98] Address already in use

Couldnā€™t find this in any searches. Any ideas?

1 Like

I see that as well - but it doesnā€™t seem to affect performance.

This is what I get too, holtche, and I think it prevents ā€œdiscoveryā€ from running properly. Honestly, I am getting the smart-plug control I installed it for and should move on, but now that I have discovered this thing I really want to use all of itā€™s parts.

Does anyone have any ideas on fixing this error?

I get the same error, and I feel like it limits the discovery process because it is not seeing anything I do not enter the host ip address for.and call by name. I am having a hell of a time just trying to figure out what to call this problem so that I can even ask questions about it. Anyone have any ideas?

The problem in my case was NFS sharing. It uses port 30000, and daikin discovery tries to use the same port and crashes. Disabling NFS worked for me.

Bingo! That worked!

How did you go about discovering that?

Noticed the stack trace said the component failing was daikin discovery, looked at the source code and saw it was trying to open port 30000. Did a port scan on my nas and noticed 30000 was used by something that looked like sharing, then did some more googling and saw references to nfs sharing and 30000. Decided to try disabling it and it worked!

Hi all. Installing and accessing HA through Container Station on my QNAP TS-453A worked without a problem, but I donā€™t know how to install NGINX. I have everything running on a Pi but since Iā€™m running the QNAP 24/7 anyway it just doesnā€™t make sense to have both. NGINX works on my Pi, HASS.IO made it easy for a noob like myself with the dedicated NGINX add-on, but for the life of me I am unable to make it work on my QNAP.