Core: SynologyDSM sensor does not work

Created on 24 Apr 2018  Â·  20Comments  Â·  Source: home-assistant/core

Home Assistant release with the issue: 0.67.1

Last working Home Assistant release (if known): n/a

Operating environment (Hass.io/Docker/Windows/etc.): Docker on Linux

Component/platform: https://www.home-assistant.io/components/sensor.synologydsm/

Description of problem: An error shows up when Home Assistant is starting up, and trying to configure the sensors. No sensors shows up.

Problem-relevant configuration.yaml entries:

platform: synologydsm
host: 192.168.0.10
username: !secret synology_user
password: !secret synology_pass
monitored_conditions:
  - cpu_total_load
  - memory_real_usage
  - network_up
  - network_down
  - disk_smart_status

Traceback (if applicable):

2018-04-24 16:14:37 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/sensor/synologydsm.py", line 109, in run_setup
    for volume in config.get(CONF_VOLUMES, api.storage.volumes):
TypeError: 'NoneType' object is not iterable

Additional information: Im running a DS411slim with version DSM 6.1.6-15266 Update 1.

synologydsm

Most helpful comment

Any progress on this issue? I'm still facing same error code

[homeassistant.core] Error doing job: Future exception was never retrieved
hass nas1 Traceback (most recent call last):
hass nas1 File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
hass nas1 result = self.fn(*self.args, **self.kwargs)
hass nas1 File "/usr/src/app/homeassistant/components/sensor/synologydsm.py", line 113, in run_setup
hass nas1 for volume in config.get(CONF_VOLUMES, api.storage.volumes):
hass nas1 TypeError: 'NoneType' object is not iterable

with this config:

sensor:
  - platform: synologydsm
    entity_namespace: nas
    host: !secret SYNOLOGY_HOST
    port: !secret SYNOLOGY_PORT
    username: !secret SYNOLOGY_USERNAME
    password: !secret SYNOLOGY_PASSWORD
    ssl: false
    # volumes: 
      # - volume1
    # disks:
      # - "/dev/sda"
    monitored_conditions:
      - cpu_total_load
      # - memory_real_usage
      # - memory_size
      # - memory_available_swap
      # - memory_total_swap
      # - volume_status
      # - volume_size_total
      # - volume_percentage_used
      # - volume_size_used

The user is hass which I created for this purpose (member of users and administartor group).
I have tried with all permissions set, but still no success.
If I comment out the line with volumes and disks I dont see any error, but no sensor is showing data even after 12 h of waiting.

Check if you have 2 step verification enabled for administrator group in the control panel -> user -> advanced. After disabling this, it worked for me.

All 20 comments

I have the same DSM version and same HA version and not experiencing this issue. Make sure your user is has admin privileges and that the Synology DiskStation is accessible.

This issue is related with python-synology module https://github.com/StaticCube/python-synology/issues/3

I just retested the issue. I had special characters in my password, and not put quotes around it. It tempoarily removed the error, but no sensors came up in home assistant. After a day, I noticed the error appearing again when rebooting home assistant.

2018-04-27 13:36:12 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/sensor/synologydsm.py", line 109, in run_setup
    for volume in config.get(CONF_VOLUMES, api.storage.volumes):
TypeError: 'NoneType' object is not iterable
2018-04-27 13:36:12 INFO (MainThread) [homeassistant.core] Bus:Handling <Event system_log_event[L]: timestamp=1524836172.476201, level=ERROR, message=Error doing job: Future exception was never retrieved, exception=Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/sensor/synologydsm.py", line 109, in run_setup
    for volume in config.get(CONF_VOLUMES, api.storage.volumes):
TypeError: 'NoneType' object is not iterable
, source=components/sensor/synologydsm.py>

Hello folks, good morning

I'm using DS213 and got the same issue on the original DSM version 5.2.

I was checking the code and then I decided upgrade the synology before working in the code. After reaching 6.0 the call api.storage.volumes started to work, then I fully upgraded DSM 6.2-23739 and everything is working as expected now.

Waldirio

Hello

FWIW I'm running DSM 6.2-23739 on a DS412+ and get the same error as the OP

Home Assistant release with the issue: 0.74.2

Last working Home Assistant release (if known): HA v73.1.

Operating environment (Hass.io/Docker/Windows/etc.): Docker on Linux

