Alexa devices unavailable after ISP disconnect

I am using the alexa devices core integration. But I think my issue is amazon cloud related. But I cant seem to find a solution. Every night at 22:30 o’clock my ISP is disconnecting my home. Some of my echo devices can not handle that. Some need lots of time to reconnect (available in Home assistant, online in alexa app) some reconnect only after being spoken to. The unavaiable state in home assistant means offline in the alexa app. When they come back online in the alexa app, they are available in home assistant again.
See here one day:


And here one week:

Anyone with the same problem or, even better, a solution?

I started having a similar issue recently, which has really annoyed my partner since she relies on our morning TTS automation. Using the homeassistant.reload_config_entry action on any of the entities gets the devices to become available, so I created an automation to run that action a little bit before the morning automation runs. I added a second trigger to fire if the media_player entities from multiple devices go “unavailable” for a few minutes. The second trigger has only fired once in the 10 days I’ve had it up.

alias: Reload Alexa Devices if Needed
description: >-
  At 7am, if any Alexas are "unavailable" or when multiple Alexas become unavailable, this automation will reload the Alexa Devices config entry so that the morning announcements don't fail silently.
trigger_variables:
  # Just replace this list with a list of your Echoes' media_player entities
  echoes:
    - media_player.bedroom_dot
    - media_player.living_room_dot
    - media_player.bathroom_dot
    - media_player.kitchen_dot
triggers:
  - alias: When it's 7:05am
    note: To make sure echoes are available for morning TTS automations.
    trigger: time
    at: "07:05:00"
  - alias: When more than 2 Alexa Media Players go unavailable for 5 minutes
    trigger: template
    value_template: |-
      {{ echoes | select('is_state','unavailable') | list | count > 2 }}
    for: "00:05:00"
conditions:
  - alias: 1 Hour Throttle
    note: Keeps the automation from running more than once an hour
    condition: template
    value_template: |
      {% set last = this.attributes.last_triggered | default(as_datetime(0),1) %}
      {{ now() >=  last + timedelta(minutes = 60) }}
  - alias: Check if any of the Alexa media players are unavailable
    note: To avoid unnecessary reloads when triggered by Time.
    condition: template
    value_template: "{{ echoes | select('is_state' ,'unavailable') | list | count > 0 }}"
actions:
  - variables:
      an_echo: "{{echoes|random}}" 
  - action: homeassistant.reload_config_entry
    data:
      entry_id: "{{ config_entry_id(an_echo) }}"
    target:
      entity_id: "{{ an_echo }}"
mode: single

Thank you for your solution. In my case not even a restart of HA is helping.

Why? Have you looked at other ISPs?

This is standard in Germany. Every Provider will do that once in 24h. But the problem also happens after every other disconnect from internet for whatever reason. The damn dots do not reconnect to amazon servers automatically.

Thanks, I did not know that this is standard practice in Germany. I still wonder why they do it though.

I tried it this morning. Reloading the config entry on one of the unavailable devices brings them all back. Nice. Maybe this is something to be handled by the integration itself?

Hi,

A quick internet search for “German ISP disconnecting every 24 hours” led me to the term “Zwangstrennung”.

Some German ISPs still use it, while others no longer do. The disconnections could also be caused by a setting on the Fritz!Box.

Last two days the reload did not work. To make it very clear: The unavailable Dots are offline in the alexa app. When I talk to them they react normal and become online afterwards.