Battery distance sensor

Hi, I am wondering if there is available a battery distance sensor. I want to use it in the edge of my awning. I need to know the position of the awning in order to be able to fold it or unfold it depending on the weather. So let’s say is half open (2 meters) if it gets windy I would like to close to 1 meter (not totally)
That’s why I need a battery distance sensor. Is there any available? (I am not good at dyi)
Thanks

Do you control the awning manually or is it electrical? Is there a wall right next to the awning?

it is electrical, wifi, so it is already integradet to HA. No wall in the sides of awning, only the wall that it is fitted

Just an idea, couldn’t you just completely close it and then open it to the desired length when the weather changes?

This what I am doing right now but it is not so good solution. Most of the time it is in the right position so it closes just to return where it was

Could you please reply to me instead of the post, otherwise I won’t see your answer.
How do you open the awning to for example 2 meters with HA?

@Burningstone
With 12 sec delay it opens at 20% of the awning
3 meters is the full opening distanse. I usually need it at 25 to% in order if it is windy not to brake and if it’s raining to the table and the chairs to remain dry

Do you also open/close the awning manually sometimes or only through HA?
How do you control the awning with HA, you press a button or what?

@Burningstone
Sometimes a family member will change the position manually or me manually through HA interface (up down arrows)
Right now I have 2 automations.
1 At 0900 clock each morning move to the desired position.
2. If the wind speed is more than 35 km/h move to desired position

However most of the times it is in the desired position but I don’t have a way to inform HA that it is.

I also don’t know if there is a switch that can report its position but i can not imagine how it would.

My awning switch has a service “cover.set_cover_position” but it does not working ( I have made several tries)
I think it is also logical not to working because it doesn’t knows what for is its function. I don’t know if there is a way to declare somehow its totally opened/closed position so that it would but I don’t think this something it cone be done

The sonic distance sensors probably wouldn’t run on batteries and be useful. If you intended to put one on the end of the awning and have it tell the distance back to the wall. An RF sender would keep battery low, but it would have no way to know it moved without waking up and checking every while which would drain the batteries. I also don’t know their maximum range, but I think it’s short like 1 meter.

Is there anything that turns available on the outside of the awning gearbox?

I’m just thinking a rotary encoder glued to the end of a shaft would allow you to tell how many times it turns and gauge the distance. The awning has obviously got power, so you could tap power off it to run the device. This would give you a sensor that would tell you roughly how extended/retracted the awning is, even if someone moved it manually.

But it would require some electronics… and making them waterproof/outdoor safe.

Nice idea. I will check it when I return to home. However in every case I am sure I can not implement it by myself :slight_smile:
Suppose that I could although. I think you suggested something like this? Where I should attach it in order to communicate with HA?

Yea, I found this:

Which could maybe be adapted. You will no doubt be sensing how many full revolutions it makes in either direction. I’d probably also add a “Home switch” that the unit presses against when it’s fully retracted, allowing you to calibrate the rotary encoded position every time someone fully closes the awning. (Other wise it’s possible it will get out of phase/sync).

This sounds like a positional “cover”. I think you can probably implement this with espeasy + rotary encoder.
I am not sure the suitability for battery usage however - esp8266/wifi devices need special consideration for sleep etc. If you were able to add a solar panel there are some designs I saw for weatherstations using ESP8266 + lipo battery + solar.

it is very interesting but very advanced technic for me to implement.
I was looking for a ready to use device unfortunately

What about RF door sensors placed on the frame in such a way that they trigger when the awning passes them? You could put 3 of them and get closed, mid point and open signals.

I had the same idea, that’s why I asked about a wall next to the awning. Didn’t think about putting them in the framing, nice idea!

You could put the main unit on the frame and put rare earth magnets in the extending pole/glued to the fabric (providing they dont interfere with the workings)

Very nice idea!
I haven’t got any rf sensors, neither know how to implement this right now but I will try it
Can you suggest me please which rf sensors I should look for?

Look for window/door alarm sensors.

There are two types. Single code “Door Open” or “Door Closed” ONLY sensors. They will send one signal when the magnet comes close to them, or goes away from them depending on whether they are a door closed or door open sensor. The two code sensors send a code for when the magnet comes close and a different code when it goes away.

Thanks. Will take a look which one to buy and come back when they arrive