I have two Synologys and they are DS713+ and DS1813+. Both are at code level DSM 6.2-23739 Update 2

My problem: No sensors show up.

2018-07-27 09:14:35 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/sensor/synologydsm.py", line 113, in run_setup
    for volume in config.get(CONF_VOLUMES, api.storage.volumes):
TypeError: 'NoneType' object is not iterable
2018-07-27 09:14:35 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/sensor/synologydsm.py", line 113, in run_setup
    for volume in config.get(CONF_VOLUMES, api.storage.volumes):
TypeError: 'NoneType' object is not iterable

Note; I just fell back to HA 0.73.1 and I don't have any problems.

Hello @larry702

Could you share the piece of your configuration configuration.yaml related to the synology ?

Best

Hello

I have (hopefully) sent you the key HA files. I redacted some information that I didn’t think was important but can share it if really necessary.

I also sent screen shots of my two Synology NAS devices. The show I am not using HTTPS and the release of DSM software installed.

Just let me know if I need to send you more.

Regards

Larry Webb

From: waldirio [mailto:[email protected]]
Sent: Friday, July 27, 2018 5:32 PM
To: home-assistant/home-assistant home-assistant@noreply.github.com
Cc: larry702 larry@4securemail.com; Mention mention@noreply.github.com
Subject: Re: [home-assistant/home-assistant] SynologyDSM sensor does not work (#14072)

Hello @larry702 https://github.com/larry702

Could you share the piece of your configuration configuration.yaml related to the synology ?

Best

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/home-assistant/home-assistant/issues/14072#issuecomment-408554795 , or mute the thread https://github.com/notifications/unsubscribe-auth/AiRQ6Ahg0BSrEzSvRPbJ2DXvclPbzBemks5uK5TigaJpZM4ThyMv .

--Certified Virus Free by 4SecureMail.com ICSA-Certified Scanner--

Hello @larry702

I didn't receive your message/screens

What I'm asking is the output like below

  - platform: synologydsm
    name: nas
    host: <ip address>
    username: <username>
    password: <password>
    monitored_conditions:
      - cpu_other_load
      - cpu_user_load
      - cpu_system_load

Just to check if you are forcing any configuration which could generate any issue to you.

According to the example above, your Synology should works.

Best

Same problem.
Home Assistant release: 0.74.0
Synology DS1517+ (DSM 6.2-23739 Update 2)
Operating environment: Docker on same Synology trying to monitor

In configuration.yaml:

sensor:
  - platform: synologydsm
    name: Synology
    host: !secret synology_ip
    username: !secret synology_username
    password: !secret synology_pass
    monitored_conditions:
      - cpu_other_load
      - cpu_user_load
      - cpu_system_load

Error:

Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/sensor/synologydsm.py", line 113, in run_setup
    for volume in config.get(CONF_VOLUMES, api.storage.volumes):
TypeError: 'NoneType' object is not iterable

Found the problem in my case it was the SSL flag not set.
If not set it will default to TRUE.

Found the problem in my case it was the SSL flag not set.
If not set it will default to TRUE.

This was the fix for me too.

I am still having the same issue even though I set the flag to ssl: false

Did you check that HA IP is not blocked by DSM?

I got it to work. There was some issues with my monitored conditions. But I also think a few of the monitored conditions available in the home assistant component are not available for my synology DS157+ it seems

Sent from my iPhone

On Nov 10, 2018, at 4:51 AM, msanchezt <[email protected]notifications@github.com> wrote:

Did you check that HA IP is not blocked by DSM?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/home-assistant/issues/14072#issuecomment-437572039, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AqJ5o3dvBdcBPOGuSySUAvxIzNzo5egBks5utqGtgaJpZM4ThyMv.

Any progress on this issue? I'm still facing same error code

[homeassistant.core] Error doing job: Future exception was never retrieved
hass nas1 Traceback (most recent call last):
hass nas1 File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
hass nas1 result = self.fn(*self.args, **self.kwargs)
hass nas1 File "/usr/src/app/homeassistant/components/sensor/synologydsm.py", line 113, in run_setup
hass nas1 for volume in config.get(CONF_VOLUMES, api.storage.volumes):
hass nas1 TypeError: 'NoneType' object is not iterable

with this config:

sensor:
  - platform: synologydsm
    entity_namespace: nas
    host: !secret SYNOLOGY_HOST
    port: !secret SYNOLOGY_PORT
    username: !secret SYNOLOGY_USERNAME
    password: !secret SYNOLOGY_PASSWORD
    ssl: false
    # volumes: 
      # - volume1
    # disks:
      # - "/dev/sda"
    monitored_conditions:
      - cpu_total_load
      # - memory_real_usage
      # - memory_size
      # - memory_available_swap
      # - memory_total_swap
      # - volume_status
      # - volume_size_total
      # - volume_percentage_used
      # - volume_size_used

The user is hass which I created for this purpose (member of users and administartor group).
I have tried with all permissions set, but still no success.
If I comment out the line with volumes and disks I dont see any error, but no sensor is showing data even after 12 h of waiting.

Essentially same traceback regarding /python3.6/concurrent/futures/thread.py for me too. Associated haas user was given restricted admin privileges as per docs. Config is as follows:

    username: !secret
    password: !secret
    monitored_conditions:
      - cpu_total_load
      - memory_real_usage
      - network_up
      - network_down

am receiving the same traceback with homeassistant 0.87 running in virtualenv, user hass in DSM is a member of admin group but has no access to any shares or apps as per documentation of the sensor; NAS is DS216SE and runs DSM 6.2.1-23824 Update 4

Feb 11 15:16:06 pine64 hass[29912]: Traceback (most recent call last):
Feb 11 15:16:06 pine64 hass[29912]:   File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
Feb 11 15:16:06 pine64 hass[29912]:     result = self.fn(*self.args, **self.kwargs)
Feb 11 15:16:06 pine64 hass[29912]:   File "/home/ubuntu/homeassistant/lib/python3.6/site-packages/homeassistant/components/sensor/synologydsm.py", line 113, in run_setup
Feb 11 15:16:06 pine64 hass[29912]:     for volume in config.get(CONF_VOLUMES, api.storage.volumes):
Feb 11 15:16:06 pine64 hass[29912]: TypeError: 'NoneType' object is not iterable

with the following config excerpt:

  - platform: synologydsm
    host: <ip address>
    username: hass
    password: !secret syndsm_pass
    ssl: false
    monitored_conditions:
      - cpu_total_load
      - memory_real_usage
      - disk_status
      - disk_smart_status
      - disk_temp
      - volume_percentage_used

I do believe I have a fix though. synologydsm sensor assumes two defaults, that ssl is true and that default port is 5001. If you do not have SSL set up, it is not enough to set ssl to false, you also have to specify port as 5000 (DSM uses 5000 for http and 5001 for https).

It might be useful to auto-change default port value in code if ssl is set to false or at the very least amend the documentation - let me know and I'll be happy to put in a PR.

Any progress on this issue? I'm still facing same error code

[homeassistant.core] Error doing job: Future exception was never retrieved
hass nas1 Traceback (most recent call last):
hass nas1 File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
hass nas1 result = self.fn(*self.args, **self.kwargs)
hass nas1 File "/usr/src/app/homeassistant/components/sensor/synologydsm.py", line 113, in run_setup
hass nas1 for volume in config.get(CONF_VOLUMES, api.storage.volumes):
hass nas1 TypeError: 'NoneType' object is not iterable

with this config:

sensor:
  - platform: synologydsm
    entity_namespace: nas
    host: !secret SYNOLOGY_HOST
    port: !secret SYNOLOGY_PORT
    username: !secret SYNOLOGY_USERNAME
    password: !secret SYNOLOGY_PASSWORD
    ssl: false
    # volumes: 
      # - volume1
    # disks:
      # - "/dev/sda"
    monitored_conditions:
      - cpu_total_load
      # - memory_real_usage
      # - memory_size
      # - memory_available_swap
      # - memory_total_swap
      # - volume_status
      # - volume_size_total
      # - volume_percentage_used
      # - volume_size_used

The user is hass which I created for this purpose (member of users and administartor group).
I have tried with all permissions set, but still no success.
If I comment out the line with volumes and disks I dont see any error, but no sensor is showing data even after 12 h of waiting.

Check if you have 2 step verification enabled for administrator group in the control panel -> user -> advanced. After disabling this, it worked for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bdraco picture bdraco  Â·  3Comments

kirichkov picture kirichkov  Â·  3Comments

coolriku picture coolriku  Â·  3Comments

i-am-shodan picture i-am-shodan  Â·  3Comments

moskovskiy82 picture moskovskiy82  Â·  3Comments