Home Assistant snow detection PV system

 

In a PV system, the voltage increases with the number of PV modules, even in poor lighting conditions. This is different if certain modules are partially or completely covered in snow. I have taken advantage of this fact and created a snow detection function in Home Assistant. Why? To correct the PV forecast for the next day and adjust the heating control accordingly.

First, I tried to create a template sensor for the detection, which did not work reliably. Because there is also shading at sunrise and sunset, the voltage values at this time can only provide limited information about whether the system is snowed in. As the snow usually lasts longer, it is only necessary to check the values once a day, which can be done automatically. The automation can be started at a time when it is reliably light, e.g. at 1 pm. I have simply created a switch under "Helpers" to remember the status.

Creating a switch

I created a switch so that Home Assistant remembers the status.

  • "On" means: snow present,
  • "Off": no unusual shading.

Automation

The following automation ensures that the previously created switch is activated when the roof is covered with snow and deactivated when the roof is clear again:

Snow present

If the roof is not shaded, the MPPT tracker uses a voltage of at least 700V, even if it is very cloudy. To determine whether the PV system is partially covered with snow, the following template checks whether the MPPT tracker attempts to correct the voltage due to shading. Here is an example: the roof side with DC1 is free of snow, DC2 is partially snowed in:

Specifically, the template checks whether the voltage is below 600 volts. I also use a statistics sensor for the average temperature over the last 24 hours.

No snow present

If the PV voltage rises to over 650 volts and at least 0.5 A is flowing, the roof should not be shaded:

Automation as a YAML file

[+]
alias: Snow?
description: ""
mode: single
trigger:
  - platform: time
    at: "13:00:00"
condition: []
action:
  - if:
      - condition: numeric_state
        entity_id: sensor.aussen_temperature_24
        below: 5
      - condition: numeric_state
        entity_id: sensor.pv_spannung_dc
        below: 550
    then:
      - service: input_boolean.turn_on
        metadata: {}
        data: {}
        target:
          entity_id: input_boolean.pv_snow
  - if:
      - condition: numeric_state
        entity_id: sensor.pv_spannung_dc
        above: 650
      - condition: numeric_state
        entity_id: sensor.pv_strom_dc
        above: 0.5
    then:
      - service: input_boolean.turn_off
        target:
          entity_id:
            - input_boolean.pv_snow
        data: {}

The sensors and their voltage and current values must of course be adapted to the values of the PV system.

Conclusion

After I use the PV forecast for heating and hot water preparation, the snow sensor helps me to correct the forecast if the PV system is snowed in. See also: Control heating: PV surplus > ESP32 & Home Assistant. Another option would be to compare the PV forecast with the values from the previous day: I'm currently testing a forecast sensor for this purpose: if it works properly, I'll let you know.

positive Bewertung({{pro_count}})
Rate Post:
{{percentage}} % positive
negative Bewertung({{con_count}})

THANK YOU for your review!

Questions / Comments


By continuing to browse the site, you agree to our use of cookies. More Details