QNAP integration - Not working no Logs about it

Hi community!

I’m trying to integrate my QNAP into home assistant to monitor it.
Bassically I followed the instructions here HA integrations QNAP and added the following code into the Sensors section of my configuration yaml

  - platform: qnap
    host: 192.168.1.xxx
    username: myadminuser
    password: mypass
    port: 8080
    monitored_conditions:
      - status
      - cpu_usage
      - memory_percent_used
      - network_tx
      - volume_percentage_used

Since I usually login with https, I also tried with

  - platform: qnap
    host: 192.168.1.xxx
    username: myadminuser
    password: mypass
    port: 443
    ssl: true
    verify_ssl: false
    monitored_conditions:
      - status
      - cpu_usage
      - memory_percent_used
      - network_tx
      - volume_percentage_used

After restarting HA qnap doesn’t show up on the integrations page. But I cannot see any logs about it.
I go to Settings/System/Logs there is no reference to QNAP errors or warnings. I have no clue where to look. Any ideas?

Thanks

Try dropping the port line and logging in with http

Thanks for quick reply Robert.
I’m afraid that didn’t work:

This is the code i used

  - platform: qnap
    host: 192.168.1.200
    username: myadminuser
    password: mypass
    monitored_conditions:
      - status
      - cpu_usage
      - memory_percent_used
      - network_tx
      - volume_percentage_used

When opening the home-assistant.log file I can find the following, but there are no further references to qnap on the logs (well, except qnapdlna, but it is not related). The http login over port 8080 works just fine.

2023-01-02 10:52:37.670 INFO (SyncWorker_6) [homeassistant.loader] Loaded systemmonitor from homeassistant.components.systemmonitor
2023-01-02 10:52:37.687 INFO (SyncWorker_4) [homeassistant.loader] Loaded qnap from homeassistant.components.qnap
2023-01-02 10:52:37.691 INFO (MainThread) [homeassistant.setup] Setting up sensor
2023-01-02 10:52:37.692 INFO (MainThread) [homeassistant.setup] Setup of domain sensor took 0.0 seconds
2023-01-02 10:52:37.692 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.time_date
2023-01-02 10:52:37.692 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.systemmonitor
2023-01-02 10:52:37.692 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.qnap
2023-01-02 10:52:37.692 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=sensor>
2023-01-02 10:52:37.698 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.hassio

Here’s what I’m using;

################################################################################
# QNAP Configuration
################################################################################
- platform: qnap
  host: !secret qnap_host_id
  username: !secret qnap_id
  password: !secret qnap_password
  monitored_conditions:
    - status
    - system_temp
    - cpu_temp
    - cpu_usage
    - memory_used
    - network_link_status
    - memory_percent_used
    - network_tx
    - network_rx
    - drive_smart_status
    - drive_temp
    - volume_size_free
    - volume_size_used
    - volume_percentage_used

Looks like your indentation may be off a little! Copied you code from above - Everything from host: downward needs to be pushed left by two spaces.

- platform: qnap
    host: 192.168.1.200
    username: myadminuser
    password: mypass
    monitored_conditions:
      - status
      - cpu_usage
      - memory_percent_used
      - network_tx
      - volume_percentage_used

hmm
I think indentation is correct. When you did the copy-paste, I think you missed the first two spaces before ‘- platform’
That is because this is directly on the configuration.yaml under the ‘sensor’ components.
Anyway, took the change to finally move everthing into a ‘sensors.yaml’ and do the import con the main configuration.yaml
Off course, no change :slight_smile:

Out of curiosity, what HA version are you using and which qnap?
I’m on latest HA and Qnap is TS-431K on latest firmware.

I’m running a TS251 with firmware version QTS 5.0.1.2248 (Latest)

HA details;

Supervisor 2022.12.1
Operating System 9.4
Frontend 20221213.1 - latest

@kdober Don’t know if it makes a difference or not; I set up a dedicated account on the QNAP for this integration. The account has only Administrative privileges.

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