Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WLED: utf-8 error #103723

Closed
cwietholt1973 opened this issue Nov 10, 2023 · 29 comments
Closed

WLED: utf-8 error #103723

cwietholt1973 opened this issue Nov 10, 2023 · 29 comments

Comments

@cwietholt1973
Copy link

The problem

I seem to be having the same issue as reported here: https://github.com/home-assistant/core/issues/89884

Oddly enough, the automation errors out at the same position as in the previous report "861".

I already tried overwriting and saving the file in N++ making sure I am using UTF-8 encoding. After restarting the WLED device and reloading the integration, the automation runs fine once. The second time I run it, I get this error message. I am attaching the Trace here as well. Any suggestions would be greatly appreciated.

trace automation.wled_veterans_day 2023-11-10T00_08_39.176374+00_00.json

What version of Home Assistant Core has the issue?

2023.11.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Automation for WLED

Link to integration documentation on our website

No response

Diagnostics information

config_entry-wled-42417ce3988da4a034f0b57863c28688.json.txt

Example YAML snippet

alias: WLED Veterans Day
description: "Displays Veterans Day light strip 45 minute after sunset. "
trigger:
  - platform: sun
    event: sunset
    offset: "00:45:00"
condition:
  - condition: time
    after: input_datetime.veterans_day_start
    before: input_datetime.veterans_day_end
    weekday:
      - sat
      - fri
      - thu
      - wed
      - tue
      - mon
      - sun
action:
  - device_id: 412c6ec03477ca9b61e1c2d87955ffcb
    domain: select
    entity_id: f6aa8b5af55284853e871baf88c8a3fb
    type: select_option
    option: VeteransDay
mode: single

Anything in the logs that might be useful for us?

{
  "trace": {
    "last_step": "action/0",
    "run_id": "aeaa30d2129b2c3158557cb64c65bfe1",
    "state": "stopped",
    "script_execution": "error",
    "timestamp": {
      "start": "2023-11-10T00:08:39.176374+00:00",
      "finish": "2023-11-10T00:08:39.408728+00:00"
    },
    "domain": "automation",
    "item_id": "1698966889024",
    "error": "'utf-8' codec can't decode byte 0xeb in position 861: invalid continuation byte",
    "trigger": null,
    "trace": {
      "trigger": [
        {
          "path": "trigger",
          "timestamp": "2023-11-10T00:08:39.176458+00:00",
          "changed_variables": {
            "this": {
              "entity_id": "automation.wled_veterans_day",
              "state": "on",
              "attributes": {
                "id": "1698966889024",
                "last_triggered": "2023-11-10T00:08:15.411726+00:00",
                "mode": "single",
                "current": 0,
                "friendly_name": "WLED Veterans Day"
              },
              "last_changed": "2023-11-09T23:33:45.028528+00:00",
              "last_updated": "2023-11-10T00:08:15.569603+00:00",
              "context": {
                "id": "01HEV8XMSKMXHERWXSXE0SW1D3",
                "parent_id": "01HEV8XMSJ6QY6T6Y16DDSVT3P",
                "user_id": null
              }
            },
            "trigger": {
              "platform": null
            }
          }
        }
      ],
      "action/0": [
        {
          "path": "action/0",
          "timestamp": "2023-11-10T00:08:39.179556+00:00",
          "changed_variables": {
            "context": {
              "id": "01HEV8YC0833J4SND4WSGK6YPM",
              "parent_id": "01HEV8YC07D33SWA471YYNZ60K",
              "user_id": null
            }
          },
          "error": "'utf-8' codec can't decode byte 0xeb in position 861: invalid continuation byte"
        }
      ]
    },
    "config": {
      "id": "1698966889024",
      "alias": "WLED Veterans Day",
      "description": "Displays Veterans Day light strip 45 minute after sunset. ",
      "trigger": [
        {
          "platform": "sun",
          "event": "sunset",
          "offset": "00:45:00"
        }
      ],
      "condition": [
        {
          "condition": "time",
          "after": "input_datetime.veterans_day_start",
          "before": "input_datetime.veterans_day_end",
          "weekday": [
            "sat",
            "fri",
            "thu",
            "wed",
            "tue",
            "mon",
            "sun"
          ]
        }
      ],
      "action": [
        {
          "device_id": "412c6ec03477ca9b61e1c2d87955ffcb",
          "domain": "select",
          "entity_id": "f6aa8b5af55284853e871baf88c8a3fb",
          "type": "select_option",
          "option": "VeteransDay"
        }
      ],
      "mode": "single"
    },
    "blueprint_inputs": null,
    "context": {
      "id": "01HEV8YC0833J4SND4WSGK6YPM",
      "parent_id": "01HEV8YC07D33SWA471YYNZ60K",
      "user_id": null
    }
  },
  "logbookEntries": [
    {
      "name": "WLED Veterans Day",
      "message": "triggered",
      "source": null,
      "entity_id": "automation.wled_veterans_day",
      "context_id": "01HEV8YC0833J4SND4WSGK6YPM",
      "when": 1699574919.176572,
      "domain": "automation"
    },
    {
      "when": 1699574919.427214,
      "state": "VeteransDay",
      "entity_id": "select.wled_preset",
      "icon": "mdi:playlist-play",
      "context_event_type": "automation_triggered",
      "context_domain": "automation",
      "context_name": "WLED Veterans Day",
      "context_message": "triggered",
      "context_entity_id": "automation.wled_veterans_day"
    }
  ]
}

