core: Unable to add second Synology DSM instance to HomeAssistant

The problem

Possibly similar to the issue described in the closed ticket #34991, adding a second Synology DSM instance fails.

image

Environment

arch x86_64
dev false
docker true
hassio false
installation_type Home Assistant Container
os_name Linux
os_version 4.4.59+
python_version 3.8.5
timezone UTC
version 0.115.0
virtualenv false
  • Home Assistant Core release with the issue: 0.115.0, 0.114.x
  • Last working Home Assistant Core release (if known): n/a
  • Operating environment (OS/Container/Supervised/Core): Container
  • Integration causing this issue: synology_dsm
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/synology_dsm

Problem-relevant configuration.yaml

All configured via UI.

Traceback/Error logs

Nothing found in debug logs matching the time or failure message.

Additional information

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

Just wanted to say thanks for looking into this and then so quickly putting forward a path to resolution.

The easiest solution should be simple remove the condition or not api.storage.disks_ids from _login_and_fetch_syno_info(), because all other references or usages of api.storage.disks_ids are conditional, but not required so that no regressions are expected (of course has to be tested). I will create a new PR for that…

So, using custom component with copied source, got this:

    # if (
    #     not api.information.serial
    #     or api.utilisation.cpu_user_load is None
    #     or not api.storage.disks_ids
    #     or not api.storage.volumes_ids
    #     or not api.network.macs
    # ):
    #     raise InvalidData
    _LOGGER.debug("HA!!!!!!!!!________________________________")
    _LOGGER.debug(api.information.serial)
    _LOGGER.debug(api.utilisation.cpu_user_load)
    _LOGGER.debug(api.storage.disks_ids)
    _LOGGER.debug(api.storage.volumes_ids)
    _LOGGER.debug(api.network.macs)

to output this:

2020-10-28 15:57:49 DEBUG (SyncWorker_12) [custom_components.synology_dsm.config_flow] HA!!!!!!!!!________________________________
2020-10-28 15:57:49 DEBUG (SyncWorker_12) [custom_components.synology_dsm.config_flow] <string_serial>
2020-10-28 15:57:49 DEBUG (SyncWorker_12) [custom_components.synology_dsm.config_flow] 5
2020-10-28 15:57:49 DEBUG (SyncWorker_12) [custom_components.synology_dsm.config_flow] []
2020-10-28 15:57:49 DEBUG (SyncWorker_12) [custom_components.synology_dsm.config_flow] ['volume_1', 'volume_2']
2020-10-28 15:57:49 DEBUG (SyncWorker_12) [custom_components.synology_dsm.config_flow] [<string_mac>]

Taking into consideration that this is a virtual DSM, it makes sense that disk_ids is an empty array.

On a slightly unrelated note, while trying to find source code, I downloaded it first from current master, and was able to reproduce #42493 on “0.116.4”