Quick predbat question

6 comments started 2024-09-15 last 2024-09-16
Home AutomationHome Assistant
W
#1 Weasel

Hi have successfully installed and configured predbat on my shiny new homeassistant.green appliance. I managed to figure out the URL for Cosy Octopus tariff and use that (plus a fixed 4p/unit export rate) an predbat is now controlling my charge and discharge (hopefully).

Prior to installing predbat, I used 3x timed charge periods to correspond with the off-peak rates. During configuration, I noticed that the plan only took account of one of these when I was in monitor mode, so I thought I would take the plunge and let it rip with full control - nobody will die 🙂

Looking at my inverter, I see that the 1st charged time period is set to 00:00-00:00 (i.e. disabled), but my 2nd and 3rd periods still reflect their previous settings. Am I correct in assuming that because the 1st perfiod is disbled, the others are implicitly disabled? I am sure I will find out soon enough anyway

Also, since the plan only showed a single timed-charge period, is there anything I did wrong in the configuration when defining 3 charging periods? Here is an extract from my apps.yaml

charge_start_time:
- select.ge_inverter{geserial}ac_charge_1_start_time
- select.ge_inverter{geserial}ac_charge_2_start_time
- select.ge_inverter{geserial}ac_charge_3_start_time
charge_end_time:
- select.ge_inverter{geserial}ac_charge_1_end_time
- select.ge_inverter{geserial}ac_charge_2_end_time
- select.ge_inverter{geserial}ac_charge_3_end_time

R
#2 Rbor

First, welcome to the Predbat clan.

There are many good tips and hints for setting up predbat in this thread, especially from #29.

https://community.givenergy.cloud/d/4954-how-to-use-predbat-from-scratch/29

My usual advice is to follow the excellent predbat documentation:
https://springfall2008.github.io/batpred/

Follow the install section closely
https://springfall2008.github.io/batpred/install/

Predbat should find all your Octopus energy energy info automatically.
https://springfall2008.github.io/batpred/energy-rates/
So Cosy settings should just appear in Predbat plan.
You must first though follow this:
https://springfall2008.github.io/batpred/energy-rates/#configuring-predbat-to-use-the-octopus-energy-integration
You do need the Octopus Energy integration in your HA set up:
https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/

There’s a lot of initial setting up to do getting Predbat working.
But it is worth it. Once done, you can leave Predbat to just get on with things automatically.
As you learn more about how it works, you can then start tweaking settings.
It’s a great piece if kit.

And there are some really helpful for on the GE forums to help you on the way.
Also look at our monster thread approaching 2,000 comments!
https://community.givenergy.cloud/d/3696-first-night-live-on-predbat/1951

Rob

R
#3 Rbor

I have looked at my apps.yaml for Predbat, and this is all I have for my Energy rates from Octopus.
You need the octopus Energy plugin.

  # Energy rates
  # Please set one of these three, if multiple are set then Octopus is used first, second rates_import/rates_export and latest basic metric

  # Set import and export entity to point to the Octopus Energy plugin import and export sensors
  # automatically matches your meter number assuming you have only one (no need to edit the below)
  # Will be ignored if you don't have the sensor but will error if you do have one and it's incorrect
  # NOTE: To get detailed energy rates you need to go in and manually enable the following events in HA
  #       event.octopus_energy_electricity_xxxxxxxx_previous_day_rates
  #       event.octopus_energy_electricity_xxxxxxxx_current_day_rates
  #       event.octopus_energy_electricity_xxxxxxxx_next_day_rates
  # and if you have export enable:
  #       event.octopus_energy_electricity_xxxxxxxx_export_previous_day_rates
  #       event.octopus_energy_electricity_xxxxxxxx_export_current_day_rates
  #       event.octopus_energy_electricity_xxxxxxxx_export_next_day_rates
  # Predbat will automatically find the event. entities from the link below to the sensors
  metric_octopus_import: 're:(sensor.(octopus_energy_|)electricity_[0-9a-z]+_[0-9a-z]+_current_rate)'
  metric_octopus_export: 're:(sensor.(octopus_energy_|)electricity_[0-9a-z]+_[0-9a-z]+_export_current_rate)'

Following on from my 1st reply to you, do watch the videos:
https://springfall2008.github.io/batpred/video-guides/
When I started with Predbat, I watched some videos several times.

Rob

#4 PianSom

Weasel Also, since the plan only showed a single timed-charge period, is there anything I did wrong in the configuration when defining 3 charging periods?

Predbat configuration does not need (and I believe cannot take) more than one charge slot, as defined in apps.yaml.

Because it is a dynamic system, reacting for example to changes in load or solar generation, there would be no point is setting up future import sessions using other slots. So it just changes the parameters of slot 1 (if that is what you have set in the apps.yaml file) to reflect any import that it needs to happen.

I don't know - so check - if it will zero out the other slots. If it doesn't then you should manually shut those down when you are using Predbat.

G
#5 geoffreycoan

PianSom Predbat configuration does not need (and I believe cannot take) more than one charge slot, as defined in apps.yaml.

Because it is a dynamic system, reacting for example to changes in load or solar generation, there would be no point is setting up future import sessions using other slots. So it just changes the parameters of slot 1 (if that is what you have set in the apps.yaml file) to reflect any import that it needs to happen.

I don't know - so check - if it will zero out the other slots. If it doesn't then you should manually shut those down when you are using Predbat.

Correct, Predbat programs everything in charge or discharge slot one. Once the first charge is completed and when it’s getting near to the start of the second charge period it will program the times into slot 1. Then later on period 3 times will get written to slot 1.

Yes, do zero out slot 2 and 3 as these will confuse things.

Welcome to Predbat, you’ll find it great. Especially the dynamic charging calculations to charge enough based upon tomorrow’s solar and house load predictions.

Rbor I have looked at my apps.yaml for Predbat, and this is all I have for my Energy rates from Octopus.
You need the octopus Energy plugin.

You don’t actually need the Octopus Energy integration/plug in. You can use the integration which automatically then picks up your tariff details and when you change tariff in the future, but equally you can configure predbat (via apps.yaml) to use the Cosy tariff details.

vis:

# Please set one of these three, if multiple are set then Octopus is used first, second rates_import/rates_export and latest basic metric
W
#6 Weasel

Thanks folks for the replies and encouragement. I have zeroed out the other charging slots as suggested although I am not sure they were being acted upon.

I chose to directly download the Octopus tariff details from their REST API because I am not (yet) using a variable tariff. I still have an old, mechanical meter and my smart meter should be fitted tomorrow. I emphasised "should" because I have already had one appointment aborted because the person who turned up to swap the meter was obviously not familiar with batteries etc. He took one look at the meter cupboard, muttered something about 3-phase and ran away. He obviously couldn't read the wiring diagram left by the battery installer

Anyway, so far, so good with predbat.