Heat your home with the surplus electricity from your photovoltaic system

Summary

In this post I show how to use excess electricity from your photovoltaic system or a balcony power plant with an infrared heater to heat your apartment or house. This way you will use less electricity and save a little heating costs at the same time. After you have implemented these instructions, your infrared heater will switch on whenever you have a surplus of electricity defined by you. And of course, the system also switches off again if the surplus is suddenly no longer there, because the sun is no longer shining or someone has suddenly switched on the dishwasher.

For whom is this description?

  • You use a Shelly 3EM to measure the power consumption of your house or apartment.
  • You operate a photovoltaic system whose surplus is fed into the public grid.
  • You use HomeAssistant and can see exactly your current surplus in Home Assistant. If this is not yet the case, then you better start with this article.
  • You have a Shelly Plug S (of course it works with other smart plugs, but this tutorial is designed to use the Shelly Plug S).
  • You have an electronic heater, preferably an infrared heater. I have linked my model here. The important thing is that the power matches your typical PV surplus. My infrared heater uses 130 watts and fits quite well with the surplus on a sunny day in the fall and spring, which time of year is still heating.

What does the structure of the system look like?

  1. The PV module is connected to your microinverter. I call this a balcony power plant (BKW).
  2. You have installed a Shelly 3EM in your fuse box.
  3. Use Home Assistant for your Smarthome and you can measure your surplus (balancing).
  4. You have installed the add-on “File Editor” in Home Assistant.
  5. Your electric heater is connected to a Shelly Plug S (or similar).
  6. The electric heater is adjusted to your surplus and not too big. In my case, the infrared heater has 130 watts.

Step by step guide

1. Measure the current surplus

After you have already integrated your Shelly 3EM into Home Assistant, you still need an entity that shows you the current power consumption or surplus. This entity will be the “trigger” that triggers our automation. Here is the YAML code:

      power_current:
        friendly_name: "Power Current"
        unit_of_measurement: 'W'
        value_template: >-
            {{ states('sensor.shelly3em_channel_a_power')|float + states('sensor.shelly3em_channel_b_power')|float + states('sensor.shelly3em_channel_c_power')|float }}
        availability_template: "{{
            [ states('sensor.shelly3em_channel_a_power'),
              states('sensor.shelly3em_channel_b_power'),
              states('sensor.shelly3em_channel_c_power')
            ] | map('is_number') | min
          }}"

Do the following:

  1. Open HomeAssistant in a browser
  2. Click in the menu on the left side the menu item “File editor”.
  3. Then you should see a folder icon at the top, click on it.
  4. In the file list open the file “configuration.yaml”.
  5. Insert the above YAML code in the template section.
  6. Click “Save”.
  7. In the bottom left corner of the main menu click on “Developer Tools”.
  8. Then click on “Check configuration
  9. If you get the message “Configuration will not prevent Home Assistant from starting” everything fits.
  10. Then click on “Restart
  11. After 1-2 minutes Home Assistant is available again and has loaded the new configuration.

2. Create automation rules in Home Assistant

We need two automation rules. The first one turns on the heating when I have more than 130 watts surplus:

  1. Open HomeAssistant in a browser
  2. Click in the menu on the left side the menu item “Settings”.
  3. Click on “Automations & Scenes”.
  4. Clicks on “+ Create Automation”.
  5. Clicks on “Start with an empty automation”.
  6. Add the type “State” as “Trigger”.
  7. Search for “power_current” in the “Entity*” field and select it from the drop-down list.
  8. Add the type “Numeric state condition” as “Condition”.
  9. Search for “power_current” in the “Entity*” field and select it from the drop-down list.
  10. Enter the value “-130” in the “Below” field. This corresponds to the necessary excess power and also represents the power consumption of my infrared heater. You have to adjust this value to your situation if necessary.
  11. Add a second “Condition”.
  12. Select your Shelly Plug S as “Entity*”.
  13. In the field “Condition” please set that the Shelly Plug S should be “OFF”. Background: Assuming the heating is already on, you don’t want to try to switch it on again.
  14. Adds an action.
  15. Select your Shelly Plug S as “Entity*”.
  16. In the field “Action” please select that the Shelly Plug S should be switched on.
  17. Click on “Save”, give the rule a name, then the first of the two automations is created.

The second automation rule turns off the heating when I draw more than 10 watts from the mains. Why 10 watts? Well, at the moment before the first automation rule takes effect, we have a surplus of 130 watts. If the electric heating is then switched on, the power consumption is immediately increased. Mathematically, I should use 0 watts here, but I give 10 watts “buffer” to avoid that the system is switched on and off too often because the power consumption fluctuates or the power of the PV modules fluctuate too much. The procedure is very similar to the one above:

  1. Open HomeAssistant in a browser
  2. Click in the menu on the left side the menu item “Settings”.
  3. Click on “Automations & Scenes”.
  4. Clicks on “+ Create Automation”.
  5. Clicks on “Start with an empty automation”.
  6. Add the type “State” as “Trigger”.
  7. Search for “power_current” in the “Entity*” field and select it from the drop-down list.
  8. Add the type “Numeric state condition” as “Condition”.
  9. Search for “power_current” in the “Entity*” field and select it from the drop-down list.
  10. Enter the value “10” in the “Below” field.
  11. Add a second “Condition”.
  12. Select your Shelly Plug S as “Entity*”.
  13. In field “Condition” please set that the Shelly Plug S should be “ON”. Background: Assuming the heating is already off, you don’t want to try to switch it off again.
  14. Add an action.
  15. Select your Shelly Plug S as “Entity*”.
  16. In the field “Action” please select that the Shelly Plug S should be switched off.
  17. Click on “Save”, give the rule a name, then the first of the two automations is created.

Outlook

I will now observe the installation well and calculate the profitability. If I have more, additional electricity “left over” I will install another infrared heater and switch this step by step.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

The maximum upload file size: 128 MB. You can upload: image, audio, video, document, archive, other. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop files here