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
71.04k stars 29.7k forks source link

WLED updated by Home assistant, error at the end. #100180

Open WarC0zes opened 12 months ago

WarC0zes commented 12 months ago

The problem

Hi, WLED has just released 0.14.0-b5 and I wanted to update the firmware using Home Assistant. The update was done, but I received an error at the end of the process. I have never had an error before with WLED updates via Home Assistant.

What version of Home Assistant Core has the issue?

2023.9.1

What was the last working version of Home Assistant Core?

2023.7.X

What type of installation are you running?

Home Assistant OS

Integration causing the issue

wled

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.websocket_api.http.connection
Source: components/wled/helpers.py:37
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 08:35:59 (1 occurrences)
Last logged: 08:35:59

[547499661504] Invalid response from WLED API
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 899, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/streams.py", line 616, in read
    await self._waiter
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_proto.py", line 213, in data_received
    messages, upgraded, tail = self._parser.feed_data(data)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "aiohttp/_http_parser.pyx", line 557, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadHttpMessage: 400, message:
  Invalid character in chunk size:

    b'181 \r'
         ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/wled/wled.py", line 699, in upgrade
    await self.session.post(url, data=form)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 560, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 901, in start
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message="Invalid character in chunk size:\n\n  b'181 \\r'\n       ^", url=URL('http://192.168.1.33:80/update')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/wled/helpers.py", line 28, in handler
    await func(self, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/wled/update.py", line 89, in async_install
    await self.coordinator.wled.upgrade(version=version)
  File "/usr/local/lib/python3.11/site-packages/wled/wled.py", line 711, in upgrade
    raise WLEDUpgradeError(msg) from exception
wled.exceptions.WLEDUpgradeError: Could not download requested WLED version '0.14.0-b5' from https://github.com/Aircoookie/WLED/releases/download/v0.14.0-b5/WLED_0.14.0-b5_ESP32.bin

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 227, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1969, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2006, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 870, in entity_service_call
    response_data = await _handle_entity_call(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 942, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 157, in async_install
    await entity.async_install_with_progress(version, backup)
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 428, in async_install_with_progress
    await self.async_install(version, backup)
  File "/usr/src/homeassistant/homeassistant/components/wled/helpers.py", line 37, in handler
    raise HomeAssistantError("Invalid response from WLED API") from error
homeassistant.exceptions.HomeAssistantError: Invalid response from WLED API

Additional information

I reported the error on the WLED github, but it seems more of a Home Assistant problem.

https://github.com/Aircoookie/WLED/issues/3367

home-assistant[bot] commented 12 months 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!

Code owner commands Code owners of `wled` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign wled` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


wled documentation wled source (message by IssueLinks)

WarC0zes commented 10 months ago

Hi, Wled 1.4.0 is release. Same error that appears at the end of installation.

HAOS: 11 core: 2023.10.3 supervisor: 2023.10.0

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:226
Integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22))
First occurred: 20:04:28 (2 occurrences)
Last logged: 20:07:16

[546742537024] Invalid response from WLED API
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 899, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/streams.py", line 616, in read
    await self._waiter
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_proto.py", line 213, in data_received
    messages, upgraded, tail = self._parser.feed_data(data)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "aiohttp/_http_parser.pyx", line 557, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadHttpMessage: 400, message:
  Invalid character in chunk size:

    b'1b1 \r'
         ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/wled/wled.py", line 699, in upgrade
    await self.session.post(url, data=form)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 560, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 901, in start
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message="Invalid character in chunk size:\n\n  b'1b1 \\r'\n       ^", url=URL('http://192.168.1.33:80/update')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/wled/helpers.py", line 28, in handler
    await func(self, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/wled/update.py", line 88, in async_install
    await self.coordinator.wled.upgrade(version=version)
  File "/usr/local/lib/python3.11/site-packages/wled/wled.py", line 711, in upgrade
    raise WLEDUpgradeError(msg) from exception
wled.exceptions.WLEDUpgradeError: Could not download requested WLED version '0.14.0' from https://github.com/Aircoookie/WLED/releases/download/v0.14.0/WLED_0.14.0_ESP32.bin

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 226, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 2012, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2049, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 876, in entity_service_call
    response_data = await _handle_entity_call(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 157, in async_install
    await entity.async_install_with_progress(version, backup)
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 432, in async_install_with_progress
    await self.async_install(version, backup)
  File "/usr/src/homeassistant/homeassistant/components/wled/helpers.py", line 37, in handler
    raise HomeAssistantError("Invalid response from WLED API") from error
homeassistant.exceptions.HomeAssistantError: Invalid response from WLED API
yzlnew commented 10 months ago

Same here, can't update through HA.

issue-triage-workflows[bot] commented 7 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment šŸ‘ This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

macf0x commented 7 months ago

Ditto. Not working with latest version

issue-triage-workflows[bot] commented 4 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment šŸ‘ This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

RicardoJeronimo commented 4 months ago

Same issue persists with HA 2024.4.3 and WLED 0.14.3.

issue-triage-workflows[bot] commented 1 month ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment šŸ‘ This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

RA198DFE commented 1 month ago

Bump. Not fixed