Hi! Im trying to find a sensor to see how much is the angle of the opening of the windows are to calculate windows opening area. Is there any suggestions? I am thinking about potentiometer as my supervisor suggested but am thinking of another alternatives
Look up ‘tilt’ sensors. They have a mechanism or electronics to determine angle. Some only detect certain orientation some report tilt amount. You should be able to locate the type of sensor no matter your transport. (wifi, zigbee ZWave raw sensor for an esp32, etc). The cheap ones are usually good enough for open close.
Radio and connectivity is going to be very region dependent.
The Aqara vibration sensor exposes angle Aqara DJT11LM control via MQTT | Zigbee2MQTT but I only use mine for detecting vibration so not sure how reliable that is. Seems it’s the only device supported by Z2M that exposes angle.
Edit: This expostes tilt Tuya ZG-103Z control via MQTT | Zigbee2MQTT
You may need to use an ESP32 and this module to get what you are wanting if there are not many or if any options for out of the box products:
Wireless Sensor Tags detect angle changes in windows and doors. They also do temperature and humidity, and a slightly more expensive version has a light sensor.
You need a controller, but it’s not expensive and the range is very good. As a bonus it allows you to control a Nest thermostat, provided you haven’t migrated to a Google account.
The HA integration is cloud-based, unfortunately, and still yaml, but it seems very robust - mine’s been problem free for several years.
I use smartthings multisensors for exactly this purpose.
They have contact, X/Y/Z tilt and temperature sensors in the one unit.
~B