Position sensor for external curtains

Hello everybody,
I’m struggling to find a way to detect the position of my external curtains.
They are motor activated (obviously) but due to their position (up to 10 meters from the ground, no balcony available, they were installed by using rope from the upper terrace) motors and control boxes are completely inaccessible, and they don’t provide any feedback about their status.

Curtains are operated ONLY by RF remote controller (I don’t have any switch installed): I successfully replicated commands on a Broadlink RM4 and integrated in HA quite easily… but I’m looking forward to some feedback about their position.

This is mainly because they have a wind sensor (maybe badly calibrated) that sometimes opens the sunscreens even if there is very low-speed wind…

My house is east-west orientated and during summer period sunscreens are vital to avoid excessive temperature specially in one of the bedrooms, so I’d like to control it in same way…

My first thought is going to ultrasonic sensors… I’ve the top of each curtain quite accessible from home my idea is to install the sensor (Ultrasonic connected to ESP32) to the top-mounting plate (this is the fixed part), left oriented, and fix some metal (aluminum?) plate onto the curtain lower-end bracket (mobile part). You can (hopefully) refer to attached picture

This should work in same way without problem (is the aluminum plate OK for you?), but how to power the ESP module? Can they operate under batteries? Which ones? Expected duration (curtains are operated about 10 times/day)?
I don’t need a continuous feedback service and they can update their status even each 30 minutes… not a problem … I don’t have any problem if I’ve to put batteries in charge for some times and leaving system without its feedback…

Am I going in the right direction? Any suggestions or experience?

Cheers,

Tony

How about a simple contact It closes when the curtain is all the way up, as then the rolled up curtain is thicker, closing the contact, while when down with a slim roll it would be open.

Or even a reed switch, with the magnetic counterpart at the bottom plate attached.

ESP32s can be a pain with batteries, due to the WiFi connection, but the above, with a contact switch can also be achieved with CR2032 driven zigbee devices lasting about a year.

All that if you only need Open and Closed states. If you need curtain percentage values it would be more complicated.