Hi,
I bought the mmWave Human detection kit. Everything works as expected in HomeAssistant and ESPHome.
Now I bought as a replacement a 24GHz mmWave Sensor - Human Stationary Presence Module (MR24HPB1) sensor and replace the original one. In HomeAssitant the sensors are unavailable.
So I tried the code for ESP home from this web page: GitHub - thefipster/esphome-mmwave-sensors: ESPHome integration for mmWave Sensors from Seeed Studio
It does not work. The ESPHome logs shows this error. Any idea where to find the ESPHome config ?
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x4205b878
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0x438
load:0x403ce000,len:0x918
load:0x403d0000,len:0x24e4
entry 0x403ce000
Here my config file for ESPHome. I added the esp32: part and the rx and tx pin based on the orginal ESPHome config for the buildin mmWave sensor.
substitutions:
device_id: test-mmwave-mr24hpb1
device_name: Test mmWave MR24HPB1
header_frame: headers/mr24hpb1_frame.h
header_sensor: headers/mr24hpb1.h
uart_rx_pin: "4"
uart_tx_pin: "5"
esphome:
name: ${device_id}
friendly_name: ${device_name}
includes:
- ${header_frame}
- ${header_sensor}
esp32:
board: esp32-c3-devkitm-1
variant: ESP32C3
framework:
version: 4.4.5
sdkconfig_options: {}
advanced:
ignore_efuse_mac_crc: false
components: []
source: ~3.40405.0
platform_version: platformio/[email protected]
type: esp-idf
logger:
logs:
sensor: INFO
uart:
id: soft_uart2
baud_rate: 9600
rx_pin: ${uart_rx_pin}
tx_pin: ${uart_tx_pin}
sensor:
- platform: custom
lambda: |-
auto mr24hpb1 = new MR24HPB1(id(soft_uart2));
App.register_component(mr24hpb1);
return {mr24hpb1->presence_sensor, mr24hpb1->motion_sensor, mr24hpb1->proximity_sensor, mr24hpb1->body_sensor};
sensors:
- id: presence_sensor
name: Internal Presense Sensor
internal: true
on_value:
- binary_sensor.template.publish:
id: presence_template
state: !lambda return x > 0;
- id: motion_sensor
name: Internal Motion Sensor
internal: true
on_value:
- binary_sensor.template.publish:
id: motion_template
state: !lambda return x > 0;
- id: proximity_sensor
name: Proximity
state_class: measurement
- id: body_sensor
name: Body Movement
state_class: measurement
binary_sensor:
- id: presence_template
platform: template
name: Presence
device_class: occupancy
- id: motion_template
platform: template
name: Motion
device_class: motion