How to install HA on QNAP

Thanks @J-CMartin

That was surprisingly straight forward, all I had to change from the default was the network configuration of the container - going from NAT to HOST so I can access it via the 8123 port on my QNAP.

With that now installed I’m straigh away stuck on where to find the /config/ folder ? I’ve SSH’d in as the admin/root anc can’t see it anywhere ?

Could you point me to it ?

In addition to the network setting, on the advanced config pages there is one for folders (I can get a screenshot later) the middle one allows you to select a folder from the NAS (mine is Container/Config) and create a mount point for it (It has to be /config so HASS can identify as config folder). Once you run it it should write default config and log files there.

Hi, yep, and that setting for me was set to /config/

… but where is that exactly if you are accessing it via SSH?

I’ve never used SSH to access the files on my QNAP, but because I mapped a Volume from host as my config folder, I can access it by mapping that folder in Windows. In my advanced settings, I have this setting:


So all I have to do is go to this address on Windows Explorer: \\qnap.ip.addr\Container\Config and I see all my config files.

With that said, when accessing via SSH, all folders should be inside the /share folder, so similarly in my case, they are in /share/Container/Config

Hope this helps

1 Like

I lurked this topic and after the latest replies I also managed to get my Home Assistant running on my QNAP yesterday (I previously failed to get the network access on port 8123 correct). I am newbie on both Dockers and Home Assistant, so I summarized the steps I did in a similar way as HA has done for Synology NAS in their docs, I hope it helps others…

  • Install / Activate the “Container Station” application on your QNAP.
  • Launch the “Container Station” application and go to “Create Container” section.
  • Use the “Search images” function to search for “homeassistant” and find the “homeassistant/home-assistant” image on the “Docker Hub”. Click the Install button.
  • Select Install version (“latest” is default). Click Next. You will also be notified that this is an application from a third-party vendor. Click OK.
  • In the “Create Container” window;
    • Choose the name you want (e.g. “Home-assistant”).
    • Click on “Advanced Settings”.
    • Within “Network”, change “Network mode” to “Host” (“NAT” is default).
    • Within “Shared folders”, click the Add button just above the “Volume from host” section.
    • This will open a new line under the “Volume from host” section.
    • Select a folder within the “NAS_NAME/Container”. Here I used the QNAP “File Station” application to create a “/Container/hass-config” folder. The mount point must be “/config”, so that Home Assistant will use if for the configs and logs.
    • Click the Create button.
  • Wait some time until your NAS pulls down the image from Docker Hub and creates the container. You can check progress in “Background Task” (top left corner) in “Container Station”.
  • When done you should see the DOCKER container status as green and running in the “Overview” section of “Container Station”, and you shall be able to access it using your NAS IP address on port 8123 (http://xx.xx.xx.xx:8123/)

I assume the folder selection in “Volume from host” can be a bit different on each installation and how things are configured (?) on you specific NAS.

For updates, I think you need to stop and also remove your Home Assistant container, then also remove the Home assistant image under “Images” in “Container Station”, and then do above steps. But I strongly suggest that someone more experience confirms that this is the right procedure… :wink:

12 Likes

Hi All,

I am just trying to get HomeAssistant installed on my QNAP TS-831X.

I tried to follow the instrcution summary of @nikno (thanks for your efforts), but unfortunatley I always end up in the following error:

Background task error for create: 500 Server Error: Internal Server Error (“rpc error: code = 2 desc = “oci runtime error: exec format error””)

I am new to the usage of Docker, so any help would be very welcome :slight_smile:

Regards,
Tim

It works.

Is pretty cool, the Zwave USB stick, works with QNAP?

Can I have two instances of HASS (one on my pi3 and one on the QNAP) or I risk disturbances?

Well, I am also very new at this…

But according to a discussion on the QNAP Forums, your error seem to relate to that your NAS is based on ARM architecture, so maybe you need to look for a Docker image that support your architecture. I have a TS-453Bmini, based on Intel.

https://forum.qnap.com/viewtopic.php?t=133387

Regarding the Zwave stick, maybe @johnnyletrois can share if he decided to get one. I think I have seen some discussions regarding using USB sticks on QNAP forums.

I pass on the question regarding running two instances…

I haven’t tried a z-wave stick yet.

This is what I found to help with the zwave stick. Kind of aggravating as the serial port changes on each boot (of the NAS) - bounces back and forth between ttyACM0 and ttyACM1.

But to get it working you need to add a device under advanced settings as well for the container. Check the run in priviledged mode and then add the ACM USB modems.

Hi, I was trying to install home assistant on my QNAP and I found this thread. I tried to follow the instructions and the container got installed but if I try to access xx.xx.xx.xx:8123 I just get and error message from the browser “this site can’t be reached”.
Is there a place where I have to set port 8123 or does anybody has any ideas on what i could try?
Thanks!

1 Like

8123 is the default port and shall work out of the box.

I would start to check the Home Assistant log file to make sure that HA have started.

If everything works fine HA will start when the Container starts. But they are different animals - so you cannot all rely on Container Station to give you the status of HA.

Thanks for helping!
Today I figured it out, In my eagerness to start changing the config file i accidentally deleted the frontend: line so the web access was disabled.
Now the next hurdle will be to install the z-wave key…

1 Like

Hi all,

I’ve recently began the process of home automation and thought it’d be best to utilise the technology I already have. I have used this forum to successfully get home-assistant running through a container in Docker on my QNAP TS-451 and I’m happy to help anywhere I can.

I’m currently stuck trying to install HASS.io (which I believe should run through home-assistant). I’m not sure that my explanation of the architecture is correct, but my understand is that I’ll need HASS.io embedded in my home-assistant to start implementing automation with siri.

Could anyone give me some pointers?

Thanks

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