Additional information

No response

@home-assistant
Copy link

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)

@rperciaccante
Copy link

I am seeing this issue as well, and it does not pass messages through in NodeRed, so it is breaking existing flows. Here are additional logs:

`
Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:230
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 9:02:04 AM (111 occurrences)
Last logged: 2:41:53 PM

[140463828711232] 'utf-8' codec can't decode byte 0xa4 in position 871: invalid start byte
[140464460541376] unexpected character: line 1 column 862 (char 861)
[140464460541376] unexpected end of data: line 1 column 1090 (char 1089)
[140463828711232] unexpected control character in string: line 1 column 1934 (char 1933)
[140463828711232] unexpected character: line 1 column 1939 (char 1938)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 230, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 2035, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2072, 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/light/init.py", line 580, in async_handle_light_on_service
await light.async_turn_on(**filter_turn_on_params(light, params))
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/light.py", line 97, in async_turn_on
await self.coordinator.wled.master(
File "/usr/local/lib/python3.11/site-packages/wled/wled.py", line 368, in master
await self.request("/json/state", method="POST", data=state)
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/wled/wled.py", line 211, in request
response_data = await response.json()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/aiohttp_client.py", line 84, in json
return await super().json(*args, loads=loads, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1120, in json
return loads(stripped.decode(encoding))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
orjson.JSONDecodeError: unexpected character: line 1 column 862 (char 861)
`

@mainmind83
Copy link

Maybe "special characters" on preset names?
Some times appear error on WLED interface and show backup text... when the error occurs the integration stops working

Logger: homeassistant.components.wled
Source: helpers/update_coordinator.py:290
Integration: WLED (documentation, issues)
First occurred: 18:21:22 (1657 occurrences)
Last logged: 23:16:25

