QNAP integration not working

and still not working under QTS 5.0

A question re this setup for QNAP…

I understand the 2FA has broken loads of things on QNAP, but what if a non-admin account is used? For example, if I created an account that was part of the admin group, and used that in the HA configuration file, is that likely to work?

HA core-2021.10.7, supervisor-2021.10.8

… but without 2FA.

For what it’s worth… I created an account for the monitoring and added it to the admins group. Placed all the details into HA and it’s working great. 2FA hasn’t been an issue.

1 Like

did what you suggested and its all back! Not sure why the other user wasn’t working but oh well, its working now, thanks!

1 Like

Do you suggest with ‘2FA hasn’t been an issue’ that you have 2FA on or not?

Good Morning Guenther @Yop1403 in my experience the ‘admin’ account is the only account the requires 2FA. The ‘monitoring’ account I created did not require 2FA, so avoided the issues encountered with the admin account. I only use the admin account for pure admin, and would recommend that approach to anyone. Hope this helps :slight_smile:

Hi Mark, I have now created a separate account on my QNAP just for HA. Have set it up as an account with admin rights and have then downgraded it to a normal user - it has always worked. Once I restarted my HA it didn’t work again until I upgraded the QNAP account to an admin account, again.
I’m having it run that way now but I’m not very happy having a QNAP account with admin rights and no 2FA as basically anyone managing to take over that account (which is much easier without 2FA + my QNAP is accessible through the web) can do anything he/she wants with my NAS. I have 1000s of brute force hacking attempts from China, every day :frowning:

1 Like

Hi @Yop1403, understand what you are saying, unfortunately I beleive the HA monitoring only works with an account in the QNAP admin group. I dont open my QNAP’s to the internet, and instead use VPN’s.

I am also very careful how I configure my pfsense firewall, and I tweak a few security features on the QNAP itself, like changing the HTTP port to something other than 8080, and I also use ‘jump’ hosts which allows me to tweak what IP subnets can access the QNAP’s.

Hope this helps, Mark

Hi everyone! I have some problems with my qnap and I can’t get sensors status etc. I made a new user for Home assistant and I added it into the administrator group, I also tried to enter to the qnap directly from his web UI with those credentials and I logged fine. I also checked to not use a 2FA authentication for that user. Just updated also the Qnap firmware which is QTS 5.0.0.1853.
How can I solve?
I get this on home assistant log:

Failed to fetch QNAP stats from the NAS

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/qnap/sensor.py", line 296, in update self.data["system_stats"] = self._api.get_system_stats() File "/usr/local/lib/python3.9/site-packages/qnapstats/qnap_stats.py", line 217, in get_system_stats resp = self._get_url( File "/usr/local/lib/python3.9/site-packages/qnapstats/qnap_stats.py", line 76, in _get_url result = self._execute_get_url(url, **kwargs) File "/usr/local/lib/python3.9/site-packages/qnapstats/qnap_stats.py", line 89, in _execute_get_url self._debuglog("Appending access_token (SID: " + self._sid + ") to url") TypeError: can only concatenate str (not "NoneType") to str

Sorry, it seems I never followed up :slight_smile: Have made a dedicated user for HA in the admin group without 2FA (I have not given that user any access to any shared folders etc.). That works for me.
My QTS version is Qnap firmware which is QTS 5.0.0.1891 but it has also worked with the previous versions.

Great to hear it is working.

I’m having this issue also. One thing that may be different with my setup is that I used Let’s Encrypt as my certificate… which means that I’m using the <nas_name>.myqnapcloud.com address. I’m not forwarding the port, but using the FQDN gets me to my NAS when I am on my home network from my computers.

What I suspect is that the FQDN is providing the IP6 information which allows the certificate to be valid and therefore gives a successful login.

Does that make any sense?

EDIT I just confirmed that it is resolving the address with the IP6… I tried adding the IP4 to the supervisor hosts file, but that does not appear to work.

Good day, I am having similar issues. I cant see any sensors. I got the same error as in post 30 when I used 2FA. After switching 2FA off I wont get any errors anymore, but still no sensors.
Any idea what I am missing (TS451+, actually running my HA instance in virtualization station on this device)?

Have you listed out all sensors?
Have you created a dedicated QNAP user that can access the QNAP data and are you using that user in the QNAP integration?
I’m only using IP V4 on my network, don’t currently bother with IP V6 at all
I’m also hosting my HA on the QNAP virtualization station, it works flawlessly.

This is my entry in configuration.yaml:

  - platform: qnap
    host: 192.168.0.70 #replace by your local NAS address
    username: uname #replace by your user specific for HA only, doesn't need any access to shared folders
    password: pword #replace by your NAS password for uname
    port: 1000 #replace by your NAS port
    ssl: false
    verify_ssl: false
    monitored_conditions:
      - status
      - system_temp
      - cpu_temp
      - cpu_usage
      - memory_free
      - memory_used
      - memory_percent_used
      - network_link_status
      - network_tx
      - network_rx
      - drive_smart_status
      - drive_temp
      - volume_size_free
      - volume_size_used
      - volume_percentage_used`Preformatted text`

Note: I have given the user admin rights as outside access to my NAS is anyway not possible, haven’t tried without admin rights

Works, now ty. Was a stupid mistake entity was calles after the qnap host name. It was there, but I simply did not find it :frowning:

Hey mate, facing same problem as you, did you manage to solve it?

Nope unfortunately, decided to not integrate the Qnap.

hello guys
i have new home assitant install i wnet from rpi4 to proxmox
i had integrated qnap to see free space but now i cant do it i tried new admin user on qnap but it’s not working is this integration broken i see pretty much of you had problems with it
im running Home Assistant 2022.11.5

I just updated HA (first update for some time) to HA 2022.12.7, Supervisor 2023.03.1, OS 9.5, Frontend 20221213.1

  • and the QNAP integration has stopped working.

From my (amateur) analysis of the logs, it is timing-out.

Anyone still got the QNAP integration running with the latest HA ?