I have a problem with my Motion Sensor Instalation with esp Home

Ich bin leider sehr unerfahren und möchte mir selber einen Pir Motion Sensor bauen über esp home die instalation funktioniert gut bis zu den Punk nachdem das Wlan eingerichtet wurde das kommt folgende meldung

[W][api.connection:071]: ::FFFF:C0A8:B21F: Socket operation failed: BAD_INDICATOR errno=11

Benutze einen Esp-32

Was muss ich tun???
Würde mich sehr über hilfe freuen!!!

Hello and welcome to the forum.

To allow for effective moderation and be inclusive of the majority this forum uses the English language.

Please edit your post and translate your question to English (online translators will do if you do not speak English).

Hallo und willkommen im Forum.

Um eine effektive Moderation zu ermöglichen und die Mehrheit einzubeziehen, verwendet dieses Forum die englische Sprache.

Bitte bearbeiten Sie Ihren Beitrag und übersetzen Sie Ihre Frage ins Englische (Online-Übersetzer reichen aus, wenn Sie kein Englisch sprechen).

Hi Malte,

To be able to help you, we need also your config file and the complete logfile, not just one line.

This forum has also a search function, when searching for your error, this came up: API Encryption - where to update in Home Assistant? so your problem could be caused by a missing or incorrect encryption-key.

HI Jos
Danke für deine Antwort

INFO Reading configuration /config/esphome/tr-malte-sensor.yaml…
INFO Generating C++ source…
INFO Compiling app…
Processing tr-malte-sensor (board: esp32dev; framework: arduino; platform: platformio/espressif32 @ 3.5.0)

HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
Dependency Graph
|-- 1.2.2
|-- 1.0
|-- 1.0
|-- 1.0
|-- 2.1.0
| |-- 1.2.2
|-- 1.1.0
|-- 1.0
|-- 0.1.4
| |-- 1.10018.1
RAM: [= ] 12.7% (used 41732 bytes from 327680 bytes)
Flash: [===== ] 53.0% (used 972342 bytes from 1835008 bytes)
========================= [SUCCESS] Took 32.34 seconds =========================
INFO Successfully compiled program.
esptool.py v3.3
Serial port /dev/ttyUSB1
Connecting…
Chip is ESP32-D0WDQ6-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 78:21:84:8e:5a:3c
Uploading stub…
Running stub…
Stub running…
Changing baud rate to 460800
Changed.
Configuring flash size…
Auto-detected Flash size: 4MB
Flash will be erased from 0x00010000 to 0x000fdfff…
Flash will be erased from 0x00001000 to 0x00005fff…
Flash will be erased from 0x00008000 to 0x00008fff…
Flash will be erased from 0x0000e000 to 0x0000ffff…
Compressed 972448 bytes to 573636…
Writing at 0x00010000… (2 %)
A fatal error occurred: Failed to write compressed data to flash after seq 0 (result was C100: Unknown result)
INFO Upload with baud rate 460800 failed. Trying again with baud rate 115200.
esptool.py v3.3
Serial port /dev/ttyUSB1
Connecting…
Chip is ESP32-D0WDQ6-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 78:21:84:8e:5a:3c
Uploading stub…
Running stub…
Stub running…
Configuring flash size…
Auto-detected Flash size: 4MB
Flash will be erased from 0x00010000 to 0x000fdfff…
Flash will be erased from 0x00001000 to 0x00005fff…
Flash will be erased from 0x00008000 to 0x00008fff…
Flash will be erased from 0x0000e000 to 0x0000ffff…
Compressed 972448 bytes to 573636…
Wrote 972448 bytes (573636 compressed) at 0x00010000 in 51.7 seconds (effective 150.4 kbit/s)…
Hash of data verified.
Compressed 17104 bytes to 11191…
Wrote 17104 bytes (11191 compressed) at 0x00001000 in 1.3 seconds (effective 102.1 kbit/s)…
Hash of data verified.
Compressed 3072 bytes to 144…
Wrote 3072 bytes (144 compressed) at 0x00008000 in 0.1 seconds (effective 292.4 kbit/s)…
Hash of data verified.
Compressed 8192 bytes to 47…
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 551.2 kbit/s)…
Hash of data verified.

