emrp:ws2025:agv
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| emrp:ws2025:agv [2026/02/27 04:57] – [4.5.2 Automations] 23553_students.hsrw | emrp:ws2025:agv [2026/02/27 21:39] (current) – [4.5.2 Automations] 23553_students.hsrw | ||
|---|---|---|---|
| Line 60: | Line 60: | ||
| * T_in ≥ 29 °C AND T_out < T_in − 0.5% | * T_in ≥ 29 °C AND T_out < T_in − 0.5% | ||
| - | |||
| - | Stop fans when: | ||
| - | |||
| - | * T_in ≤ 28.5 °C | ||
| No humidity/ | No humidity/ | ||
| Line 74: | Line 70: | ||
| * AND T_out < T_in − 0.5% | * AND T_out < T_in − 0.5% | ||
| * AND DP_out ≤ DP_in + 1% | * AND DP_out ≤ DP_in + 1% | ||
| - | |||
| - | Stop fans when: | ||
| - | * T_in ≤ 26.8 °C OR outside is no longer favorable | ||
| This allows cooling even if outside dew point is slightly higher, but blocks cases where outside air is much wetter. | This allows cooling even if outside dew point is slightly higher, but blocks cases where outside air is much wetter. | ||
| Line 87: | Line 80: | ||
| * AND T_out ≤ 27 °C | * AND T_out ≤ 27 °C | ||
| * AND outside air is truly drier: DP_out < DP_in − 0.7% | * AND outside air is truly drier: DP_out < DP_in − 0.7% | ||
| - | |||
| - | Stop fans when: | ||
| - | * RH_in < 68% | ||
| - | * OR T_out > 27 °C | ||
| - | * OR DP_out ≥ DP_in − ΔDP (outside no longer helps) | ||
| If outside dew point is lower, exchanging air will reduce moisture even if outside is warmer. | If outside dew point is lower, exchanging air will reduce moisture even if outside is warmer. | ||
| + | |||
| + | If one of these three conditions is true for 1 minute the fans start, if they are false fo 2 minutes the fans turn off. | ||
| ===== 3. Components ===== | ===== 3. Components ===== | ||
| Line 250: | Line 240: | ||
| </ | </ | ||
| - | Because the electronics enclosure is mounted on the greenhouse door while the Ethernet feed and the inside sensor cable are routed to fixed points, both cables are installed with sufficient slack to accommodate the door movement without putting strain on connectors or wiring. | + | The electronics enclosure is installed next to the greenhouse door (rather than on the door itself) and remains stationary. The Ethernet feed and the DHT11 sensors |
| ==== 4.4 Software setup ==== | ==== 4.4 Software setup ==== | ||
| Line 408: | Line 398: | ||
| To add automatic calculations of the dew points for inside and outside Templates are used. [S3] | To add automatic calculations of the dew points for inside and outside Templates are used. [S3] | ||
| - | Following the quickling | + | Following the quick link in the Template Documentation or under '' |
| - | <file script | + | <file script |
| {% set T = states(' | {% set T = states(' | ||
| {% set RH = states(' | {% set RH = states(' | ||
| Line 420: | Line 410: | ||
| {% else %} | {% else %} | ||
| {{ none }} | {{ none }} | ||
| + | {% endif %} | ||
| + | </ | ||
| + | |||
| + | A second template is used for checking if the control condition for venting are met. Instead of a '' | ||
| + | |||
| + | <file script should_vent.txt> | ||
| + | {% set tin = states(' | ||
| + | {% set tout = states(' | ||
| + | {% set hin = states(' | ||
| + | {% set dpin = states(' | ||
| + | {% set dpout = states(' | ||
| + | |||
| + | {% if None in [tin, tout, hin, dpin, dpout] %} | ||
| + | false | ||
| + | {% else %} | ||
| + | {% set dT = 0.5 %} | ||
| + | {% set dp_max = 1.0 %} | ||
| + | {% set dp_margin = 0.7 %} | ||
| + | |||
| + | {% set extreme_temp = (tin >= 29 and tout < (tin - dT)) %} | ||
| + | {% set normal_temp | ||
| + | {% set humidity | ||
| + | |||
| + | {{ extreme_temp or normal_temp or humidity }} | ||
| {% endif %} | {% endif %} | ||
| </ | </ | ||
| Line 428: | Line 442: | ||
| === 4.5.2 Automations === | === 4.5.2 Automations === | ||
| - | The ventilation control logic is implemented using Home Assistant automations. This includes temperature-driven ventilation and humidity-driven ventilation rules based on comparing inside vs. outside conditions. | + | The ventilation control logic is implemented using Home Assistant automations |
| < | < | ||
| Line 439: | Line 453: | ||
| The following YAML file specifies the criteria that Home Assistant uses to determine when to activate the ventilation system based on 2.2 Control concept. | The following YAML file specifies the criteria that Home Assistant uses to determine when to activate the ventilation system based on 2.2 Control concept. | ||
| + | |||
| <file yaml automation.yaml> | <file yaml automation.yaml> | ||
| - | alias: | + | alias: Greenhouse Ventilation |
| - | description: | + | description: |
| - | mode: single | + | Vent switch follows binary_sensor.greenhouse_should_vent with anti-flip-flop |
| + | | ||
| triggers: | triggers: | ||
| - | - id: vent_on | + | - entity_id: |
| - | | + | - binary_sensor.greenhouse_should_vent |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | {% set dpin = states(' | + | |
| - | {% set dpout = states(' | + | |
| - | + | - entity_id: | |
| - | {% if None in [tin, tout, hin, dpin, dpout] %} | + | - binary_sensor.greenhouse_should_vent |
| - | {{ false }} | + | |
| - | {% else %} | + | |
| - | {% set dT = 0.5 %} | + | |
| - | {% set dp_max = 1.0 %} | + | |
| - | {% set dp_margin = 0.7 %} | + | |
| - | + | | |
| - | {% set extreme_temp = (tin >= 29 and tout < (tin - dT)) %} | + | |
| - | {% set normal_temp = (tin > 27 and tin < 29 and tout < (tin - dT) and dpout <= (dpin + dp_max)) %} | + | |
| - | {% set humidity = (hin > 70 and tout <= 27 and dpout < (dpin - dp_margin)) %} | + | |
| - | + | ||
| - | {{ extreme_temp or normal_temp or humidity }} | + | |
| - | | + | |
| - | + | ||
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | {% set dpin = states(' | + | |
| - | {% set dpout = states(' | + | |
| - | + | ||
| - | {% if None in [tin, tout, hin, dpin, dpout] %} | + | |
| - | {{ true }} | + | |
| - | {% else %} | + | |
| - | {% set dT = 0.5 %} | + | |
| - | {% set dp_max = 1.0 %} | + | |
| - | {% set dp_margin = 0.7 %} | + | |
| - | + | ||
| - | {% set temp_ok = (tin <= 26.8) %} | + | |
| - | {% set rh_ok = (hin <= 68) %} | + | |
| - | + | ||
| - | {% set outside_not_cooler = (tout >= (tin - dT)) %} | + | |
| - | {% set outside_too_warm_for_humidity = (tout > 27) %} | + | |
| - | {% set outside_too_wet_for_normal = (dpout > (dpin + dp_max)) %} | + | |
| - | {% set outside_not_drier = (dpout >= (dpin - dp_margin)) %} | + | |
| - | + | ||
| - | {{ | + | |
| - | (temp_ok or outside_not_cooler or outside_too_wet_for_normal) | + | |
| - | and | + | |
| - | (rh_ok or outside_too_warm_for_humidity or outside_not_drier) | + | |
| - | }} | + | |
| - | {% endif %} | + | |
| actions: | actions: | ||
| - | - choose: | + | - target: |
| - | | + | entity_id: switch.agv_esp32_greenhouse_ventilation |
| - | - condition: trigger | + | |
| - | id: vent_on | + | mode: single |
| - | sequence: | + | |
| - | - service: switch.turn_on | + | |
| - | target: | + | |
| - | | + | |
| - | | + | |
| - | - service: switch.turn_off | + | |
| - | | + | |
| - | | + | |
| </ | </ | ||
emrp/ws2025/agv.1772164655.txt.gz · Last modified: 2026/02/27 04:57 by 23553_students.hsrw