I am waiting for my HC-SR04 to arrive and am planning on connecting it to an esp8266 and reporting back the data via MQTT to home assistant.
My plan is to identify who is entering or leaving a room by installing the sensor on the top of the door way and if the height measured matches my height my wife’s or daughters then responding accordingly.
Sounds like a very ambitious plan in terms of timing and accuracy.
Just in comparison: I mounted an ultrasonic sensor in my garage facing down to recognise whether or not the car space is currently occupied or not. The following diagram shows measured values. The actual distance from the sensor to the floor is 250cm, while the measured values range from 300 to 420cm during the day with a few outliers, and without any obstacles in the way.
I’ve ordered another sensor in the meantime to see if maybe just this sensor is broken or inaccurate.