### The problem
Since a couple of weeks now, I'm facing the issue that controll… commands to FritzBox Smart Home Dect Devices are failing, due to an autorization issue. Restarting HA as well as reloading the integration config entry solves this problem for about 10 minutes, after that time, the same issue appears. Comparing log files on HA server and FritzBox shows, that HA tries to connect to the FritzBox with an invalid Seesion-ID, which forces the FritzBox to kill all ongoing and valid sessions which belong to the home assistant server IP address.
**FritzBox Log:**
<img width="695" height="572" alt="Image" src="https://github.com/user-attachments/assets/9c22ce8f-98bc-4c10-bc19-5abf206ab51f" />
**HA Log entry of a failed script execution, which tried to open the shutters of a window through FritzBox Smart Home integration:**
Logger: homeassistant.components.script.schlafzimmer_morgens_verlassen_alexa
Quelle: helpers/script.py:524
Integration: Skript (Dokumentation, Probleme)
Erstmals aufgetreten: 06:51:32 (1 Vorkommnis)
Zuletzt protokolliert: 06:51:32
Schlafzimmer morgens verlassen (Alexa): Error executing script. Unexpected error for call_service at pos 1: 403 Client Error: Forbidden for url: http://192.168.178.1/webservices/homeautoswitch.lua?switchcmd=setblind&sid=4d7f8d68374fb906&target=open&ain=14276+0532517-1
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 524, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1012, in _async_step_call_service
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<9 lines>...
)
^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 624, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2835, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2878, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 852, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
hass, entity, func, data, call.context
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 924, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/group/cover.py", line 183, in async_open_cover
await self.hass.services.async_call(
COVER_DOMAIN, SERVICE_OPEN_COVER, data, blocking=True, context=self._context
)
File "/usr/src/homeassistant/homeassistant/core.py", line 2835, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2878, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 852, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
hass, entity, func, data, call.context
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 924, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/fritzbox/cover.py", line 74, in async_open_cover
await self.hass.async_add_executor_job(self.data.set_blind_open, True)
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.13/site-packages/pyfritzhome/devicetypes/fritzhomedeviceblind.py", line 43, in set_blind_open
self._fritz.set_blind_open(self.ain, wait)
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pyfritzhome/fritzhome.py", line 449, in set_blind_open
self._set_blind_state(ain, "open")
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pyfritzhome/fritzhome.py", line 445, in _set_blind_state
self._aha_request("setblind", ain=ain, param={"target": state})
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pyfritzhome/fritzhome.py", line 119, in _aha_request
plain = self._request(url, params)
File "/usr/local/lib/python3.13/site-packages/pyfritzhome/fritzhome.py", line 47, in _request
rsp.raise_for_status()
~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 1026, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: http://192.168.178.1/webservices/homeautoswitch.lua?switchcmd=setblind&sid=4d7f8d68374fb906&target=open&ain=14276+0532517-1
### What version of Home Assistant Core has the issue?
core-2025.10.3
### What was the last working version of Home Assistant Core?
core-2025.9.x
### What type of installation are you running?
Home Assistant OS
### Integration causing the issue
Fritz!SmartHome
### Link to integration documentation on our website
https://www.home-assistant.io/integrations/fritzbox/
### Diagnostics information
_No response_
### Example YAML snippet
```yaml
alias: Schlafzimmer morgens verlassen (Alexa)
sequence:
- action: cover.open_cover
metadata: {}
data: {}
target:
entity_id: cover.schlafzimmerrollladen_2
- target:
entity_id: input_boolean.schlafzimmerrollladen_geoffnet_durch_alexa
data: {}
action: input_boolean.turn_on
- data: {}
action: script.schlafzimmer_alle_lichter_ausschalten
mode: single
icon: mdi:sun-clock-outline
```
### Anything in the logs that might be useful for us?
```txt
Logger: homeassistant.components.script.schlafzimmer_morgens_verlassen_alexa
Quelle: helpers/script.py:524
Integration: Skript (Dokumentation, Probleme)
Erstmals aufgetreten: 06:51:32 (1 Vorkommnis)
Zuletzt protokolliert: 06:51:32
Schlafzimmer morgens verlassen (Alexa): Error executing script. Unexpected error for call_service at pos 1: 403 Client Error: Forbidden for url: http://192.168.178.1/webservices/homeautoswitch.lua?switchcmd=setblind&sid=4d7f8d68374fb906&target=open&ain=14276+0532517-1
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 524, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1012, in _async_step_call_service
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<9 lines>...
)
^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 624, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2835, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2878, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 852, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
hass, entity, func, data, call.context
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 924, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/group/cover.py", line 183, in async_open_cover
await self.hass.services.async_call(
COVER_DOMAIN, SERVICE_OPEN_COVER, data, blocking=True, context=self._context
)
File "/usr/src/homeassistant/homeassistant/core.py", line 2835, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2878, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 852, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
hass, entity, func, data, call.context
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 924, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/fritzbox/cover.py", line 74, in async_open_cover
await self.hass.async_add_executor_job(self.data.set_blind_open, True)
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.13/site-packages/pyfritzhome/devicetypes/fritzhomedeviceblind.py", line 43, in set_blind_open
self._fritz.set_blind_open(self.ain, wait)
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pyfritzhome/fritzhome.py", line 449, in set_blind_open
self._set_blind_state(ain, "open")
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pyfritzhome/fritzhome.py", line 445, in _set_blind_state
self._aha_request("setblind", ain=ain, param={"target": state})
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pyfritzhome/fritzhome.py", line 119, in _aha_request
plain = self._request(url, params)
File "/usr/local/lib/python3.13/site-packages/pyfritzhome/fritzhome.py", line 47, in _request
rsp.raise_for_status()
~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 1026, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: http://192.168.178.1/webservices/homeautoswitch.lua?switchcmd=setblind&sid=4d7f8d68374fb906&target=open&ain=14276+0532517-1
```
### Additional information
_No response_