Leaving…
Hard resetting via RTS pin…
INFO Successfully uploaded program.
INFO Starting log output from /dev/ttyUSB1 with baud rate 115200
[23:54:18][I][logger:242]: Log initialized
[23:54:18][C][ota:461]: There have been 3 suspected unsuccessful boot attempts.
[23:54:18][D][esp32.preferences:114]: Saving preferences to flash…
[23:54:18][D][esp32.preferences:131]: NVS data not changed skipping 233825511 len=4
[23:54:18][I][app:029]: Running through setup()…
[23:54:18][D][binary_sensor:034]: ‘PIR Sensor’: Sending initial state ON
[23:54:18][C][wifi:037]: Setting up WiFi…
[23:54:18][D][wifi:373]: Starting scan…
[23:54:20][D][wifi:388]: Found networks:
[23:54:20][I][wifi:432]: - ‘LAN Anschluss’ (DC:15:C8:F9:01:79) [redacted]▂▄▆█
[23:54:20][D][wifi:433]: Channel: 13
[23:54:20][D][wifi:434]: RSSI: -73 dB
[23:54:20][D][wifi:437]: - ‘juhe-4429-Devolo’[redacted] (30:B1:B5:2E:8B:AA) [redacted]▂▄▆█
[23:54:20][D][wifi:437]: - ‘Buchwald_Castle’[redacted] (B8:BE:F4:7F:B3:36) [redacted]▂▄▆█
[23:54:20][D][wifi:437]: - ‘Buchwald_Castle’[redacted] (30:D3:2D:A9:F4:48) [redacted]▂▄▆█
[23:54:20][D][wifi:437]: - ‘MeinNetzwerk’[redacted] (20:4E:7F:85:FB:B2) [redacted]▂▄▆█
[23:54:20][I][wifi:248]: WiFi Connecting to ‘LAN Anschluss’…
[23:54:21][I][wifi:505]: WiFi Connected!
[23:54:21][C][wifi:353]: Local MAC: 78:21:84:8E:5A:3C
[23:54:21][C][wifi:354]: SSID: ‘LAN Anschluss’[redacted]
[23:54:21][C][wifi:355]: IP Address: 192.168.178.44
[23:54:21][C][wifi:357]: BSSID: DC:15:C8:F9:01:32[redacted]
[23:54:21][C][wifi:358]: Hostname: ‘tr-malte-sensor’
[23:54:21][C][wifi:360]: Signal strength: -73 dB ▂▄▆█
[23:54:21][C][wifi:364]: Channel: 13
[23:54:21][C][wifi:365]: Subnet: 255.255.255.0
[23:54:21][C][wifi:366]: Gateway: 192.168.178.1
[23:54:21][C][wifi:367]: DNS1: 192.168.178.1
[23:54:21][C][wifi:368]: DNS2: 0.0.0.0
[23:54:21][D][wifi:514]: Disabling AP…
[23:54:21][C][ota:085]: Over-The-Air Updates:
[23:54:21][C][ota:086]: Address: tr-malte-sensor.local:3232
[23:54:21][C][ota:089]: Using Password.
[23:54:21][W][ota:095]: Last Boot was an unhandled reset, will proceed to safe mode in 7 restarts
[23:54:21][C][api:025]: Setting up Home Assistant API server…
[23:54:21][I][app:062]: setup() finished successfully!
[23:54:21][I][app:102]: ESPHome version 2022.5.0 compiled on May 21 2022, 12:14:53
[23:54:21][C][wifi:491]: WiFi:
[23:54:21][C][wifi:353]: Local MAC: 78:21:84:8E:5A:3C
[23:54:21][C][wifi:354]: SSID: ‘LAN Anschluss’[redacted]
[23:54:21][C][wifi:355]: IP Address: 192.168.178.44
[23:54:21][C][wifi:357]: BSSID: DC:15:C8:F9:01:79[redacted]
[23:54:21][C][wifi:358]: Hostname: ‘tr-malte-sensor’
[23:54:21][C][wifi:360]: Signal strength: -73 dB ▂▄▆█
[23:54:21][C][wifi:364]: Channel: 13
[23:54:21][C][wifi:365]: Subnet: 255.255.255.0
[23:54:21][C][wifi:366]: Gateway: 192.168.178.1
[23:54:21][C][wifi:367]: DNS1: 192.168.178.1
[23:54:21][C][wifi:368]: DNS2: 0.0.0.0
[23:54:21][C][logger:274]: Logger:
[23:54:21][C][logger:275]: Level: DEBUG
[23:54:21][C][logger:276]: Log Baud Rate: 115200
[23:54:21][C][logger:277]: Hardware UART: UART0
[23:54:21][C][gpio.binary_sensor:015]: GPIO Binary Sensor ‘PIR Sensor’
[23:54:21][C][gpio.binary_sensor:015]: Device Class: ‘motion’
[23:54:21][C][gpio.binary_sensor:016]: Pin: GPIO13
[23:54:22][C][captive_portal:088]: Captive Portal:
[23:54:22][C][mdns:084]: mDNS:
[23:54:22][C][mdns:085]: Hostname: tr-malte-sensor
[23:54:22][C][ota:085]: Over-The-Air Updates:
[23:54:22][C][ota:086]: Address: tr-malte-sensor.local:3232
[23:54:22][C][ota:089]: Using Password.
[23:54:22][W][ota:095]: Last Boot was an unhandled reset, will proceed to safe mode in 7 restarts
[23:54:22][C][api:138]: API Server:
[23:54:22][C][api:139]: Address: tr-malte-sensor.local:6053
[23:54:22][C][api:141]: Using noise encryption: YES
[23:55:04][D][api:102]: Accepted ::FFFF:C0A8:B21F
[23:55:04][W][api.connection:071]: ::FFFF:C0A8:B21F: Socket operation failed: BAD_INDICATOR errno=11
[23:56:04][D][api:102]: Accepted ::FFFF:C0A8:B21F
[23:56:04][W][api.connection:071]: ::FFFF:C0A8:B21F: Socket operation failed: BAD_INDICATOR errno=11
[23:57:04][D][api:102]: Accepted ::FFFF:C0A8:B21F
[23:57:04][W][api.connection:071]: ::FFFF:C0A8:B21F: Socket operation failed: BAD_INDICATOR errno=11
[23:58:04][D][api:102]: Accepted ::FFFF:C0A8:B21F
[23:58:04][W][api.connection:071]: ::FFFF:C0A8:B21F: Socket operation failed: BAD_INDICATOR errno=11
[23:59:05][D][api:102]: Accepted ::FFFF:C0A8:B21F
[23:59:05][W][api.connection:071]: ::FFFF:C0A8:B21F: Socket operation failed: BAD_INDICATOR errno=11
[23:59:18][I][ota:105]: Boot seems successful, resetting boot loop counter.
[23:59:18][D][esp32.preferences:114]: Saving preferences to flash…
[23:59:18][D][esp32.preferences:131]: NVS data not changed skipping 233825511 len=4
[00:00:04][D][binary_sensor:036]: ‘PIR Sensor’: Sending state OFF
[00:00:05][D][api:102]: Accepted ::FFFF:C0A8:B21F
[00:00:05][W][api.connection:085]: ::FFFF:C0A8:B21F: Reading failed: BAD_INDICATOR errno=11
[00:01:05][D][api:102]: Accepted ::FFFF:C0A8:B21F
[00:01:05][W][api.connection:071]: ::FFFF:C0A8:B21F: Socket operation failed: BAD_INDICATOR errno=11
[00:02:05][D][api:102]: Accepted ::FFFF:C0A8:B21F
[00:02:05][W][api.connection:071]: ::FFFF:C0A8:B21F: Socket operation failed: BAD_INDICATOR errno=11
[00:03:05][D][api:102]: Accepted ::FFFF:C0A8:B21F
[00:03:05][W][api.connection:071]: ::FFFF:C0A8:B21F: Socket operation failed: BAD_INDICATOR errno=11
[00:04:05][D][api:102]: Accepted ::FFFF:C0A8:B21F
[00:04:05][W][api.connection:071]: ::FFFF:C0A8:B21F: Socket operation failed: BAD_INDICATOR errno=11
[00:05:05][D][api:102]: Accepted ::FFFF:C0A8:B21F
[00:05:05][W][api.connection:071]: ::FFFF:C0A8:B21F: Socket operation failed: BAD_INDICATOR errno=11
[00:06:05][D][api:102]: Accepted ::FFFF:C0A8:B21F
[00:06:05][W][api.connection:071]: ::FFFF:C0A8:B21F: Socket operation failed: BAD_INDICATOR errno=11
[00:06:45][D][binary_sensor:036]: ‘PIR Sensor’: Sending state ON
[00:07:06][D][api:102]: Accepted ::FFFF:C0A8:B21F
[00:07:06][W][api.connection:071]: ::FFFF:C0A8:B21F: Socket operation failed: BAD_INDICATOR errno=11
[00:08:06][D][api:102]: Accepted ::FFFF:C0A8:B21F
[00:08:06][W][api.connection:071]: ::FFFF:C0A8:B21F: Socket operation failed: BAD_INDICATOR errno=11
[00:09:06][D][api:102]: Accepted ::FFFF:C0A8:B21F
[00:09:06][W][api.connection:071]: ::FFFF:C0A8:B21F: Socket operation failed: BAD_INDICATOR errno=11
[00:10:06][D][api:102]: Accepted ::FFFF:C0A8:B21F
[00:10:06][W][api.connection:071]: ::FFFF:C0A8:B21F: Socket operation failed: BAD_INDICATOR errno=11
[00:11:06][D][api:102]: Accepted ::FFFF:C0A8:B21F
[00:11:06][W][api.connection:071]: ::FFFF:C0A8:B21F: Socket operation failed: BAD_INDICATOR errno=11
[00:12:06][D][api:102]: Accepted ::FFFF:C0A8:B21F
[00:12:06][W][api.connection:071]: ::FFFF:C0A8:B21F: Socket operation failed: BAD_INDICATOR errno=11

Und mein Edit:

esphome:
name: tr-malte-sensor

esp32:
board: esp32dev
framework:
type: arduino

Enable logging

logger:

Enable Home Assistant API

api:
encryption:
key: “FzWwErT5W3vFeGoawNIIscJij6/ZKl9sI+WDNunw+Ng=”

ota:
password: “79b1747e34c90ae8c1a95deea9718e50”

wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password

Enable fallback hotspot (captive portal) in case wifi connection fails

ap:
ssid: “Tr-Malte-Sensor Fallback Hotspot”
password: “A0P14XJD0FLr”

captive_portal:

binary_sensor:

  • platform: gpio
    pin: 13
    name: “PIR Sensor”
    device_class: motion

Hi @Malte3506, I can’t help you with your technical issue but would like to advice you to also translate the topic title to increase the chance of getting helped.

Closed due to refusal to post in English.