Battery distance sensor

Remember that these sensors are momentary. So there will be quite a bit of logic to work out where the awning currently IS based on the last value received from the group of sensors. Although you should be able to use them in the control loop of moving them to a set location fairly easily. ie. Move awning until the right one triggers, then stop.

Another option could be a camera and some “simple” machine learning to send the distance from another location, be it a battery cam or one inside pointing to it. Just an option not a recommendation - don’t hate!

Since it is rolling back all within the casing, try to detect the thickness of the roll.

1 Like

how could I achieve that ?

Hi Paul
I’m looking for a similar solution for my covers on the outside, they are being driven by a Somfy motor, and they do have a electronical end-switch. But they don’t send any repons back to the KNX, right now i’m working with a timer to put them in some position, but that does’nt work very well.
I do have electrical power on them, but not all the time, only when the system runs.

I have a total of 14 covers to include

So any input that could help me on this would be great.
Ragards
Maurice

Anything is achievable and as I liked the problem I pitched in with solutions. There are several solutions already suggested. I don’t think this problem is difficult to solve “in theory”, but producing a reliable outdoor device that will work for years will be the hard part.

The RF door sensors are probably the easiest hardware installation. Weather proofed easily. Virtually no electronics required, save flashing the RF Bridge. They will however require more messing around with the logic side, and won’t really tell you the actual position per say. but that’s at least warm armchair work.

I like the idea of measuring how much material is on the drum suggested by @kouny mechanically a strip of metal resting against the material on the drum on a gentle spring connected to a potentiometer. As the material reels in the potentiometer moves. An ESP type device reading that potentiometer, filtering for noise and sending MQTT with the estimated actual position in realtime. It can self calibrate based on the MIN and MAX values it encounters. It has advantages, but is heavier on the electronics and weather proofing side.

In theory it’s always a lot easier, i also have to keep in mind that i want to know the positions of the slats, i supose that this will be only possible by keeping up the impulses of the rotary encoder in some registry, with an aboslute encoder or incremental encoder but i also need to add a home sensor somehow.
the second porblem will be installing this in a gap between the outside and inside wall really small gap of 150mm width and 400mm upwards

If you want to use window/door sensors (which makes sense because they are often easy to waterproof), you can try also something else.

The main unit is a Hall sensor, the movable part is a magnet. Any magnet triggers any base unit.

Buy three of them and stick the base units at predefined distance on something that doesn’t move (it depends a lot on what awning you have: knickarm/extending arm, or on a pergola).

Place a movable unit (the magnet part, or ANY neodymium magnet of the size you find suitable for that) somewhere where it can pass in front of each base unit when it extends/folds.

By checking which base unit is triggered, you will know how far is the awning extended.

Since ANY magnet can trigger the base units, you can also use thin and cheap magnets from Aliexpress, which are so thin that you can stick to the cloth very easily and they should not affect the folding.

This allows you also to do the opposite: buy only two base units and stick them somewhere at a certain distance between each other, let’s say 25 cm distance.

Stick several magnets at a different distance (let’s say 30 cm) between each other along the side of the cloth. If you don’t overdo it, the awning will fold back anyway, magnets can be thin.

Now you have a rotary encoder made of magnets on a cloth.

By checking the timing of the pulses you will know whether the awning is extending or retracting, and by counting the pulses you will know how far it reached (more or less, 30 cm resolution in the case described).

Once you have the script for counting and detecting direction, POST IT HERE, because it will be quite cool and AFAIK it’s never been done before :slight_smile:

In the next few days I will receive the SONOFFÂŽ DW1 433Mhz Door Window Sensor.
Can someone help me with the initial code? How I could make a simple “counter”? I mean every time the parts come close to count them?

  • I think now that I should buy also the SONOFFÂŽ RF Bridge WIFI in order to connect it to HA