WLED Integration GitHub Rate Limit (get_wled_versions_from_github)

The problem

I cannot manage (nor re-add) my WLED device (just 1 luckly) because of a Github API Rate limit that my IP seems to have reached.
This is not big deal, but I wonder, why would be important to prevent a device to be added only because we cannot check the current latest version number on github?

What version of Home Assistant Core has the issue?


What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue


Link to integration documentation on our website


Example YAML snippet

No response

Anything in the logs that might be useful for us?

2021-12-31 18:17:55 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 220, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 181, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 157, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 252, in async_configure
    result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 325, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/wled/config_flow.py", line 39, in async_step_user
    return await self._handle_config_flow(user_input)
  File "/usr/src/homeassistant/homeassistant/components/wled/config_flow.py", line 91, in _handle_config_flow
    device = await wled.update()
  File "/usr/local/lib/python3.9/site-packages/backoff/_async.py", line 133, in retry
    ret = await target(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/wled/wled.py", line 247, in update
    versions = await self.get_wled_versions_from_github()
  File "/usr/local/lib/python3.9/site-packages/backoff/_async.py", line 133, in retry
    ret = await target(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/wled/wled.py", line 700, in get_wled_versions_from_github
    raise WLEDError(response.status, {"message": contents.decode("utf8")})
wled.exceptions.WLEDError: (403, {'message': '{"message":"API rate limit exceeded for MY_PUBLIC_IP. (But here\'s the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"}\n'})

Additional information

No response

1 thought on “WLED Integration GitHub Rate Limit (get_wled_versions_from_github)

  1. @SeLLeRoNe Yeah I agree, it shouldn’t block at all.

    The first step is to make it not hit the rate limits, next up preventing it from blocking anything (WLED is local, and should work locally without internet).
    There is also another issue around this.

    But the linked PR is focused on this issue specifically.

Comments are closed.