Empfänger auf reale Tor-Steuerung (esp32dev) umgestellt
- tor_empfaenger.yaml (ESP32-S3-Platzhalter) ersetzt durch tor_steuerung.yaml, das die bestehende ChatGPT-Konfig (Relais GPIO16, Türsensoren GPIO34/35, echte WLAN/API/OTA-Credentials) mit der CC1101-Empfangslogik zusammenführt - CC1101 auf freie VSPI-Pins gelegt (GPIO4/5/18/19/23), da 16/34/35 belegt sind - auto_sender_01.yaml verwendet dieselben Credentials wie der Empfänger - README: Pintabelle für esp32dev, Hinweis auf Klartext-Secrets im Repo
This commit is contained in:
@@ -15,15 +15,15 @@ logger:
|
||||
|
||||
api:
|
||||
encryption:
|
||||
key: !secret api_key
|
||||
key: "X2kSHZmeEbdPtMBlxB67cJ4/WMNkQOPCstqYiUQlL2g="
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
password: !secret ota_password
|
||||
password: "4bd4f24d4a26730d06e84d6e0816fb09"
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
ssid: "Leonardo da WiFi"
|
||||
password: "44290812080358610465"
|
||||
# Wichtig: im Auto ist kein WLAN in Reichweite.
|
||||
# Ohne diese Zeile würde der ESP alle 15 Min neu starten.
|
||||
reboot_timeout: 0s
|
||||
|
||||
@@ -1,36 +1,69 @@
|
||||
esphome:
|
||||
name: tor-empfaenger
|
||||
friendly_name: Tor Empfänger
|
||||
name: tor-steuerung
|
||||
friendly_name: Tor Steuerung
|
||||
|
||||
esp32:
|
||||
board: esp32-s3-devkitc-1 # <- ggf. an dein Board anpassen
|
||||
board: esp32dev
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: recommended
|
||||
|
||||
logger:
|
||||
level: DEBUG
|
||||
|
||||
api:
|
||||
encryption:
|
||||
key: !secret api_key
|
||||
key: "X2kSHZmeEbdPtMBlxB67cJ4/WMNkQOPCstqYiUQlL2g="
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
password: !secret ota_password
|
||||
password: "4bd4f24d4a26730d06e84d6e0816fb09"
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
ssid: "Leonardo da WiFi"
|
||||
password: "44290812080358610465"
|
||||
power_save_mode: none
|
||||
ap:
|
||||
ssid: "Torsteuerung"
|
||||
password: "Spring.3"
|
||||
|
||||
captive_portal:
|
||||
|
||||
# --- Bestehende Hardware ---
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: GPIO16
|
||||
id: tor_impuls_relay
|
||||
name: "Tor Impuls"
|
||||
restore_mode: ALWAYS_OFF
|
||||
on_turn_on:
|
||||
- delay: 500ms
|
||||
- switch.turn_off: tor_impuls_relay
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: GPIO34
|
||||
name: "Tor AUF"
|
||||
device_class: door
|
||||
- platform: gpio
|
||||
pin: GPIO35
|
||||
name: "Tor ZU"
|
||||
device_class: door
|
||||
|
||||
# --- Neu: CC1101 433 MHz Empfänger für den Funksender im Auto ---
|
||||
# Pinbelegung siehe README/doku/verdrahtung-cc1101.svg
|
||||
# (GPIO16/34/35 sind durch die bestehende Hardware belegt, deshalb
|
||||
# hier die freien VSPI-Standardpins verwendet)
|
||||
|
||||
# --- SPI zum CC1101 ---
|
||||
# Diese Pins am S3 prüfen und ggf. anpassen!
|
||||
spi:
|
||||
clk_pin: GPIO12
|
||||
mosi_pin: GPIO11
|
||||
miso_pin: GPIO13
|
||||
clk_pin: GPIO18
|
||||
mosi_pin: GPIO23
|
||||
miso_pin: GPIO19
|
||||
|
||||
cc1101:
|
||||
cs_pin: GPIO10
|
||||
gdo0_pin: GPIO9
|
||||
cs_pin: GPIO5
|
||||
gdo0_pin: GPIO4
|
||||
frequency: 433.92MHz
|
||||
modulation_type: GFSK
|
||||
symbol_rate: 4800
|
||||
@@ -64,7 +97,7 @@ cc1101:
|
||||
|
||||
ESP_LOGI("tor", "Tor öffnen für Fahrzeug %u (RSSI %.1f)", fz, rssi);
|
||||
id(letztes_fahrzeug).publish_state(std::to_string(fz));
|
||||
id(tor_impuls).press();
|
||||
id(tor_impuls_relay).turn_on();
|
||||
|
||||
globals:
|
||||
- id: letzte_oeffnung
|
||||
@@ -72,9 +105,8 @@ globals:
|
||||
restore_value: false
|
||||
initial_value: '0'
|
||||
|
||||
# --- RSSI-Schwelle, in HA per Schieberegler einstellbar ---
|
||||
# Je näher an 0, desto kürzer die Reichweite.
|
||||
# Startwert -60 entspricht grob 5 m — beim Einrichten im Log ablesen und anpassen.
|
||||
# In HA per Schieberegler einstellbar, kein Neuflashen nötig.
|
||||
# Startwert -60 ≈ 5 m, im Betrieb anhand der geloggten RSSI-Werte feinjustieren.
|
||||
number:
|
||||
- platform: template
|
||||
name: RSSI Schwelle
|
||||
@@ -92,19 +124,3 @@ text_sensor:
|
||||
- platform: template
|
||||
name: Letztes Fahrzeug
|
||||
id: letztes_fahrzeug
|
||||
|
||||
# --- Torimpuls: Relais 500 ms schließen ---
|
||||
switch:
|
||||
- platform: gpio
|
||||
id: tor_relais
|
||||
pin: GPIO7 # <- an deine Relais-Verdrahtung anpassen
|
||||
restore_mode: ALWAYS_OFF
|
||||
|
||||
button:
|
||||
- platform: template
|
||||
name: Tor Impuls
|
||||
id: tor_impuls
|
||||
on_press:
|
||||
- switch.turn_on: tor_relais
|
||||
- delay: 500ms
|
||||
- switch.turn_off: tor_relais
|
||||
Reference in New Issue
Block a user