Unexpected error fetching wled data: 'utf-8' codec can't decode byte 0xff in position 9540: invalid start byte
Unexpected error fetching wled data: unexpected character: line 1 column 4700 (char 4699)
Unexpected error fetching wled data: 'utf-8' codec can't decode byte 0xff in position 8256: invalid start byte
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/wled/coordinator.py", line 103, in _async_update_data
device = await self.wled.update(full_update=not self.last_update_success)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/wled/wled.py", line 294, in update
if not (presets := await self.request("/presets.json")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/wled/wled.py", line 211, in request
response_data = await response.json()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/aiohttp_client.py", line 84, in json
return await super().json(*args, loads=loads, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1120, in json
return loads(stripped.decode(encoding))
^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 9540: invalid start byte

@nilvanis
Copy link

I have the same issue.
No special characters, no spaces in Preset names, nor in segment names.
0.14.0 on esp8266 has some issue with json responses, so I installed latest 0.15 branch and json problem is gone, but utf8 issue is still there.

@cwietholt1973
Copy link
Author

Same here, I looked everywhere for any out of place characters, but couldn't find any. The issue still persists, but doesn't seem to cause any noticeable errors in the lights. Although, WLED seems to be doing some unexpected things, but that could also be due to my inexperience with the too.

@rperciaccante
Copy link

The bigger issue for me is that in NodeRed flows, the error causes the flow not to pass the message to the next node, so it breaks existing flows....

@nilvanis
Copy link

nilvanis commented Dec 11, 2023

Yes, the problem with this, is that it breaks automations.
continue_on_error: true doesn't help.
But the preset is - as far as I can see - set correctly on WLED device, even when HA reports the error.

@cwietholt1973
Copy link
Author

cwietholt1973 commented Dec 12, 2023

I didn't test it that far, all my automations do is turn on/off a preset on WLED, and that seems to work okay, but there is certainly no node after that. That's probably why I don't see any immediate issues. I will have to test a bit further as I have been exploring the automation options in Node Red recently.

@mainmind83
Copy link

Do you change preset from PC mode?

@cwietholt1973
Copy link
Author

cwietholt1973 commented Dec 12, 2023

I do both. When I create new presets, I typically do that in a browser tab on the PC (Chrome on Windows). Then I also setup my automation in HA using the browser, this is where I come across the errors. Sometimes, when I want to fine tune things, I do go outside to the strips and modify my presets on the phone using the WLED Android app. But that doesn't happen often.

Btw. I do have spaces in my preset names, do you expect those to cause any issues?

@mainmind83
Copy link

In my case, it has always failed in PC mode... but reimporting the file it works again...

@cwietholt1973
Copy link
Author

Interesting. I just tested removing the spaces from the preset names, and executed my automations a few times. This error only happens sporadically, and I am not able to reproduce it all the time. After activating my automations about a dozen times, I got the error once.

My setup is that I have various presets defined in WLED, and I have several playlists defined. The HA automations then set a playlist or a preset as active.

What do you do exactly to reimport the file?

@mainmind83
Copy link

mainmind83 commented Dec 12, 2023

Same setup, but changing some presets and play list appear error...

And others:

image

@danielBreitlauch
Copy link

Same problem here. Quite often. I see also the same stack trace.
It is unfortunate that the WLED controller sends this data in the first place but perhaps it would help to catch that UnicodeDecodeError and transform it into an WLEDError which gets transformed into an HA Error that can be ignored in automations with the mentioned continue_on_error: true.

@frenck would you be willing to add the catch in the WLED client?
That would be a quick fix to get our automations to work again.

@nilvanis
Copy link

Problem has been fixed in WLED 0.14.1-b3 (see Aircoookie/WLED#3641 )
Jest tested, works like a charm!

@cwietholt1973
Copy link
Author

Is there a binary for an ESP8266 available for 0.14.1-b3? I don't have a build environment setup for this, would be helpful to have a binary. Alternatively, I can look into setting this up.

@Alfagek
Copy link

Alfagek commented Jan 12, 2024

Is there a binary for an ESP8266 available for 0.14.1-b3? I don't have a build environment setup for this, would be helpful to have a binary. Alternatively, I can look into setting this up.

https://github.com/Aircoookie/WLED/releases/download/v0.14.1-b3/WLED_0.14.1-b3_ESP8266.bin

@cwietholt1973
Copy link
Author

Got it. Thank you so much.

@WAPEETY
Copy link

WAPEETY commented Jan 22, 2024

Same problem here

Env: esp8266 3.1.2 (2)
Version:
Installed version: WLED 0.14.1-b3
(esp8266 build 2401060)

Also:
image

I can confirm that the same issue is present in the 0.14.1 stable

@fama-lama
Copy link

Latest 2401141 build seems to have fixed this issue on all my esp8266s.

@WAPEETY
Copy link

WAPEETY commented Jan 27, 2024

I had the problem even after the upgrade and i fixed it in a simple but drastic way.

  1. create a fake empty preset from a text editor: (presets.json) with this content {"0":{}}
  2. go to settings > security and updates > restore presets and upload the newly created presets

Obv you will lose every preset but at least should work again with HA

@Jonah1970
Copy link

Just chiming in to say that I am also experiencing this problem on HA version 2024.1.5 and WLED 0.14.1. I have also tried the workaround from @WAPEETY above and still get the log errors and WLED device going unavailable periodically.

Logger: homeassistant.components.wled
Source: helpers/update_coordinator.py:332
Integration: WLED (documentation, issues)
First occurred: 08:18:35 (10 occurrences)
Last logged: 12:38:51

Error fetching wled data: Invalid response from API: (503, {'error': 3})
Error fetching wled data: Invalid response from API: Timeout occurred while connecting to WLED device at 192.168.4.111

Logger: homeassistant.components.wled
Source: helpers/update_coordinator.py:300
Integration: WLED (documentation, issues)
First occurred: 08:18:46 (26 occurrences)
Last logged: 12:38:27

Unexpected error fetching wled data: 'utf-8' codec can't decode byte 0xa1 in position 863: invalid start byte
Unexpected error fetching wled data: 'utf-8' codec can't decode byte 0xc0 in position 877: invalid start byte
Unexpected error fetching wled data: 'utf-8' codec can't decode byte 0xf8 in position 891: invalid start byte
Unexpected error fetching wled data: 'utf-8' codec can't decode byte 0x99 in position 1933: invalid start byte
Unexpected error fetching wled data: 'utf-8' codec can't decode byte 0xff in position 861: invalid start byte
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/wled/coordinator.py", line 103, in _async_update_data
device = await self.wled.update(full_update=not self.last_update_success)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/wled/wled.py", line 256, in update
if not (data := await self.request("/json")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/wled/wled.py", line 211, in request
response_data = await response.json()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/aiohttp_client.py", line 71, in json
return await super().json(*args, loads=loads, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1181, in json
return loads(stripped.decode(encoding))
^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc7 in position 1933: invalid continuation byte

@WAPEETY
Copy link

WAPEETY commented Feb 1, 2024

Just chiming in to say that I am also experiencing this problem on HA version 2024.1.5 and WLED 0.14.1. I have also tried the workaround from @WAPEETY above and still get the log errors and WLED device going unavailable periodically.

Logger: homeassistant.components.wled Source: helpers/update_coordinator.py:332 Integration: WLED (documentation, issues) First occurred: 08:18:35 (10 occurrences) Last logged: 12:38:51

Error fetching wled data: Invalid response from API: (503, {'error': 3}) Error fetching wled data: Invalid response from API: Timeout occurred while connecting to WLED device at 192.168.4.111

Logger: homeassistant.components.wled Source: helpers/update_coordinator.py:300 Integration: WLED (documentation, issues) First occurred: 08:18:46 (26 occurrences) Last logged: 12:38:27

Unexpected error fetching wled data: 'utf-8' codec can't decode byte 0xa1 in position 863: invalid start byte Unexpected error fetching wled data: 'utf-8' codec can't decode byte 0xc0 in position 877: invalid start byte Unexpected error fetching wled data: 'utf-8' codec can't decode byte 0xf8 in position 891: invalid start byte Unexpected error fetching wled data: 'utf-8' codec can't decode byte 0x99 in position 1933: invalid start byte Unexpected error fetching wled data: 'utf-8' codec can't decode byte 0xff in position 861: invalid start byte Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/wled/coordinator.py", line 103, in _async_update_data device = await self.wled.update(full_update=not self.last_update_success) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry ret = await target(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/wled/wled.py", line 256, in update if not (data := await self.request("/json")): ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry ret = await target(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/wled/wled.py", line 211, in request response_data = await response.json() ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/aiohttp_client.py", line 71, in json return await super().json(*args, loads=loads, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1181, in json return loads(stripped.decode(encoding)) ^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc7 in position 1933: invalid continuation byte

go on the webpage of WLED and try to see what JSON is broken

@Jonah1970
Copy link

Thanks @WAPEETY but I don't know how to do that. Can you explain further or suggest a guide?

@Juffle74
Copy link

Hi,

I had the same bug, but by looking at the WLED config and presets JSON files, I found this in my presets.json...

... "stop": 0 }, { "st�p": 0 }, { "stop": 0 }, { "stop": 0 ...

Can you spot the glitch? ;-)

Might want to take a look at your JSON files for any unusual characters.

For me, it fixed the error in Home Assistant after a reboot.

@WAPEETY
Copy link

WAPEETY commented Feb 20, 2024

Thanks @WAPEETY but I don't know how to do that. Can you explain further or suggest a guide?

go to the web page of your device -> press ctrl+shift+i and see the error (it's red in the logs and should be on the right) just read the log and you should find something like utf-8 error or something, right now i don't remember the exact error

@Jonah1970
Copy link

My problems seem to have improved a lot after trying a couple of things but they have not gone away completely. Firstly I erased and re-flashed all my WLED boards as I only have 5 and I am currently not using any presets. Secondly I shutdown a second experimental HA instance which had auto-discovered these devices (my thinking is that maybe ESP8266 boards struggle to support multiple instances).

After completing the above all the devices seem a lot more responsive however I am still seeing occasional errors as below:

  1. Red text "Connection to light failed" when visiting a WLED devices UI from HA however this still worked OK and has only occurred once within the last day or so. Inspecting the webpage only showed yellow warnings rather then red errors (I am not sure what these warnings means or whether they are important, all my devices appear to have the same warnings which using the WLED UI):

image

  1. "Error fetching wled data: Invalid response from API" - from HA logs, occurred 6 times within the last day or so.

Logger: homeassistant.components.wled
Source: helpers/update_coordinator.py:345
Integration: WLED (documentation, issues)
First occurred: 24 February 2024 at 08:42:00 (6 occurrences)
Last logged: 14:32:02

Error fetching wled data: Invalid response from API: (503, {'error': 3})

  1. "Unexpected error fetching wled data" - from HA logs, occurred once within the last day or so.

Logger: homeassistant.components.wled
Source: helpers/update_coordinator.py:313
Integration: WLED (documentation, issues)
First occurred: 09:35:17 (1 occurrences)
Last logged: 09:35:17

Unexpected error fetching wled data: 'utf-8' codec can't decode byte 0xb3 in position 861: invalid start byte
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/wled/coordinator.py", line 103, in _async_update_data
device = await self.wled.update(full_update=not self.last_update_success)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/wled/wled.py", line 325, in update
if not (state_info := await self.request("/json/si")):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/wled/wled.py", line 211, in request
response_data = await response.json()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/aiohttp_client.py", line 71, in json
return await super().json(*args, loads=loads, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1182, in json
return loads(stripped.decode(encoding))
^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb3 in position 861: invalid start byte

Most of the devices are 1m-5m from an AP and one is about 10m away.

In summary things are looking a lot better however there is still something not quite right.

@kaisch-ferenc
Copy link

Hy! I got erased my presets one-by-one, and i find the defected one, so it works again, without removing from HA!

@issue-triage-workflows
Copy link

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.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 10, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests