Objective

Many owners of bioclimatic louvered pergolas express regrets about their purchase, often favoring a traditional pergola instead. Common feedback is: “In two years, I’ve only opened the louvres five times, and twice it resulted in rain soaking my terrace because I forgot to close them. I’ve stopped opening them since.”

Despite this, I chose a louvered pergola over a traditional one because the latter would obstruct too much sunlight from my large glass patio doors, essential for warming the central living area during winter.

The concept is straightforward; the louvres are to pass maximum sunlight in winter and maximize air flow while shading in summer. To be effective, the louvres must track the sun accurately and close automatically when it starts to rain, all without my manual intervention.

Hardware

The louvres are powered by an actuator, Elero Picolo XL, supplied by the manufacturer. I connected it to a Shelly 2.5 module during installation, which has two relays for opening and closing. The Shelly module, upgraded with Tasmota for added flexibility, is encased within the pergola’s aluminum structure, which significantly reduces the WiFi signal strength. The WiFi access point, an Ubiquiti AC-LR, is obstructed by a house wall and about 7 meters away, but the signal remains just about usable and stable.

Calibration of the louvre opening is a required step post-installation. The process is detailed on the official Tasmota website and involves timing the opening and closing of the louvres, with the results configured into the system.

Integration into Home Assistant

Integration is achieved using the MQTT protocol.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
mqtt:
  cover:
    - name: "Pergola"
      unique_id: "Pergola"
      availability_topic: "tele/zunaj/terasa/pergola_motor_14-4/LWT"
      payload_available: "Online"
      payload_not_available: "Offline"
      set_position_topic: "cmnd/zunaj/terasa/pergola_motor_14-4/ShutterPosition1"
      position_topic: "stat/zunaj/terasa/pergola_motor_14-4/RESULT"
      position_template: >
        {% if ('Shutter1' in value_json) and ('Position' in value_json.Shutter1) %}
          {{ value_json.Shutter1.Position }}
        {% else %}
          {% if is_state('cover.pergola', 'unknown') %}
            50
          {% else %}
            {{ state_attr('cover.pergola','current_position') }}
          {% endif %}
        {% endif %}        
      position_open: 100
      position_closed: 0
      command_topic: "cmnd/zunaj/terasa/pergola_motor_14-4/Backlog"
      payload_open: "ShutterOpen1"
      payload_close: "ShutterClose1"
      payload_stop: "ShutterStop1"
      retain: false
      optimistic: false
      qos: 1

Automation Logic

All software logic is managed through the AppDaemon add-on, which supports Python scripting and integration with Home Assistant.

The system aims to maximize light intake in winter and air circulation in summer, adjusting the louvres accordingly every 30 minutes.

The routine functions as follows:

  1. At 7:00 each morning, it assesses the weather forecast to determine the operating mode for the day, choosing between light pass or ventilation.
  2. It then computes the optimal louvre angles every 30 minutes based on the azimuth of the house and its geolocation. In ventilation mode, the louvres are adjusted by 90° to expose to longer side towards the sun. This ensures shadow and maximum ventilation.
  3. The louvres are set to the calculated position if no precipitation has occurred within the last two hours and the outdoor illumination is above 20,000 lux.
  4. Two hours post the last adjustment (maximum louvre position), the louvres are closed.

Any sudden weather change to precipitation triggers an immediate system response to close the louvres. Weather data is sourced from OpenWeatherMap, which is integrated into Home Assistant and is quite reliable.

In snowy conditions, the system automatically pauses until manually reactivated by the user.