Category: Battery

  • Chasing down electricity usage

    Chasing down electricity usage

    Working to minimise usage

    We will be using our battery to power our electric heating and so we want to minimise usage. After setting up the monitoring of energy flow in Home Assistant I noticed that we were drawing 300W-400W of energy overnight. This ends up using about 10%-15% of our battery storage.

    There are a number of things in the house which we leave on overnight and draw some power. The fridge obviously, but also the wireless routers, a few raspberry pi computers and some LED lights. Looking at the sources I knew about, it still seemed like less than 400W.

    Looking for the unknown usage

    I have been using a couple of Shelly 1PM devices to switch on and off and monitor our coffee machine, and other appliances. These are easily integrated into home assistant and very reliable. I used one of them to monitor some of our appliances and nothing looked like a huge user of power.

    I decided to try and measure everything we kept powered on at night. To do this I purchased a bunch of inexpensive Tapo smart plugs and integrated them into HA.

    What the usage looks like

    Although I don’t monitor everything I did try to assess all the usage. I checked every outlet in the house, and measured everything that was plugged into them at least once. I left the Tapos on the biggest users, and assessed that the unmeasured devices draw less than 20W. The chart below shows all the devices I measure. Dark grey is untracked consumption. During the day there are a handful of appliances I don’t measure. These include the stove, hair dryers, the kettle. I can clearly see spike in usage during the day when these are on.

    Daily usage measurements. Untracked usage is dark grey.

    Overnight usage on the other hand is pretty steady, and only the fridge fluctuates its current draw as it cycles its cooling on and off.

    Fridge power usage during a day. It draws between 10W and 100 W as it cycles on and off.

    Some of the servers remain on overnight, but their current draw is steady around 60 W for this group.

    Computer usage during a day. Some of the computers remain on and draw 60W overnight.

    After tracking the overnight current draw for a number of nights it was clear the current draw was consistent. It was also clear that the power being used in the house was not 300W-400W. Adding up all the measured usage and also estimating the contributions for devices I not measuring the current draw at night is closer to 150W-250W.

    Battery discharge does not equal power usage

    There isn’t any mysterious device hidden somewhere drawing 100W. The statistic of total energy usage in Home Assistant is essentially the battery discharge as we are not drawing from the grid. The current we draw overnight is less than the battery discharge. The most likely reason for this seems to be the inverter.

    Our battery needs to convert DC to AC in order to power the house. This is quite efficient when there is a large current draw, but for small current draws it seems to be much less efficient. This seems to be responsible for most of the untracked consumption which shows up overnight in the figure above. It has been useful understanding all the appliances which do draw power, and I will need to consider whether I want to power some of them off overnight.

    Closer look at overnight usage

    The images above on the left shows the power consumption in kW being used in the house overnight. The middle image shows all the measured energy use in the same period. The image on the right shows the measured energy being discharged from the battery to feed the household usage. The untracked (dark grey) in the middle plot is mostly coming from inverter losses.

  • Measuring energy flow with Home Assistant

    Measuring energy flow with Home Assistant

    Energy flow in the HA dashboard

    Understanding the energy flow in our household will be critical in trying to reduce dependence on the grid. We also want to maximise our use solar energy.

    Summary tab

    The HA Energy dashboard Summary tab provides useful overview on where and when we are producing and using energy.

    The Sources pane on the dashboard shows net usage from solar, the battery and the grid. On this day we used around 25kWh from the solar for the home and to charge the battery. We fed in the rest to the grid. Our net use of the battery was 3.77 kWh as we used more from the battery this day than usual.

    The Power sources pane shows the energy flow during the day. Here we see the battery use during the evening (cooking ) and then a small steady amount of overnight usage. During the day, the solar charges up the battery, and provides all our home’s electricity. The Solar which is left over is fed back to the grid.

    Energy tab

    The Energy tab in the dashboard offers a number of useful diagnostics for seeing where energy is being used and produced in more detail.

    The Electricity usage pane details where we use electricity (on an hourly basis). This shows the battery charging in pink, the grid feed-in in purple. The household use from battery is in green and household use from solar in orange.

    The Solar production pane gives an hour by hour look at the solar produced, and also shows the prediction for what we expected given by the solcast integration.

    There is also the possibility to track more detailed use of individual devices. The summary plot looks like this.

    I have put in a number of devices to track electricity usage in the household. I haven’t tracked everything, there are big untracked spikes from running the washer/dryer and the oven. There was something which was really bothering me though. We are using the battery to run everything overnight, and there was a steady draw on the battery of around 250 watts overnight. I tried to find if there was a culprit for this. I’ll describe what I did to measure this, and what I found out in another post.

  • Using home assistant for monitoring battery and solar

    Using home assistant for monitoring battery and solar

    We have been using home assistant for monitoring and controlling many items in our home for a few years. This is a fantastic open source home automation system, and is ideal for monitoring energy usage. It can also be used for controlling use and charging of a battery taking into account tariffs, solar input. We also plan to use it to monitor and control the HVAC system and the hot water heat pump.

    We considered a number of different solutions for battery storage, and decided to go with a Tesla Powerwall 3 solution. This is a mature and well tested system, even if we had some worries about the CEO. Our system has two Powerwalls giving 27.5 kWh of storage along with a gateway. This setup gives us whole home backup, and the inverter is built into the Powerwall.

    Home assistant has a pretty good setup for monitoring energy usage documented at HA energy dashboard. The dashboard needs to be able to read out the information from the inverter, battery, grid usage, and solar production. Many battery and inverter systems are able to be integrated with home assistant in a straightforward manor. The Tesla Powerwall app which allows the user to control and readout the battery is a little more locked down.

    Getting access to the Powerwall data

    There are however several ways to get this data into home assistant.

    1. Locally read the data by connecting to the wifi which is on the Powerwall.
    2. Access Tesla’s developer API.
    3. Use a paid third party solution to access the Tesla API and get up and running quickly.

    I explored, and managed to get all three of these options working, but in the end I am using the third option with my HA setup. It works flawlessly, is quite affordable, and prepares all the sensors needed to setup the energy dashboard in home assistant. The downsides of this approach are that it depends on access to the Tesla cloud, and costs a small amount of money.

    If you are interested in either of the first two options, I recommend having a look at the excellent pypowerwall python library https://github.com/jasonacox/pypowerwall. This has code to access the data provided by the battery. There is also a wealth of information about how to connect to either the local wifi or the cloud.

    If you want to connect to the local wifi, be sure to take a photo of the inside of the Powerwall when it is being installed. There is a sticker in there which has the SSID : (something like TeslaPW_XXXXXX) and Password on it which you will need to connect to the wifi. You can connect a computer to this wifi, and then can use the TEDAPI in pypowerwall to access the local data from your battery. This gives access to information like the power on each string of PV panels.

    The quick solution – using Teslemetry

    There are a lot of complications in getting this data into home assistant, but if you have enough IT skills it is doable. If you want to connect to the Tesla API without paying, you need to register on the Tesla portal (https://developer.tesla.com). This allows you to make calls and get information about your battery without paying. Again, if you have sufficient IT skills, you can do this. I set up an account, and managed to make the API calls, but opted for the easier solution in the end.

    Using the Telslemetry solution https://teslemetry.com makes it incredibly easy to integrate the data from the battery into home assistant, and costs only a few dollars a month. In the end it was worth it to subscribe, and be up and running reliably and immediately rather than spending a lot of time rolling my own solution.

    After subscribing to Teslemetry, and adding the integration into home assistant, I was able to setup the home assistant energy monitoring with the sensors defined by Teslemetry.

    Setting up the Home Assistant energy dashboard

    When you setup your Powerwall with the Tesla app, you give the system a name. You will need to edit the energy dashboard in HA, and enter 6 sensors. The sensors which are available and wher to enter them in the dashboard are (for a:

    1. My system Grid Imported (add to Electricity Grid/Grid Consumption)
    2. My system Grid Exported (add to Electricity Grid/Return to Grid)
    3. My system Grid Power (add to Electricity Grid/Grid Power)
    4. My system Battery Charged (Home battery storage/Battery systems)
    5. My system Battery discharged (Home battery storage/Battery systems)
    6. My system Solar generated (Solar panels/ Solar production)

    After doing this, there is lots of information provided by the energy dashboard in home assistant.

  • Solar panel installation day

    Solar panel installation day

    Our home has a terracotta tile roof. This is one of the more challenging surfaces for solar panel installation. We were quite careful about choosing our installer, and went with a local company on the recommendation of someone who had used them in the past. We discussed with them the challenges of installation, and they asked us to source some replacement tiles in case of any breakage. Although they work carefully to avoid breaking any roof tiles, terracotta can be brittle, and so we sourced around 25 spare tiles.

    Spare tiles

    The tiles on our roof were made by a company in Ballarat which went out of business some time ago, so we had to source spares from a salvage company. Luckily these were fairly common in Melbourne homes in the past, and there was no difficulty in finding spares.

    PV installation on North facing roof

    Panel installation

    Our solar panel installation took place over two days. The installers mounted the panels on the first day. They also finished much of the electrical work on the panels, switchboard. They finished installing the battery on the second day. The above picture shows our North facing roof with 8 of the 9 tiles in place. Our system has 8 tiles facing East, 9 on the North facing roof, and 13 on the West facing roof.

    Battery installation

    Battery installation

    We situated the battery outside on or West facing wall. It is in a shaded area, and not far from the switchboard which is inside the house. In the end we opted for a Tesla Powerwall 3, giving a bit over 27 kWh of storage.

    At the end of the second day, the system was operational, and the installer showed us how to use the application for the battery to operate the system.

    The installers were careful and only 3 tiles were broken and replaced. The next time it rained we discovered that a fourth tile had cracked, but the crack was not visible as it was in the area where the tiles overlap. It rained heavily, and we heard water dripping in the roof, so we called the installers who came out the next day, and discovered the culprit.

    The broken tile