Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. ESPHome - erster Versuch scheitert

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    ESPHome - erster Versuch scheitert

    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      speerwerfer last edited by Homoran

      Hallo,

      ich habe einen ESP32 hier mit ESPHome versorgt. Er wird in ESPHome auch als online angezeigt. Im Log von ESPHome sehe ich aber einen Fehler:

      INFO Reading configuration /opt/iobroker/iobroker-data/esphome.0/ble-temp-receiver.yaml...
      INFO Starting log output from ble-temp-receiver.local using esphome API
      INFO Successfully connected to ble-temp-receiver.local
      [18:24:16][I][app:102]: ESPHome version 2022.9.4 compiled on Mar  9 2023, 18:14:46
      [18:24:16][C][wifi:502]: WiFi:
      [18:24:16][C][wifi:360]:   Local MAC: B4:E6:2D:97:F9:5D
      [18:24:16][C][wifi:361]:   SSID: [redacted]
      [18:24:16][C][wifi:362]:   IP Address: 192.168.1.140
      [18:24:16][C][wifi:364]:   BSSID: [redacted]
      [18:24:16][C][wifi:365]:   Hostname: 'ble-temp-receiver'
      [18:24:16][C][wifi:367]:   Signal strength: -59 dB ▂▄▆█
      [18:24:16][C][wifi:371]:   Channel: 11
      [18:24:16][C][wifi:372]:   Subnet: 255.255.0.0
      [18:24:16][C][wifi:373]:   Gateway: 192.168.0.2
      [18:24:16][C][wifi:374]:   DNS1: 192.168.0.8
      [18:24:16][C][wifi:375]:   DNS2: 0.0.0.0
      [18:24:16][C][logger:275]: Logger:
      [18:24:16][C][logger:276]:   Level: DEBUG
      [18:24:16][C][logger:277]:   Log Baud Rate: 115200
      [18:24:16][C][logger:278]:   Hardware UART: UART0
      [18:24:16][C][dht:017]: DHT:
      [18:24:16][C][dht:018]:   Pin: GPIO21
      [18:24:16][C][dht:020]:   Auto-detected model: DHT11
      [18:24:16][C][dht:027]:   Update Interval: 60.0s
      [18:24:16][C][dht:029]:   Temperature 'Temperature Test'
      [18:24:16][C][dht:029]:     Device Class: 'temperature'
      [18:24:16][C][dht:029]:     State Class: 'measurement'
      [18:24:16][C][dht:029]:     Unit of Measurement: '°C'
      [18:24:16][C][dht:029]:     Accuracy Decimals: 1
      [18:24:16][C][dht:030]:   Humidity 'Humidity Test'
      [18:24:16][C][dht:030]:     Device Class: 'humidity'
      [18:24:16][C][dht:030]:     State Class: 'measurement'
      [18:24:16][C][dht:030]:     Unit of Measurement: '%'
      [18:24:16][C][dht:030]:     Accuracy Decimals: 0
      [18:24:16][C][captive_portal:088]: Captive Portal:
      [18:24:16][C][mdns:100]: mDNS:
      [18:24:16][C][mdns:101]:   Hostname: ble-temp-receiver
      [18:24:16][C][ota:089]: Over-The-Air Updates:
      [18:24:16][C][ota:090]:   Address: ble-temp-receiver.local:3232
      [18:24:16][C][ota:093]:   Using Password.
      [18:24:16][C][api:138]: API Server:
      [18:24:16][C][api:139]:   Address: ble-temp-receiver.local:6053
      [18:24:16][C][api:141]:   Using noise encryption: YES
      [18:24:25][D][api:102]: Accepted ::FFFF:C0A8:69
      [18:24:25][W][api.connection:071]: ::FFFF:C0A8:69: Socket operation failed: BAD_INDICATOR errno=11
      

      Im Protokoll von iobroker steht dies:

      2023-03-09 18:29:26.248 - error: esphome.0 (7960) ESPHome client 192.168.1.140 Error: Bad format. Expected 0 at the begin
      2023-03-09 18:29:26.249 - error: esphome.0 (7960) ESPHome client 192.168.1.140 Error: Bad format. Expected 0 at the begin
      2023-03-09 18:29:31.238 - warn: esphome.0 (7960) Client 192.168.1.140 Timeout, connection Lost, will reconnect automatically when device is available!
      2023-03-09 18:29:56.376 - error: esphome.0 (7960) ESPHome client 192.168.1.140 Error: Bad format. Expected 0 at the begin
      2023-03-09 18:29:56.379 - error: esphome.0 (7960) ESPHome client 192.168.1.140 Error: Bad format. Expected 0 at the begin
      2023-03-09 18:30:01.343 - warn: esphome.0 (7960) Client 192.168.1.140 Timeout, connection Lost, will reconnect automatically when device is available!
      2023-03-09 18:30:26.463 - error: esphome.0 (7960) ESPHome client 192.168.1.140 Error: Bad format. Expected 0 at the begin
      2023-03-09 18:30:26.464 - error: esphome.0 (7960) ESPHome client 192.168.1.140 Error: Bad format. Expected 0 at the begin
      2023-03-09 18:30:31.449 - warn: esphome.0 (7960) Client 192.168.1.140 Timeout, connection Lost, will reconnect automatically when device is available!
      

      die Konfiguration vom ESP sieht so aus:

      esphome:
        name: ble-temp-receiver
      
      esp32:
        board: esp32dev
        framework:
          type: arduino
      
      # Enable logging
      logger:
      
      # Enable Home Assistant API
      api:
        encryption:
          key: "sMmBZapO8u/XXXXXF3AaxPII5T2K4I0DlFxSEUXOioY="
      
      ota:
        password: "6bc17b5b9XXXXXd284cf36d5a73da56b"
      
      wifi:
        ssid: !secret wifi_ssid
        password: !secret wifi_password
      
        # Enable fallback hotspot (captive portal) in case wifi connection fails
        ap:
          ssid: "Ble-Temp-Receiver"
          password: "neenee"
      
      captive_portal:
      
      # Example configuration entry
      sensor:
        - platform: dht
          pin: GPIO21
          temperature:
            name: "Temperature Test"
          humidity:
            name: "Humidity Test"
          update_interval: 60s
      

      MOD-EDIT: private Daten entfernt!

      Was mache ich falsch? Ich komme irgendwie nicht weiter, da ich nicht weiß wo der Fehler liegt. Irgendwas hab ich noch nicht verstanden.
      VG

      FredF 1 Reply Last reply Reply Quote 0
      • arteck
        arteck Developer Most Active last edited by

        @speerwerfer sagte in ESPHome - erster Versuch scheitert:

        Signal strength: -59 dB ▂▄▆█

        prikelnd ist es nicht.. und es steht auch im Log..

        Client 192.168.1.140 Timeout, connection Lost, will reconnect automatically when device is available

        S 1 Reply Last reply Reply Quote 0
        • S
          speerwerfer @arteck last edited by speerwerfer

          @arteck ich glaube nicht, das es am schlechten WLAN liegt.

          Wenn ich in der YAML zum ESP die Zeilen

          api:
            encryption:
              key: "sMmBZapO8u/XXXXXF3AaxPII5T2K4I0DlFxSEUXOioY="
          

          durch

          api:
            password: "myPassword"
          

          ersetze, geht es. Irgendwas stimmt bei mir mit der Einrichtung der API nicht.

          draexler 1 Reply Last reply Reply Quote 0
          • draexler
            draexler @speerwerfer last edited by

            @speerwerfer Ersetze mal „passwort“ durch dein Passwort und trage dieses Passwort auch noch in den Adaptereinstellungen ein.

            S 1 Reply Last reply Reply Quote 0
            • S
              speerwerfer @draexler last edited by speerwerfer

              @draexler said in ESPHome - erster Versuch scheitert:

              @speerwerfer Ersetze mal „passwort“ durch dein Passwort und trage dieses Passwort auch noch in den Adaptereinstellungen ein.

              Hmm, ich glaube wir reden aneinander vorbei 🙂 Wenn ich das folgende benutze (natürlich mit einem anderen Passwort und auch in der Adaptereinstellung eingetragen)

              api:
                password: "myPassword"
              

              dann funktioniert es ja einwandfrei. Nur laut Doku ist dies deprecated. Soll also so nicht mehr gemacht werden.

              Wenn ich hingegen mit encryption und key arbeite, dann bekomme ich die Fehlermeldungen. Was muss ich tun, damit encryption funktioniert.

              draexler 1 Reply Last reply Reply Quote 0
              • draexler
                draexler @speerwerfer last edited by

                @speerwerfer: Du Sprichst von der ESPHOME Doku vermutlich und nicht die vom Adapter?
                Da muss man machmal ein bisschen Abstriche machen... Der Adapter hängt an ein paar stellen zurück.
                Zum Beispiel geht nur Switch und kein Button etc.
                Die YAML Prüfung wird dir keinen Fehler melden, aber halt der ioBroker 😉

                Am besten den alten Weg verwenden und das API Passwort in die "Secret" YAML eintragen.

                1 Reply Last reply Reply Quote 0
                • FredF
                  FredF Most Active Forum Testing @speerwerfer last edited by FredF

                  @speerwerfer
                  Auszug aus der ESPHome Doku zum Thema Native API:

                  Currently, only the ESPHome tool and Home Assistant use this native API.
                  

                  Ich Frage mich also für was du das brauchst beim ioBroker...

                  1 Reply Last reply Reply Quote 1
                  • First post
                    Last post

                  Support us

                  ioBroker
                  Community Adapters
                  Donate
                  FAQ Cloud / IOT
                  HowTo: Node.js-Update
                  HowTo: Backup/Restore
                  Downloads
                  BLOG

                  580
                  Online

                  31.9k
                  Users

                  80.1k
                  Topics

                  1.3m
                  Posts

                  4
                  7
                  889
                  Loading More Posts
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes
                  Reply
                  • Reply as topic
                  Log in to reply
                  Community
                  Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                  The ioBroker Community 2014-2023
                  logo