Did 2021.12 break Synology integration?

Hi all,

After upgrading to 2021.12 my NAS-sensors in HA went dead. In the integrations page the Synology DSM-panel showed the red border.

I removed the integration and tried to install a new one, but when filling in the parameters it returns an ‘unexpected error’.

Debug log shows that authentication goes well, but apparently after that something breaks. Anyone who knows what to make of this?

Log-messages:

2021-12-15 15:41:39 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] Request url: http://192.168.59.11:5000/webapi/auth.cgi?account=********&passwd=********&enable_device_token=yes&device_name=homeassistant&format=sid&api=SYNO.API.Auth&version=6&method=login
2021-12-15 15:41:39 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] Request status_code: 200
2021-12-15 15:41:39 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] Request headers: {'Server': 'nginx', 'Date': 'Wed, 15 Dec 2021 14:41:39 GMT', 'Content-Type': 'text/plain; 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', 'P3P': 'CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"', 'Set-Cookie': 'smid=uFMXBgOhC79E7G9w3rwP1peNtk253xXeXnNDpYnLBXv8ISSbw5fLxcjeejCHbW3wSd8beMGh3mk5K3auXLVQ3w;expires=Thu, 15-Dec-2022 14:41:39 GMT;path=/;HttpOnly', 'Content-Encoding': 'gzip'}
2021-12-15 15:41:39 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] Request Method: GET
2021-12-15 15:41:39 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] Successful returned data
2021-12-15 15:41:39 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] API: SYNO.API.Auth
2021-12-15 15:41:39 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] RESPONSE: {'data': {'is_portal_port': False, 'sid': 'D6oQ-0chQaSP3CTs4XzI9OQTMk3mhmxpvP4-DFubt-YKoTFgV1eum6BX7m5uZoyJ8ZI5aEDIx4oXD6dDP_oA6s'}, 'success': True}
2021-12-15 15:41:39 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] Authentication successful, token: D6oQ-0chQaSP3CTs4XzI9OQTMk3mhmxpvP4-DFubt-YKoTFgV1eum6BX7m5uZoyJ8ZI5aEDIx4oXD6dDP_oA6s
2021-12-15 15:41:39 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] Request url: http://192.168.59.11:5000/webapi/entry.cgi?api=SYNO.DSM.Info&version=2&method=getinfo&_sid=********
2021-12-15 15:41:39 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] Request status_code: 200
2021-12-15 15:41:39 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] Request headers: {'Server': 'nginx', 'Date': 'Wed, 15 Dec 2021 14:41:39 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'}
2021-12-15 15:41:39 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] Request Method: GET
2021-12-15 15:41:39 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] Successful returned data
2021-12-15 15:41:39 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] API: SYNO.DSM.Info
2021-12-15 15:41:39 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] RESPONSE: {'data': {'codepage': 'enu', 'model': 'DS218', 'ram': 2048, 'serial': '19B0QEN052500', 'temperature': 40, 'temperature_warn': False, 'time': 'Wed Dec 15 15:41:39 2021', 'uptime': 28860442, 'version': '25426', 'version_string': 'DSM 6.2.3-25426 Update 3'}, 'success': True}
2021-12-15 15:41:46 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] Request url: http://192.168.59.11:5000/webapi/entry.cgi?api=SYNO.Core.System.Utilization&version=1&method=get&_sid=********
2021-12-15 15:41:46 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] Request status_code: 200
2021-12-15 15:41:46 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] Request headers: {'Server': 'nginx', 'Date': 'Wed, 15 Dec 2021 14:41:46 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'}
2021-12-15 15:41:46 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] Request Method: GET
2021-12-15 15:41:46 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] Successful returned data
2021-12-15 15:41:46 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] API: SYNO.Core.System.Utilization
2021-12-15 15:41:46 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] RESPONSE: {'error': {'code': 1052, 'errors': {'err_key': '', 'err_line': 895, 'err_msg': 'Transmition get failed Result.', 'err_session': ''}}, 'success': False}
2021-12-15 15:41:46 DEBUG (SyncWorker_3) [synology_dsm.synology_dsm] Session error: 1052
2021-12-15 15:41:46 ERROR (MainThread) [homeassistant.components.synology_dsm.config_flow] {'api': 'SYNO.Core.System.Utilization', 'code': 1052, 'reason': 'Unknown', 'details': {'err_key': '', 'err_line': 895, 'err_msg': 'Transmition get failed Result.', 'err_session': ''}}

Hello !

Same here, lost communication with my Synology after upgrade.
I tried several times, with or without SSL certificate, with or without 2FA, no change.

(@jph59, where to look for the logs, to compare to yours ?)

Working great here - tested on 2021.12 - 2021.12.3 on both DSM 6 and DSM 7.

For debug logs you first have to add some lines to configuration.yaml:

logger:
  default: info
  logs:
    homeassistant.components.synology_dsm: debug
    synology_dsm: debug

Then restart HA en look in home-assistant.log

1 Like

Doesn’t seem to be version-related after all. I have an extra HA instance running 2021.10.6 and that one can’t connect either. Hmmm.

I fixed this. The NAS is mounting an NFS share from the HA-server and somehow the NFS-server stopped working or didn’t start well after reboot. And somehow that hindered some authentication processes (snmpd didn’t work either). Hmmm, strange side effect. Anyway, after restarting the NFS-server everything started working again.

And yes, I am aware that the nas mounting a share from the HA-server instead of the other way around may seem odd :slight_smile:

1 Like

OMG Thanks so much, I recover mine thanks to your find… Thanks again! (And yes, strange to use NFS but why not :sweat_smile:)