Updated, entire network crashing (Draytek routers)

I do wonder if this is a Matter 1.1 update that you pointed out earlier

Probably better to read that. It refers to IPv6 being enabled internally, IGMP, multicast etc

Same issue - 2023.6 is making my Draytek router reboot, killing the network. I have a Vigor 2762 and have had IGMP proxy and snooping turned on for years. I turned OFF just UPNP in my case and rebooted Home Assistant and it’s been stable since. I’m going back to 2023.5 though until this is understood.

My case is a Pi4 running DEB11 and Home Assistant supervised

Has 2023.6.1 addressed this issue?

No - I tried 2023.6.1 before turning off UPnP on the router.

1 Like

Hi all…

I’ve had the same problem here…

IGMP Proxy and IGMP Snooping was already enabled on my DrayTek 2862 with firmware version 3.9.9.1_BT, but IGMP Fast Leave was not enabled.

Enabling that 3rd option didn’t help.

However after diabling UPnP, my router and network are now stable and I have been able to keep HA on 2023.6.0 for now.

Hopefully someone will figure out what the hell that was all about!

Cheers… Andy

@everyone: it would be helpful if affected people could follow-up on the question of balloob. Finding the root cause seems pretty important.

1 Like

Hi @balloob

I re-enabled UPnP on my DrayTek and rebooted it, then commented out default_config and restarted everything… Unfortunately problem is still apparent…

Let me know if there is anything else you would like me to try…

Cheers… Andy.

2 Likes

I’m having the same issue here with a Draytek 2862ac running firmware 3.9.9_BT.

Took a bit of figuring out what was causing it before I discovered it was HA!

Managed to get up and running again by disabling the network to the Home Assistant VM and restoring backup via the console CLI.

I am also having problems using a standard haos build (32bit) on as Raspberry Pi 3b.
Unable to access anything on the network and had to pull the power unit out as PI was to hot to hold.
The router is a Draytek 2862.

Core 2023.6.2 has not fixed the problem either.

Is anyone actively looking at this issue?

I have a support ticket open with Draytek, but no response so far. I’m not sure if will help if others open duplicate requests reporting the same problem.

From using Wireshark to have a look what’s going on with HA 2023.6.2 running, I’m seeing SSDP messages from HA using IPv6 (everything else on my network is only using IPv4 for SSDP) eg

