Direkt zum Hauptinhalt

Installation ESP32

Beschreibung:

ESP32 lässt sich in zwei Varianten installiern

  1. Einmal auf dem Home Assitant selber (Vorteil, LOGS und OTA Updates und ESP32 direkt anschließen und yaml flashen)

  2. Auf beliebigen Computer mit Linux und pip per command line (Vorteil Home Assistant unabhängig zum flashen, sonst muss ja der ESP32 an den Home Assistanten angeschlossen sein

Installtion variante 1:

 

 

Installation variante 2:

via pip:

python3 -m venv esphome32
source esphome32/bin/deactivate
pip install esphome

Beispiel yaml fürs esp32

nano esphome32/beacon.yaml

Inhalt

 

esphome:
  name: ble_beacon_scanner
  platform: ESP32
  board: esp32dev

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

mqtt:
  broker: !secret mqtt_broker
  username: !secret mqtt_user
  password: !secret mqtt_password

logger:

ota:

esp32_ble_tracker:
  on_ble_advertise:
    then:
      - mqtt.publish_json:
          topic: "ble/scan"
          payload: |-
            root["mac"] = x.address_str();
            root["rssi"] = x.get_rssi();
            root["name"] = x.get_name().empty() ? "unknown" : x.get_name();

 

wenn alles fertig

source esphome32/bin/deactivate