QTS 5.0.0 Qnap integration issue
See original GitHub issueThe problem
Cpu temperature, Cpu usage and network interfaces info are no longer working. I’ve this issue since I upgraded my qts to 5.0.0 (running on a TVS-673e NAS with a 10Gb nic ) I already had a similar issue in the past but the integration was fixed. 5.0.0 qts broke it again I guess
What version of Home Assistant Core has the issue?
core-2021.12.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Qnap
Link to integration documentation on our website
https://www.home-assistant.io/integrations/qnap/
Example YAML snippet
- platform: qnap
host: !secret ip_nas
port: !secret qnap_port
username: !secret qnap_user
password: !secret qnap_psw
monitored_conditions:
- status
- cpu_usage
- cpu_temp
- system_temp
- memory_percent_used
- network_tx
- network_rx
- volume_percentage_used
- volume_size_free
- volume_size_used
- drive_smart_status
Anything in the logs that might be useful for us?
2021-12-12 17:26:01 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform qnap
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 613, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 748, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 505, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 511, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 363, in state
value = self.native_value
File "/usr/src/homeassistant/homeassistant/components/qnap/sensor.py", line 380, in native_value
data = self._api.data["bandwidth"][self.monitor_device]
KeyError: 'eth4'
2021-12-12 17:26:01 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up qnap platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 257, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 613, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 748, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 505, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 511, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 363, in state
value = self.native_value
File "/usr/src/homeassistant/homeassistant/components/qnap/sensor.py", line 380, in native_value
data = self._api.data["bandwidth"][self.monitor_device]
KeyError: 'eth4'
Additional information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:22 (3 by maintainers)
Top Results From Across the Web
How do I fix login issues for QTS / QuTS hero? - QNAP
Refresh webpage and log in to QTS as admin. Go to Control Panel > Network&File Services > Win/Mac/NFS > Microsoft Networking. Select Standalone...
Read more >QTS 5.0.0 | Release Notes | QNAP
QTS 5.0.0 | Release Notes. You can get all of QNAP operating systems release notes ... Fixed and Known Issues. QTS 5.0.0.2131 build...
Read more >QTS 5.0 | QNAP
The new QVPN 3.0 integrates the popular, lightweight, and reliable WireGuard VPN, providing you with an easy-to-use interface for setting up a secure...
Read more >QTS 5.0.0.2131 build 20220815 | Release Notes - QNAP
Known Issues · QTS and QuTS hero with newer kernel versions do not support ATTO Fibre Channel adapters. · Thunderbolt connection between the...
Read more >QTS 5.0.1 | Release Notes | QNAP (US)
We also include fixes to reported issues and provide information about known issues. ... Nevertheless, if you update the firmware from QTS 5.0.0...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I experienced the same problem for several months, ever since upgrading to QTS 5. I finally decided to do more troubleshooting and found the following:
I use a unique admin account for Home Assistant monitoring, so there was no MFA configured to interfere with access. However, after reading through the thread, I noticed that the integration works by essentially logging into the web UI to pull information, so I decided to log into the web UI as the home assistant admin user and was prompted to accept the new privacy policy. Once I accepted the policy and clicked through the “intro,” the Qnap integration started working again.
For anyone else having problems, I recommend doing the same thing. First, create a unique admin account just for Home Assistant monitoring. Second, login as that account and click through any agreements, warnings, wizards, etc. Last, setup the Home Assistant Qnap integration to use this new admin user.
I’m 99% sure it’s because of the MFA.
I gave up and installed Netdata via qpkg on the NAS. You can then use that to pull through stats to HA.
https://forum.qnap.com/viewtopic.php?f=320&t=121518&sid=8c9002611c64953e865c9068db9b19fb
https://www.home-assistant.io/integrations/netdata/
Its a bit of a faff to set up but there are way more stats that you can pull.