QNAP integration - Not working no Logs about it

I’m completely out of ideas.
I now also created a separate user to be able to identify on the QNAP what is going on.

On home assistant there are not error logs. I would say almost no logs rather than the ‘loaded qnap’ shown previously.
On the Qnap side I can see the new homeassistant user logged in

But no entities or devices for Qnap are shown up :frowning:

@kdober, Have UPS settings on the QNAP been configured as slave? Assuming your UPS is connected to HA.

At this point I don;'t have a UPS.
Settings there are the default ones (USB connection)

That’s likely why there’s no entities showing up in HA. The entities are first read by the QNAP NAS (NUT actually) then passed to HA. If you don’t have a UPS connected, why would you expect there to be readings?

honestly, I’m not sure to understand why I need an UPS energy backup to monitor the QNAP variables like its memory, temperature, processor usage, etc etc.
I have neither read anything that having an UPS power supply to be requirement to read the QNAP variables. Can you point out to some doc that can I read about this?

Thanks :slight_smile:

You don’t - my apologies. I’ve replied incorrectly to your message.

@kdober Here’s one more thought - QNAP has blacklisted HA. Unable to Access QNAP

No poblem :slight_smile:
I’m glad that is the case. I don’t want to buy an UPS to make this work :slight_smile:

I saw that post before making this one. I will re-read that and a few others I found again just in case I missed something.
About the blacklisted I think it is not the case.
Can you confirm this is the right screen I should look for that

Thanks for all your time and help so far!!

I believe it is.

I’ll have a look through other settings on my NAS to see if there’s anything that would restrict acces by HA.

EDIT: Checked the settings on my NAS. Don’t see anything obvious. Have you seen the list of known working devices for this integration? It’s posted at QNAP Stats Integration

oh damn :frowning:
I saw the list before and I thought mine was listed there.
However, mine version is TS-431K and the listed there is only TS-431P

So, likely that is the reason and my device is unsuported :frowning:

I see very little difference between the two models. I wonder if that’s really the problem.

have you ever figured anything out here? i have the exact same situation, the qnap device does not show up anywhere in my devices & services.

i even can see that HA successfully connects to the nas:

there are no popups when i’m logged into the qnap as the hass user. the hass user is in the administrator group, there are no blacklist entries in the security dialogue, nothing i can find. it’s a 451+ with 5.0.1.2376.

the only entry in the logs i get is this - after that nothing (except if i change something so it runs into an error - if i use ssl it tells me it’s not verified and stuff like that, but with the probably “correct” config it doesnt do anything).

2023-06-22 12:50:50.242 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform qnap is taking over 10 seconds.

my config

sensor:
  - platform: qnap
    host: 192.168.0.x
    port: 8080
    timeout: 120
    username: hass
    password: xxxx
    monitored_conditions:
      - status
      - cpu_usage

I think your host, user name and password are incorrect. Try using the NUT add-on with these settings…

- username: admin
  password: "123456"
  instcmds:
    - all
  actions: []

Since QNAP uses a short password, you’ll also need to adjust the Network UPS Tools config by enabling the i_like_to_be_pwned setting.

sadly no, if i change any of that to a wrong value i get an error that it’s not correct, for example if the password is incorrect i get:

2023-06-23 09:50:14.498 ERROR (SyncWorker_0) [homeassistant.components.qnap.sensor] Failed to fetch QNAP stats from the NAS

right now i do not get anything whatsoever. i also do not see a successful connection on the NAS if any of this is wrong, so i am pretty sure that host, username and password are all correct.

also i don’t know what the network ups tools has to do with this? i do not have that installed.

Ah, nuts! I thought you were attempting to monitor a UPS. Disregard my post.

I was having the same issue and may have found the resolution. Also make sure your home assistant user in QNAP is in the administrator group.

  1. Check this out – isn’t exactly related but helped me figure out my error was invalid authentication disforw/qnap: Home Assistant QNAP Integration using ConfigFlow (github.com)
    Looks like this is going to get merged to HA core at some point maybe.

  2. More important: I am not sure if a firmware update changed this or I did, but there are two things to check for 2FA enforcement:
    a. Make sure the enforce 2SV is disabled for the user in question


    b. Make sure the 2SV enforcement is disabled for the “everyone” and “administrators” group (under local groups dropdown) (As well as any other groups the user might be a member of)

    c. If 2SV is enabled for your home assistant user, disable it!

Once I did this, it started working again!

Thank you @disforw for the updated component with config flow and unique IDs!!

Hi @JOHLC

Thanks for your post. I can confirm all my settings about 2FA were correct.
I was using the default Qnap integration that comes with HA. I just switched to the custom HACS integration and problem solved. I can now see the status on the NAS on HA.

Thanks for the tip!!
Cheers
Cristian

I tried to install my QNAP in HA and always got an “Unknown Error”. Nothing in the logs of the QNAP.

I didn’t setup the user for home assistant without admin privileges for obvious security reasons. That was obviously the issue. However, the admin user can delegate administrative tasks to other users in the control panel. I have activated the “System Monitoring” there for the home assistant user and now everything works.

Maybe that helps someone stumbling across this thread :wink:

Sorry, just saw this. Were you able to solve it?