home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.3k stars 30.61k forks source link

WLED frontend breaks after integrating it into HA #68480

Closed fpfuetsch closed 2 years ago

fpfuetsch commented 2 years ago

The problem

I am running WLED version 0.13.1 on an ESP32. As soon I set up the WLED integration in Home Assistant the WLED frontend breaks after a few minutes and is no longer available. After resetting the controller the frontend is up again for some seconds but the breaks again (only flashing it resolves the problem).

If I do not use the integration, WLED works perfectly fine.

What version of Home Assistant Core has the issue?

core-2022.3.5

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

wled

Link to integration documentation on our website

https://www.home-assistant.io/integrations/wled/

Diagnostics information

{
  "home_assistant": {
    "installation_type": "Home Assistant Container",
    "version": "2022.3.5",
    "dev": false,
    "hassio": false,
    "virtualenv": false,
    "python_version": "3.9.9",
    "docker": true,
    "arch": "armv7l",
    "timezone": "Europe/Berlin",
    "os_name": "Linux",
    "os_version": "5.10.63-v7l+",
    "run_as_root": true
  },
  "hacs": {
      "version": "1.22.0",
      "requirements": [
        "aiogithubapi>=21.11.0"
      ]
    }
  },
  "integration_manifest": {
    "domain": "wled",
    "name": "WLED",
    "config_flow": true,
    "documentation": "https://www.home-assistant.io/integrations/wled",
    "requirements": [
      "wled==0.13.0"
    ],
    "zeroconf": [
      "_wled._tcp.local."
    ],
    "codeowners": [
      "@frenck"
    ],
    "quality_scale": "platinum",
    "iot_class": "local_push",
    "is_built_in": true
  },
  "data": {
    "info": {
      "architecture": "esp32",
      "arduino_core_version": "v3.3.6-16-gcc5440f6a2",
      "brand": "WLED",
      "build_type": "Unknown",
      "effect_count": 118,
      "filesystem": {
        "__type": "<class 'wled.models.Filesystem'>",
        "repr": "Filesystem(total=983, used=16, free=967, percentage=2)"
      },
      "free_heap": 194380,
      "leds": {
        "__type": "<class 'wled.models.Leds'>",
        "repr": "Leds(cct=0, count=100, fps=0, max_power=4000, max_segments=32, power=200, rgbw=False, wv=0)"
      },
      "live_ip": "",
      "live_mode": "",
      "live": false,
      "mac_address": "349454e84b78",
      "name": "WLED",
      "pallet_count": 71,
      "product": "FOSS",
      "udp_port": 21324,
      "uptime": 12,
      "version_id": 2203150,
      "version": "0.13.1",
      "version_latest_beta": "0.13.0-b7",
      "version_latest_stable": "0.13.1",
      "websocket": 7,
      "wifi": "**REDACTED**"
    },
    "state": {
      "brightness": 128,
      "nightlight": {
        "__type": "<class 'wled.models.Nightlight'>",
        "repr": "Nightlight(duration=60, fade=True, on=False, mode=<NightlightMode.FADE: 1>, target_brightness=0)"
      },
      "on": false,
      "playlist": -1,
      "preset": -1,
      "segments": [
        {
          "__type": "<class 'wled.models.Segment'>",
          "repr": "Segment(brightness=255, clones=-1, color_primary=(255, 160, 0), color_secondary=(0, 0, 0), color_tertiary=(0, 0, 0), effect=Effect(effect_id=0, name='Solid'), intensity=128, length=100, on=True, palette=Palette(name='Default', palette_id=0), reverse=False, segment_id=0, selected=True, speed=128, start=0, stop=100)"
        }
      ],
      "sync": {
        "__type": "<class 'wled.models.Sync'>",
        "repr": "Sync(receive=True, send=False)"
      },
      "transition": 7,
      "lor": 0
    },
    "effects": {
      "27": "Android",
      "38": "Aurora",
      "115": "Blends",
      "1": "Blink",
      "26": "Blink Rainbow",
      "91": "Bouncing Balls",
      "68": "Bpm",
      "2": "Breathe",
      "88": "Candle",
      "102": "Candle Multi",
      "114": "Candy Cane",
      "28": "Chase",
      "37": "Chase 2",
      "54": "Chase 3",
      "31": "Chase Flash",
      "32": "Chase Flash Rnd",
      "30": "Chase Rainbow",
      "29": "Chase Random",
      "111": "Chunchun",
      "34": "Colorful",
      "8": "Colorloop",
      "74": "Colortwinkles",
      "67": "Colorwaves",
      "112": "Dancing Shadows",
      "18": "Dissolve",
      "19": "Dissolve Rnd",
      "96": "Drip",
      "7": "Dynamic",
      "117": "Dynamic Smooth",
      "12": "Fade",
      "49": "Fairy",
      "51": "Fairytwinkle",
      "69": "Fill Noise",
      "66": "Fire 2012",
      "45": "Fire Flicker",
      "42": "Fireworks",
      "90": "Fireworks 1D",
      "89": "Fireworks Starburst",
      "110": "Flow",
      "87": "Glitter",
      "46": "Gradient",
      "53": "Halloween",
      "82": "Halloween Eyes",
      "100": "Heartbeat",
      "58": "ICU",
      "64": "Juggle",
      "75": "Lake",
      "41": "Lighthouse",
      "57": "Lightning",
      "47": "Loading",
      "76": "Meteor",
      "77": "Meteor Smooth",
      "59": "Multi Comet",
      "70": "Noise 1",
      "71": "Noise 2",
      "72": "Noise 3",
      "73": "Noise 4",
      "107": "Noise Pal",
      "62": "Oscillate",
      "101": "Pacifica",
      "65": "Palette",
      "98": "Percent",
      "105": "Phased",
      "109": "Phased Noise",
      "97": "Plasma",
      "48": "Police",
      "95": "Popcorn",
      "63": "Pride 2015",
      "78": "Railway",
      "43": "Rain",
      "9": "Rainbow",
      "33": "Rainbow Runner",
      "5": "Random Colors",
      "79": "Ripple",
      "99": "Ripple Rainbow",
      "15": "Running",
      "52": "Running Dual",
      "16": "Saw",
      "10": "Scan",
      "11": "Scan Dual",
      "40": "Scanner",
      "60": "Scanner Dual",
      "108": "Sine",
      "92": "Sinelon",
      "93": "Sinelon Dual",
      "94": "Sinelon Rainbow",
      "0": "Solid",
      "103": "Solid Glitter",
      "83": "Solid Pattern",
      "84": "Solid Pattern Tri",
      "20": "Sparkle",
      "21": "Sparkle Dark",
      "22": "Sparkle+",
      "85": "Spots",
      "86": "Spots Fade",
      "39": "Stream",
      "61": "Stream 2",
      "23": "Strobe",
      "25": "Strobe Mega",
      "24": "Strobe Rainbow",
      "104": "Sunrise",
      "6": "Sweep",
      "36": "Sweep Random",
      "116": "TV Simulator",
      "44": "Tetrix",
      "13": "Theater",
      "14": "Theater Rainbow",
      "35": "Traffic Light",
      "56": "Tri Fade",
      "55": "Tri Wipe",
      "17": "Twinkle",
      "81": "Twinklecat",
      "80": "Twinklefox",
      "106": "Twinkleup",
      "50": "Two Dots",
      "113": "Washing Machine",
      "3": "Wipe",
      "4": "Wipe Random"
    },
    "palettes": {
      "2": "* Color 1",
      "4": "* Color Gradient",
      "3": "* Colors 1&2",
      "5": "* Colors Only",
      "1": "* Random Cycle",
      "18": "Analogous",
      "46": "April Night",
      "63": "Aqua Flash",
      "51": "Atlantica",
      "50": "Aurora",
      "55": "Aurora 2",
      "39": "Autumn",
      "26": "Beach",
      "22": "Beech",
      "67": "Blink Red",
      "15": "Breeze",
      "48": "C9",
      "52": "C9 2",
      "53": "C9 New",
      "57": "Candy",
      "70": "Candy2",
      "7": "Cloud",
      "37": "Cyane",
      "0": "Default",
      "24": "Departure",
      "30": "Drywet",
      "59": "Fairy Reaf",
      "35": "Fire",
      "10": "Forest",
      "32": "Grintage",
      "28": "Hult",
      "29": "Hult 64",
      "36": "Icefire",
      "31": "Jul",
      "25": "Landscape",
      "8": "Lava",
      "38": "Light Pink",
      "65": "Lite Light",
      "40": "Magenta",
      "41": "Magred",
      "9": "Ocean",
      "44": "Orange & Teal",
      "47": "Orangery",
      "6": "Party",
      "20": "Pastel",
      "61": "Pink Candy",
      "11": "Rainbow",
      "12": "Rainbow Bands",
      "16": "Red & Blue",
      "66": "Red Flash",
      "62": "Red Reaf",
      "68": "Red Shift",
      "69": "Red Tide",
      "56": "Retro Clown",
      "33": "Rewhi",
      "14": "Rivendell",
      "49": "Sakura",
      "60": "Semi Blue",
      "27": "Sherbet",
      "19": "Splash",
      "13": "Sunset",
      "21": "Sunset 2",
      "54": "Temperature",
      "34": "Tertiary",
      "45": "Tiamat",
      "58": "Toxy Reaf",
      "23": "Vintage",
      "43": "Yelblu",
      "64": "Yelblu Hot",
      "17": "Yellowout",
      "42": "Yelmag"
    },
    "playlists": {},
    "presets": {}
  }
}

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

I already tried to investigate if there are any useful logs on the controller's side using debug logging but weren't successful. There are no hints in the controller's logs about the breaking behaviour. Even if the frontend is no longer available the controller stays connected to the WiFi and keeps printing the default debug logs as if it was perfectly fine.

probot-home-assistant[bot] commented 2 years ago

Hey there @frenck, mind taking a look at this issue as it has been labeled with an integration (wled) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)


wled documentation wled source (message by IssueLinks)

fpfuetsch commented 2 years ago

I just checked my Pi-Hole installation (local DNS ad blocker) and saw that during the last 24 hours the DNS name of the WLED controller got resolved more than 200k times 💥. The DNS request must originate from home assistant which also would explain why the controller breaks after connecting it to Home Assistant -- it just gets spammed with requests.

Interestingly the requests continued after I "deleted" the WLED integration in Home Assistant and I saw something like "couldn't unload WLED integration" in the logs (unfortunately flushed the HA logs afterwards).

fpfuetsch commented 2 years ago

Seems like the problem got resolved by restarting home assistant. Will reopen an issue if it occurs again.