I have a weird problem - my new POE ESP32 board works great so far, but when I try to add a binary GPIO sensor, this error appears:
I can’t find it anywhere…
Also, I can’t add a DALLAS sensor - with similar errors (but that’s not so important)
this is my YAML (the sensor in question is at the very bottom):
esphome:
name: eingang-bl-proxy-etc
includes:
- uart_line_sensor.h
esp32:
board: esp32dev
framework:
# type: arduino
type: esp-idf
# Enable Home Assistant API
substitutions:
device_name: "eingang-bl-proxy-etc"
location: "Eingangsbereich"
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO17_OUT
phy_addr: 0
#dallas:
# - pin: GPIO12
# update_interval: 10s
logger:
level: DEBUG
baud_rate: 0 #disable logging over uart
uart:
- tx_pin: 16
rx_pin: 32
baud_rate: 9600
id: uart_bus
# Enable Home Assistant API
api:
password: !secret api_ota_pass
ota:
password: !secret api_ota_pass
# Text sensors with general information.
text_sensor:
- platform: custom
lambda: |-
auto my_custom_sensor = new UartReadLineSensor(id(uart_bus));
App.register_component(my_custom_sensor);
return {my_custom_sensor};
text_sensors:
- name: "UART CPM Sensor"
# internal: true
id: "uart_cpm"
sensor:
# Uptime sensor.
- platform: uptime
name: ${device_name} Uptime
button:
- platform: restart
name: "${location} ${device_name} Restart"
#switch:
bluetooth_proxy:
active: true
esp32_ble_tracker:
scan_parameters:
duration: !secret ble_tracker_duration
binary_sensor:
# Presence based on iBeacon UUID
- platform: ble_presence
ibeacon_uuid: !secret xxx_phone_uuid
ibeacon_major: 100
ibeacon_minor: 1
name: "xxx-Phone-BLE-${device_name}"
- platform: ble_presence
ibeacon_uuid: !secret yyy_phone_uuid
ibeacon_major: 100
ibeacon_minor: 1
name: "yyy-Phone-BLE-${device_name}"
- platform: ble_presence
ibeacon_uuid: !secret zzz_phone_uuid
ibeacon_major: 100
ibeacon_minor: 1
name: "zzz-Phone-BLE-${device_name}"
- platform: gpio
name: "${device_name} Eingangstüre"
pin:
number: 33
mode: INPUT_PULLUP
inverted: true
filters:
- delayed_on_off: 20ms
what’s gong on there?!
nickrout
(Nick Rout)
December 15, 2022, 8:28am
2
Any reason you are using esp-idf instead of arduino?
yes - because the main purpose of that ESP will be to control a Yale door lock via Bluetooth - and with esp-idf the connection is supposed to be more stable and quicker.
could this be an issue?! I thought changing this makes the system more stable because it removes a whole layer of code… hmmm - will give it a quick try with arduino
EDIT : well, ok now it works kind of weird that something as basic as a GPIO binary sensor won’t work with this xD
in this thread: August Lock Gen4 + HomeKit - #64 by Farnsworth
and when I searched, I found threads like this Question: Benefits of esp-idf over framework type arduino · Issue #62 · mmakaay/esphome-xiaomi_bslamp2 · GitHub where it is explained why that is the case.
and about the speed - I can personally confirm that with arduino
the lock takes around 4-5s to react, with esp-idf
it’s somewhere around 1s
nickrout
(Nick Rout)
December 15, 2022, 9:15am
6
Actually just after i posted I saw that second thread (just by chance). Interesting.
zoogara
(Daryl)
December 15, 2022, 9:41am
7
Possibly nothing to do with your sensor - did you recently upgrade to 2022.12 ESPHome?
opened 07:37AM - 14 Dec 22 UTC
### The problem
Compile fails with "sh: 1: xtensa-esp32-elf-g++: not found"
…
### Which version of ESPHome has the issue?
2022.12.0
### What type of installation are you using?
Home Assistant Add-on
### Which version of Home Assistant has the issue?
2022.12.5
### What platform are you using?
ESP32
### Board
esp32dev
### Component causing the issue
_No response_
### Example YAML snippet
_No response_
### Anything in the logs that might be useful for us?
```txt
Platform Manager: Installing platformio/espressif32 @ 5.2.0
INFO Installing platformio/espressif32 @ 5.2.0
Downloading [####################################] 100%
Unpacking [####################################] 100%
Platform Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Tool Manager: Installing espressif/toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
INFO Installing espressif/toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
Downloading [####################################] 100%
Unpacking [####################################] 100%
Tool Manager: [email protected] +2021r2-patch3 has been installed!
INFO [email protected] +2021r2-patch3 has been installed!
Tool Manager: Installing platformio/framework-arduinoespressif32 @ ~3.20005.0
INFO Installing platformio/framework-arduinoespressif32 @ ~3.20005.0
Downloading [####################################] 100%
Unpacking [####################################] 100%
Tool Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Tool Manager: Installing platformio/tool-esptoolpy @ ~1.40201.0
INFO Installing platformio/tool-esptoolpy @ ~1.40201.0
Downloading [####################################] 100%
Unpacking [####################################] 100%
Tool Manager: [email protected] has been installed!
INFO [email protected] has been installed!
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- WiFi @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- Update @ 2.0.0
Compiling /data/luftkvalitet1/.pioenvs/luftkvalitet1/src/esphome/components/api/api_connection.cpp.o
sh: 1: xtensa-esp32-elf-g++: not found
*** [/data/luftkvalitet1/.pioenvs/luftkvalitet1/src/esphome/components/api/api_connection.cpp.o] Error 127
========================= [FAILED] Took 371.07 seconds =========================
```
### Additional information
_No response_
interesting - will give it a try with one of the upcoming versions then ^^
I just went (back) to the ESPHome beta branch, and everything (I use) works now with esp-idf
OE333
(Oe333)
November 2, 2023, 1:58pm
10
I had the same problem not being able to add a dallas temperature sensor.
Going to ESPHome beta solved the problem.
Thank you for the hint !