i want to make a presence detector. Prject
impossible to flash bye PC
it is possible to compile wirelessely, but flash dont work finally (code IS valides)
my code is
Code: Select all
esphome:
name: xx
friendly_name: XX
esp32:
board: esp32-s2-saola-1
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "xxxxxxxxxx"
ota:
password: "xxxxxx"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.1.56
gateway: 192.168.1.5
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Xx Fallback Hotspot"
password: "oxxxxxxxxx"
captive_portal:
web_server:
port: 80
version: 2
local: true
ld2410:
uart:
tx_pin: GPIO18
rx_pin: GPIO33
baud_rate: 256000
parity: NONE
stop_bits: 1
i2c:
- id: bus_a
sda: 12
scl: 11
scan: true
sensor:
- platform: ld2410
light:
name: light
moving_distance:
name: Moving Distance
still_distance:
name: Still Distance
moving_energy:
name: Moving Energy
still_energy:
name: Still Energy
detection_distance:
name: Detection Distance
g0:
move_energy:
name: g0 move energy
still_energy:
name: g0 still energy
g1:
move_energy:
name: g1 move energy
still_energy:
name: g1 still energy
g2:
move_energy:
name: g2 move energy
still_energy:
name: g2 still energy
- platform: bh1750
name: "BH1750 Illuminance"
address: 0x23
update_interval: 10s
id: bh1750_sensor
binary_sensor:
- platform: ld2410
has_target:
name: Presence
has_moving_target:
name: Moving Target
has_still_target:
name: Still Target
out_pin_presence_status:
name: out pin presence status
number:
- platform: ld2410
timeout:
name: timeout
light_threshold:
name: light threshold
max_move_distance_gate:
name: max move distance gate
max_still_distance_gate:
name: max still distance gate
g0:
move_threshold:
name: g0 move threshold
still_threshold:
name: g0 still threshold
g1:
move_threshold:
name: g1 move threshold
still_threshold:
name: g1 still threshold
g2:
move_threshold:
name: g2 move threshold
still_threshold:
name: g2 still threshold
switch:
- platform: ld2410
engineering_mode:
name: Engineering Mode
bluetooth:
name: Control Bluetooth
button:
- platform: ld2410
factory_reset:
name: "factory reset"
restart:
name: "restart"
query_params:
name: query params
select:
- platform: ld2410
distance_resolution:
name: "distance resolution"
baud_rate:
name: "baud rate"
light_function:
name: light function
out_pin_level:
name: out pin level
text_sensor:
- platform: ld2410
version:
name: "firmware version"
- platform: wifi_info
ip_address:
name: ESP IP Address
ssid:
name: ESP Connected SSID
bssid:
name: ESP Connected BSSID
mac_address:
name: ESP Mac Wifi Address
the log is
"
INFO ESPHome 2023.12.9
INFO Reading configuration /config/esphome/xx.yaml…
INFO Generating C++ source…
INFO Compiling app…
Processing xx (board: esp32-s2-saola-1; framework: arduino; platform: platformio/espressif32@5.4.0)
HARDWARE: ESP32S2 240MHz, 320KB RAM, 4MB Flash
toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
toolchain-xtensa-esp32s2 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 2.0.1
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.1.0
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.4
|-- Wire @ 2.0.0
|-- ArduinoJson @ 6.18.5
RAM: [= ] 14.4% (used 47168 bytes from 327680 bytes)
Flash: [===== ] 54.2% (used 993810 bytes from 1835008 bytes)
========================= [SUCCESS] Took 29.56 seconds =========================
INFO Successfully compiled program.
INFO Connecting to 192.168.1.56
ERROR Connecting to 192.168.1.56:3232 failed: [Errno 111] Connection refused"
It compiles but cant flash with ans without thé ld2410cmodule
Please help++++++
Mick