mmWave Presence Detection - ESPHome style

Nice work! Glad you like it.

Both were for debugging and can be safely left off.

Thank you for the clarification, I appreciate it!

Can you pls explain to a total noob how to use uart_presence_output? I would like to understand what are the possibilities and how to use it in automation in home assistant…

Pls prove Paul hibbert wrong, that the communite are not lifeless vergins

He’s totally right! Lol

2 Likes

I just received the HLK LD1115H and found your post. Do you have a pic of your final set-up? I was hoping to stack the boards but the pins don’t align electrically so I’m curious how you did it.

Feel free to contribute more here: How to work with HLK-LD1115H and Wemos D1 Mini for Human Presence Detection - ESPHome - Home Assistant Community (home-assistant.io)

Hello, on binary sensor you have to use the option pulldown: true or mode: INPUT_PULLDOWN
The “middle” pin on module goes to 3v when it detects move or occupancy, then the pin into WeMos must be in pulldown state. Now I working to adapt the code to the hlk .

This is excellent. Used the code for my 2 sensors. One is always in sync but the other one cant stay turned off. Is that the lambda? If you find a solution for this please let us know! Thanks for the efforts!

Have you confirmed the sensor reads off when face-down on a table?

If not, disconnect from ESP and check GPIO2 using a multimeter.

If yes, sounds like tuning and you will want to set min distance and latency and then customize those to your room.

Cheap mwave sensor AC 220 240V 5.8GHz Microwave Radar Sensor Switch Body Motion Detector For LED Light Sensors Switches| | - AliExpress
May be easy to remove it and use it :slight_smile:

Just loaded the new yaml in the hope that I could turn the LED off. But, despite the switch being off on the interface and it reporting that it’s been switched off, my LED is still flashing away merrily. Is there anything else that needs doing?

The switch depends on UART. What output do you see?

Do you mean in the web interface?

This is when I switch it on and off

That doesn’t look right, only one-way comms. Check your RX/TX.

Should show both direction of communication <<< and >>>

Doh!

Yep. That’s done it

Nice, I will try it later. Where do you get distance from?

@crlogic

Hi Crlogic, one proposition for the first post:
use attribute: entity_category: config
for entities created for configuration purpose, this will move those parameters to the correct place in HA.
Example:

  - platform: template
    name: latency
    id: latency
    entity_category: config

for Uart, you can put diagnostic

    name: "uart_target_output"
    id: "uart_target_output"
    optimistic: true
    entity_category: diagnostic 
2 Likes

What was your solution here? Did you have the RX and TX pins the wrong way around? I think I have a similar issue, I can set the latency to whatever and it doesn’t really seem to make much difference i.e. I could set it to 30000 for 30s and the sensor will still happily go from “clear” to “detected” within a 3 second window which is useless. Looking at your post I can see I’m also only getting one way communication with >>> which might be the reason…

RX pin from ESP goes to TX pin on the sensor
TX pin from ESP goes to RX pin on the sensor

Check your code, pin assignment from your ESP and wires

Thanks, that’s good to know. I’ve not got access to the device at the moment but just swapping the pins in the code has given me both directions in the logs <<< and >>> so hopefully it’s obvious it’s fixed when someone heads in the room! I’ve just been randomly changing the distance for days and thinking “why isn’t this working”, how foolish!