core: problem with DSM integration, "loosing" authentication couple of times per day

The problem

The DSM integration regularly (every few hours) “loses” authentication. especially the part responsible for the Surveillance Station.

It happens after I updated to 2023.4.1. Now I am on 2023.4.4 and it still does not work properly! I have not updated anything on Synology. I have installed the latest Surveillance Station which worked fine before 2023.4.1 along with HA.

To fix this, sometimes reloading the integration helps or I am prompted to authenticate again. This has never happened, only when I did some updates on Synology that required a new login or a change of the SSL certificate

Logger: homeassistant.components.synology_dsm.coordinator
Source: helpers/update_coordinator.py:193 

Integration: Synology DSM (documentation, issues) 
First occurred: 15. April 2023 um 20:14:35 (4 occurrences) 
Last logged: 09:38:20

Error fetching 192.168.100.102 SynologyDSMCameraUpdateCoordinator data: Error communicating with API: {'api': 'SYNO.SurveillanceStation.Camera.Event', 'code': 105, 'reason': 'Insufficient user privilege', 'details': None}
Error fetching 192.168.100.102 SynologyDSMCameraUpdateCoordinator data: Error communicating with API: {'api': 'SYNO.SurveillanceStation.Camera', 'code': 105, 'reason': 'Insufficient user privilege', 'details': None}

What version of Home Assistant Core has the issue?

2023.4.4

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

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

does anyone have the same problem ? Maybe someone can give me a tip on how to fix this annoyance.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 17 (5 by maintainers)

Most upvoted comments

looks like its working correctly now after updating to 2023.5.0 😃

next Wednesday 😉

as i already assumed in https://github.com/home-assistant/core/issues/91499#issuecomment-1519062058 you NAS is re-discovered every 5 minutes (once by it’s ipv4 and in the other moment by its ipv6 address) which causes the integration to re-configure and reload such often. This is solved in #92088 which is already available in current beta, so also in upcoming 2023.5 release. As workaround, disable IPv6 for the time being. After you have update HA you may need to add the NAS again by it’s ipv4 address (without removing it from HA!), this will update the existing configuration in HA.

HI @helmarw

I think “we” have two issues here

1. authorization error

the logs of your Synology shows, that the user “helmar” (and later “ha_user”) logs on very often, but HA should only logon once at startup and reuses the existing connection 🤔 Please download and provide the diagnostics data.

btw. all about the needed user permission and configuration is documented - see the Separate User Configuration chapter

2. IPv6 issue

there is an open report about IPv6 issues may I ask you to also try to provide the debug outputs from https://github.com/home-assistant/core/issues/91668#issuecomment-1519026335