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
72.16k stars 30.2k forks source link

ESPhome device is offline in HA due to: google.protobuf.message.DecodeError: Field number 0 is illegal. #83928

Closed abrilevskiy closed 1 year ago

abrilevskiy commented 1 year ago

The problem

ESPhome device is offline in HA due to: google.protobuf.message.DecodeError: Field number 0 is illegal.

The issues comes after upgrade HA from some older version to : Home Assistant 2022.12.4 ESPHome Firmware: 2022.11.1

What version of Home Assistant Core has the issue?

2022.12.4

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

esphome

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

--
2022-12-13 10:05:23.960 INFO (MainThread) [aioesphomeapi.connection] m5-scd40 @ 192.168.0.34: Ping Failed: Invalid protobuf message: Field number 0 is illegal.
2022-12-13 10:05:23.963 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aioesphomeapi/connection.py", line 137, in _do_cleanup
    await self._process_task
  File "/usr/local/lib/python3.10/site-packages/aioesphomeapi/connection.py", line 559, in _process_loop
    msg.ParseFromString(pkt.data)
  File "/usr/local/lib/python3.10/site-packages/google/protobuf/message.py", line 202, in ParseFromString
    return self.MergeFromString(serialized)
  File "/usr/local/lib/python3.10/site-packages/google/protobuf/internal/python_message.py", line 1128, in MergeFromString
    if self._InternalParse(serialized, 0, length) != length:
  File "/usr/local/lib/python3.10/site-packages/google/protobuf/internal/python_message.py", line 1178, in InternalParse
    raise message_mod.DecodeError('Field number 0 is illegal.')
google.protobuf.message.DecodeError: Field number 0 is illegal.

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @ottowinter, @jesserockz, mind taking a look at this issue as it has been labeled with an integration (esphome) you are listed as a code owner for? Thanks!

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

(message by CodeOwnersMention)


esphome documentation esphome source (message by IssueLinks)

bdraco commented 1 year ago

I'm going to close this issue since the code has been replaced and the issue that was being worked on aioesphomeapi has gone stale without response:

https://github.com/esphome/aioesphomeapi/issues/341#issuecomment-1379689457