An installation for closing an opening, which a building or a swimming pool has and which includes, on the one hand, two lateral guide slides (100; 100') intended to be positioned one opposite the other one, on both sides of the opening, on the other hand, an apron intended to close the opening and having side ends (1010; 1010') slidably mounted inside the lateral guide slides (100; 100'), wherein it also includes a device for detecting the position of the apron between the two lateral guide slides, this detection device including: - a means for transmitting an electromagnetic signal including, on the one hand, a transmitting antenna extending parallel to a first lateral guide slide and adopting the shape of a tubular waveguide having at least one wall provided with at least one opening (204, 204') and, on the other hand, a means for exciting this antenna with a view to transmitting such a signal by this antenna; - a means for receiving this electromagnetic signal including, on the one hand, a receiving antenna extending parallel to a second lateral guide slide, adopting the shape of a tubular waveguide having at least one wall provided with at least one opening (404, 404') and, on the other hand, a means for detecting such a signal; - a means for determining the position of the apron by analyzing a signal received by the reception means depending on a signal for controlling the transmitting means, this received signal and this control signal being connected by a transfer function depending on the position of the apron, the means for determining the position of the apron being adapted to regularly follow/define the position of the apron and for determining whether there is a gap between the received signal and an expected signal calculated based on the transfer function, the means for determining the position of the apron being also adapted to determine a normal displacement of the apron if the gap is not significant, and to detect the presence of a living being or an object on the trajectory of the apron if the gap is significant. - a means for transmitting an electromagnetic signal including, on the one hand, a transmitting antenna extending parallel to a first lateral guide slide and adopting the shape of a tubular waveguide having at least one wall provided with at least one opening (204, 204') and, on the other hand, a means for exciting this antenna with a view to transmitting such a signal by this antenna; - a means for receiving this electromagnetic signal including, on the one hand, a receiving antenna extending parallel to a second lateral guide slide, adopting the shape of a tubular waveguide having at least one wall provided with at least one opening (404, 404') and, on the other hand, a means for detecting such a signal; - a means for determining the position of the apron by analyzing a signal received by the reception means depending on a signal for controlling the transmitting means, this received signal and this control signal being connected by a transfer function depending on the position of the apron, the means for determining the position of the apron being adapted to regularly follow/define the position of the apron and for determining whether there is a gap between the received signal and an expected signal calculated based on the transfer function, the means for determining the position of the apron being also adapted to determine a normal displacement of the apron if the gap is not significant, and to detect the presence of a living being or an object on the trajectory of the apron if the gap is significant.