My way to install HASSIO on QNAP NAS

Im back :wink:
But with the same problemā€¦or at least the same symptom. Homeassistant is not answering on 192.168.8.145: 8123 since the last update (a few hours ago).
Iā€™ve Been running for weeks and even survived the last update before this oneā€¦ The ubuntu server VM is ok on that IP so I just used puTTY and ran ā€œdocker restart homeassistantā€ but that did not helpā€¦
Iā€™m a novice at Linux so running this configuration was probably a bad idea from the beginningā€¦
The Docker0 IP shows as 172.17.0.1
Hassio at 172.30.32.1
Is that OK?
Do i need to use some ā€œhassioā€ command ? (I tried hassio restart homeassistant But the hassio command is not recognized and I have so little understanding of this configuration so I cannot even understand if that is how it should be )
Is there another way to restart homeassistant?
Is there any other command i can run to se if homassistant/hassio is up and running and start to understand where its stuck?
Sorry for beeing such a noob.

Edit: Hmmā€¦ I can see now that the QNAP and hence the virtual switch has a new IP from my routerā€¦ Could that for some reason affect homeassistant? It probably should not since i can reach the Ubunte server om its IP which should be the same as homeassistants IPā€¦

Great tutorial thanks! I seems to be the best way for my useā€¦Ie: not to install on Pi3 as it kept freezing upā€¦ Only had two flows running in Node Red and the Pi couldnā€™t manage that!

I installed the Node Red addon and all seemed to go well untilā€¦ I clicked on the side panel and was greeted with 502: Bad Gatewayā€¦ I checked the system log and found the belowā€¦

19-11-12 10:15:26 INFO (MainThread) [hassio.addons] Create Home Assistant add-on data folder /data/addons/data/a0d7b954_nodered
19-11-12 10:15:26 INFO (SyncWorker_8) [hassio.docker.interface] Pull image hassioaddons/node-red-amd64 tag 5.0.3.
19-11-12 10:16:33 INFO (MainThread) [hassio.addons] Add-on ā€˜a0d7b954_noderedā€™ successfully installed
19-11-12 10:16:37 INFO (MainThread) [hassio.ingress] Update Ingress as panel for a0d7b954_nodered
19-11-12 10:16:45 ERROR (MainThread) [hassio.api.ingress] Ingress error: Cannot connect to host 172.30.32.1:63164 ssl:None [Connection refused]
19-11-12 10:17:05 ERROR (MainThread) [hassio.api.ingress] Ingress error: Cannot connect to host 172.30.32.1:63164 ssl:None [Connection refused]
19-11-12 10:18:23 ERROR (MainThread) [hassio.api.ingress] Ingress error: Cannot connect to host 172.30.32.1:63164 ssl:None [Connection refused]
19-11-12 10:19:59 ERROR (MainThread) [hassio.api.ingress] Ingress error: Cannot connect to host 172.30.32.1:63164 ssl:None [Connection refused]
19-11-12 10:33:18 WARNING (MainThread) [hassio.api.addons] Protected flag changing for core_samba!
19-11-12 10:34:06 ERROR (MainThread) [hassio.api.ingress] Ingress error: Cannot connect to host 172.30.32.1:63164 ssl:None [Connection refused]
19-11-12 10:34:11 ERROR (MainThread) [hassio.api.ingress] Ingress error: Cannot connect to host 172.30.32.1:63164 ssl:None [Connection refused]
19-11-12 10:37:56 INFO (SyncWorker_2) [hassio.docker.interface] Restart homeassistant/qemux86-64-homeassistant
19-11-12 10:38:35 INFO (MainThread) [hassio.homeassistant] Detect a running Home Assistant instance
19-11-12 10:55:02 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-11-12 10:55:32 ERROR (MainThread) [hassio.api.ingress] Ingress error: Cannot connect to host 172.30.32.1:63164 ssl:None [Connection refused]
19-11-12 11:02:30 ERROR (MainThread) [hassio.api.ingress] Ingress error: Cannot connect to host 172.30.32.1:63164 ssl:None [Connection refused]
19-11-12 11:03:32 ERROR (MainThread) [hassio.api.ingress] Ingress error: Cannot connect to host 172.30.32.1:63164 ssl:None [Connection refused]
19-11-12 11:03:38 ERROR (MainThread) [hassio.api.ingress] Ingress error: Cannot connect to host 172.30.32.1:63164 ssl:None [Connection refused]

I can see NR was installed ok but I am damned if I can work out what is wrongā€¦

Anyone???

I think you need to set ā€œsslā€: false . That is if you do not have a ssl certificateā€¦ Im unfortunately not able to run hassio at all so i can not be more specific but look here https://github.com/hassio-addons/addon-node-red/issues/268#issuecomment-525945305

Yep that workedā€¦and a bit more patience helped too!..

Interesting situation with this install is the response time when using HA is slower than I expected. Is there a way to make it more responsive? My install is on a TS453pro using 2 cores and 2gb ram in the VM with 25Gb disk.

Now that I have Node Red up and running I am setting up the flows I had in the previous installation.

One thing has me puzzled when configuring my Kodi lighting flow is that the ā€˜media_player_Kodi HTā€™ cannot be found in Node Red.

I have this entry in configā€¦

media_player:

  • platform: kodi
    host: 192.168.1.208
    name: Kodi HT

I appears on the Lovelace overview as Kodi HT but is invisible to NR.

What am I missing??

Just figured it outā€¦

I found the entry in the Entities and I copied and pasted ā€˜media_player.kodi_htā€™ into the Entity ID of the State node and Viola it works!!

