home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.78k stars 30.04k forks source link

Synology integration failing to initiate due to failing API. #126921

Open ab623 opened 3 hours ago

ab623 commented 3 hours ago

The problem

When trying to add Synology DSM as a new integration into Home Assistant, it fails to set up.

Having done some investigation, I believe it is because a single Synology API failing to return, specific the SecurityScan API. This causes the integration to fail and not set up any entities at all. I have attached the appropriate logs that show this.

For my purposes, I do not need to Security Scan API sensors, because that will just give me general update information. I would rather:

What version of Home Assistant Core has the issue?

core-2024.9.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Synology DSM

Link to integration documentation on our website

https://www.home-assistant.io/integrations/synology_dsm/

Diagnostics information

home-assistant_synology_dsm_2024-09-27T13-03-04.684Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-09-27 14:01:42.275 DEBUG (MainThread) [synology_dsm.synology_dsm] Request url: http://192.168.1.200:5000/webapi/entry.cgi?api=SYNO.Core.SecurityScan.Status&version=1&method=system_get&_sid=*********
2024-09-27 14:01:42.276 DEBUG (MainThread) [synology_dsm.synology_dsm] Response status_code: 200
2024-09-27 14:01:42.276 DEBUG (MainThread) [synology_dsm.synology_dsm] Response headers: {'Server': 'nginx', 'Date': 'Fri, 27 Sep 2024 13:01:42 GMT', 'Content-Type': 'application/json; charset="UTF-8"', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Keep-Alive': 'timeout=20', 'Vary': 'Accept-Encoding', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'Cache-Control': 'max-age=0, no-cache, no-store, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0', 'Content-Encoding': 'gzip'}
2024-09-27 14:01:42.276 DEBUG (MainThread) [synology_dsm.synology_dsm] Successful returned data
2024-09-27 14:01:42.276 DEBUG (MainThread) [synology_dsm.synology_dsm] RESPONSE: {'error': {'code': 1300}, 'success': False}
2024-09-27 14:01:42.276 DEBUG (MainThread) [synology_dsm.synology_dsm] Session error: 1300
2024-09-27 14:01:42.276 DEBUG (MainThread) [homeassistant.components.synology_dsm.common] Connection error during setup of '2050SBRVJPF5Y' with exception: {'api': 'SYNO.Core.SecurityScan.Status', 'code': 1300, 'reason': 'Unknown', 'details': None}

Additional information

My Synology device does not open Security Advisor in the front end. It fails with a generic "Operation Failed" error. Having inspected the front end during this error, it makes 100's of calls to the same API with the same error as HomeAssistant.

The payload: api=SYNO.Core.SecurityScan.Status&method=system_get&version=1

The response is always: {"error":{"code":1300},"success":false}

This is deemed to be unfixable by technology support because I have "custom packages" installed on my system and they are unable to investigate further.

home-assistant[bot] commented 3 hours ago

Hey there @hacf-fr, @quentame, @mib1185, mind taking a look at this issue as it has been labeled with an integration (synology_dsm) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `synology_dsm` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign synology_dsm` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


synology_dsm documentation synology_dsm source (message by IssueLinks)