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
73.93k stars 30.99k forks source link

Synology DSM Integration keeps going UNAVAILABLE #128641

Open jcmleng opened 1 month ago

jcmleng commented 1 month ago

The problem

My Synology DSM220 keeps going Unavailable at random intervals. This was a problem many months back, appears to have been fixed, but in the past 2-3 weeks, have noticed the Unavailable occurring very frequently again, enough for it be very noticeable. Am unsure if Core 2024.10.2 caused the issue as I was not watching this occurrence closely until the last few days.

I have not changed anything around my Synology DSM for many years now, both on the DSM itself and the Synology DSM integration within HA.

Noticed that this issue was reported as #115062, but that issue has been closed, hence the opening of this issue.

What version of Home Assistant Core has the issue?

Core-2024.10.2

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

Synology DSM

Link to integration documentation on our website

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

Diagnostics information

See attached debug logs over 2 time periods. home-assistant_synology_dsm_2024-10-18T01-31-14.744Z.log home-assistant_synology_dsm_2024-10-18T08-17-36.861Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

This error seems to consistently showing up and correlates to the Synology DSM logbook entries which show the NAS being Unavailable.

2024-10-18 11:59:41.654 DEBUG (MainThread) [synology_dsm.synology_dsm] RESPONSE: {'error': {'code': 1052, 'errors': {'err_line': 194, 'err_msg': 'Transmition get failed Result.'}}, 'success': False}
2024-10-18 11:59:41.654 DEBUG (MainThread) [synology_dsm.synology_dsm] Session error: 1052

Additional information

Reloading the Synology DSM integration makes the device and entities available again, but it then goes unavailable again thereafter.

My DSM has a fixed IP address and is on the same network as my HA server.

home-assistant[bot] commented 1 month 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)

mvaneijken commented 1 month ago

Same here. Removed the integration and tried to configure it again, but without any positive result. Error in log:

2024-10-23 09:28:04.373 ERROR (MainThread) [homeassistant.components.synology_dsm.config_flow] {'api': 'SYNO.Core.System.Utilization', 'code': 1052, 'reason': 'Unknown', 'details': {'err_line': 194, 'err_msg': 'Transmition get failed Result.'}}

I have another Synology NAS (DS918+) connected to Home Assistant, that one is still working fine. A difference between the two is that the failing NAS (DS1618+) has Survilance Station active.

mib1185 commented 1 month ago

RESPONSE: {'error': {'code': 1052, 'errors': {'err_line': 194, 'err_msg': 'Transmition get failed Result.'}}, 'success': False} comes from the NAs itself

Do you have any hardware issues, especial with external connected devices like USB disks? Did you already try to reboot the NAS?

jcmleng commented 1 month ago

Do you have any hardware issues, especial with external connected devices like USB disks? Did you already try to reboot the NAS?

I have nothing external connected to the NAS. Rebooting now, will monitor and report back.

jcmleng commented 1 month ago

Have rebooted the NAS. In the last 24 hours, these are the error messages that I got from the Logs (all entries with "synology"). The good news is that after the reboot, there has been a very significant drop in the Unavailable occurrence - 3x vs the Unavailable status coming up many times in an hour prior to the reboot.

I think the reboot has restored things to its "normal" behaviour, ie. the droputs happens from time to time, then the integration restores itself 10-15 mins later. In the future, if the frequent Unavailable dropouts occur, I wil reboot my NAS as the first step.

If you could please review and confirm that these occasional dropouts are BAU, will close this issue out thereafter.

2024-10-23 18:14:05.698 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: {('netgear', 'e7b3ef20940ddf782cc82a5decd3f196'): 78676.24622272, ('synology_dsm', '5a2dc902f2eb640ff91be9515c32d1da'): 78680.538134004}

2024-10-24 01:18:59.868 ERROR (MainThread) [homeassistant.components.synology_dsm.coordinator] Error fetching 192.168.1.5 SynologyDSMCentralUpdateCoordinator data: Error communicating with API: {'api': 'SYNO.Core.System.Utilization', 'code': 1052, 'reason': 'Unknown', 'details': {'err_line': 194, 'err_msg': 'Transmition get failed Result.'}}

2024-10-24 01:49:14.268 ERROR (MainThread) [homeassistant.components.synology_dsm.coordinator] Error fetching 192.168.1.5 SynologyDSMCentralUpdateCoordinator data: Error communicating with API: {'api': 'SYNO.Core.System.Utilization', 'code': 1052, 'reason': 'Unknown', 'details': {'err_line': 194, 'err_msg': 'Transmition get failed Result.'}}

2024-10-24 10:23:28.488 ERROR (MainThread) [homeassistant.components.synology_dsm.coordinator] Error fetching 192.168.1.5 SynologyDSMCentralUpdateCoordinator data: Error communicating with API: {'api': 'SYNO.Core.System.Utilization', 'code': 1052, 'reason': 'Unknown', 'details': {'err_line': 194, 'err_msg': 'Transmition get failed Result.'}}

mvaneijken commented 1 month ago

Did a reboot, I was able to add it again. Question is why this was needed, as far as I know nothing is changed on both sides appart from an HA update.