Next, onto trying an independent installation of NR on a Pi.

wellā€¦ to reply to my own post a few steps upā€¦ Since i do not understand enough about containers and how they work, I installed portainer. It showed hassio_dns, hassio_supervisor, two addons to hassio and homeassistant. All showed as running. However when going to command propt in homeassistant container via portainer and typed hass, it started up saying there was no configuration file and continued to start up with a new one. I went to 8123 and created the same account againā€¦ Logged in and restored the lattest snapshot. Im taking baby steps to really understand why tis happensā€¦ I guess ill wait for next uppdate of VM/QTS/hassio to see if it fails againā€¦as of now it is running

I have to apt-get update/upgrade and restart my VM every week beacuse the VM starts using more cpu cycles. ssh into the VM i can only see its python3 process but no further info. Anyone else has this problem?

edit this morning the VM again was utilising the HD and CPU for 50%+. I turned it off this time, anyone has a idea how to find out what process is causing this?

Because you ran the hass command, without any parameters? You would need to specify the configuration file location, but you really shouldnā€™t be using that command INSIDE the running home assistant container, because, well, home assistant is already running.

Thanksā€¦yes i found the info about parameters laterā€¦ But that is not the main issueā€¦I just wanted to kick home assistant in the nuts since it had stopped responding on port 8123ā€¦ any enlightening thoughts about that? As I wrote Portainer showed every container as runningā€¦ so what can the problem be?

You have to review the logs and see why it failed to actually run. If you want to ā€˜kick it in the nutsā€™, restart the container. The next time that container restarts, if there was a problem in the configuration (likely cause), you will lose your settings you just set, and it will do the same thing.

ALWAYS review the logs before jumping in and doing something that will break the system.

Hmmā€¦ i would have ranked the configuration as one of the most unlikely causes since I can run home assistant without any issues for weeks, but when I updated VM and/or hassio it just stops responding on 8123 while , as you say, still is runningā€¦ first I thought ther was an issue with my router firewall but I fail to figure it outā€¦
Anyway, thanks for trying to helpā€¦ Iā€™ll do some reading instead of clogging this thread up

You are aware that there are breaking changes with almost every release? If those breaking changes apply to your setup, YOU have to fix them before updating. A bad configuration (like what happens when a component changes with updates) can absolutely cause it to ā€œnot respond on 8123ā€ because home assistant isnā€™t running. It is sitting there with an error waiting on you to fix itā€¦

Yes I am aware and thatā€™s partly why I left the configuration as clean as possible the last time.
However I see now that I had node-red running and telldus entetiesā€¦ so maybe not as clean as I intendedā€¦
Anywayā€¦ Iā€™ll wait for next updates and see if it happens again. I do not want to put too much effort into configuring Hass before I feel I can rely on itā€¦I guess that actually means ā€œthat I understand it in more depthā€
Thanks for your time!
Actuallyā€¦ as I wrote on my first postā€¦I was going to go wit a Raspberry PIā€¦ do you recommend that I, with my limited knowledge on VMs, containers, virtual switches and what have youā€¦ go that way instead? (No disrespect to OP)

Away with only mobile phone so sorry for any misshapsā€¦

I think the raspberry pi is a cool device but I donā€™t think itā€™s appropriate to rely on for your home automation brains.

1 Like

I narrowed it down to the google drive snapshot add-on its causing NPM and Node processes to be stuck in a loop.

Thank you so much for this guide, it worked like a charm.
Have you got audio working on ubuntu server 18.04 LTS virtual machine hosted on a QNAP NAS?

I donā€™t use audio on my Nas since there is no need for it for meā€¦

Whatā€™s your idea behind, do you want to connect some speakers to the bad and play audio on that? Or what are you thinking of?

Platini76, I get the same error after a few months of running. I am wondering if it is the history or log getting too full. I do limit the log files. Did you find out anything on your side?

@BjornH big thanks a lot for this great guide. Based on this I have setup Hass.io on my qnap TS-453B with Aeotec Z-Wave, Zigbee2Mqtt and Bluetooth.
As there were a couple of obstacles along the way I want to share them with all of you, hoping it will help people finding solutions for their problems:
Problem 1: Aeotec Stick will not show up when doing lsusb
Solution 1: Use Front USB Port
Problem 2: Aeotec Stick not available in Hass.Io
Solution 2: Followed Link provided by Bjorn but instead of Back USB port using Front USB port
Problem 3: Stick will not show after restart of Qnap
Solution 3a: Canā€™t find the link anymore, but here is what you need to do:
Enable the autorun.sh processing in the Control Panel -> Hardware -> General: Run user defined startup processes (autorun.sh)

With Putty 
mount $(/sbin/hal_app --get_boot_pd port_id=0)6 /tmp/config

With WinSCP
Create/Edit /tmp/config/autorun.sh.
Ensure that /tmp/config/autorun.sh is executable
# chmod +x /tmp/config/autorun.sh
IMPORTANT: Unmount the mounted flash partition:
 # umount /tmp/config

Add to autostart.sh
insmod /usr/local/modules/cp210x.ko
insmod /usr/local/modules/cdc-acm.ko
chmod /dev/ttyACM0

Solution 3b: Make sure your USB devices in the Virtual Station are mounted (have not found a solution to ensure that is happening after restart) and restart Hass.Io

Problem 4: In Hass.Io Error ā€œNot running in priviledge modeā€
Soltuion 4: https://gist.github.com/frenck/32b4f74919ca6b95b30c66f85976ec58#gistcomment-2803212

Thanks to all the different people who have helped me on my setup and I hope this summary will help to find all those great helps at one shot.

2 Likes