mmWave Presence Detection - ESPHome style

Thanks, I had already started down the path of static IP reservations for the devices after I posted the message, but within a few minutes one rebooted again just to laugh in my face :smile:

I will work through some of the other ideas. I’m using unifi APs along with OPNsense so I have all kinds of ways to break adjust the wireless. If I come across something that works for me I will post that info.

Thanks!

Same here. And since I’ve had at least five custom fw builds in the last 7 days alone; fw matters…

I’m getting these same error messages… What did you do to fix them?

Unfortunately everything I tried, including those from crlogic above, didn’t help and the issue still occurred. Only suggestion I didn’t try was the separate SSID for 2.4ghz as that causes a bunch of headaches for me.

I just finished connecting up some ESP32 devices to the DFRobots and so far things have been better, but it’s only been an hour or so since putting them in place.

Don’t overlook firmware. Try the last 10 EA’s. No joke.

How does the DFRobot hold up to others? Let’s find out…

mmWave Wars: one sensor (module) to rule them all

1 Like

I’m having a tough time getting Arduino SDK to work with my chosen setup of esp32-c3-devkitm-1 in ESPHome. Any chance this can be made to work with the Espressif SDK or is Arduino a requirement?

Seems like a technical possibility. I’ve only just learned enough to make it work w/ ESPHome using Arduino framework. So you would have to translate the Arduino bits…

You can likely make it work with the following in your esphome config:

esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: esp-idf

There may be other changes needed to get the c3 working. Note that there is a bug (with a workaround) when using the esp-idf framework. See https://github.com/hjmcnew/esphome-hs2xx3a-custom-component/issues/9

1 Like

Thank you @hjmcnew , I was able to get this working and added my comments in GitHub :slight_smile:

Are the mmwave_presence_detection and num_targets sensors intended to work “out of the box” or is there some configuration necessary? I have tried the configuration values for distance (5.8), latency (90), and sensitivity (7) with mmwave_sensor == on referenced in OP but I’m not getting any changes to the sensors. The LED on the device continues to blink, I’m not sure if this is good or an error condition.

Yes

Classic signs of no UART communication occurring.

Hello, is it possible to know the speed with which the object is approaching? I would like to see if it is possible to sense the movement speed of the cars.

I would not use this sensor for that. It is not designed w/ that in mind and the target detection refresh is far too slow if you ask me.

I know that the RFBeam K-LD2 advertises “Object speed measurement systems” and likewise the K-LD7 does as well.

There are many other options on AliExpress that market this feature.

1 Like

Hi everyone. Thank you all for your great contributions to this project.

I am a begginer to all this but i decided to try this setup. Im having a lot of trouble even after browsing this thread and trying different things.

I have an esp32 board and have wired up the SEN0395 and tried adding it through ESP home to HA. The binary sensor seems to be working but I cannot get the sensitivity, distance, and latency to work. I saw that the advice is to check the UART wiring for the TX/RX pins so this is my current wiring:

Next I downloaded the files from the repo, using install method 2 my esp device config looks like

> esphome:
>   name: mmwave-occupancy
> 
> esp32:
>   board: nodemcu-32s
>   framework:
>     type: arduino
> 
> # Enable logging
> logger:
>   level: debug
> 
> 
> # Enable Home Assistant API
> api:
>   encryption:
>     key: "xxxxx"
> 
> ota:
>   password: "xxxxx"
> 
> wifi:
>   ssid: !secret wifi_ssid
>   password: !secret wifi_password
> 
>   # Enable fallback hotspot (captive portal) in case wifi connection fails
>   ap:
>     ssid: "Mmwave-Occupancy"
>     password: "xxxxx"
> 
> captive_portal:
>     
>     
> substitutions:
>   device_name: lounge mmwave
>   
>   # This will vary based on your board
>   uart_tx_pin: GPIO17
>   
>   # This will vary based on your board
>   uart_rx_pin: GPIO16
>   
>   # This will vary based on your board
>   gpio_pin: GPIO23
>   
>   # (Optional) Path to the leapmmw_sensor.h file relative to your esphome configuration directory
>   header_file: leapmmw_sensor.h
> 
> packages:
>   remote_package:
>     url: https://github.com/hjmcnew/esphome-hs2xx3a-custom-component
>     ref: release
>     file: packages/leapmmw_sensor.yml

After installing and connecting to HA it looks like this.
image

Binary sensor works and responds accurately with room occupancy. Cannot control LED, sensitivity, distance, latency :grimacing:
Any guidance on what I can do to figure this out?

Wiring/GPIO looks good.

You copied the leapmmw_sensor.h and installed it in your ESPHome folder?

I took the zip folder from the repo and emptied the whole thing into my ESP home folder :smiley:
image

.h check

For kicks, try GPIO 5 & 18 ?

ok so now wiring is sensor rx > GPIO18 and sensor tx > GPIO 5 and the yaml looks like this:
image
After reinstall still no change in HA :frowning:

Thanks for checking the other pins.

Paging @hjmcnew - were you able to create the branch w/ UART debugging enabled?

Might shine some light on what could be going on here.

@1st_timer Alternatively until that branch is deployed. Do you have a USB serial adapter? Confirming on a PC can be a useful step.

No unfortunately I don’t. Ill see if maybe I can get one in the coming days and I could post again.
Otherwise if I should just be patient I can do that too :slight_smile:

Ill continue to tinker with it…I was having the same problem with a second sensor I tried to build (hoping it would go better) on an ESP8266 D1 Mini. Ill try swapping cables and boards out and let you know if i stumble on it…