Simple Service Discovery Protocol
    M-SEARCH * HTTP/1.1\r\n
    HOST:[FF02::C%2]:1900\r\n
    MAN:"ssdp:discover"\r\n
    MX:4\r\n
    ST:ssdp:all\r\n
    \r\n
    [Full request URI: http://[FF02::C%2]:1900*]
    [HTTP request 1/10]
    [Next request in frame: 30221]

So I wonder if the problem is that Vigor routers can’t hope with UPnP over IPv6?

1 Like

I have removed from the default config the following
Cloud, media_source, mobile_app, my:, ssdp, and zeroconf.

The router is still crashing and has now downgraded itself to the last version due to the number of reboots.
I do not use ip6 on the network and have not seen any packets on wireshark.
The router only seems to send IGMPv2 packets but HA is sending IGMPv3, also IGMP group 239.255.255.250 is not showing in the routers table.

Hope this helps.

Please report the issue to Draytek, and don’t assume others have. It’s likely they haven’t received enough reports to prioritize fixing their firmware

Reported :slight_smile:

1 Like

Draytek have provided some test firmware for my 2862 - I now just need to find a time to load it and potentially break everything.
Meanwhile one of the reasons I was using UPnP was to monitor the router, I’ve now switched that to SNMP which gives much more data.

For those who might be interested, here’s what I’ve done with SNMP for the Vigor stats now I’ve got UPnP disabled.
Updated with a few more refinements since the original post.

########################################################
### Router Sensors in configuration.yaml
########################################################
sensor:
  # Router Sensors
  - platform: snmp
    host: 192.168.1.1
    community: 'public'
    version: "2c"
    baseoid: 1.3.6.1.2.1.1.1.0
    name: snmp_draytek_info
    scan_interval: 60
    unique_id: "BazT5PE9Bumc"

  - platform: snmp
    host: 192.168.1.1
    community: 'public'
    version: "2c"
    baseoid: 1.3.6.1.2.1.1.3.0
    name: snmp_draytek_uptime
    scan_interval: 60
    value_template: >
      {% set time = value | int %}
      {% set minutes = ((time % 360000) / 6000) | int%}
      {% set hours = ((time % 8640000) / 360000) | int %}
      {% set days = (time / 8640000) | int %}
      {%- if time < 60 -%}
      {{ time }}s
      {%- else -%}
      {%- if days > 0 -%}
      {{ days }}d
      {%- endif -%}
      {%- if hours > 0 -%}
      {%- if days > 0 -%}
      {{ ' ' }}
      {%- endif -%}
      {{ hours }}hr
      {%- endif -%}
      {%- if minutes > 0 -%}
      {%- if days > 0 or hours > 0 -%}
      {{ ' ' }}
      {%- endif -%}
      {{ minutes }}min
      {%- endif -%}
      {%- endif -%}
    unique_id: "v7ZrMck96Cyh"

  - platform: snmp
    host: 192.168.1.1
    community: "public"
    version: "2c"
    baseoid: 1.3.6.1.4.1.7367.3.7.0
    name: snmp_draytek_memory
    unit_of_measurement: '%'
    scan_interval: 60
    unique_id: "Guk5vNot2bA7dK"

  - platform: snmp
    host: 192.168.1.1
    community: 'public'
    version: "2c"
    baseoid: 1.3.6.1.2.1.2.2.1.10.4
    name: snmp_vdsl_in
    device_class: data_size
    unit_of_measurement: 'bytes'
    scan_interval: 10

  - platform: snmp
    host: 192.168.1.1
    community: 'public'
    version: "2c"
    baseoid: 1.3.6.1.2.1.2.2.1.16.4
    name: snmp_vdsl_out
    device_class: data_size
    unit_of_measurement: 'bytes'
    scan_interval: 10

  - platform: snmp
    host: 192.168.1.1
    community: 'public'
    version: "2c"
    baseoid: 1.3.6.1.2.1.10.251.1.2.2.1.2.4.1
    name: snmp_vdsl_down_speed
    device_class: data_rate
    unit_of_measurement: 'Mb/s'
    value_template: "{{ value|int / 1000000 }}"
    scan_interval: 60
    unique_id: "Ftq5FDND4NkMUR"

  - platform: snmp
    host: 192.168.1.1
    community: 'public'
    version: "2c"
    baseoid: 1.3.6.1.2.1.10.251.1.2.2.1.2.4.2
    name: snmp_vdsl_up_speed
    device_class: data_rate
    unit_of_measurement: 'Mb/s'
    value_template: "{{ value|int / 1000000 }}"
    scan_interval: 60
    unique_id: "aqccVx8FXPmEjk"

  - platform: snmp
    host: 192.168.1.1
    community: 'public'
    version: "2c"
    baseoid: 1.3.6.1.2.1.2.2.1.8.4
    name: snmp_vdsl_status
    scan_interval: 60
    value_template: >
      {% if value | int == 1 %}
        Up
      {% else  %}
        Down
      {% endif %}

  - platform: snmp
    host: 192.168.1.1
    community: 'public'
    version: "2c"
    baseoid: 1.3.6.1.2.1.10.94.1.1.2.1.6.4
    name: snmp_vdsl_state
    scan_interval: 20
    unique_id: "RrVZCHS5u4NLXA"
    value_template: >
      {% set input = value %}
      {% set input = (input | regex_findall('.{1,2}') | list)[1:] | map('int', base=16) | map('pack', '>I') | map('string') | map('replace', "\\x00", "") | map('regex_findall', "b'([a-zA-Z]{1})'") | map('first') | select('defined') | join %}
      {{ input }}

  - platform: snmp
    host: 192.168.1.1
    community: 'public'
    version: "2c"
    baseoid: 1.3.6.1.2.1.10.94.1.1.3.1.4.4
    name: snmp_vdsl_snr_upstream
    device_class: signal_strength
    unit_of_measurement: "dB"
    scan_interval: 60
    unique_id: "DeanLB4rsasR6z"

  - platform: snmp
    host: 192.168.1.1
    community: 'public'
    version: "2c"
    baseoid: 1.3.6.1.2.1.10.94.1.1.2.1.4.4
    name: snmp_vdsl_snr_downstream
    device_class: signal_strength
    unit_of_measurement: "dB"
    scan_interval: 60
    unique_id: "CLcyVjyVd4cDMC"

  - platform: template
    sensors:
      internet_speed_in1:
        friendly_name: "Internet Speed VDSL In"
        device_class: data_rate
        value_template: "{{ min(((states.input_number.internet_traffic_delta_in1.state | float(default=0) ) / 1048576 ),states('sensor.snmp_vdsl_down_speed') | float(default=0) ) | round(3) }}"
        unit_of_measurement: "Mbit/s"
        unique_id: "mG9pjpuTmB"

      internet_speed_out1:
        friendly_name: "Internet Speed VDSL Out"
        device_class: data_rate
        value_template: "{{ min(((states.input_number.internet_traffic_delta_out1.state | float(default=0) ) / 1048576 ),states('sensor.snmp_vdsl_up_speed') | float(default=0) ) | round(3) }}"
        unit_of_measurement: "Mbit/s"
        unique_id: "gHK9FUVtvfhzw"

      draytek_model:
        friendly_name: "Draytek Model"
        value_template: >-
          {{ states.sensor.snmp_draytek_info.state.split(':')[1] | replace (', Version','') | trim }}
        unique_id: "3W9SWE8GKPnV"

      draytek_firmware:
        friendly_name: "Draytek Firmware"
        value_template: >-
          {{ states.sensor.snmp_draytek_info.state.split(',')[2].split(' ')[2] }}
        unique_id: "SSgP9ULmKjfx"

input_number:
  internet_traffic_delta_in1:
    name: "Traffic IN Delta 1"
    initial: 0
    min: 0
    max: 1000000000000

  internet_traffic_delta_out1:
    name: "Traffic OUT Delta 1"
    initial: 0
    min: 0
    max: 1000000000000


########################################################
### Router Automations in automations.yaml
########################################################
alias: Vigor - Monitor Internet Traffic In
description: ""
trigger:
  - platform: state
    entity_id: sensor.snmp_vdsl_in
action:
  - service: input_number.set_value
    data_template:
      entity_id: input_number.internet_traffic_delta_in1
      value: >-
        {{ max(((trigger.to_state.state  | int - trigger.from_state.state | int)
        * 8 ) / ( as_timestamp(trigger.to_state.last_changed) -
        as_timestamp(trigger.from_state.last_changed) ),0) }}

alias: Vigor - Monitor Internet Traffic Out
description: ""
trigger:
  - platform: state
    entity_id: sensor.snmp_vdsl_out
action:
  - service: input_number.set_value
    data_template:
      entity_id: input_number.internet_traffic_delta_out1
      value: >-
        {{ max(((trigger.to_state.state | int - trigger.from_state.state | int)
        * 8 ) / ( as_timestamp(trigger.to_state.last_changed) -
        as_timestamp(trigger.from_state.last_changed) ),0) }}
3 Likes

Thanks! I dabbled with SNMP and never got it working that might help!

Draytek have replied to my request:

"
Thank you for contacting technical support. Thank you for reporting this issue, I will be investigating and will get back to you as soon as I have a result.

Regards,
Gjok"

Reported to Draytek.
They seem to be aware: “This is a known issue when using UPnP combined with Home Assistant”

Running Vigor2862L
HA: Any release version ^2023.6.0

Draytek sent a beta-firmware: Version 20220615_STD
I re-enabled UPnP and disabled whatever hack I was trying with IGMP on the router (thanks for the suggestions though - was worth a try).
Also re-enabled UPnP/IGD in HA to pull statistics from router.

Have been running for 26 minutes now without issues.

1 Like