SOLVED: Reading failed: BAD_INDICATOR errno=11 after ESPhome 2023.3.0 upgrade

I have upgraded the ESPhome add-on earlier this week to version 2023.3.0 .
Since that moment one of my ESP8266’s, configured as a DSMR interface is generating the following error:

[20:11:08][W][api.connection:085]: 192.168.178.68: Reading failed: BAD_INDICATOR errno=11
[20:11:20][D][api:102]: Accepted 192.168.178.68
[20:11:20][W][api.connection:085]: 192.168.178.68: Reading failed: BAD_INDICATOR errno=11
[20:11:38][D][DmsrCustom:179]: request new message from P1 port
[20:11:38][D][DmsrCustom:084]: Header found
[20:11:38][D][DmsrCustom:092]: Footer found
[20:11:38][D][DmsrCustom:099]: Trying to parse
[20:12:08][D][api:102]: Accepted 192.168.178.68
[20:12:08][W][api.connection:085]: 192.168.178.68: Reading failed: BAD_INDICATOR errno=11

And, more important, all device entities are unavailable

What can be the case here?
Thank you for your help, Yann

Somebody suggested to look for the access parameters of the native API .
I followed the following procedure:

  • Sidepanel → Setting → Integrations → ESPhome > My device → 3 dots → Delete
  • Sidepanel → ESPhome → My device → edit
  • Edited myDevice.yaml file and made sure it contained
 # Enable Home Assistant API
api:
  encryption:
    key: !secret esphome_encryption_key
  • Compiled and uploaded code
  • Sidepanel → Setting → Devices → + Add Device → My device → the ESPhome encryption key that is in my secrets file

Done

8 Likes

Oh my goodness!! You just saved my life! You don’t even know.

Thank you so much!

I’m not sure if I get it; you’ve removed your device from the HA integration, then did something to the encryption key and then added the device again?

A lot of my sonoff devices fell out of the HA configuration and require re-integration with an encryption key, which I don’t have. All my yaml configuration files have kindly disappeared so I decided to start again. The sonoff controls a radiator valve and I added a AM2302 climate sensor to the unit, so it works as a stand alone temperature controller.

So after reprogramming a sonoff basic, and adding it to ESPHome page in my HA, I get the same error message.

[17:25:39][D][dht:048]: Got Temperature=22.7°C Humidity=38.5%
[17:25:39][D][sensor:093]: 'Music Room Temperature': Sending state 22.70000 °C with 1 decimals of accuracy
[17:25:39][D][sensor:093]: 'Music Room Humidity': Sending state 38.50000 % with 0 decimals of accuracy
[17:25:53][D][api:102]: Accepted 192.168.0.103
[17:25:53][W][api.connection:091]: : Socket operation failed: BAD_INDICATOR errno=11
[17:26:39][D][dht:048]: Got Temperature=22.8°C Humidity=38.6%

The log file shows the sensor is read. I don’t understand the error, nor do I understand the consequences.

1 Like

Consequences I think are less security if you dont have an encryption key setup. They added this in 2023.12.2 I believe, and heres more info on how to update older devices that helped me out some

I got that same BAD_INDICATOR errno=11 today for the first time after a minor, unrelated change (which worked on all my other devices, btw.)

Deleting and re-adding the offending device in HA did the trick, thanks!!!

For the record, I do use the encryption key, and I didn’t have to recompile or upload again. Just the delete and re-add did the trick. No clue why.

2 Likes