First night live on PredBat …

3193 comments started 2023-12-21 last 2025-02-07
Home Automation
#1 Lofthouse

I installed PredBat a couple of weeks ago and have been running it in Read-Only mode (just show the plan, don’t control the inverter). I quickly found out that it is a lot cleverer than I am !
In particular, I realised that my mindset regarding charging and discharging was still based on my Flux Summer tariff (charge in the early hours, export over the evening peak), even though I am now on Agile Import and 15p Fixed Export. This became apparent when the PredBat plan said it would export at midnight. Initially, I thought it had gone mad, but actually that is entirely reasonable as PredBat knows it can charge the battery later on using some of the negative cost Agile timeslots available tonight.

With some trepidation, I switched Read-Only off, disabled my normal morning charge HA automations, and let PredBat run …

@geoffreycoan , I have you to thank (or blame!) for this - if I thought HA was a rabbit-hole, PredBat takes it to the max !

A
#2 Arg0t

Welcome to the club. Takes some time to adjust your head to the logic and realise it's looking to make the most optimal choice in every slot. Definitely a massive level above an overnight/cheap rate charge, then live off the batteries approach. It's not always perfect, but Trefor is highly active on the github issues.

My plan for today intentionally drains the battery, as the stored energy is worth more as export, 13.97p after conversion losses, than it is to run off grid 7.44p. Will charge up later on very cheap rates but as there are more cheap slots than needed to fully charge my batteries it will also perform some discharge between the charges.

Pushes the system much harder, but overall it's maximising the invest in the hardware and fully leveraging the tariffs we have.

#3 Lofthouse

That is what I like about it - it really is opportunistic about sliding in a quick bit of export, in a way that would be frankly impossible for a human operator to do. A very impressive body of work by Trefor. I have left Expert mode off for now whilst I study the comprehensive documentation some more.

B
#4 Boffinboy

Very curious about trying PredBat - need to first figure out how to get HA running on my synology. One question I had was whether it can handle doing multiple charges of the battery per day? My battery doesn’t last me through the day, and I am therefore currently using Cosy. I’d love to use PredBat to switch to Agile - but I wasn’t sure if it could operate by making multiple charging “runs”?

#5 PianSom

I am dipping a Xmas toe into PredBat at last too. All set up and ready to go. (And, yes, @geoffreycoan has a lot to answer for!)

But tomorrow they have just announced a 4 hour Power-up (first one that is so long). How do PredBat users deal with Power-ups?

#6 Lofthouse

Boffinboy

It absolutely can, and does, use multiple charging slots - in fact, it is quite dizzying at times how it switches from charge to discharge to hold-charge and back again, all to milk the most out of the changing import rates on Agile.

Easy to recommend Agile at the moment, with pretty frequent negative import rates, but of course that won’t always be the case.

If you are on Cosy at the moment, is that because you have a high daily load, from a heat pump for example ?

#7 Lofthouse

PianSom I am by no means the expert, but I believe you can override the import (and export) rates between certain times - will need to look into it !

#8 Lofthouse

PianSom Here it is in the PredBat documentation:

Manually Over-riding energy rates

You can also override the energy rates (regardless of if they are set manually or via Octopus) using the override feature. The override is used to set times where rates are different, e.g. an Octopus Power Up session (zero rate for an hour or two)

rates_import_override:

  • start : "HH:MM:SS"
    end : "HH:MM:SS"
    rate : pence
    date : "YYYY-MM-DD"
    rates_export_override:
  • start : "HH:MM:SS"
    end : "HH:MM:SS"
    rate : pence
    date : "YYYY-MM-DD"
    date is in the date format of "YYYY-MM-DD" e.g. "2023-09-09"
#9 PianSom

Lofthouse

Nice, thanks.

Though with a 4 hour Power-up I was wondering whether there was something more clever I could be doing. That's enough time to do some exporting to make some money, and still have time left over to leave myself with a full battery for free.

#10 Lofthouse

Hopefully, the Power-Ups will be extended to DNOs other than UK Power Networks - and it would be really helpful to have the Power-Up information exposed in the Octopus API so BottleCapDave could add a binary sensor to his Octopus HA integration, and Trefor could then automate the process in PredBat, as he does for Octoplus Saving Sessions, auto-joining and applying the Timed Export between the relevant start and end times.

#11 Lofthouse

PianSom Though with a 4 hour Power-up I was wondering whether there was something more clever I could be doing

That’s exactly the sort of thing that PredBat helps with - good to hear you are already setup and ready to go - the only gotcha for me was that I was expecting to see PredBat installed as an Integration, but in fact it “lives” in the AppDaemon Add-On.

The more people bite the bullet and install PredBat, the more we will be able to help each other.

I wish you the best of luck 🤞

J
#12 Jellybaby

Lofthouse I tried and failed miserably to get it working and gave up

B
#13 Boffinboy

Lofthouse that’s exactly it, I am a high user - charging the battery up in both Cosy periods as much as it can (3h not quite enough to get to full, if it’s emptied overnight).

Unfortunately I just started trying to get the required HA and add ons setup and I can’t even get GivTCP to see my inverter. Not sure why! Doesn’t find an inverter on the network and keeps timing out according the logs, I am certain the IP address is right. Any ideas?! This is one of the reasons I’m slightly wary about going with PredBat (if I can even get things working!) - troubleshooting ends up very complicated!

B
#15 Boffinboy

Thank you. I do have the broker installed. Follow the speak to the geek written guide as well and don’t think I missed anything - may have some time again today to look.

#16 PianSom

Lofthouse I wish you the best of luck 🤞

So, following your lead, I went live last night for the first time. And woke up to find that the AIO had gone into a charge/discharge loop for 4 hours in the early hours. I’m on IOG, so it clearly decided at the last minute that a 15p export combined with a 7.5p import was a Good Thing!

As you say, surprising what it decides to do. Not necessarily wrong or irrational, just surprising.

S
#17 Slartibartfast

Boffinboy
I'm at the 'MQTT doesn't authorise requests from GivTCP' stage - if I can figure out how to get Moquitto to allow all requests I'll let you know what to chnge in MQTT config file when I get it running. It's Mosquitto Broker version 6.1.3.

A
#18 Arg0t

Slartibartfast You need to run mosquitto without auth, there is a switch to add to the docker deployment.

This is the mosquitto section of my docker compose.

'''
mosquitto:

container_name: "mosquitto"

command:
  - "/usr/sbin/mosquitto"
  - "-c"
  - "/mosquitto-no-auth.conf"

entrypoint:
  - "/docker-entrypoint.sh"

hostname: "mosquitto"

image: "eclipse-mosquitto:2.0"

network_mode: "bridge"

ports:
  - "1883:1883/tcp"

restart: "unless-stopped"

volumes:
  - "/volume1/docker/mosquitto:/mosquitto"
  - mosquitto-log:/mosquitto/log
  - mosquitto-data:/mosquitto/data

'''

B
#19 Boffinboy

Slartibartfast turns out my issue was a networking one. My APs had updated and the new firmware seems to introduce an issue

A
#20 Arg0t

PianSom It's for a sure a change in mindset, historically I tried to run as long as I could on batteries. 5 hour charge a day, no automated export, try and make it to the next charge window. Predbat throws that out the window and simply says, let's make this as cheap as possible including discharging when the rates are stupidly low.

It works, however you need to trust it and avoid temptations to override.

I've been running it for 6 weeks, never would have expected to be exporting in December.

400+ kWh for £30 before the saving session income of £57. Could I have achieved the same without predbat, maybe but highly unlikely unless I wanted to manually control everything. It's definitely more efficient than my old scripts charging to 90% in cheapest slots.

#21 PianSom

Arg0t
It's certainly disconcerting!

ATM I have about 2kW of PV and an Octopus Power-up started 10 minutes ago. It has moved me from importing 6kW 5 minutes ago to exporting 5kW (my DNO limit) now. A wild ride, and certainly not one I would have done manually.

#22 Lofthouse

I expect to do about 25kWh of EXPORT today, thanks in part to the 4 hour Power-Up which PredBat is using to recharge the battery after dumping it this morning - I would never be that brave !

N
#23 neomancer

Has anyone got any pearls of wisdom on flux configuration, or is predbat optimised more for agile?

It planned to not charge 2-5am, ideally I'd like it predicting if it it needed a 3pm charge to cover me till 7pm on a rubbish solar day for example..

S
#24 SJB

neomancer I'm on Flux as well, just got Predbat installed but not really planning to use it yet.
Is Predbat mode set to Monitor? If so change it to Control charge it will show the planned charging times.

N
#25 neomancer

Yeah I had it set to control... It was aiming for a 42% charge during the flux low slot. Which I wasn't super happy about :/

#26 Lofthouse

SJB If so change it to Control charge it will show the planned charging times.

If you do that, make sure you have Read Only mode set to True, otherwise PredBat will start sending commands to your inverter.

Settings->Devices & Services->Entities->switch.predbat_set_read_only

N
#27 neomancer


It's things like this that it's doing that make me a bit :/

I'll have another look through the config to make sure I've not enabled something silly.

N
#28 naltsta

I’m on go and a recent convert to predbat too. Making me think I should really look at agile again in the new year! Part of the reason I switched to go for the winter was to keep it simple but if Predbat can squeeze a few extra pounds it’s probably worth doing.

I had some dubious automation I’d set up myself to maximise my flux income in the summer but really impressed with what Trefor has done.

N
#30 naltsta

neomancer for financial reasons it wants to make sure you hit 4pm with enough battery to discharge at full power for 3 hours or to empty your battery. Best way to do that is charge up overnight and then use the grid during the day… that’s what it’s showing right?

S
#31 SJB

Lofthouse Thanks, - I'll have to remember that.

A
#32 Arg0t

neomancer probably have combine charge slots enabled.

N
#33 neomancer

naltsta

Yeah, the way it usually works at the moment is I scrape through at 7pm and go onto grid sometime after 7 usually, but I guess using the grid incurs less loss in conversions, plus predbat is trying to put me into the 4PM with a full battery when I'm fine with anything above 60% usually.

Just very different to summertime usage. I guess.

B
#34 Boffinboy

Finding this really difficult to get finally set up! What I’m currently struggling with is getting the chart and html plans to be visualised in the dashboard. I’ve added the required visualisation add ons in HACS but when I try to paste and use the template code in a custom card, it’s not recognised. Any obvious things I need to do after adding them?

#35 PianSom

Boffinboy
No, just follow the instructions and they should work. That’s what I did yesterday, anyway. Make sure you have all the addons up and running before adding the cards.

Understanding the charts - that’s where the challenge is!

#37 Lofthouse

PianSom Understanding the charts - that’s where the challenge is!

Agreed - I am still trying to work out what the Calibration chart is telling me …

B
#38 Boffinboy

Thanks all. I had to restart Ha a couple of times and reinstall the chart add ons in HACs as they weren’t loading. I am still struggling to find the dashboard yaml. Instructions say “ in your AppDaemon configuration area under the filename predbat_dashboard.yaml” but I can’t see it anywhere! Also not getting the historic usage data pulling through yet, even though I’ve set it to use givenergy cloud for now

#39 PianSom

Boffinboy
I never found the example card (but I am a special case in that I have appdaemon in its own docker container anyway). But it’s not needed. Just do what Lofthouse suggested.

B
#41 Boffinboy

Seem to have it working now! First test tonight… I have turned on the inverter notifications just to see what’s going on. Something odd seems to be happening - every 5 minutes I get three or four notifications in sequence, one about setting reserve to 4%, then target SOC to 100%, then to 5%, then target reserve to 6, then hold charging to 5%… Let’s see if it actually works overnight (not yet on agile, on cosy).

The other issue I am having now is the log file doesn’t seem to show up under the appdaemon log within HA menu. I have to open the actual file which is very unwieldy. A problem for another day!

#42 Lofthouse

Boffinboy If you set switch.predbat_set_status_notify to Off (it’s On by default), that will stop the notifications.

[Edit: Sorry, misread your mail - you have turned the inverter notifications on deliberately ☺️ - PredBat seems to tee a lot of things up in advance, and is always fiddling with charge windows and reserve percentages !]

If you are trying to view the AppDaemon log file on a mobile device, make sure your Internal URL is set correctly at Settings->Companion App then first option, where it says your name. Mine wasn’t, and it took me an age to work out why I could see the log on my desktop Mac, but not on my IPad !

I’ll be crossing fingers for you tonight 🤞

#43 Lofthouse

And I might have got the wrong end of the stick again …

There are 2 logs - the first is the AppDaemon log at Settings->Add Ons->AppDaemon->Log. It is worth looking in here if you have to restart HA - sometimes AppDaemon doesn’t start properly, and then PredBat won’t work. Just hitting Restart on the AppDaemon AddOn fixes things.

The second, and more interesting, is the PredBat log itself, accessed from the Open Web UI button on the AppDaemon AddOn. This should show something like below in your default browser. Select Logs and you can just leave that running, hitting refresh when you come back to it to wake it up.

B
#44 Boffinboy

Lofthouse thank you. This was it. I had assumed it would show in the Appdaemon log area in HA itself, but it didn’t. When I open the log it starts with the oldest messages first - so you know if there is a way for it to show the newest first? Thanks for all of your guidance!

I am tempted to switch from Cosy to Agile given the crazy low rates with the wind at the moment, but slightly fearful that PredBat won’t work or will break at some point and then I’ll have to just use a “best guess” approach with Agile… It seems to be working well, but I am always worried about breaking updates. Maybe I just never update it!

B
#45 Boffinboy

P.s. Happy Christmas! What can beat playing around with battery optimisation in Christmas Day 🤣

B
#46 Boffinboy

This is the weird behaviour I am seeing when battery hits near empty - the battery is actually at 7% - it’s almost like it’s yo-yoing?

B
#47 Boffinboy

Also seeing some very strange solar forecast data more than a day out…. Anyone else experiencing this? Seems to reach a point and then extend the same number out forwards - needless to say this causes some odd behaviour!

#48 Lofthouse

Boffinboy Yes, I see that too - I disregard any part of the plan more than 4 hours out, but have learned to trust PredBat to do the right thing at the right time !

Glad you are up and running 👍

#49 Lofthouse

Boffinboy When I open the log it starts with the oldest messages first - so you know if there is a way for it to show the newest first?

Odd, my newest messages are at the top, and scroll through at a pretty frantic pace.

#50 Lofthouse

This is why I am trusting PredBat - 18p for 174kWh, £7.50 of export over two very dull days, and all my gas (admittedly mild days) and standing charges covered, plus 8 hours of PowerUp to be refunded later - normal pre-PredBat energy figures (even with negative Agile rates) were £5 to £8 a day.

Summary below from the excellent Octo-Aid app:

B
#51 Boffinboy

Lofthouse Wow! Hope this Agile pattern of unseasonably warm windy weather holds…. My Agile switch will be backdated to midnight yesterday, but my charging pattern will be off.

Just re-checked my logs and they are indeed going newest first. Strange, I must have read wrong

Really glad I am not the only one who sees the odd solar pattern. It seemed fine at first, but then changed to the 0.53 value

A
#52 Arg0t

Boffinboy

Trefor had released an update fixing the solar PV forecast.

G
#53 geoffreycoan

Hello @Lofthouse @PianSom and all, sorry not been on this forum for a while so hadn't seen this thread, but great to see that others are dipping their toes and feet into the predbat pool, although not sure I like me being blamed for encouraging you !

Predbat is great, as @Arg0t says, you have to learn to trust what it does. By all means adjust the thresholds so it gives a usage pattern you are comfortable with, but it does do things that you sometimes don't think of. If I really set my mind to it I keep thinking I could probably optimise a tiny bit more, but we're talking pence so its just not worth it. And I may of course not be right anyway!

Trefor is very helpful and is always adding new features, the HTML plan, the charge/discharge mode, read-only, and just this week the new auto-update features.
I've also contributed a few bug fixes and minor enhancements along the way, the blue for negative pricing on the html plan is my doing!

Yes the apex charts are a pain to setup. I do plan to suggest an improvement to that. Manually cut and paste each chart into a blank chart is the way to go, don't try and paste the whole yaml into a dashboard - the indentation is all wrong.

December 23rd, total bill 17p, the 24th, -87p, Christmas day at 23:30, -9p.
Incredible!
And this is running the ASHP and I put the hot tub on and heated it up as well.
The powerup events and negative pricing have been great, who'd have believed making a profit in December! Makes the 60p/kW I was paying in peak slots in early December in the cold period a distant memory. Gotta take the rough with the smooth of course.

For someone that asked, yes predbat works excellent on Flux or Cosy. I started using it in early September on Flux and continued using it like that all the way through to October when I moved to agile. The plan is of course a lot simpler with Flux, but what it does do well is force export excess capacity in the peak period.

B
#54 Boffinboy

Arg0t Thanks. Will test!

#55 PianSom

First Pedbat fail today.

It’s a Power-up day (12-3) and last night it decided to charge up to about 50%. This morning a laundry load went on, which meant that the battery was drained by 11am, so went back to grid.

Not sure how I could have avoided that. Still, at least it’s now getting filled up for free.

G
#56 geoffreycoan

PianSom Predbat uses historical load figures to predict what your battery level will be, and with the forthcoming power up event it would have decided to not charge the battery too much as you’d “have enough” to see you through to the cheap period.

Suggestions:

  • make sure you are using enough days of history in apps.yaml to average out ups and downs such as extra washing, Christmas cooking or saving sessions. I have mine set to take an average of the last 2, 3, 4, 5, 6, 7 and 8 days. Used to have 1 as well but was suggested to remove this
  • turn ‘Apply modal filter historical load’ on. This discards the lowest day of history from the average
  • turn ‘calculate in day adjustment’ on and increase ‘load scaling’ to increase the weighting applied to todays’s load (mine is 1.15). This will adjust the predicted load based on what you have used already today
  • increase ‘load scaling pv 10%’ to be more pessimistic about solar (mine is 1.1)
  • increase best soc min (hard limit) and best soc keep (soft limit) to keep more in reserve in the battery for unexpected events. Beware of too high a minimum will result in charging in expensive slots to maintain that soc level
  • train the family to do the washing when it’s cheap periods!

Cheers Geoffrey

I
#57 Ivan

First of all I'd like to comment what an excellent bit of work predbat is and to thank Trefor and all others who have contributed to it's development.

I had my first night of predbat controlling my battery last night. Currently just on an Eco 7 tariff so my charging needs are straightforward but I want to become familiar with predbat for when I switch to Agile in a month or so.

What I noticed last night is that my AIO charged at its max rate (5730W). As I have a 7 hour overnight window to charge I've been charging at a lower rate to both maintain a decent battery temperature throughout the night and also as there is speculation that charging at max rate increases the risk of loss of calibration/SOC accuracy issues. I had set the inverter limit in the apps.yaml to 3500W but this had no impact on the actual charge rate.

Is there a setting or scaling factor I can set to limit the charge rate to something other than the maximum?

Thanks in advance for any advice.

#58 PianSom

geoffreycoan
Many thanks for the suggestions, Geoffrey.

For your first point, it is not entirely clear to me why to exclude day 1 - please can you elaborate? Do you do this by setting days_previous to 8 and days_previous_weight to 0?

Your other points seem to be set as defaults already, which is good.

I have made suggestions about the timing of the laundry, and it has been made very clear to me that the only suggestion that would be welcomed in the future is one which involves me doing it. 🙂

G
#59 geoffreycoan

Ivan What I noticed last night is that my AIO charged at its max rate (5730W). As I have a 7 hour overnight window to charge I've been charging at a lower rate to both maintain a decent battery temperature throughout the night and also as there is speculation that charging at max rate increases the risk of loss of calibration/SOC accuracy issues. I had set the inverter limit in the apps.yaml to 3500W but this had no impact on the actual charge rate.

Which setting did you change in apps.yaml, was it inverter_limit? According to the docs https://springfall2008.github.io/batpred/config-yml-settings/ you can set inverter_limit_charge to restrict the charge rate used.

PianSom I used to have days_previous set to 1 through to 7 to take an average of the previous week's activity, but in response to discussion over an issue I had, Trefor said that setting days_previous to 1 included today in the '1 day ago' calculation and that was skewing my load figures. TBH I didn't 100% understand this but changed my apps.yaml to:

 days_previous:
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8

  days_previous_weight:
    - 1

Yeah, the laundry, some things are best not interfered with. I've managed to get there by suggesting when the cheapest periods are and being proactive in setting the delay on the washing machine and dishwasher accordingly. This is the limit of my involvement !

I used Octoblock to calculate when the cheapest slots are and then some awfully complex Jinja coding to work out the start delays for the devices:

I
#60 Ivan

geoffreycoan Thanks Geoffrey - yes that was the setting I used. From the comments I suspect that must just limit the charge from PV?? Set it to 3600 but charged at the max rate.

G
#61 geoffreycoan

Ivan Hi Ivan
If you set inverter_charge_limit it should do what you want, restrict the rate of charging, not charge at the inverter max (which is the default).
Inverter_Limit is used to model max inverter throughput, eg for solar pv charging. Ie so predbat knows what the maximum your inverter can charge at even if solcast says your panels are generating more.
The inverter_charge_limit isn’t in the default apps.yaml so you’ll have to add it in
Cheers Geoffrey

#62 PianSom

geoffreycoan
I wonder if Day 1 is today (since the implication of the holidays configuration suggests that it might be)? But then I don't see what may be wrong with including that ... Ah well, I am sure he and you are the sensible voices to follow, so I will do so blindly!

And I think I will leave calculated delays on starting the domestic machines well alone. The upside is limited, and the downside is horrible.

N
#63 naltsta

Ivan Do you have "Set Charge Low Power Mode" turned on?

I
#64 Ivan

geoffreycoan Thanks Geoffrey - I'll have a play with that tonight.

I
#65 Ivan

naltsta I did not - will also have a play with that tonight. Thank you.

I
#66 Ivan

Hi Geoffrey - for info I added this to the apps.yaml
inverter_charge_limit:

  • 3000
    but it had no effect - still wanted to charge at the maximum.

I just allowed this to happen for a minute or so before switching on "Set Charge Low Power Mode" - this did reduce the charge rate to c. 1300W, which reduced further when the charge reached 90% SOC as I have the battery charge power curve enabled in the yaml.

I
#67 Ivan

naltsta See my comment above - the "Set Charge Low Power Mode" achieved my objective. Thanks.

G
#68 geoffreycoan

Ivan Hi Ivan

Could you please raise an issue on the predbat GitHub https://github.com/springfall2008/batpred/issues so Trefor can investigate please?

From the documentation it looks like the inverter_charge_limit will do what you wanted it to, but sounds like it didn’t. The set charge low power mode I looks to be new and isn’t described in the documentation; must have been introduced to sort a similar bug but isn’t documented.
The docs should really guide which settings are to be used so worth getting it raised even if you’ve now got a solution.

Cheers Geoffrey

I
#69 Ivan

geoffreycoan Thanks Geoffrey - I've raised an issue.

For info low power mode is actually described under Inverter Controls

"switch.predbat_set_charge_low_power Enables low power charging mode where the max charge rate will be limited to the lowest possible to meet the charge target. Only really effective for charge windows >30 minutes. Off by default."

I've also commented on the above issue that I'm unsure of the maths as a full charge was achieved in just 4 hours of the available 7 hour window.

Cheers

G
#70 geoffreycoan

Ivan Thanks I see your issue, and Trefor's reply that the apps.yaml entry is inverter_limit_charge

Looks like I mis-typed it ...

I
#71 Ivan

geoffreycoan Thanks - well it is easily fixed - I've give it a try tonight.

Thanks to you and Trefor for your help - I'm sure this won't be the last time I'll be asking for it!

Regards, Ivan

W
#72 Wavy Davy

Tried Predate a while ago and wasn't sure so uninstalled it. Am on agile import and fixed export 15p/kWh so I am thinking of giving it another go. What's the best guide to installing it?

I
#73 Ivan

Wavy Davy https://springfall2008.github.io/batpred/

Probably worth watching all the videos through to 'Charts' and have a read of the instructions before starting the install. The only problem I had was that the default apps.yaml has to be configured for your own situation before predbat will run successfully.

W
#74 Wavy Davy

Have started watching and installing, but not sure if appdaemon is installed correctly. I don't have a addon_configs file and cant find appdaemon anywhere. But hacs shows appdaemon as a option, so maybe it is installed ok.

W
#75 Wavy Davy

Forget that it is in file editor now, so maybe needed HA restart.

W
#76 Wavy Davy

It's downloaded but doesn't seem to be running. Have checked appdaemon logs and last entry says ready to run apps nut no sign of predbat. Have deleted the entries in the config.yaml but still not working.
Also still cant find the appdaemon.yaml file anywhere. Have appdaemon folder which has apps folder which has batpred folder and config.yaml and batpred.py files.

A
#77 Arg0t

There is a line in config.yaml that needs to be removed once you have completed entering any required data in the config file.

W
#78 Wavy Davy

Arg0t Thanks but have done that. What I think is the problem is that I cant find the appdaemon.yaml file.
It seems it has to be moved to get predbat to work, but I've disabled enforce basepath but still cant see it in the file editor.

W
#79 Wavy Davy

ha I found it. now just need to find out what to do with it!!

A
#80 Arg0t

This is added to mine

  time_zone: Europe/London
  thread_duration_warning_threshold: 90
  plugins:
    HASS:
      type: hass
      ha_url: http://127.0.0.1:8123
      token: <<create your own token in HA>>
      cert_verify: True
W
#81 Wavy Davy

Think my brains frazzled. cant understand what "Add to the appdaemon: section apps_dir which should point to /homeassistant/appdaemon/apps"
Have added a directory apps_dir but what does point to mean?

A
#82 Arg0t

Do you have this in the appdaemon.yaml?

  app_dir: /homeassistant/appdaemon/apps
W
#83 Wavy Davy

ok so I added my ha url to the yaml file. but still cant see predbat running or added to the appdaemon.
yes this is my appdaemon.yaml
appdaemon:
latitude: 52.379189
longitude: 4.899431
elevation: 2
time_zone: Europe/Amsterdam
plugins:
HASS:
type: hass
http:
url: http://192.168.1.26:8123/
admin:
api:
hadashboard:

W
#84 Wavy Davy

Just corrected Lat and Longitude settings as they were wrong.

A
#85 Arg0t

I do not see the entry
app_dir: /homeassistant/appdaemon/apps

Do you see the Automation tab in HACS?
Did you add the custom repository in HACS?

W
#86 Wavy Davy

Arg0t Yes I can see the automation tab and I do have predbat at the bottom of the screen. If I click it I get predbat page and no download button, so it did download.
Do i add the entry to the yaml file?

W
#88 Wavy Davy

No will watch it now. Thanks

W
#89 Wavy Davy

does this config look right?

the only files in the app folder were
apps.yaml
hello.py
both of which just had hello world in them.

I
#90 Ivan

Wavy Davy I just have the apps.yaml in the folder - think I deleted the hello.py. The apps.yaml is your configuration file for predat - you need to personalise the example apps.yaml file that is included with the download.

W
#91 Wavy Davy

Ivan If you mean in the config folder then that's in there and personalised, also removed the 'template: True' line from the file.

W
#92 Wavy Davy

in the appdaemon.yaml file does the app dir entry point to the app dir
(/homeassistant/appdaemon/apps/)
or where the apps.yaml file is (/homeassistant/appdaemon/apps/batpred/config)

I
#93 Ivan

Wavy Davy
yep -

Also change Amsterdam to London for correct time zone. (Edit - don't know why the font size/bold has changed!).

appdaemon:
latitude: 54.514821
longitude: -1.441296
elevation: 2
time_zone: Europe/London
thread_duration_warning_threshold: 120
plugins:
HASS:
type: hass
app_dir: /homeassistant/appdaemon/apps
http:
url: http://homeassistant.local:5050
admin:
api:
hadashboard:
logs:
main_log:
filename: /homeassistant/appdaemon/appdaemon.log
log_generations: 9
log_size: 10000000

W
#94 Wavy Davy

I see from your config you have url: http://homeassistant.local:5050
I have the location url: http://192.168.1.26:8123/ which is my HA url

appdaemon:
latitude: 51.399151
longitude: -0.734351
elevation: 2
time_zone: Europe/Amsterdam
plugins:
HASS:
type: hass
app_dir: /homeassistant/appdaemon/apps
http:
url: http://192.168.1.26:8123/
admin:
api:
hadashboard:
logs:
main_log:
filename: /homeassistant/appdaemon/appdaemon.log
log_generations: 9
log_size: 10000000

Will change location.

G
#95 geoffreycoan

Wavy Davy I'm part way through updating and enhancing the predbat documentation, the work in progress version is here: https://github.com/gcoan/batpred/blob/main/docs/install.md

Your predbat looks like it is installed in the right directory and the appdaemon.yaml configured to point to it. The lat and long don't matter what they are.

What do you get in appdaemon.log?

W
#96 Wavy Davy

Hi Geoffrey, been having another play with it.
Here's a screen shot of logs

W
#97 Wavy Davy

have found extended logs in appdaemon gui but its quite long, but looks like its trying to start predbat but not finding any entities.
I could post here if it helps.

W
#98 Wavy Davy

Have just checked again and there are now some predbat entities appearing so maybe it was just a bit slow in creating them.

G
#99 geoffreycoan

Wavy Davy Predbat writes voluminous logging information, and to make it easier to read it directs most of the appdaemon logging into a new logfile /homeassistant/appdaemon/appdaemon.log - you have to access this with a file editor (either the file editor add-on or visual studio)

Personally I use visual studio, but either will work

This bit isn't really covered in the docs so is something I will be expanding on as part of the doc refresh I'm doing

Have a look at that file and see what it says

Getting there !

W
#100 Wavy Davy

geoffreycoan Thanks for the encouragement. Had a look at the logs and no obvious errors. Just going through the vids and creating a dashboard. Trying to find the charts in the git hub but not found them yet, but the entities are loaded and logging so good so far.

W
#102 Wavy Davy

Thanks for info, done all that, just got to digest it all now. will leave it in monitor for a week to get some data before trying out properly.

G
#103 geoffreycoan

@Wavy Davy if you've got any questions, do ask as there's a few people using it.

Usually takes a bit of tuning to get the thresholds for charge, discharge and retained soc to be what you want them to be for your personal preferences.

I find the Predbat plan is the most useful to understand what Predbat is planning to do. That's the one I look at all the time. When I was on Flux I found the 'Home battery prediction' was the most useful of the Apex charts, but even with that there's a lot of info presented so I cut down what was shown and changed it to just the next 10 forward hours:

type: custom:apexcharts-card
header:
  show: true
  title: Home Battery Prediction (10 hours)
  show_states: true
  colorize_states: true
graph_span: 12h
span:
  start: minute
  offset: '-2h'
now:
  show: true
yaxis:
  - min: 0
series:
  - entity: predbat.soc_kw_h0
    stroke_width: 1
    curve: smooth
    name: actual
    extend_to: now
    show:
      in_header: raw
  - entity: predbat.soc_kw_best
    stroke_width: 3
    curve: smooth
    name: best
    data_generator: >
      let res = []; for (const [key, value] of
      Object.entries(entity.attributes.results)) { res.push([new
      Date(key).getTime(), value]); } return res.sort((a, b) => { return a[0] -
      b[0]  })
    show:
      in_header: raw
  - entity: predbat.soc_kw_best10
    stroke_width: 1
    curve: smooth
    name: best10
    data_generator: >
      let res = []; for (const [key, value] of
      Object.entries(entity.attributes.results)) { res.push([new
      Date(key).getTime(), value]); } return res.sort((a, b) => { return a[0] -
      b[0]  })
    show:
      in_header: raw
  - entity: predbat.best_charge_limit_kw
    stroke_width: 3
    curve: stepline
    name: charge_limit_best
    type: area
    opacity: 0.2
    data_generator: >
      let res = []; for (const [key, value] of
      Object.entries(entity.attributes.results)) { res.push([new
      Date(key).getTime(), value]); } return res.sort((a, b) => { return a[0] -
      b[0]  })
    show:
      in_header: raw
  - entity: predbat.best_discharge_limit_kw
    stroke_width: 1
    curve: stepline
    name: discharge_best
    data_generator: >
      let res = []; for (const [key, value] of
      Object.entries(entity.attributes.results)) { res.push([new
      Date(key).getTime(), value]); } return res.sort((a, b) => { return a[0] -
      b[0]  })
    show:
      in_header: raw
  - entity: predbat.grid_power_best
    name: power
    stroke_width: 1
    type: area
    opacity: 0.2
    data_generator: >
      let res = []; for (const [key, value] of
      Object.entries(entity.attributes.results)) { res.push([new
      Date(key).getTime(), value]); } return res.sort((a, b) => { return a[0] -
      b[0]  })
    show:
      in_header: raw
  - entity: predbat.rates
    stroke_width: 2
    curve: stepline
    name: import
    data_generator: >
      let res = []; for (const [key, value] of
      Object.entries(entity.attributes.results)) { res.push([new
      Date(key).getTime(), value]); } return res.sort((a, b) => { return a[0] -
      b[0]  })
    show:
      in_header: raw

Most of the other charts I never really use. Even now I still don't fully understand the Calibration chart !

W
#104 Wavy Davy

Yes it's a bit confusing, I also seem to have lost a select_predbat_update entity. Sure it was on the predbat dashboard.yaml I set up before but did an auto update and maybe that's thrown it out of sync or some thing. But cant find the entity at all now.

G
#105 geoffreycoan

Wavy Davy I also seem to have lost a select_predbat_update entity

Its select.predbat_update

W
#106 Wavy Davy

geoffreycoan sorry my bad, that's what I have on the dashboard, but its not listed anymore for some reason.

W
#107 Wavy Davy

That's funny, just searched the yaml file and its not in there, but it must have been there when I copied and pasted into the card otherwise it wouldn't be listed as a entity

G
#108 geoffreycoan

Wavy Davy I have just updated to 7.14.29 and I do have the select.predbat_update entity present still, but in my case its now empty.
So something has gone wrong in the upgrade. I'll raise a bug report...

... just finished typing the bug report and the dropdown is now populated correctly. It may be that predbat needs a run or so after update to populate the dropdown again.

Is your entity reappeared now?

Its still confusing so I raised a bug report anyway https://github.com/springfall2008/batpred/issues/560

W
#109 Wavy Davy

No it's still not there. I also raised a issue..
How did you do the update? I had mine set to auto.
We must have done them at the same time as yours wasn't there when I did mine..

W
#110 Wavy Davy

Just rewatched the update video and Trefor's dashboard has an auto update toggle which I don't have. It must have been there before so it seems that's disappeared as well.

W
#112 Wavy Davy

No I didn't realise I had. I just tried posting a screen shot

W
#113 Wavy Davy

"switch.predbat_auto_update" don't have that entity either.

W
#114 Wavy Davy

All working now. Have closed the issue. Thank you Geoffrey and Trefor.

#115 PianSom

Hello @geoffreycoan

I am having an issue with predbat that is slightly annoying. My system is over-discharging - so at the end of the day (before a charging slot starts at 23.30) it dumps excess power to generate income - great. The problem is that it dumps too much too early, so I have to go to the grid for 30 mins at 23.00. (I am away and in holiday mode at the moment, so things are pretty predictable.)

I thought the solution to my problem might be to increase "Best SOC keep" to something like 10 (I think the unit is %??). Do you agree?

G
#116 geoffreycoan

PianSom you could use use best_soc_min or best_soc_keep.

The min specifies the minimum amount to keep in the battery and is a hard limit, so predbat won’t let the battery go below this. If need be it will charge the battery to ensure you have the minimum in.
Whereas keep is a soft limit that can be exceeded.

I’m surprised though that if you are in holiday mode predbat should be using yesterdays consumption to predict todays and shouldn’t be exhausting the battery so you need grid draw after discharge.

But yes set keep should keep more in reserve

Cheers Geoffrey

#117 PianSom

geoffreycoan I’m surprised though that if you are in holiday mode predbat should be using yesterdays consumption to predict todays and shouldn’t be exhausting the battery so you need grid draw after discharge.

Yes, me too. I had put it down to the vagaries of AIO BMS noise, but who knows. Seems to be consistent though.

Moving the “keep” to 10 produces some very odd plans (with projected min SOC above 35% by the end of the day). I will move to 10 anyway and see what actually happens.

G
#118 geoffreycoan

PianSom keep and min soc are in kWh, not %, so if you are setting keep to 10kWh then you’re telling predbat to keep the AIO almost full.

Try setting it to say 1kWh if you just need a bit more retaining at the end of the day?

#119 PianSom

geoffreycoan
Ah, that explains it! My assumption (as I mentioned) was that the unit was %.

Moved to 1.

Thanks.

#121 PianSom

geoffreycoan
Aha! It has been updated since I loaded it, and after a quick refresh it is now much clearer - thanks again.

(You may want to specify the units in that para, like you have in the following ones. Help an idiot. 🙂 )

G
#122 geoffreycoan

PianSom (You may want to specify the units in that para, like you have in the following ones. Help an idiot. 🙂 )

That's one of the few parts of the Predbat docs I haven't done yet (saving the fun ones for last!).

I worked through tonight the 'what does predbat do' and 'installation guide' docs so did include this change as well. Its waiting for Trefor to approve the PR so the doc changes should go live soon.

#123 PianSom

geoffreycoan
Before I go and put a bug report together, if you have a mo I'd appreciate your thoughts on the following.

Tomorrow there is a Power-up 12-2.30pm. I have entered this in the appdeamon .yaml file (a few hours ago). The current plan includes this -

I am a bit confused about (1) why predbat is suggesting hitting the Power-up with an almost full battery and (2) why it is suggesting a discharge while free leccy is available.

Any thoughts?

G
#124 geoffreycoan

PianSom I've got a power up event as well tomorrow, happy days as wifey wanted the tumble dryer on tonight otherwise!

This is nothing like my plan which is charging overnight, then using the electricity during the morning, then fully charging in the power up period:

There is a charge and discharge during the period like yours, but this I take to just be maximising the income as there's time in the 2.5 hour period to charge, partially discharge for export income, then re-charge to 100%.

What are your best_soc_keep and _min set to, is this preserving charge unnecessarily? The other thing I'd be wondering about is what's happening overnight (is there any charging going on earlier in the night) and whether you have enough load to discharge the battery?

At the moment I only have a single 5.2kW battery so I can get through it very quickly, but I did experience something like this once before with Predbat so I set it to read-only to stop it charging, then set it back to auto later on and it was fine.

What are your switch settings, in particular the different calculate_ switches?

A
#125 Arg0t

Your solar forecast tomorrow is massive, are you sure it's grid charge?

#126 PianSom

geoffreycoan What are your best_soc_keep and _min set to, is this preserving charge unnecessarily?

_keep = 1 (was 0.8 until earlier today)
_min = 0

geoffreycoan what's happening overnight (is there any charging going on earlier in the night) and whether you have enough load to discharge the battery?

At the time of writing (10.45pm GMT) the battery is dumping charge to generate income. If it performs like previous nights it will stop discharging at 11pm, and then start charging at 11.30pm when the Intelligent Octopus Go cheap rate starts. Though - oddly - I expect it will fully charge, even though it knows there is a Power-up coming.

Load atm (holiday mode) is an almost completely constant 0.3kWh per half hour slot.

geoffreycoan What are your switch settings, in particular the different calculate_ switches?

As shown -

Arg0t Your solar forecast tomorrow is massive, are you sure it's grid charge?

Solwise projection shown below. (Ignore times - seems to be picking up my local time, rather than GMT.) Roughly 2x today 8th, and roughly the same as was achieved on 7th. So not massive.

#127 PianSom

I actually think I need to increase _keep further. As with previous nights, I have hit 11pm with the battery fully discharged following an income-generating dump and have now started importing - which is stupidly wasteful

G
#128 geoffreycoan

PianSom all these settings look reasonable and match my own configuration.

Like @Arg0t I agree your solar forecast looks huge. 2.6kW in a half hour slot, sounds more like summer generation than winter.
My total generation for today was 3.7kW, and I’ve got 14kW across 3 arrays. Peak 1-hour output was only 1kW and that was at midday. You’ve got more than twice that in half an hour. Must be a massive panel you have!

But regardless of whether your Solcast is wrong or not, doesn’t explain why predbat isn’t looking far enough ahead to limit the overnight charging and then take advantage of the free electricity.

If the plan doesn’t improve tonight as it starts charging overnight (and predbat’s forward window reduces) I’d be inclined to put an automation in triggered at say 3am to put predbat into read only, cancel the charge and then turn read only off at say 8am.
And yes put a GitHub issue in

G
#129 geoffreycoan

PianSom just thought of another easier way of stopping the import overnight, put a rate import override in apps.yaml to dissuade predbat from charging all night

Eg 3am to 8am import rate 300

#130 PianSom

geoffreycoan
Here are my production nos from 7th -

I have 8.8kW (20 x 440W panels, facing SSE), with a 6kW inverter. I keep an eye on the output from the inverter, and compare to the power received by the AIO and the power seen by my Harvi - I have not seen any anomalies. Total generation today was approx 1.7kWh, peaking at 0.8kW (considerably less today than the peak Solcast forecast of about 2.3kW; generally speaking it is closer than this).

I won't change anything more tonight - lets see what happens tomorrow.

G
#131 geoffreycoan

PianSom OK, I looked at my figures for the 7th (today was worse) and its similar, a total of 9.6kW across my 3 arrays so I can believe yours now

Just today's figures are awful.

Still think it would be worth dissuading predbat from fully charging the battery overnight with an import rate override if it charges the battery up too much. It is possible that as the forward window rolls forward it works out that it doesn't need to charge as much, but the rate override would encourage it further and this is much simpler than an automation.

#133 PianSom

geoffreycoan Still think it would be worth dissuading predbat from fully charging the battery overnight with an import rate override if it charges the battery up too much.

I guess I had hoped that predbat didn't need dissuading!

In the end, the absolute amounts of cash involved in any given day are small, so I'd rather focus on tweaking settings than introducing manual amendments to achieve a short term goal.

I'm just happy that you are as confused as me about what is going on - at least my understanding is not fundamentally flawed. Thanks.

G
#134 geoffreycoan

PianSom no problem. HTH. As you say the sums involved are quite small, but worth still raising a GitHub issue if you can. 98% of the t8me predbat does exactly what I think it should do, but sometimes it still throws a curveball

A
#135 Arg0t

PianSom can you share all your settings and the full plan? The PV forecast still seems very optimistic in Predbat, close to best from solcast.

#136 PianSom

Arg0t
Please see below. Apologies for the poor readability - couldn't think of a quick, better way.

I agree the solar looks optimistic. But, as Geoffrey points out that doesn't explain the lack of export pre-Power-up.









#137 PianSom

ps current pv production

A
#138 Arg0t

This deserves a github issue. Would have expected it to discharge to a minimal level after 5:30, export the solar directly to grid and then recharge on the grid from 12. Can understand a discharge during the free energy section if the solar + import over the period is greater than your total battery capacity. Charge, Discharge, Charge earns you more than sitting on a full battery with free import.

I'd be tempted to dial down the metric battery cycle cost closer to 0, you've paid for it and it's under a lifefime warranty with unlimited cycles. I'd also switch off combine charge slots, set load scaling and load scaling pv10% to 1 and increase metric 10 weight to .2.

G
#139 geoffreycoan

@PianSom your settings are very similar to mine. You've set a battery metric at 2p which would dissuade predbat slightly from cycling the battery (I have mine set to 0 as I take the view I've invested in the battery so want to use it, and manage the 'when to discharge' based on the % losses). So could try changing that to zero.

Also I see you have charge on discharge turned on. I do as well, but sometimes I have found you can get better plans by turning that off, or turning it on. Its just one of those things that is sometimes worth changing.

Assume you have an EV? num_cars is set to 0 (otherwise the car charging data would be in the predbat plan) but intelligent octopus charging is turned on in HA. Probably makes no difference but?

Looking at your discharge before overnight charge, it looks OK and should keep enough in reserve to prevent unnecessary import. Wonder if there is something wrong with the discharge rate being higher than predbat thinks it is if you keep running out?

I wonder also about your inday adjustment damping factor, this being set to 0.95 is counteracting the load scaling, and since you are in holiday mode, is this combining to under-represent the daily load? My damping factor is set to 1, and load scaling to 1.15

#140 PianSom

geoffreycoan
Good to know, thanks Geoffrey.

To address your thoughts:

  • battery metric is (like most settings) as per defaults atm. Theoretically, I think that the 2p concept is ok - although the capital cost is sunk, my guess is that effective lifetime may be reduced by excessive charge/discharge cycles.
  • I have no idea what charge on discharge does! I'd better rtfm
  • Although I am on IOG I do not currently have an EV (shh!). One is arriving hopefully next month.
  • I wonder too if there is something wrong with the discharge rate. In any case I will raise the _keep level to 1.5 later today.
  • Again, I have not changed inday damping and scaling from defaults as yet. Seems unlikely that these could be causing the issues I am seeing.

FYI today's chart so far; I have just hit my DNO export limit -

I
#141 Ivan

geoffreycoan PianSom

I’m on Eco 7 and despite the simple battery charge regime, I am using predbat to control that battery in order to become familiar with its workings as I intend to switch to Agile in the next month or so.

Predbat, rightly chooses the 00:30 to 07:30 cheap rate window to charge the battery. I have the ‘Set Charge Low Power Mode’ enabled which is meant to set the charge to make full use of the available charge window. Generally, predbat fully charges the battery (to 99%) at around 05:30 – and then for the remainder of the cheap rate window it starts cycling between discharging the battery to cover the house lead and recharging. What it should be doing during this remaining cheap rate window is hold the battery as fully charged and cover the house load from the grid.

![

I note that PianSom had a similar charge/discharge cycle last on this morning’s charge – I assume this is not intended??
Before I raise this as a github issue is this a consequence of any setting I may have adjusted in error??

#142 PianSom

Arg0t
Many thanks - I will try your suggestions

#143 PianSom

Ivan
No, certainly not intentional!

I’m slightly loathe to raise an issue on GitHub, because all I can say is “things aren’t working like I’d hoped”, which is not much use to a developer! I’d rather be able to point at a specific case of error.

G
#144 geoffreycoan

PianSom

battery metric is (like most settings) as per defaults atm. Theoretically, I think that the 2p concept is ok - although the capital cost is sunk, my guess is that effective lifetime may be reduced by excessive charge/discharge cycles.

The default for battery metric is 2p. If you've got an AIO then the warranty is for unlimited cycles (as is my 9.5) so hence my 'use it as I've got it' logic. TBH it probably makes little difference to the overall cost plan whether you have this set to 2p or,0p.

I have no idea what charge on discharge does! I'd better rtfm

Charge on discharge is to allow predbat to discharge in what would otherwise be a charging slot. If you turn it on then you (could) get more discharging, looks like this in the plan:

Its one of those settings that I've not found a good value for. Sometimes having it on makes the plan better, sometimes having it off makes it better. In my opinion anyway. Worth trying to change.

I wonder too if there is something wrong with the discharge rate. In any case I will raise the _keep level to 1.5 later today.
Again, I have not changed inday damping and scaling from defaults as yet. Seems unlikely that these could be causing the issues I am seeing.
I just checked the code and inday damping factor defaults to 0.95 (so you are on the default) and load scaling to 1.0 (you are on 1.15 as am I).

Load scaling of 1.15 will be taking a more pessimistic view of your historical load, so setting it to 1.15 means predbat will predict that today's consumption will be 15% more than yesterday's

inday adjustment is turned on so Predbat will be calculating the difference between your historical load and current today's load, and using that to adjust the prediction of what today's load will be.

The effects of these two is going to adjust your historical consumption, and given that you are on holiday and have said that your consumption is fairly flat, then I wonder whether these should either be ignored when in holiday mode, or whether there should be advice in the documentation for the user to review and change these when going away?

I've raised issue 602 to seek Trefor's thoughts on this https://github.com/springfall2008/batpred/issues/602

#145 PianSom

Just to close off this protracted discussion - I think it is fair to say that Predbat has not covered itself with glory today.

To summarise the starting position

  • I am on Intelligent Octopus Go, with low (7.5p) import pricing 23:30-05:50, and high (31p) pricing at other times. My export pricing is a fixed 15p
  • There was copious PV generation forecast for today. While the early forecast was not met, I managed 16.2kWh of sunny electrons
  • I had an Octopus Power-up (ie 0p import pricing) 12:00-14:30. This was entered into the predbat yaml yesterday (ie in very good time)
  • I am away (and predbat is in holiday mode), with consumption being pretty flat at around 600W (forgot to turn off the Quooker so there will be odd spikes!)

This is what my chart looks like for today -

Some observations

  • I imported 21.2kWh, exported 7.7kWh and generated 16.2kWh
  • Unlike some days, today predbat chose not to do significant export during the early morning cheap charge period. Instead after initial charging (other than two short export periods) it chose to cycle through running load and topping up. Don't know why
  • Predbat did not get the battery to 100% during the morning. This was only achieved when the pv generation kicked in later.
  • Even though the Power-up was known in advance and there was copious forecast and realised pv generation, no significant discharge to generate income took place. HUGE missed opportunity. The biggest issue of thee day.
  • During the day I increased best_soc_keep to 1.15, to avoid the 11pm import that has been plaguing me the last few days. Fail!! Still had my late import.

Generally I am pleased with predbat. But today was not a good day.

W
#146 Wavy Davy

Yesterday was not a good day for me also. Agile rates are not great at the moment but last night predbat was only going to charge my batts upto 71% and not charge them again until 10:30 tonight. They would have no chance of lasting that long, so reluctantly I set predbat to monitor/read only and switched back to bottlecap Dave's automation which was scheduled to be on from midnight to 1:00 and 1:30 until 6 am. I've switched back this morning
But it still looks strange for the rest of the day/evening.

#147 PianSom

Wavy Davy
Very odd.

I do wonder what the logic is. It is a horrible multi-variate equation to solve, and I guess sometimes it just gets it wrong. In your example I can't see any reason why it would stick to 60% in the evening; in mine there was no good reason to fully charge before a deluge of free power arrived. In both there seems to be a fairly obvious (to human eyes) better solution.

I guess I will take the rough with the smooth for a few weeks more and see how it goes.

EDIT - on reflection, I think I may be wrong about my human solution being obviously better. Maybe predbat was right to load up with 7.5p electricity and dump it at 15p. But then if it was going to do that then why didn't it dump it all? It's very hard ...

W
#148 Wavy Davy

Just wondering if having Nordpool enabled is causing problems, so I think i Will disable it and see if that makes any difference.

B
#149 Boffinboy

I’m also sometimes having unusual behaviour - currently Predbat is holding charge when the cost is 24p. It charged at 14 or 15 overnight, so even with round trip losses it would be saving by using battery. It could be saving it for the evening peak, but looking at the prediction it would still have 50% even after the peak, so shouldn’t need to hold that much charge. I would have thought it should discharge for the 24p slots, then hold charge on the slightly lower priced ones.

A
#150 Arg0t

Wavy Davy Your issue is with the freezecharge early in the morning? For me rest of plan looks ok, it charges adequately overnight and then has PV top off the batteries to 94%. In the evening it uses the grid to cover load early evening and then tops off the batteries from grid to 100%, using the grid avoids conversion losses and any battery cost metric you have maintained.
Is the calculation overly optimistic on the PV generation, pessimistic on the house load?

Boffinboy Something not right there, do you have a very high SOC keep or Best SOC Min value? do you have combine charge slots on?

These settings work generally well for me, they do result in a little more charge in the batteries than desired but overall they are suitably optimistic on my calculating the house load and PV and adjusting to any variations through the day. In my apps.yaml I have 2,3,4,5,6,7,8,14,21 maintained as historic dates considered in the plan so I get a very blended predicted load that isn't overly skewed because of cooking a massive Christmas dinner or everyone being off work for a week.



W
#151 Wavy Davy

Arg0t Looking at the settings you have, there are some differences.
On mine I have the metric battery cycle cost is set to 2 where yours is 0
my metric future rate offset import is 0 where yours is 1
my in day adjustment is 0.95 yours 1.1
my Rate Low threshold 0 yours 0.9
My Plan forecast hours 24 yours 48
My HTML Plan Debug off yours on.
Not sure if any of these would help but will change them and see if I get a better forecast.

Also re the historic dates I assume the yaml setting is days_previous:
- 2,3,4,5,6,7,8,14,21

but if I try that I get this error.

G
#152 geoffreycoan

Wavy Davy you need to enter each days_previous on a separate line

days_previous:
 - 2
 - 3
 - 4

days_previous_weight defaults to 1 so unless you want to weight the different historical days, just having a single entry '-1' is sufficient

I have updated the apps.yaml documentation for predbat with some examples to make this clearer. It'll get pushed through in my next doc update, but here's the fork: https://github.com/gcoan/batpred/blob/main/docs/apps-yaml.md

B
#153 Boffinboy

Arg0t Wavy Davy it’s a bit puzzling! I remembered I had set the forecast to 32h briefly, putting that back to 24 improved things. Still doesn’t seem to be discharging as much as I’d expect - was working consistently well previously. I don’t have combine discharge or charge on. I only have a soc keep of 0.3. My settings are slightly higher on inverter loss, and battery loss, and the default cycle cost - but even so, I would have expected it to discharge through some of the >24p slots

W
#154 Wavy Davy

geoffreycoan in config.yaml Is there anything required before the entry
recorder:
purge_keep_days: 14
As I'm getting a error

Also seem to have a couple of template errors cropped up regarding binary_sensor.octopus_energy_target_my_charge_slots but don't think their related to this issue as they are showing as unavailable

A
#155 Arg0t

Wavy Davy remove the 21, I have an external DB that gives me a longer history.

W
#156 Wavy Davy

Arg0t thanks argot but the error is in the config.yaml and relates to the recorder entry.
Have tried changing the indent and also tried adding a "- " to the beginning so it matches the other entries but still get the error.

A
#157 Arg0t

Wavy Davy

On mine I have the metric battery cycle cost is set to 2 where yours is 0 = Batteries are paid for, there is no actual cost or loss for using them. Conversion losses are real and have a financial impact.
my metric future rate offset import is 0 where yours is 1 = This causes predbat to predict that future rates will be more expensive than current rates, by at least 1p. Encourages taking advantage of current rate rather than guessing tomorrow might be cheaper.
my in day adjustment is 0.95 yours 1.1 = if my usage is higher than forecast then make the rest of the day higher.
my Rate Low threshold 0 yours 0.9 = this reduces the number of low rate slots and creates a real band between the high and low rates.
My Plan forecast hours 24 yours 48 = weirdly this does make a difference and I often flip this when predbat is predicting a weird night.
My HTML Plan Debug off yours on. = this adds conversion losses to the plan html, which I find informative.

W
#158 Wavy Davy

Arg0t HTML Plan Debug off yours on. = this adds conversion losses to the plan html, which I find informative. I noticed the extra info but didn't understand what it was. I agree handy to know exact figures.

A
#159 Arg0t

Boffinboy the loss parameters have a significant weight in the calculation, too high and using your battery will not be cost-effective in any low rate slot and discharge will only happen when there a rates significantly lower than 15p or excess PV.
The defaults are fairly reflective of actual losses and I'd recommend sticking with the 3% for battery losses and 4% for inverter loss.

#160 PianSom

Arg0t I'd recommend sticking with the 3% for battery losses and 4% for inverter loss.

Are these values reasonable for an AIO? I am rather hazy on the efficiency difference for different systems

W
#161 Wavy Davy

Arg0t Could I ask you to share your config.yaml entry for the recorder part. Cant seem to get it right without error.

A
#162 Arg0t

PianSom I'm not sure sorry, the process is the same with conversion from AC to DC to AC through the inverter so inverter losses should be similar, however I do not know if the different battery chemistry in the AIO has a material impact on battery losses.

A
#163 Arg0t

Wavy Davy

Configuration.yaml for HA. NB I have a postgres DB setup to handle such a long history. Modifying purge_keep_days will store that in the HA DB but this can impact performance of HA. Default purge, if the value is not maintained, is 10.

# Database
recorder:
  purge_keep_days: 365
  db_url: !secret psql_string
  db_retry_wait: 15 # Wait 15 seconds before retrying
  exclude:
    domains:
      - automation
      - updater
    entity_globs:
      - sensor.weather_*
    entities:
      - sun.sun # Don't record sun data
      - sensor.last_boot # Comes from 'systemmonitor' sensor platform
      - sensor.date
      - predbat.plan_html
    event_types:
      - call_service # Don't record service calls

predbat apps.yaml

  # Days previous is the number of days back to find historical load data
  # Recommended is 7 to capture day of the week but 1 can also be used
  # if you have more history you could use 7 and 14 (in a list) but the standard data in HA only lasts 10 days
  days_previous:
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 14
    - 21
    - 28

  # Days previous weight can be used to control the weighting of the previous load points, the values are multiplied by their
  # weights and then divided through by the total weight. E.g. if you used 1 and 0.5 then the first value would have 2/3rd of the weight and the second 1/3rd
  # Include one value for each days_previous value, each weighting on a separate line.
  # If any days_previous's that are not given a weighting they will assume a default weighting of 1.
  days_previous_weight:
    - 0.8
    - 0.8
    - 0.8
    - 0.8
    - 0.8
    - 1.0
    - 0.8
    - 0.8
    - 0.8
    - 0.8
W
#164 Wavy Davy

Thanks that seems to have got rid of that error, just now need to find out why binary_sensor.octopus_energy_target_my_charge_slots is showing as unavailable for the last few days.

B
#165 Boffinboy

Arg0t thanks for this. Even tuning them down I get odd behaviour. Turning on html debug was very helpful to see the values with loss. Even then I get some odd behaviour. In this screenshot I’d imagine it should be allowing the battery to be used in the slots circled, since even with losses the early charges would save money, but it keeps charging. I just tried turning the low rate threshold to 0.9 and that made a huge difference and broke up the plan.

W
#166 Wavy Davy

When does the cost total reset.
was wondering if its a day or if not what amount of time.

G
#167 geoffreycoan

@Wavy Davy total cost resets to zero at midnight but the predbat plan always shows total cost from midnight today, so cost at say 4pm tomorrow on the predbat plan will actually be 'actual cost up to now today' + 'projected cost from now to 4pm tomorrow'

I personally find this a bit confusing but its the way it works. But at midnight the cost column on the plan will reset to counting from zero.

Boffinboy here's my plan for tomorrow, it starts releasing the charge in those circled slots as you were expecting it to do

my low rate and high rate threshold are both set to zero

try turning combine charge slots off. that can make quite a difference sometimes

looking at your differences to @Arg0t 's settings:

metric_battery_cycle_cost of 2 will mean it "values" each cycle (charge & discharge) at 2p, so won;'t charge or discharge unless there's at least 2p cost benefit. I leave mine set to 0 as I have already paid for the battery so want to utilise it

metric future rate import is an offset to add to future agile prices for tomorrow before they are published. I have mine set to 0, the nordpool does a good enough job

in day adjustment adds a factor to adjusting your today's planned consumption by how much you have already consumed. 1.1 means if you are already consuming more today then assume (by +10%) that it'll continue. Useful if you have a heat pump and its a cold day already so likely to remain cost = more electricity

B
#168 Boffinboy

geoffreycoan thank you. I already have combine turned off…. I do have charge cycle at 2 and inverter loss, but looking at the raw numbers with loss it should still discharge. Have opened an issue to try and see if I am misunderstanding how it calculates. The fact that setting the low threshold to 0.9 changes it must mean something

B
#169 Boffinboy

Think I may have discovered a bug - or the documentation is unclear. I turned cycle cost down from 2 to 0, I get the argument of sunk cost of battery intended to be used. I had assumed this was the cost in pence for a full cycle, 9.5kW, but looking at the two screenshots below the full 2p appears to be applied to the rate for every slot. That can’t be right. Impact on cost per kWh should presumably be 1/9.5*2 = 0.21p

B
#170 Boffinboy

Boffinboy actually, thinking about this further - a cycle is 9.5 x 2. So per kWh it should be 1/19 x 2p difference in rate. I have an open issue where Trefor seems to confirm the full 2p is applied to kWh rate. Presumably either that calculation should change, or the documentation should make it clear that this is cycle cost per kWh, not for a full cycle.

B
#171 Boffinboy

Have an issue raised, I think it’s just a clarification in the language - the setting is actually the cost per kWh cycled, not the cost for a full cycle

#172 PianSom

All - Trefor is asking for some feedback on the new "save settings" feature on GitHub

G
#173 geoffreycoan

Boffinboy Have an issue raised, I think it’s just a clarification in the language - the setting is actually the cost per kWh cycled, not the cost for a full cycle

I saw your issue. Likely will need to clarify it in the docs.

At the moment I'm very happy with predbat as its doing precisely what I want it to. Charging in the cheapest slots, discharging when the export rate is > import and is going through a pattern of charging overnight, letting the battery be used in the morning as the rates rise, then mid-day charging through to the evening peak when it gets released again.
Over the last 3 months I've been on agile my average per kWh import cost is about 18/19p, a third less than the standard variable rate, and that's with high consumption (40-70kWh a day)

W
#174 Wavy Davy

Mines nearly there but I wish it would charge up to 100% before mid morning.
It doesn't get to 100% at all tomorrow.

B
#178 Boffinboy

geoffreycoan I’m currently seeing better average cost than I did on Cosy, and using a bit less (with Cosy I just charged to full twice, and there are definitely significant conversion losses). Very happy with it.

A
#179 Arg0t

Wavy Davy Do you need 100% or is that just preference? If your predicted load is less than battery capacity, or loss calculations make grid use cheaper, it will not charge.

W
#180 Wavy Davy

Just a preference , but my wife prefers to use the dishwasher in the evening, so concerned that the capacity won't be enough. It did last but was down to about 17%. Will persevere with it and keep monitoring it.

A
#181 Arg0t

Wavy Davy I get the charge anxiety also!
If the evening dishwasher is a common activity, then it should be in your load history and part of the plan. For everything else, play with the Best SOC Keep to give yourself a couple of kWh of reserve for the abnormal loads, just remember the value includes the reserve.

W
#182 Wavy Davy

the washing machine is a bit more of a problem, as it goes on at irregular intervals, so not as predictable.
Have increased the soc to 2.2 to see if it helps.
Today is a bit of a worry as there's no planned charge until midnight. Fingers crossed the predicted solar of 4 kWh will get us through. Roll on summer.

W
#183 Wavy Davy

Lost my nerve today. It ran my batteries down to 4% and wasn't going to charge higher than 88% and then not charge again until 21:30.
Just seems very low charging soc.
Put it on read only and enabled bottlecap Daves automation to charge it up.

A
#184 Arg0t

Wavy Davy my plan is similar, I let it do its thing. I'm at 66% and forecast to get to 8% with those numbers reliant on a little PV today.

I find you can make the system a little more aggressive, in charging, by increasing Metric Future Rate Offset Import. Making this 1 to 1.5p results in the calculation expecting todays import rates are lower than future rates, in my experience this results in charge to higher percentages as the system tries to make a cost benefit of the lower rates. NB can lead to higher costs and to some export if solar generation is better than forecast. In my plan above this is set to 0.

#185 PianSom

There's a passing comment over on Github that one user needs to amend Predbat (to turn off Combine Charging windows) for the DFS/Saving Sessions.

As a new user I'd be interested to hear people's experience of DFS sessions and Predbat last year - did it work well?

W
#186 Wavy Davy

Arg0t As I said I set the status to read only, but for some reason after I went to bed it changed back to normal, so didn't charge as I hoped. I checked my Metric Future Rate Offset Import and it was set to 0. have set it to 1 but as yet its not made any noticeable difference in the chart, currently on 66% soc and not due to charge again until 21:30.
Will let it run and see how it does.

W
#187 Wavy Davy

Arg0t You said you use an external database for predbat. is that easy to set up? For HA I use a dell thin client with 8gb ram and an internal 128gb ssd which is showing as 8.5% used, so should have plenty of room for use as storage. So would be able to extend the days previous table, or maybe don't need a external database to do that, just set it to 24 days.

A
#188 Arg0t

Wavy Davy you can read about it here https://www.home-assistant.io/integrations/recorder/, I have postgres running in a container and the HA DB runs in postgres. It's fairly straightforward but overkill.

If I recall correctly you can extend the retained days, without an external DB, by changing/adding purge_keep_days in HA configuration.yaml. This can have a potential to slow your machine down significantly. Strongly advise taking a backup before playing with these settings or DBs.

recorder:
  purge_keep_days: 28
N
#189 neomancer

Wavy Davy

Yeah, I think my use case is to always charge to 100% at night on Flux, but I'd like it to only give a day rate bump charge if the battery is low prior to flux peak rate.. but I've been trying to work out how to configure that in the settings, charging to 65% because its going to be a sunny day isn't worth the risk, and I'd rather be exporting early.

I think this is very much weighted towards agile.

A
#190 Arg0t

neomancer It's weighted towards lowest possible cost rather than a specific tariff, of course your personal environment impacts the best tariff and the optimisations that predbat can make with the tariff.
Personally I've run out of battery twice in 4+ months of use, both related to a BMS drop lowering the SOC rather than a poor predbat prediction. I however understand the safety net of utilising the lower rate slots to charge as much as you can, accepting the higher cost for the comfort of spare capacity. I'd encourage tweaking your best SOC keep slightly higher, creating an artificially higher floor in the plan, and letting it run for a few days to build trust.

A
#191 Arg0t

Wavy Davy Did it make it through the day? My actual usage was much lower than the plan and PV was double the solcast forecast, net result my SOC is 40% higher than the plan at this point. Cost for the day 74p

W
#192 Wavy Davy

It's at 16% against a hold charge value of 14% so yes its making it at the mo. Will charge to 30% at 21:30 and to 100% later in the morning.
Will persevere with it with fingers crossed.

G
#193 geoffreycoan

PianSom As a new user I'd be interested to hear people's experience of DFS sessions and Predbat last year - did it work well?

In the early DFS sessions I found that Predbat wasn't discharging the battery sufficiently, it started the discharge then stopped it, then resumed it, etc. So after this experience I wrote my own automation script to turn predbat into read only, do my own force discharge, then turn predbat back on after the session ended.

Ran like this for a couple of sessions but did raise an issue that Trefor issued an update for. Long story short after further testing I have disabled my automation script and now entirely let Predbat manage the DFS session. My experience has been that its charged the battery prior to the peak then it holds enough SOC for a full rate discharge during the saving session.
We've even had some really weird scenarios just before Christmas of a Power up (0p import) session immediately followed by a DFS saving session. Predbat has managed the battery perfectly through all that, no issues.

Arg0t I find you can make the system a little more aggressive, in charging, by increasing Metric Future Rate Offset Import

Good tip, I'll add this to the documentation. I've been working my way through expanding the docs for Trefor, still got the main configuration doc to do but have done most of the others now.

Arg0t If I recall correctly you can extend the retained days, without an external DB, by changing/adding purge_keep_days in HA configuration.yaml. This can have a potential to slow your machine down significantly. Strongly advise taking a backup before playing with these settings or DBs.

There's instructions in the predbat installation docs for how to extend the history in HA if you need to for predbat. I don't know for sure if this was the cause but I had extended my history to 30 days and all was running fine until I came to apply a HA update when it basically wouldn't install. This happened with several 2023.9.* updates and I tracked it down to the upgrade process failing in a database purge. I eventually managed to get an upgrade to apply and then a day later I awoke to an empty HA system as the database had been declared as corrupt.
I integrity checked and put the database back and the next night same thing happened, probably when the recorder purge was running.

So end result is I lost about 3 months of HA history and had to start again.

I've since watched one of the HA release videos (from 2022.9 I think) where they basically said that when they introduced long term stats and reengineered the database their advice is now that people don't need to and shouldn't extend their purge history (even suggesting reducing purge to 2 or 3 days). They acknowledged that in the past people had used their own db because of history limits that were now not there. If people wanted to use their own db they of course could still do so but that they didn't recommend it and basically you were on your own if there was an issue.

I worked in IT for my career but I never wanted to be a DBA and now I definitely don't so I've extended my history from 10 to 14 days but am not going any further nor swapping to another DB.

Just my 2p worth.

neomancer Yeah, I think my use case is to always charge to 100% at night on Flux, but I'd like it to only give a day rate bump charge if the battery is low prior to flux peak rate.. but I've been trying to work out how to configure that in the settings, charging to 65% because its going to be a sunny day isn't worth the risk, and I'd rather be exporting early.

I think this is very much weighted towards agile.

I was on Flux with Predbat before I went to Agile for the winter. As @Arg0t says, Predbat will do a least cost optimisation. In my view charging the battery fully up overnight so you start exporting sooner is not cost effective. The overnight import rate is very similar to the day time export rate and by the time you include conversion losses you're actually losing something like 1p per kW.
Its better to only charge enough overnight to see you through the next day + PV topup.

You can always tweak the PV weightings to be more pessimistic which will increase the overnight charge %

#195 PianSom

I have come to the conclusion that
1 - predbat is much cleverer than me, and
2 - predbat is much better than me about getting stuff done.

Yesterday was a Power-up day - and the coldest day of the winter so far. My battery started the day (as it does most days) almost empty, charged and discharged while the electricity was cheap (to generate some cash while I slept). Then did a full discharge before a morning Power-up (and lots of sunshine) and charged (with a little discharge, cos it's rude not to) while the electricity was free. Then let the evening and afternoon load drain the battery down, with a quick discharge at the end to earn a bit more cash before starting it all again when the cheap rate started at 11.30pm.

Imported 33kWh (approx £2), generated 18kWh (good for Jan), consumed 29kWh (a heavy day), exported 15.5kWh (£2.42)

(I am sure some will be concerned with the battery/component wear and tear associated with two full charge/discharge cycles in 24 hours. But until someone tells me that the kit is not meant to be used this way it seems to me that it is what it is there for. Over a 12y warranty period if every day was like this (which obv it won't be) then I'd make about 1/3 of the cost of an AIO back and have all my electricity for free.)

I am increasingly impressed with predbat.

G
#196 geoffreycoan

PianSom Excellent results, Predbat is as you say, cleverer than us!

I too am very impressed and am positive about Predbat, 99% of the time it does what I want it to without me having to touch it at all. Its worked flawlessly in the power up events and is doing a great job of eking out my battery to reduce peak grid import. Like you, a couple of charge/discharge cycle a day at the moment.

I do have to report though that it didn't work as expected in the recent DFS saving session. The session was in the peak period and we're usually cooking and the heat pump is on, so historic load was about 3kW vs 2.6 max inverter output. When the saving session started Predbat set itself to Eco mode which would normally be enough to support the house load, but of course the load was much lower than normal and I didn't get the force discharge I anticipated. Had to set predbat to read only and force the discharge myself.
Previous DFS sessions have been fine so I think this is as a result of the colder weather and more base load that Predbat got the plan wrong (for me). Have raised an issue on it

#197 PianSom

geoffreycoan
As I just mentioned on the other thread, we both will have a Power-up 7pm-11pm tomorrow. My IOG low cost rate will then start at 11.30pm.

This has all the makings of a great test for predbat.

N
#198 naltsta

geoffreycoan I refuse to accept that predbat is cleverer than me (although Trefor is!)

I am just not prepared to look at the data every 5 minutes 24 hours a day…

G
#199 geoffreycoan

geoffreycoan When the saving session started Predbat set itself to Eco mode which would normally be enough to support the house load, but of course the load was much lower than normal and I didn't get the force discharge I anticipated

New “load reduction for saving session “ introduced in the latest predbat release, should resolve my issue of Eco mode not force discharge.

Also new ability to set slot override for charge, discharging and idle. Very useful

G
#200 geoffreycoan

naltsta I refuse to accept that predbat is cleverer than me (although Trefor is!)

I am just not prepared to look at the data every 5 minutes 24 hours a day…

I've been playing around with the new Predbat 'manual mode' to over-ride the Predbat plan, setting charge and discharge slots.
Not tested exhaustively but when I have configured my own slots, the Predbat cost prediction afterwards is worse than if I'd left Predbat to do its own thing. So far Predbat is outsmarting me!

The manual override is useful if for example there is more house load than predicted and you want to stop a force discharge that won't get exported for profit.

#201 PianSom

Hello @geoffreycoan

I want to change my load prediction so that it is a lot like the same day last week, and a bit like the same day the week before. At the moment I have in my apps.yaml

  days_previous:
    - 7
    - 14

  days_previous_weight:
    - 2
    - 1

but I am getting a bit confused about days numbering.

Is today day 0? If so then why isn't day 1 used for the example weekly averaging (so days 1-7 rather than 2-8 as stated in the manual)?

Or is today day 1? In which case, why does the manual say to use days 7+14 for weekly average (rather than 8+15)?

I think you mentioned you had had a conversation with Trevor about this in the past ...

N
#202 naltsta

PianSom how do you go back further than 10 days? It’s that some home assistant history setting you have to change rather than something in GIvTCP?

#203 PianSom

naltsta
Yup. It’s actually set out in the predbat manual.

(Apologies for no link - on phone atm)

W
#204 Wavy Davy

geoffreycoan How do you use the new functions like the Manual override.
I looked for a switch but cant find one.

A
#205 Arg0t

Wavy Davy Its a select not a switch.

      - entity: select.predbat_manual_charge
      - entity: select.predbat_manual_discharge
      - entity: select.predbat_manual_idle
G
#206 geoffreycoan

PianSom naltsta
Yup. It’s actually set out in the predbat manual.

I wrote that !

https://springfall2008.github.io/batpred/apps-yaml/

Wavy Davy How do you use the new functions like the Manual override.

Its at the bottom of this page of the documentation https://springfall2008.github.io/batpred/customisation/
As @Arg0t says, there's three new select switches. You'll need to add them to the dashboard

PianSom I want to change my load prediction so that it is a lot like the same day last week, and a bit like the same day the week before. At the moment I have in my apps.yaml
days_previous:
- 7
- 14

days_previous_weight:
- 2
- 1
but I am getting a bit confused about days numbering.

Is today day 0? If so then why isn't day 1 used for the example weekly averaging (so days 1-7 rather than 2-8 as stated in the manual)?

I've been looking at the Predbat code. From what I can understand, day 0 is today, day 1 is yesterday so to average the same day as today from a week ago and the week before that it would (logically) be:

days_previous:
- 7
- 14

I know the documentation is a bit unclear, trouble is that is a mixture of what Trefor originally wrote and then what I added based on advice he'd given me about avoiding today in the history.

I have logged an issue to get clarity https://github.com/springfall2008/batpred/issues/647

#207 PianSom

geoffreycoan there's three new select switches. You'll need to add them to the dashboard

@Wavy Davy - in case it helps, here's the code I use on my dashboard (to match the standard collapsible cards one):

  - type: custom:collapsable-cards
    title: 🔼 Manual overrides
    defaultOpen: false
    cards:
      - type: custom:auto-entities
        card:
          type: entities
        filter:
          include:
            - entity_id: select.predbat_manual_*
          exclude: []
        unique: true
        sort:
          method: friendly_name
          numeric: false
G
#208 geoffreycoan

PianSom

See the Predbat issue I logged for the explanation, but basically the examples in the documentation are actually all correct. For your requirement, same day as today and a week ago, then days_previous should be set to -7 and -14 as you have them.

I'll go and lie down with a wet towel on my head whilst I work out how to explain how this works to any lay-people that may have wandered in the room ....

N
#209 naltsta

geoffreycoan makes perfect sense! Do you know how forecast_hours in apps.yaml and the forecast_plan_hours variable work and how they are different?

G
#210 geoffreycoan

naltsta I think

apps.yaml forecast_hours is the number of hours that Predbat will forecast ahead things like Solar, Load, etc. Mine is set to the default, 48.

input_number.predbat_forecast_plan_hours is the number of hours that Predbat will create the plan for (from the forecast). Mine is set to 36.

But yes, this is another corner of predbat documentation that isn't clear (yet). The predbat_forecast_plan_hours is only briefly mentioned in the tariff rates configuration guide, not in the customisation guide.

#211 PianSom

geoffreycoan
Thanks!

As I read it, this is the issue: The (default) forecast period is 2 days. When creating a prediction for future usage, predbat needs to look back “days_previous” days from the END of the forecast period to see what the actual usage was at that time. So days_previous needs to be AT LEAST 2 days (or whatever the forecast period is) for this to work.

I may just post to Github, just to make sure that my understanding is correct.

If I am, then the civilian instruction is - days_previous can’t be less than forecast_hours (when expressed as days).

T
#212 The Black Cat

I’ve been running Predbat for the last few weeks in read only mode and I’m close to letting Predbat take control of my battery. I’m currently on Octopus Flux and still waiting for my export meter to be set-up (12 weeks and counting!) but plan to switch to Agile when I’m confident with the way my system is working.

However, I have some questions before I let Predbat take control:-

  1. I have an AIO battery with a 4kw string inverter for the PV. The documentation for inverter_limit says “If you have a separate Solar inverter as well then add the solar inverter limit to the battery inverter limit to give one total amount”. The AIO has a limit of 6000w and the string inverter 4000w. I’ve put 10000 in the apps.yaml file for this, is this correct?

  2. Are there any non standard settings I need for the AIO?

  3. My AIO is still having SOC problems on BMS 8, occasionally crashing to 0% from around 20ish %. It’s been fine down to about 25% but after that it’s been a bit hit and miss, so at the moment I don’t trust where the bottom of the battery is.
    Predbat will try and minimise my cost and sometimes will suggest not charging up to 100% overnight as it expects the battery to cope with the load the next day, running it down to 5% the following day at 2am but that brings in the chance that the battery may have a SOC drop and leave me running off the grid, maybe even during the peak period. Are there any settings I can make in Predbat to try and minimise the potential SOC drop problems?

G
#213 geoffreycoan

PianSom If I am, then the civilian instruction is - days_previous can’t be less than forecast_hours (when expressed as days).

The way I understand Trefor's explanation and my examples is that there isn't a restriction between days_previous and forecast_hours, but if you set days_previous to 1 and forecast_hours is (in days) > 1 then the previous days history has to repeat

i.e.

days_previous=1, i.e the day before

  • when forecasting for the remainder of today, it will use the historical load from yesterday (previous day)
  • when forecasting for tomorrow, it will use historical load from today (previous day)
  • when forecasting for the day after tomorrow (e.g. forecast_hours>24) then it can't use historical load from the day before as that's tomorrow that hasn't happened yet so it takes historical load from today (i.e. - another day)
G
#214 geoffreycoan

The Black Cat However, I have some questions before I let Predbat take control:-

Answering your questions:

  1. Yes 10k is correct. Predbat uses that to predict the most you could get without importing, i.e. max from the array and max battery discharge. In practice unless its a very sunny day and you are running lots of things, its a limit you won't reach

  2. I am not aware of any as the AIO differences are hidden by GivTCP. Maybe others with an AIO can chip in their experience and if common I am happy to add to the Predbat docs.

  3. If you set best_soc_min (in kW) then this defines a minimum soc to always keep. Bear in mind that this will mean Predbat will charge (even if unfavourable rates) to keep this soc level.
    You might be better setting best_soc_keep which is a 'soft' minimum soc level to keep, it can go below it, but it tries to plan to keep above it.
    https://springfall2008.github.io/batpred/customisation/#battery-margins-and-metrics-options

If you don't have export setup yet then maybe set Predbat to 'control Charge' mode, or set a manual export rate of zero in apps.yaml

T
#215 The Black Cat

geoffreycoan
Thanks for the suggestions. I did try changing best_soc_keep from 0.5 to 1 yesterday but the charging plan changed to maintain 100% from 5am through to 4pm as the forecast was to drop down to 5% around 21:30 even though this was more expensive. See attached screen dump:-

G
#216 geoffreycoan

The Black Cat what do you have input_number.predbat_metric_battery_cycle set to and your loss %'s? It seems its not planning on using the battery much, these are the usual things that prevent it.

A copy of the HTML plan (with debug on) is useful to see the planned activity with the battery and house load

T
#217 The Black Cat

geoffreycoan Metric battery cycle cost: 2, Loss charge: 0.03, Loss discharge: 0.03, Inverter loss: 0.04. This plan was from yesterday afternoon and currently as my usage is much less than planned, I will not run out of battery today and predbat is behaving as I would expect and recommending to charge up to 80% tonight with best_soc_keep set to 1. I've put debug on and will post if a similar situation occurs again. Thanks.

G
#218 geoffreycoan

The Black Cat No problem

Just to add some context to those figures above, to discharge your battery to the home its a 7% loss.

PLUS the metric battery cycle cost of 2p means that each kW of battery energy is priced at 2p for the "amortised cost of using the battery".

So to use the battery over grid, there has to be at least 7% + 2p cost benefit. I'm guessing that the import rates were such that it was cheaper to keep the battery for the peak and post-peak period and grid import before then (once the battery was fully charged).

Your losses are quite reasonable. You might want to reduce battery cycle metric. Trefor has reduced the default now to 1p (from 2p). Bear in mind that the metric applies both when deciding to charge or discharge the battery.
Personally I figure that I've bought the battery already so I might as well use it and set my metric to 0p.

HTH

Geoffrey

#219 PianSom

geoffreycoan
No, you are quite correct that there is no restriction. But your explanation of what happens if you break my rule isn’t really for the faint-hearted!

What I’d really like (in the absence of a Google Nest Thermostat-like AI managed monitoring and prediction system) is the ability to set up a default load profile for weekdays and weekends. My usage on, say, a Sunday is very different from a Monday. Averaging over a week loses that, and averaging over days 7&14 is open to - like last Sunday - distortion by an very odd day with cooking, laundry and Power-ups. And I don’t really want to increase my history any more.

N
#220 naltsta

PianSom

I’ve gone for a hybrid approach with weighting…

G
#221 geoffreycoan

@PianSom I'll have a go at explaining the way days_previous works next, but at the moment I'm working on an FAQ for the importance of the different loss rates, battery metric and best_soc values to 'getting the plan right' as this seems to trip a lot of people (me included) up at the beginning

Thinking about your problem, how about setting days_previous to 7 and 14 and tweaking input_number.load_scaling for anomalous historical load?

input_number.load_scaling is a percentage Scaling factor applied to historical load, increase this if you want to be more pessimistic on future consumption. Use 1.0 to use exactly previous load data. A value of 1.1 for example would add 10% to historical load.

#222 PianSom

geoffreycoan
Yes, I think there are probably several ways to “fiddle” it to manage anomalies. But - like @naltsta i suspect - I’d rather have something I can set and forget.

Still seems to me that two missing alternatives for load forecasting are a clever learning algorithm and a stupid fixed schedule. The latter should be easy to include, I’d imagine. (Just to be clear I am not in any way criticising predbat - I think it’s great!)

#224 PianSom

naltsta
Yup, looks like you and others are ahead of me.

G
#225 geoffreycoan

naltsta geoffreycoan Do you know how forecast_hours in apps.yaml and the forecast_plan_hours variable work and how they are different?

I found the answers at last

apps.yaml / forecast_hours - the number of hours to that Predbat will forecast ahead, suggested to be 48

input_number.forecast_plan_hours is the number of hours after the next charge slot to include in the plan, default 24 hours is the suggested amount (to match energy rate cycles).

G
#226 geoffreycoan

@PianSom @naltsta I have updated the Predbat documentation for apps.yaml to explain how days_previous works. In the end working through some examples seemed the only way to do it and make it crystal clear. Does make that part of the docs quite long but its worth getting it right.

https://github.com/gcoan/batpred/blob/main/docs/apps-yaml.md#basics

Have a look, see what you think before I push it into the Predbat core docs

#227 PianSom

geoffreycoan
I think it is very clear, and the examples help a lot. Well done!

A few thoughts (both about this work, and broader things):

  • Even though you have done a magnificent job, it is still perhaps rather complicated and off-putting for what is, after all, an opening section of a manual that will be consulted by newbies. I wonder whether it may be worth putting the section from "When Predbat forecasts future home demand " onwards into a "See here for more detail" hyperlink?
  • You have - quite reasonably - split the documentation into sections which describe naturally related items. I think that it would be very helpful for newcomers if the default installed apps.yaml followed the same ordering - one to suggest to Trefor?
  • I watched Trefor's two introductory videos from 3 weeks ago earlier today. They really helped my understanding, but I was left with the feeling that the docs might benefit from a "here's a walk-through of how to configure" section. I know I'd read it!

Please don't take the above as criticism - I am trying to be helpful, honest!

G
#228 geoffreycoan

PianSom thanks, all comments gratefully received.

Yes I was concerned that this section of describing just one configuration item is significantly longer and more elaborate than the others. I'll have a think about how to structure it. Would rather not have lots of different documentation files as they get out of step with each other and it becomes messy to navigate. In going through the docs and uplifting them I've found that there were duplicates across docs and some settings not documented, something I have been resolving as I go.

There is a walkthrough of setting up and configuring Predbat in the installation summary and main installation docs https://github.com/gcoan/batpred/blob/main/docs/installation-summary.md and https://github.com/gcoan/batpred/blob/main/docs/install.md - I had previously rewritten and expanded them considerably. Does that do what you want?

I did discuss with Trefor about updating apps.yaml as well, to merge the different apps.yaml's that exist for different inverters, to restructure it to follow the same sequence as the documentation, and to put headings etc in. He agreed it should be done as apps.yaml is a bit of a mess at the moment.
This is on my to-do list.

For what its worth, the list of things I still have in mind to do:

  • complete the predbat customisation doc (its part done)
  • rewrite and expand the sample Apex dashboards and creating-charts documentation, have a single 'starter' dashboard you can copy and paste in, explain what the different graphs show and how to tailor them
  • output data, explain the Dynamic entities card better
  • apps.yaml file update as above
  • other inverters doc tidy up
  • script to add power up zero rates 'automatically' to apps.yaml file
W
#229 Wavy Davy

While looking for something else in the logs I noticed a number of predbat errors, one of which was

Logger: homeassistant.components.recorder.db_schema
Source: components/recorder/db_schema.py:582
Integration: Recorder (documentation, issues)
First occurred: 21 January 2024 at 17:06:53 (1795 occurrences)
Last logged: 19:41:19

State attributes for predbat.plan_html exceed maximum size of 16384 bytes. This can cause database performance issues; Attributes will not be stored

Anyone know what this mean and what should I do about it?

G
#230 geoffreycoan

Wavy Davy it’s covered in the Predbat faq’s https://springfall2008.github.io/batpred/faq/
It’s only a warning that can be ignored, but the faq’s describe how to suppress it.
It’s caused by the length of the html plan and gives a warning it can’t be saved in the database. But as it’s an attribute it isn’t saved in the ha history anyway so it’s a spurious warning as well

PianSom thinking further about the extended days_previous, I could move the extended description to the end of the doc, with a summary at the beginning. That way it’d be in the same doc but not disrupt the flow and level of detail

A
#231 Arg0t

Wavy Davy

Try adding an exclude to the recorder configuration.

  exclude:
    domains:
      - automation
      - updater
    entity_globs:
      - sensor.weather_*
    entities:
      - sun.sun # Don't record sun data
      - sensor.last_boot # Comes from 'systemmonitor' sensor platform
      - sensor.date
      - predbat.plan_html ##this
    event_types:
      - call_service # Don't record service calls
#232 PianSom

geoffreycoan
Putting the longer description at the end of the page is a good compromise, I agree.

I have looked at the two sections that you sent, and they are not really what I was looking for. Perhaps it will be the first bullet point you have (Predbat customisation)? Trefor's video covered tuning Predbat for best performance - eg by tweaking Load Scaling and the like. I watched the video twice, and think I need to watch it again in the absence of a doc! There is still a lot I don't understand.

On the subject of your second link - install.md - I think it needs some small corrections. As I think I have mentioned before, I am a HA Container user. (Last time I looked some 25% of HA users are either Container or Core users FYI.) That means that we cannot use Add-ons. At the risk of teaching you to suck eggs, let me expand.

HACS is not an Add-on, it's an Integration. I can and do use it all the time (eg for installing the Solcast or Octopus Integrations). However, for us Core/Container users, AppDaemon/Predbat (or even just AppDaemon) is not available in HACS. So we have to run AppDaemon standalone or - I as do - in its own container. And then add in Prebat as an app manually.

The docs as they stand are nearly there, but need some corrections perhaps especially in this section - https://github.com/gcoan/batpred/blob/main/docs/install.md#predbat-manual-install. The bold note is not correct for me.

T
#234 The Black Cat

PianSom I'm glad you raised the 13.5 or 15.96 issue as I've been wondering about this for a while.
In terms of charge curve, I've looked at my last 5 charges to 100%:-

There appears to be a change in behaviour for the last 2 charges I did, throttling down to about 68% from the 85% mark whereas the previous 3 did not throttle down until about the 95% mark. I'll see what happens over the next few charges.
Calculation used:- Charging rate in watts used to get to next % level divided by full charging rate in watts just before throttling.

#235 PianSom

The Black Cat
Thanks for that.

I'm inclined to believe your numbers more than mine. I seldom get a good, solid charge in these days. Predbat seems to love doing intermittent exports every night, interrupting the charge. Makes it hard to find a proper set of numbers.

R
#236 Rbor

Hi,
I have spent most of the last week trying to get to grips with Predbat, reading the documentation and watching, pausing, rewinding, all the videos.
I have managed to get Predbat installed together with all the charts and Predbat plan.
This is a great thread, showing how much everyone here has progressed and learnt from one another.

Some questions from the newbie on the Predbat block.

  1. My initial Predbat (run in monitor mode with Export switched off), seems to just discharge my battery and run off the grid. Something not right. My 'best' etc are virtually at zero (0.7 kWh)
  2. I have checked the Predbat entities in HA and they are all 'disabled'. Have I missed something in the set up?

I don't know whether I will ever trust the system to control my installation!
But so far, my journey has taught me so much, not only about Predbat, but the inner workings of HA.

Thanks

Rob

J
#237 James L

Rbor I think @geoffreycoan will have the answer for you, but (quoting his reply to someone earlier):

If you want to see what Predbat plans but don't execute it, set mode to 'Charge' or 'Charge and Discharge' and 'read only' to True then it will plan but not execute anything.

I think you'll then see something more sensible.

G
#238 geoffreycoan

James L Absolutely correct, thanks

Monitor mode only monitors and predicts the current battery charge & discharge plans you have setup and predicts load and PV generation.
I’ve made this clearer in the latest documentation update that I’ll push through soon https://github.com/gcoan/batpred/blob/main/docs/install.md#ready-to-light-the-touch-paper

Don’t understand that your entities are disabled @Rbor can you post a screen shot? All the predbat output entities are read only but the predbat controls (input_number.predbat_* switch.* and input_select.* ) should be editable.

You’re almost there !

Cheers Geoffrey

R
#239 Rbor

James L Thanks. I have attached my new Predbat plan (Charge and discharge in read only) up to mid pm today, together with my Home battery prediction. This looks much closer to what I have seen on other screenshots in this thread. Last night, I nearly filled my battery as Agile rates are up today.
How do you think these look?

R
#240 Rbor

geoffreycoan Geoffrey, Thanks for this. I will read your Light and Touch doc (I think your docs are very informative - Thanks).
I have attached the disabled entities screen and also one of the dashboard cards. All sensors, etc show like this.

Rob

G
#241 geoffreycoan

Rbor this looks sensible. Predbat looks to be doing the right thing. What’s your best Soc min, keep and losses set to? It may be worth tweaking those to reduce the amount predbat is charging if you want to but it looks like you are running well off the battery and cheap agile

It was set to charge not charge & discharge? Looks like you have an export rate of 15p.

@Rbor looking at the screen shot, all of those entities that are disabled are ‘expert mode’ entities. To try to hide away some of the complexity of predbat a lot of advanced settings have been moved to an expert mode so you don’t normally see them. These are fine. Get the hang of the basics first, you shouldn’t need expert mode unless there is a specific switch to change.

The error on the controls dashboard is because you haven’t installed the auto-entities HACS integration. I need to expand this bit of the documentation as its thin on details but you have only installed collapsible cards https://springfall2008.github.io/batpred/output-data/
To to HACS/front end and search for collap - you’ll need to add the custom repository first
(Needs to be written with more detailed instructions, its on my to-do list!)

A
#242 Arg0t

Rbor This isn't a predbat error, you appear to be missing the auto-entities frontend addon in HA. Go to HACS, frontend, search for auto-entities, install and reload browser.

R
#243 Rbor

geoffreycoan Geoffrey,
Thanks for your feedback and explanation.

More for me to read and another HACS integration to find. Dealing with HA is a real merry-go-round. Sort one thing and there is always another lurking around the corner.

I have to do some work now and will leave Predbat for a few hours. There is so much to get your head around but I think I finally have some idea of what it does. Phew.

These are my settings (just the defaults that Predbat set up), looking at the card:
best Soc min: 0.66 (Can't set from the card)
keep: 0.5 (I can set this from the card)
losses: can't find it!

Will these be hidden away in apps.yaml?

Rob

R
#244 Rbor

Arg0t Thanks.
So much help from folk in this thread.
I will hunt this out.

Rob

G
#245 geoffreycoan

Rbor losses: can't find it!

The losses are Home Assistant entities:

  • input_number.predbat_battery_loss
  • input_number.predbat_battery_discharge_loss
  • input_number.predbat_inverter_loss

You should be able to see and set them from the entities tab of integrations. All of these are %'s, so 0.05 is 5%

Your best soc's are fine.

There is a lot to setting up HA and Predbat. I have progressively been improving the documentation to make it easier for newcomers, but it is a powerful tool and never going to get to a 1-click process. Nor to be honest would that be a good idea, you need to understand what you're doing. I learnt lots about my inverter when I started on Home Assistant, trying to script the charge manually with givtcp isn't straightforward!
It is a rabbit hole of sucking you in though..

Cheers

T
#246 The Black Cat

PianSom I've checked another couple of overnight charges to 100%, one started throttling back at 75% to 0.68 and the at 95%. I've averaged those charges that started throttling at 95% and will use these values to start with.:-
95%: 0.97
96%: 0.82
97%: 0.67
98%: 0.52
99:%: 0.37
100%: 0.23

#247 PianSom

The Black Cat
Thanks for the update.

I really need to work out what to change so I get a decent charge period.

#248 PianSom

The Black Cat
"v7.15.3 Fix bugs in low power charging predictions, add automatic battery charge curve feature "

From the new apps.yaml:

  # Some batteries tail off their charge rate at high soc%
  # enter the charging curve here as a % of the max charge rate for each soc percentage.
  # the default is 1.0 (full power)
  # The example below is from GE 9.5kwh battery with latest firmware and gen1 inverter
  #
  # Predbat can compute this curve automatically if you have enough data, restart the add-on and look in the logfile for the data
  # once set here Predbat will no longer re-compute the curve.
  #battery_charge_power_curve:
  #  91 : 0.91
  #  92 : 0.81
  #  93 : 0.71
  #  94 : 0.62
  #  95 : 0.52
  #  96 : 0.43
  #  97 : 0.33
  #  98 : 0.24
  #  99 : 0.24
  #  100 : 0.24
#249 PianSom

Update - throws an error for me. Bug report posted

Update 2 - new release posted already!

G
#250 geoffreycoan

PianSom thanks for raising the issue and getting the fix out. My 'detect predbat errors' automation had alerted me to predbat had crashed but I hadn't had the chance to see what the issue was with the auto-updated 7.15.3

Had to do a manual update through HACS to 7.15.4 as the Predbat auto-update I think caches GitHub and so it wasn't pushing the new update through.

I'm not seeing the battery curve appearing automatically in my predbat logfile. I don't have one manually set, so from what I read I am expecting it to be created by predbat. Do you?

#251 PianSom

geoffreycoan
Nope. And am seeing an entry in logfile.txt saying that necessary info is missing (see below)

Got timed out for this evening; will look again tomorrow…

INFO pred_bat: Note: Can not find battery charge curve, one of the required settings for soc_kw, battery_power and charge_rate are missing from apps.yaml

Edit - fyi I downgraded and then upgraded from the gui, so as to avoid having to play with appdaemon too much!

N
#252 naltsta

PianSom I have a matching message

R
#253 Rbor

geoffreycoan Geoffrey,
I have found these missing entities within HA entities but they are all disabled.
If I try to activate them via the cog, I get the error message below.

Any advice for what to do?

Thanks Rob

I
#254 Ivan

Rbor Switch on Expert Mode

G
#255 geoffreycoan

Rbor Two things here:

  1. The way that predbat creates entities in home assistant, they don't get created with a unique id, so you can't control them in Home Assistant. That's why this error is occurring and why you can't enable them using the HA UI. You also can't do things like change the unit of measure (eg W to kW) or the rounding

  2. But the reason they are not enabled is that these are expert mode controls in Predbat.
    As I said before, a lot of the more complex controls have been moved to an expert mode and you can't change them in 'basic' mode. The idea is that basic mode is good for most people.
    See this bit of the manual https://springfall2008.github.io/batpred/customisation#expert-mode

If you want to change any of these controls then turn switch.predbat_expert_mode on

N
#256 naltsta

PianSom can see why I don’t have the required bits in apps.yaml !

G
#257 geoffreycoan

PianSom Nope. And am seeing an entry in logfile.txt saying that necessary info is missing (see below)

Got timed out for this evening; will look again tomorrow…

INFO pred_bat: Note: Can not find battery charge curve, one of the required settings for soc_kw, battery_power and charge_rate are missing from apps.yaml

@naltsta

It looks like a bug. These controls are not set in apps.yaml if you're using rest to communicate to givtcp which is the recommended approach

Raised a bug - number of the beast !

https://github.com/springfall2008/batpred/issues/666

R
#258 Rbor

Ivan Thanks.
Expert mode has done the trick and I think I have everything set up now.
I can see all the controls, switches, etc and I can even see loss info in the Predbat Plan.
..... and no errors in the Predbat log.
I want to check through all the instructions again and Trefor's videos.
I will also work through this thread again. It has a mine of information and it is all starting to make a lot of sense now.

The big question is 'Will I pluck up courage to try out Predbat live?'

Rob

N
#259 naltsta

geoffreycoan i think you need to have them in apps.yaml to create a charging curve even if you are using rest. That’s my understanding anyway… and then once the curve is created you copy that into apps.yaml and can content them out again!

R
#260 Rbor

geoffreycoan Thanks as always.
I have tried Expert mode and can see the additional features that it offers (satisfying my inquisitive mind).
I also installed the Auto-entities card which has helped with the switches, controls etc. I can switch Expert mode off and having Read only has allowed me to see how PredBat might work.

The loss discharge defaults seem to be 5% which gives a large reduction (more than I would have thought) with charge and discharge efficiencies of 78% (I have an ac coupled inverter).
When I set up PredBat originally, these were set at 3%. Any recommendations for 'sensible' settings.

My brain has been working in overdrive this week but I am nearly there. Predbat is quite hypnotic.
Since moving onto Agile, I have been very selective in choosing charging slots. It will be interesting to see the effect on cost if I now try PredBat.

Rob

G
#261 geoffreycoan

naltsta geoffreycoan i think you need to have them in apps.yaml to create a charging curve even if you are using rest. That’s my understanding anyway… and then once the curve is created you copy that into apps.yaml and can content them out again!

Yes that would probably work, but I don’t think we should have to do that. Those fields are all available via rest calls, my guess is that it’s been coded to use the non-rest entities and not coded (like the rest of predbat) to use either rest or non-rest.

I’ll see what Trefor says in respect to my issue

Rbor The loss discharge defaults seem to be 5% which gives a large reduction (more than I would have thought) with charge and discharge efficiencies of 78% (I have an ac coupled inverter).
When I set up PredBat originally, these were set at 3%. Any recommendations for 'sensible' settings.

There’s other articles (including a very recent one) in this forum on loss rates for givenergy inverters.
GivEnergy don’t publish this data unfortunately but the consensus seems to be from people that have done testing of actual inverter performance that losses in the range of 10-20% are real and do happen ☹️
Lots of factors like temperature, charge/discharge rate, etc.

I personally have mine set in predbat to 5/5/3. I have two gen 1 hybrid inverters

And in answer to your question about cost, you will be surprised at how good a job it can do. Few days this week I’ve been in profit still by the middle of the day (i.e. negative consumption cost).
Today for instance was 33kWh imported, 10kWh exported for £3.29

R
#262 Rbor

geoffreycoan The big moment arrives.
I have just switched off 'Read only' and am letting PredBat loose on my system.
I can always switch 'Read Only' back on if I want to bail out.

Rob

G
#263 geoffreycoan

Rbor Good luck Rob, just keep an eye on it. It does become addictive looking at it though!

Another thing you might find useful is Octoblock which I use with some Jinja code to calculate when to put the dishwasher and washing machine on in the cheapest agile slots.

@naltsta @PianSom Trefor has responded, it seems REST doesn’t have access to the history so you do need to uncomment those lines out in apps.yaml to create the charge curve

#264 PianSom

geoffreycoan
See my Github comment - still didn't work for me. Did it work for you?

G
#265 geoffreycoan

PianSom Yes I saw your comment which motivated me to try it as well, and mine didn’t work either
I’m sure Trefor will issue a fix quickly, he is amazingly responsive at adding to and responding to issues

R
#266 Rbor

geoffreycoan Back in posts ~#213, you discussed metric battery cycle with @The Black Cat
I agree with you – I have bought my batteries and might as well use them. Who knows what may change in the next 10 years anyway with DFS.
I have changed this setting from 2p to 0p and this has made a large difference to the plan. Before, it was concentrating on keeping battery charge high, 100% a lot of the time. Now SOC is shown from one extreme to the other. I can always tweak it up and try Trevor's default of 1p.

I knew none of this a week ago! Now it seems to be dominating my life.

Rob

G
#267 geoffreycoan

Rbor Yes, metric battery cycle and the loss figures are very important to get right.

I’ve written a new FAQ on this topic as quite a few people (myself included) when first starting on predbat have questions about the plan it produces https://github.com/gcoan/batpred/blob/main/docs/faq.md#the-plan-doesnt-charge-or-discharge-when-i-expect-it-to which is waiting Trefor’s approval before it gets merged in to the documentation. Happy to make any more enhancements to it. I need to add something about load scaling and modal filter …

Yes it can dominate your life. Then you get into wanting to understand where the rest of your power consumption goes in the house, smart plugs, energy monitors, more automations, etc. Keeps you busy!

#268 PianSom

@The Black Cat
In case you haven't been following the Github conversation, this is the profile that predbat is suggesting for my AIO.

  battery_charge_power_curve:
    100 : 0.19
    99 : 0.19
    98 : 0.19
    97 : 0.45
    96 : 0.57
    95 : 0.57
    94 : 0.7
    93 : 0.82
    92 : 0.95

Be interested to see whether this is consistent among AIO users?

T
#269 The Black Cat

PianSom I've tried to get the automatic battery charge curve feature to work but I get the message "Note: Can not find battery charge curve, one of the required settings for predbat_status, soc_kw, battery_power and charge_rate do not have history, check apps.yaml".
I'm using REST, so commented that out and used the definitions for soc_kw, battery_power and charge_rate but no joy, so have gone back to REST.
If I look at these entities, soc_kw is set correctly, battery_power is setup by shows zero and charge_rate does not exist. The equivalent givtcp entities exist and are set correctly. Any suggestions on how to resolve this?

G
#270 geoffreycoan

The Black Cat I was using REST and had the same issue. Turns out you need to use the non-rest config for these 3 entities as the rest values don’t have the history that predbat requires to calculate the charge curve.
You only need to uncomment out the 3 entities, not swap the entire config over to non-rest

I’ve done this but for me I’m not getting the curve created either. At the moment Trefor is trying to debug why this is happening.

Strange that you don’t have battery power and charge rate, sounds like something spelt wrongly in apps.yaml?
Suggest you add your experience to my GitHub issue https://github.com/springfall2008/batpred/issues/666

#271 PianSom

The Black Cat
I switched ALL mine over to non-REST temporarily, and then it worked for me.

T
#272 The Black Cat

PianSom I tried that but still no joy. I don't know why the entity charge_rate has not been created.

#273 PianSom

The Black Cat
You have to look at the predbat logs to see the created schedule. Then paste it into apps.yaml

(A quick “cat logfile.txt | grep curve” gave the timestamp, then I just looked for that.)

No entity is created …

T
#274 The Black Cat

PianSom Yes, I've checked the logs, I still get "Note: Can not find battery charge curve, one of the required settings for predbat_status, soc_kw, battery_power and charge_rate do not have history, check apps.yaml" and if I check for the entity "charge_rate" under the "Devices and Services / Entities" section of HA, it doesn't exist. Don't worry about it, I'm using the figures I calculated before.

G
#275 geoffreycoan

The Black Cat I get

Find charge curve with sensors sensor.h_sd2237g395_soc_kwh and number.h_sd2237g395_battery_charge_rate and predbat.status and sensor.h_sd2237g395_battery_power

Find charge curve has 9.0 days of data, max days 9

then the same
Note: Can not find battery charge curve, one of the required settings for predbat_status, soc_kw, battery_power and charge_rate do not have history, check apps.yaml

To be clear, the entity isn't charge_rate, its sensor.givtcp<serial no>battery_charge_rate (my givtcp prefix is h so its different)

T
#276 The Black Cat

geoffreycoan Yes, that's exactly what I get:-

Find charge curve with sensors sensor.givtcp_xxx_soc_kwh and number.givtcp_xxx_battery_charge_rate and predbat.status and sensor.givtcp_xxx_battery_power
Find charge curve has 9.0 days of data, max days 9
Note: Can not find battery charge curve, one of the required settings for predbat_status, soc_kw, battery_power and charge_rate do not have history, check apps.yaml

(I've replaced my actual serial number with xxx)

R
#277 Rbor

Hi, I have survived a 1.5 days running PredBat and I am very impressed with the results. The PredBat Plan is hypnotic, even more so as it changes all the time.
My plan seems to charge overnight if there are low rates, then discharges during morning, charges pm and then discharges like crazy (it reduced my battery to 4% yesterday for several hours) until very late evening. The overall result is a reduced cost for me. I guess that it will settle down as it starts to see my real previous day settings (I was just grabbing any low Agile half hour rates before).

I am now trying to understand what all the controls do and I am trying to analyse the charts.
Can you look at my Battery Prediction Chart below. The 'base' doesn't seem to be showing up as expected from Trefor's video. I have filtered down the lines to show just the Actual, Base and Best.
Am I missing a setting somewhere, perhaps in the code for the chart (or elsewhere)?

Thanks for any help here.

Rob

G
#278 geoffreycoan

Rbor I deleted the dashboard with my predbat apex charts on it the other day, not realising there were still other tabs on it I needed. Doh.
So can't look at my own charts

but the 'base' will be whatever is already programmed into your inverter in terms of charge and discharge activities, so once you've started using predbat for a while I think it'll be the next charge and discharge that predbat has planned .... assuming you are within X hours of the charge/discharge window.
So pretty useless.
In summer when there's lots of solar it is a bit more useful as it shows how you battery soc will rise with solar and no predbat battery management

R
#279 Rbor

geoffreycoan I think I need some more historical data before my charts make sense. (1 day only!)

I am learning and understanding more every day. There are some key switches and settings, such as 'Best SOC keep', 'Battery loss charge', 'Battery loss discharge' and 'Inverter loss'. I am not the only person querying these.

I now need to settle down and see how PredBat works for me, an amazing piece of work.

Rob

R
#281 Rbor

geoffreycoan Had a read for your FAQ.
I am running on 4/4/4 with defaults of 0 and 0.1 on the 2 metrics.
My SOC keep is set at 0.5 for straight Agile.
It will be good to see how my plan works tomorrow as that will really be my first 'clean day' on PredBat. When I switched off the 'Read only' switch, my battery was virtually full from the previous night's charging. My batteries drop right down to 4% but I am using them. Tonight, the Plan aims to get me up to 100% by 6 am and the minimum projected is 14% (but who knows how much this could change .......)

We are all chasing that holy grail of 'optimum settings'.

Rob

R
#282 Rbor

A day in the life of Predbat.

At 6 am, SOC at 100%
At 10:15 pm, SOC at 4%, gearing up for the overnight charge.
Estimated total cost ~ £1.53 for the day (and this powers a heat pump as well).

Rob

P
#283 pacemaker

Wondering if anyone can help. I have Predbat installed, givtcp, octopus integrations, all seems to be OK and working together. PredBat is running in read only mode "Monitor" - I have a "plan" but the plan never seems to show when it would charge, all the "state" slots are white, with the plan effectively just showing me running from grid for the next 3 days.

Any ideas on what I should look for?

EDIT: Found an answer on the intelligent PredBat thread (thanks @geoffreycoan): Turn read only mode on, and set it to control charge and discharge.

Z
#285 Zakalwe

pacemaker

Also create a dashboard with the entities listed here to tweak it to suit your tariff:
https://springfall2008.github.io/batpred/configuration-guide/

**Note: There is an error here:

The correct item should be " input_number.predbat_metric_min_improvement "

The easiest way (if you are a noob like me) is to create a new dashboard (call it Predbat Controls), then click the three dots in the upper right and select "Edit Dashboard"

Click "+ Add Card"
Then select "By Entity"

Paste the item name in the "Search Entities" field.
Select the tickbox beside the entity name and then click "Continue". In most cases HA will select the best option for the item:

Then click "Add to Dashboard". Rinse and repeat to add the other configuration items.

G
#286 geoffreycoan

Zakalwe Thanks, I have corrected that now.

The whole ‘how to create a dashboard of predbat controls’ needs rewriting as it’s not very clear at the moment, needs more detail adding. Its on my list !

Z
#287 Zakalwe

geoffreycoan

Ahh...are you the author of the Predbat Documentation?

G
#288 geoffreycoan

Zakalwe No Trefor Southwell the author of Predat wrote the original documentation.
I’ve been progressively updating, correcting and expanding the Predbat documentation, particularly to help newer users.

I see it as a give-back to the community and to help Trefor out with what is such an amazingly useful piece of software

G
#289 geoffreycoan

pacemaker I've updated the install instructions in my fork of the predbat documentation to re-clarify what Monitor mode does and doesn't do, and the modes you need to set for predbat to plan your battery activity
https://github.com/gcoan/batpred/blob/main/docs/install.md#ready-to-light-the-touch-paper

Also in this fork is the typo corrections you spotted thanks @Zakalwe

I usually push through a Predbat documentation update about every couple of weeks. There was one earlier this week with better explanation of how days_previous work, a new FAQ on 'why is the charging and discharging not what I expect' https://springfall2008.github.io/batpred/faq/#the-plan-doesnt-charge-or-discharge-when-i-expect-it-to plus a load of other changes I can't even remember now!

Z
#290 Zakalwe

Top man!

At the risk of being a nuisance (when has that ever stopped me before!) and of turning this into a Predbat support thread, could I ask you to clarify these for numpties like me? I'm trying to configure the car charging section (on Intelligent Octopus, Tesla Model 3 LR, Andersen A2 charger)

Thanks again for the outstanding work you are doing here.

G
#291 geoffreycoan

Zakalwe from https://springfall2008.github.io/batpred/apps-yaml/#car-charging-integration

I'll edit the first line 'ensure intelligent slot' to make it clear that this should auto-populate from your octopus energy integration. Its really just the case to check the logfile to see that it did populate correctly.

On the SoC, I don't have an EV so I can only go by what is in the documentation ...

It doesn't look as if the octopus integration provides the car SoC and in apps.yaml it says

# If you have Intelligent Octopus the battery size and limit will be extracted from the Octopus Energy plugin directly.
# Set the car SOC% if you have it to give an accurate forecast of the cars battery levels.

So my guess is that its asking you to find the SoC from a charger entity in Home Assistant. Assuming your charger is visible to HA.

It does say "if you have it" (in apps.yaml) and "to have accurate results" (in the docs) so I'm guessing the SoC is optional, but preferrable to know when the car charging is going to turn off

Z
#292 Zakalwe

Thank you again.

D
#293 deanjesper

I’m confused with my Predbat plan which appears to change every few minutes.

At 11:30 it says that it will freeze discharge at 30.6p import and 15p export even though the PV kWh is showing as 0.37 and the Load kWh is showing as 0.5.

What am I missing? Why would I want to go on grid and not use my battery?

R
#294 Rbor

Hi
I am trying to set up PredBat for saving sessions.
The instructions for Energy rates state:

  • For Predbat to automatically manage Octopus saving sessions the following additional configuration item in apps.yaml is used. Like the electricity rates this is set in the apps.yaml template to a regular expression that should auto-discover the Octopus Energy integration.

I have checked my apps.yaml file and the saving entry are there, uncommented'.
But when I checked Octopus Energy entities, I see this:

The final instruction states:

  • If you do not want Predbat to automatically join Octopus saving sessions and manage your battery activity for the session, simply delete or comment out the octopus_saving_session entry in apps.yaml.

I am unsure quite what this means. I thought that PredBat took over my inverter. Should I switch to 'Read only' during a saving session (Rumours are that there will be one today, 2nd Feb, 5–6 pm).
I use saving sessions for exporting and normally switch off my heat pump during a saving session and have changed 'Load scaling for saving sessions' down from 1 to 0.4. Is this enough or too much? I usually export ~ 2-3 units in an hour and earn £6 for a 1 hour session (GE AC3 coupled inverter).

I have also just watched Trefor's saving sessions video and I think I have done the right thing.

Thanks

Rob

R
#295 Rbor

Following on from my last entry, I have just received a HA notification that PredBat has joined saving session today 5-6pm and the Octopus app confirms that I have opted in. So this stage works.

I will be reassured when battery is well charged and exporting works during the session.

Rob

P
#296 pacemaker

geoffreycoan I see it as a give-back to the community and to help Trefor out with what is such an amazingly useful piece of software

thanks for all your hard work. I found another issue in the docs:

https://springfall2008.github.io/batpred/what-does-predbat-do/#predbat-status

  • Freeze discharging - The battery is covering the load but charging is disabled, thus any solar generated will be exported.
  • Freeze charging - The current battery level is held and the grid/solar covers any load. Solar power will also be used to charge the battery.

The above is the wrong way round. Freeze Discharging stops the battery from discharging at all, grid/solar cover the house load.

Z
#297 Zakalwe

It's all very clever, to be honest.
Bottlecap dave's Octopus integration has automatically opted me into this afternoon's session. Predbat then picked it up, noticed the change in the amounts for export and has set the batteries to discharge in that period.

P
#298 pacemaker

I have the same opt in, loving it - however I cannot for the life of me find an entity or sensor that confirms that I am signed up to it. I can see on the octopus website I am, and got a notification from PredBat that I was too. Would have thought there would be some flag somewhere ... any ideas?

A
#299 Arg0t

pacemaker
Attribute of the Octopus Energy Integration

binary_sensor.octopus_energy_*********_octoplus_saving_sessions

P
#300 pacemaker

pacemaker

Ignore this, it is right. I had confused myself.

R
#301 Rbor

Same for me with being automatic signing up and before the saving session had been advertised.

The 190 entry looks like '£1.75' per unit for saving session and '15 p' per unit for 'normal export'.
And the final cost columns get filled automatically.
The only thing that PredBat doesn't do for me is to turn off my heat pump for an hour.

What an amazing piece of software Trefor has developed, together with Geoffrey's input with documentation.
I haven't tried car charging yet but 1st PredBat saving session for me is enough excitement for the day.

Rob

R
#302 Rbor

Arg0t Where can I find this attribute? Back in post 289, I have shown screenshots of this entity in my HA and I can't get any information from it.
Thanks
Rob

Z
#303 Zakalwe

Rbor

Go to Settings>Devices & Service>Octopus Energy. Click on Entities. Put "octoplus_saving_sessions" into the search field and click on the entity. In the pop up window click on Attributes

P
#304 pacemaker

started to build a custom card for my dash, PredBat is so far awesome but very techie, so its helping me get to grips with what's going on:

Z
#305 Zakalwe

@geoffreycoan

What's the best way to contact you to highlight anything that I spot?

Under Configuration Guide:

should read "switch.predbat_inverter_hybrid"

R
#306 Rbor

Zakalwe Thanks.
I have found the attribute and mine is identical to yours.
Another Predbat mystery solved.

Rob

D
#307 deanjesper

In the GivEnergy’s portal I’ve got my battery set to charge at 60% power - is there anywhere in Predbat I can tell it this as it currently is taking the charge rate of 6kWh which is a different setting?

D
#309 deanjesper

SJB thanks! I got confused as there’s a section that uses the GivTCP sensor and couldn’t find that

G
#310 geoffreycoan

Zakalwe done. There were actually 4 missing predbat_ prefixes in that block of text!
And it was one of the documentation pages I had already gone through, so no excuses, sorry.

You can ping me on here, or drop me an email/text or whatsapp message. My mobile is 07720 805620.

pacemaker thanks for all your hard work. I found another issue in the docs:

https://springfall2008.github.io/batpred/what-does-predbat-do/#predbat-status

Freeze discharging - The battery is covering the load but charging is disabled, thus any solar generated will be exported.
Freeze charging - The current battery level is held and the grid/solar covers any load. Solar power will also be used to charge the battery.

The above is the wrong way round. Freeze Discharging stops the battery from discharging at all, grid/solar cover the house load.

It does sound like it might not be correct, but on things like this I have to defer to Trefor (who wrote this text originally). I raised a github issue https://github.com/springfall2008/batpred/issues/689

Rbor Hi
I am trying to set up PredBat for saving sessions.
...
But when I checked Octopus Energy entities, I see this:

As you discovered Predbat should manage the saving session entirely automatically, joining the session, sending an alert to say you've joined, and then changing the import and export rates for the session so that it exports during the session and ensuring you have enough battery charge before the session as well.

The message from HA about the saving session entity not being provided by the integration any more, I can only guess that this is because there has been a gap since the last saving session and the data in this entity had 'expired'. Do you get this error any more? Your following messages indicate it all worked OK.

I think that's all the questions from earlier today, 18 messages in total ! I too have to turn my heat pump off manually. Integrating it to HA is on my future to-do project list, but needs physical modbus wiring so is not something I'm prioritising !

The saving session worked perfectly for me as well, input_number.predbat_load_scaling_saving is very useful new feature that Trefor introduced following my feedback on the last saving session where my inverter went into Eco mode not force discharging. I set the scaling to 0.1 and Predbat did the full force discharge. Result !

D
#311 deanjesper

Saving session was a success thanks to Predbat!

G
#312 geoffreycoan

Zakalwe I've updated the documentation for Octopus intelligent car charging to clarify the point about octopus_intelligent_slot and car_charging_soc

https://github.com/gcoan/batpred/blob/main/docs/car-charge-planning.md

Did you manage to find a car soc sensor in HA you could use?

deanjesper I’m confused with my Predbat plan which appears to change every few minutes.

At 11:30 it says that it will freeze discharge at 30.6p import and 15p export even though the PV kWh is showing as 0.37 and the Load kWh is showing as 0.5.

What am I missing? Why would I want to go on grid and not use my battery?

Predbat runs every 5 minutes and re-evaluates the plan every 10 minutes (by default). Sometimes if its finely balanced between charging and not the plan can appear to flip flop. If you've got some screen shots or a logfile it may be better to raise a github issue for Trefor to look at.

The Freeze statii are perhaps a bit confusing, but per the documentation:

Freeze discharging - The battery is covering the load but charging is disabled, thus any solar generated will be exported.

So Predbat is letting your battery cover the load, not grid importing. Its just not letting the battery charge any further so if there is excess solar it will be exported, and if house load is > PV then the battery soc will decrease as the battery supplies the house.

D
#313 deanjesper

geoffreycoan ah that makes sense! I thought it meant that all discharging was frozen

Z
#314 Zakalwe

geoffreycoan so no excuses, sorry.

You can ping me on here, or drop me an email/text or whatsapp message. My mobile is XXXXXXXX.

Dont be daft. it's a tremendous amount of work and a few proff-reading errors are to be expected.

Might be worth obscuring your moby number...it might get scrapped by a bot and spammed to death?

R
#315 Rbor

geoffreycoan Geoffrey, I cannot believe how smoothly saving sessions work in PredBat. I set input_number.predbat_load_scaling_saving at 0.4 and I seem to have exported as much as I can.
It is all an experiment but next time, I will try 0.1, as you have done.

I started to install PredBat less that a week ago, I have watched all the videos at least once and have gone through all the documentation (more than once). What seemed an unnavigable maze is making sense and I am now questioning how I might best tweak the system. I can also find my way around HA properly for the first time.

One further question!
In the Predbat Plan, Export mode with debug exposes the true loss rates based on our settings. Do the 'Cost' amounts in the right-hand columns take into account these losses or are they based on costs without losses? I can't find this anywhere in the videos or documentation.

And a final congratulatory comment on the Trefor's fantastic software that makes up PredBat and your contributions to the documentation. I hope that I will be able to suggest improvements myself as my understanding improves. After less than a week, I cannot imagine life without PredBat!

Rob

G
#316 geoffreycoan

Great success. Yes it does teach you to learn lots about Home Assistant which is a rabbit hole in its own right.
Predbat is the main thing I am using HA for by far, I do have a few temperature sensors and automations for lights and heaters in smart plugs, but 99% its Predbat.

Rbor In the Predbat Plan, Export mode with debug exposes the true loss rates based on our settings. Do the 'Cost' amounts in the right-hand columns take into account these losses or are they based on costs without losses? I can't find this anywhere in the videos or documentation.

The costs in the right hand columns of the plan are the (estimated) true import and export costs you incur (including the daily standing charge if you have left that to default from the octopus integration - I deleted this line in my apps.yaml as I wanted to just focus on consumption costs)
The left hand columns give the "effective cost rate", i.e. what you would be paying once losses are taken into account per this FAQ https://springfall2008.github.io/batpred/faq/#the-plan-doesnt-charge-or-discharge-when-i-expect-it-to

G
#317 geoffreycoan

pacemaker thanks for all your hard work. I found another issue in the docs:

https://springfall2008.github.io/batpred/what-does-predbat-do/#predbat-status

  • Freeze discharging - The battery is covering the load but charging is disabled, thus any solar generated will be exported.
  • Freeze charging - The current battery level is held and the grid/solar covers any load. Solar power will also be used to charge the battery.

The above is the wrong way round. Freeze Discharging stops the battery from discharging at all, grid/solar cover the house load.

I raised a github query with Trefor and he confirmed that the documentation is actually correct, but the modes are perhaps a bit confusingly named.

I've updated the Predbat documentation to describe better how the two freeze modes work. Draft here: https://github.com/gcoan/batpred/blob/main/docs/what-does-predbat-do.md#predbat-status

geoffreycoan The costs in the right hand columns of the plan are the (estimated) true import and export costs you incur

@Rbor
PS: I have added explanation this to the documentation (draft here: https://github.com/gcoan/batpred/blob/main/docs/predbat-plan-card.md#understanding-the-predbat-plan) and also about the standing charge being included in the Total

P
#318 pacemaker

geoffreycoan I raised a github query with Trefor and he confirmed that the documentation is actually correct, but the modes are perhaps a bit confusingly named.

Thanks a lot @geoffreycoan - this is the most confusing one:

Hold charging - A type of charge where the target SOC % is the same as the current SOC %, effectively the same as a charge freeze (but without being explicitly selected).

No matter how hard I think about it, I cannot understand why Pred chooses Hold vs Freeze if they are effectively the same thing. Would love a better description of that one, which describes the outcome it achieves that is different between Hold Vs Freeze

P
#319 pacemaker

I am trying to understand why PredBat thinks that these kind of slots are red (not good import/charge slots). I understand it's basing it on the average import cost, but should it not also consider the export price? It seems that slots like this would at least be yellow.

Have tried playing with the low rate threshold, (values 0-1.5) and it hasn't made a difference. Maybe just misunderstanding.

W
#320 Wavy Davy

I have been checking my days previous settings and have the following settings in apps.yaml
days_previous:

  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 14

However after reading geoffs new write up re this he says that the /homeassistant/configuration.yaml is normally set to 10 days mine is set to
recorder:
purge_keep_days: 365
this seems excessive.
I 'm sure I haven't set this, so should I change this, and if so what to? I think it would be 14.
hard disc space isn't an issue as I have a 16gb ssd and ha is showing 10% used.

G
#321 geoffreycoan

pacemaker Hold charging - A type of charge where the target SOC % is the same as the current SOC %, effectively the same as a charge freeze (but without being explicitly selected).

No matter how hard I think about it, I cannot understand why Pred chooses Hold vs Freeze if they are effectively the same thing. Would love a better description of that one, which describes the outcome it achieves that is different between Hold Vs Freeze

Yes I find hold vs freeze charge confusing as well. TBH I just let it be. Trefor seems to understand the subtleties of the distinction and I left it at that !

pacemaker I am trying to understand why PredBat thinks that these kind of slots are red (not good import/charge slots). I understand it's basing it on the average import cost

By the time you include battery & inverter losses (try turning HTML debug mode on) I suspect many of these will be unprofitable. Do you have a battery metric set?
If you look at the explanation of the html predbat plan, https://springfall2008.github.io/batpred/predbat-plan-card/#understanding-the-predbat-plan I wrote this by going through the code to see how it actually worked as the colour coding wasn’t clear to me either.

I have noticed that Predbat has a tendency to not exhaustively try to achieve every charge and discharge profit. Maybe there’s a limit to the number of forward slots it plans and focuses on the most profitable because if I look at the period after the peak for me tonight:

Then 19:30 would be profitable to charge and export, but yet it doesn’t plan to do so even though it is coloured green. 20:30 and 21:30 where the rates are lower it does plan to charge up in. I’m not getting fussed about things like this as yes I want to make profit out of the battery but I’m not so desperate to chase every single pence of charge/discharge and battery cycling. The broad plan I am absolutely happy with and indeed most of the detailed plan as well, just not chasing it to the ends of the earth

G
#322 geoffreycoan

Wavy Davy recorder:
purge_keep_days: 365
this seems excessive.
I 'm sure I haven't set this, so should I change this, and if so what to? I think it would be 14.

Yes that is excessive.

I watched the HA launch video for when they brought in the new history statistics summarisation features in HA and the authors of HA are now recommending you set history to only a few days.

There’s two types of history now, full history which holds every single change in entity state, and they could be sampled very frequently. So for example all the GivTCP sensors are populated every 10-30 seconds depending on your poll frequency and you are getting all those instantaneous power import, export, battery level, etc, etc held for 365 days.
After the ‘full history’ period HA summarises the entity history, capturing a value every 10 minutes so you get 6 samples an hour x 24 hours a day - this is held indefinitely but is much lower data volumes

(That’s my understanding of how it works in HA)

W
#323 Wavy Davy

geoffreycoan Thanks Geoff, Think I'll set it to 16 days, as this will then cover my 14 days look back period.

G
#324 geoffreycoan

Wavy Davy I just checked and mine is set to 14 days as well.

You might want to step the history down progressively over a series of days so the overnight purge routine doesn’t have to delete months of data in one go.

#325 PianSom

I moved mine to 22 days a week or so back, only so I can make sure of having 3 weeks of data for Predbat. But now I am wondering whether "full history" is actually needed ...

(I run HA on Docker on a NUC, so no real issues with resources.)

T
#326 The Black Cat

PianSom I've been looking at the battery scaling for the AIO with respect to it being reported at 15.96 by GivTCP but the "usable" value being 13.58. You said to change metric_battery_value_scaling to 0.85 (13.58/15.96) in this github discussion.
I couldn't see much difference when I set this. However, when i changed the battery_scaling value in apps.yaml from 1.0 to 0.85 instead, all my graphs re-drew themselves showing 13.58 as the the top line and the current actual kWh shown reflected the SOC% based on 13.58, which seemed to be what I would expect from the scaling down of the battery capacity. What is the correct way to use these two options?

#327 PianSom

The Black Cat
It was actually Trefor (the dev of Predbat), not me, who said to move the battery scaling down to 0.85. I then (wrongly) suggested the way to do this was by changing metric_battery_value_scaling, I was corrected by him (perhaps on anther thread??) and told to edit apps.yaml as you say.

So I believe you are now in the correct place.

T
#328 The Black Cat

PianSom Thanks, that's good to know.

A
#329 Arg0t

geoffreycoan

You are correct that 365 historic is excessive for Predbat but recorder is not just used for predbat. The integrations are not always stable with entity naming, I've experienced numerous changes that break history and also have my own adventures with integration changes that result in continuity issues with history. I want my energy dashboard to be correct and contain the history since the solar install, including the costs.
Having the DB with a long history enabled a switch from givenergy-local to GIVtcp, updating on the DB level the history to move it to the givTCP entities, when bottlecap dave changed his approach on storing price history, I was shielded by the hiccup with renaming that took place through that change.

Having this at 365 days in a postgres SQL, with an 800+ entity, HA environment costs about 25Gb a year in storage and some compute. I have ample compute and storage for it not to matter and it's fun to learn about postgres with a reasonably sized DB 😃

A
#330 Arg0t

PianSom

I use 4 weeks with some weighting to prefer the corresponding weekday for previous weeks.
My logic is our routine is fairly consistent week to week but not day to day, and we have no ASHP so the base load is not excessive. When using 2-8, 14, 21, 28, with an equal weighting of 1, the plan was overestimating the load, the weekly activity of kids being home on weekends, cooking the Sunday roast were raising the daytime numbers through the week.
Still keep the previous days in the plan to have some consideration/reaction if the routine changes, eg upcoming half term holidays.

  days_previous:
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 14
    - 21
    - 28
  days_previous_weight:
    - 0.5
    - 0.5
    - 0.5
    - 0.5
    - 0.5
    - 1.0
    - 0.5
    - 0.9
    - 0.9
    - 0.9
D
#331 deanjesper

SJB

So I set inverter_charge_limit and it decided to update my charge limit to 3630 as per the setting but I don’t want it to do that. I’ve set the battery to charge at 60% power in the GivEnergy portal which is different from the other setting. Is there a way to let Predbat know I only want to charge at 3630w but without it controlling it?

S
#332 SJB

deanjesper So I set inverter_charge_limit and it decided to update my charge limit to 3630 as per the setting but I don’t want it to do that.

I'm not sure want you want to do then.

deanjesper I’ve set the battery to charge at 60% power in the GivEnergy portal which is different from the other setting.

If you are using Predbat to control your charging then whatever you put in the portal will be ignored and indeed anything that Predbat does won't show in the portal settings.

deanjesper Is there a way to let Predbat know I only want to charge at 3630w but without it controlling it?

I don't think so. Looking at the code it will charge either at the maximum charge rate, or the lowest charge rate to meet the charging target.
Predbat takes the charge rate from the inverter's maximum charge rate. This can be overridden by setting the inverter_charge_limit - this becomes the new maximum charge rate. The only other option I can see for varying the charge rate is switch.predbat_set_charge_low_power - which allows the charge rate to be the lowest necessary to meet the charging target.
Predbat also sets the charge rate to 0 in certain circumstances which is probably why it sets the charge rate when starting a charging slot and of course it would be good practice to set the charge rate in case some outside force is giving instructions as well.

Maybe someone else knows of something I haven't spotted (I'm not a Python programmer or a long term Predbat user), or you can contact Trefor via github for advice.

D
#333 deanjesper

SJB cool thanks for your help. I’m tempted to set the battery charge power to 100% to maximise the potential (I had it set to 60% because I heard it’s better on the battery to charge slower).

G
#334 geoffreycoan

SJB deanjesper Is there a way to let Predbat know I only want to charge at 3630w but without it controlling it?

I'm not sure what you mean about "without it controlling it", but if you want to set the rate predbat will charge the battery at, use inverter_limit_charge in apps.yaml:

inverter_limit_charge and inverter_limit_discharge - One per inverter (optional). When set in watts, overrides the maximum charge/discharge rate settings used when controlling the inverter. This can be used if you need to cap your inverter battery rate (e.g. charge overnight at a slower rate to reduce inverter/battery heating) as Predbat will normally configure all timed charges or discharges to be at the inverter's maximum rate.

As @SJB says, if predbat is managing battery charging it will instruct the inverter to charge at a specified rate (default to max inverter rate) or zero (when holding charge). Anything you put in the GE portal will be overwritten by Predbat so you need to tell Predbat (via apps.yaml) to charge at the lower rate

G
#335 geoffreycoan

Arg0t My point was 365 historic is excessive for HA not just for Predbat.

Appreciate your rationale for keeping all the full depth history data and for moving it to PostresSQL, my return POV is:

  • the authors of Home Assistant recommend you don't need to keep much full depth history any more, the long term statistics (which is still history, just summarised) meets the needs in a much more efficient way. I think it was Frenk who said he was running with just 3 days full recorder history
  • different databases are of course still supported in HA, but the advice was that if you do do that (PostgreSQL, Maria DB, etc), you're on your own and have to be your own DBA
  • as I said I had my HA db corrupt itself, I think in part due to the length of history I had (30 days) and in the end was unable to recover a stable HA that would run for more than a couple of days without deciding the db was corrupted

So for me I'm keeping it simple and vanilla.

Personally I'd love to have better tools in HA to manipulate the energy history, recover my old data, load in manual spreadsheet data, fix issues when I got the energy tariff wrong and my costs got loaded incorrectly, etc, etc. But none of this exists today. I've looked for solutions but not found anything. My SQL is rusty and I never wanted to be a DBA when I worked in IT so no intentions of starting now!

#336 PianSom

Arg0t
Thanks. Mine is very similar now.

One thought occurs to me - my load is dramatically altered by both Saving Sessions and Power-ups. These are both “known” to predbat, and so could theoretically be ignored in a future load projection. Have you had any conversation with Trefor about this @geoffreycoan ?

G
#337 geoffreycoan

PianSom At the moment you can predict the changed load profile for both future power up events and saving sessions so predbat takes this into account for future battery activity planning, but there's nothing at the moment to adjust the historical forecast.

days_previous and days_previous_weight are both blunt instruments, affecting a whole day's history, there's nothing more granular. I suppose in theory Predbat could use historical import rate over-rides and past saving session dates/times and use these to alter the future plan, it would mean marrying up the actual dates from those histories with the 'N days' history that predbat normally works on. Similar to the logic that must exist for future price overrides only in reverse

How do-able, I don't know. Potentially put an enhancement request in for it, but to be honest I am happy enough with just having enough days_previous for it to get lost in the averaging process and switch.predbat_load_filter_modal turned on to ignore the lowest day's consumption.

If I look at my house load from 27th Jan its been 47kWh, 51 (power up day), 34, 45, 44 (power up), 50, 38 (saving session), 34 (yesterday) so there's no obvious correlation.
The within-day consumption is perhaps where knowing previous saving/power up event timings would be most useful as the load gets moved around with the different events, then we move the washing machine, dishwasher and tumble dryer times to suit the overnight/evening agile prices and for me I know my profile is altered significantly by the temperature outside with the ASHP consumption varying day to day, often being 60-75% of my usage.

So net, it'd be more accurate if Predbat modelled this but I don't know how much real benefit I'd see from it.

For those that didn't know, you can predict different future consumption in power up events with a load scaling factor in the apps.yaml import rate override:

rates_import_override:
    -  date: '2024-01-31'
       start: '20:00:00'
       end: '22:30:00'
       rate: 0
       load_scaling: 3.0

So saying I'll use 3x more energy

And for the saving session, its a HA control to specify the lower consumption:

input_number.predbat_load_scaling_saving

I have mine set to 0.1 so saying I'll use just 10%

#338 PianSom

geoffreycoan
I think I might just raise it as a suggestion for Trefor. But only if the coding was easy - I sort of agree with you that the game may not be worth the candle.

Looking at my consumption data I can't see an obvious correlation either.

geoffreycoan for me I know my profile is altered significantly by the temperature outside with the ASHP consumption varying day to day, often being 60-75% of my usage.

I wonder if you (and other ASHP owners) need to build yourself a little automation that shifts your load scaling depending on the weather forecast?

R
#339 Rbor

@geoffreycoan
I feel reasonably confident with using Predbat now but I hadn't looked at car charging properly before today.
I have found the documents heavy going. Trefor's video is very much focussed on Octopus Intelligent but I am a low mileage Agile user. I couldn't follow the part of the video about automations and I couldn't see anywhere where I could set up charging slots.
The docs state: "Use an automation based on binary_sensor.predbat_car_charging_slot to control when your car charges". Sadly, I have never really got to grips with automations and I am completely unsure how to do this!
A useful video could show how Predbat car charging could be set up for Agile, including the automations step.

For now, I will be scheduling using my Zappi app.
If I am not going to use Prebat for car charging for now, I presume that apps.yaml would contain:
car num_cars: 0

I also feel that the docs need more work to make the car charging instructions clearer as much of the information is about Intelligent Octopus car charging.

Thanks

Rob

G
#340 geoffreycoan

PianSom wonder if you (and other ASHP owners) need to build yourself a little automation that shifts your load scaling depending on the weather forecast?

At the moment I have my load_scaling set to 1.15 so if it’s already a cold day predbat will realise that I’m using more electricity than normal and plan accordingly.

For me personally the ASHP uses so much electricity that it’s a bit of a moot point. At the moment I only have a single 5.2 battery (long story, hopefully getting resolved soon, and I’ll tell all when once it is), but even when I do have more battery capacity my ASHP still swamps it in anything other than very mild weather.

Rbor I assume you have read https://github.com/gcoan/batpred/blob/main/docs/car-charge-planning.md and https://github.com/gcoan/batpred/blob/main/docs/apps-yaml.md#planned-car-charging

If you are not using Octopus intelligent then (second option in the car-charge-planning) Predbat will plan the car charging based upon the lowest rate agile slots, the car soc, what the Soc value you want the car to be at, etc. The first bit is to configure the different sensors in apps.yaml. The specific values for the sensors will depend very much on your own EV charger and car details so its not going to be easy to put 100% detailed instructions, but if other people have a Zappi I can include their details in the docs as a worked example.
Which sensors have you managed to configure and which are you stuck on?

The bit about the automation is saying that predbat will set turn the binary_sensor called predbat_car_charging_slot to True when Predbat wants your car to start charging. You need to write an automation that triggers on this being set to True and start the EV charging, and the reverse when predbat wants to stop car charging.

I can help you write the automation, but first, have you got your car charger configured in Home Assistant?

It looks like there is a HACS integration for the myenergi devices that you need to install and configure with your myenergi account details: https://github.com/CJNE/ha-myenergi

Until you want predbat to start planning your car charging, yes leave num_cars set to 0

D
#341 deanjesper

Are there any specific AIO tweaks I need to make for Predbat? I’ve noticed for the past two nights, my battery is empty at 10/10:30pm and I’m pulling from the grid. Ideally I’d like it to not pull from the grid until 11:30pm when the off-peak starts.

G
#342 geoffreycoan

deanjesper I don’t have an AIO so can’t give you a definitive list, but one thing I think you should do is set the battery scaling.

AIO’s incorrectly report the battery capacity as 15.9kW when they should be 13.5 (these numbers from memory so are probably wrong!)

In apps.,yaml:

# Battery scaling makes the battery smaller (e.g. 0.9) or bigger than its reported
  # If you have an 80% DoD battery that falsely reports it's kwh then set it to 0.8 to report the real figures
  battery_scaling: 0.85

Should scale what GivTCP returns to the correct battery size. This being wrong is probably why your battery runs out every night.

I’ll add this specific value to the docs

R
#344 Rbor

geoffreycoan Geoffrey,
I have read your docs (many times). I can find all the entities in devices and settings/entities and some in the expert choices.
However I cannot find a way to set some of these such as:
binary_sensor.predbat_car_charging
select.predbat_car_charging_plan_time

I can set select.predbat_car_charging_plan_time in the Expert control switches
I have no idea of how to set an automation based on binary_sensor.predbat_car_charging_slot to control when your car charges

In apps.yaml, I have uncommented the following settings and have set my battery size (just a mini).
car_charging_battery_size:
- 28
car_charging_limit:
- 're:number.tsunami_charge_limit'
car_charging_soc:
- 're:sensor.tsunami_battery'

I have no idea what tsunami means and I can't find this outside of apps.yaml. There is nothing in the docs.
I assume that car_charging_limit and car_charging_soc will be set at their defaults of 100% and 0% respectively?

Guidance on settings for the Zappi and an example automation would be useful.
I am floundering here.
I have had the myenergi integrations installed for ages but all the entities seem to be sensors.

I would really like to get this set up through Predbat but without some help am truly stuck.

Thanks. Rob

G
#345 geoffreycoan

Rbor However I cannot find a way to set some of these such as:
binary_sensor.predbat_car_charging

That is not something you set. Predbat sets this when it wants to instruct your car to start charging. Remember this is Predbat-led charging, Predbat will select the best slots and will instruct your car to start charging at the appropriate time.

We'll come back to the automation when we've got everything else working ...

Rbor car_charging_limit:
- 're:number.tsunami_charge_limit'
car_charging_soc:
- 're:sensor.tsunami_battery'

I have no idea what tsunami means and I can't find this outside of

In the apps.yaml that is supplied with Predbat there is a sample config, but almost certainly have to tailor for your settings. The Tsunami settings are samples presumably to point to a Tsunami brand of EV charger.
You need to change these two rows to the correct sensors for your EV charger.

There isn't a great deal of documentation for the myenergi integration to Home Assistant. It doesn't list the sensor names so you'll have to hunt through them to see if there is something suitable for these. If not then the charging will just have to do without them (they are optional).

It does say in the doc that there is a:

  • Charge mode selector that let you switch between Stopped, Fast, Eco and Eco+ charge modes

So that's going to be the basis of the automation you'll need. First though, plug the car in, find that control (it will I think be called something like select.myenergi_zappi_<id>)
See what the values for this selector are, and when you change it to something such as "Eco" does the car start charging, then stop when set to "Stopped" - this'll prove you have the car charger working correctly in Home assistant

Then for the automation, I can mock one up for you, but it'll be better if you learn how automations work yourself (loads of tutorials on youtube and the automations UI in HA is fairly easy to follow) - teach a man to fish and all that analogy...

The guts of it though is you'll need two automations:

  1. WHEN the entity binary_sensor.predbat_car_charging is set to the value True
    THEN select the entity myenergy_zappi_<id> to the value you need to start car charging

  2. WHEN the entity binary_sensor.predbat_car_charging is set to the value False
    THEN select the entity myenergy_zappi_<id> to the value you need to stop car charging

#346 PianSom

geoffreycoan find that control (it will I think be called something like select.myenergi_zappi_<id>)

Mine is select.myenergi_zappi_charge_mode and the choices are Fast, Eco, Eco+ and Stopped.

I am set up to use the Zappi integration (so the charging is controlled by the Zappi, not the car) and the instruction is to leave the setting in Eco+. See https://support.myenergi.com/hc/en-gb/articles/18470101583377-Zappi-Intelligent-Octopus for more details. In particular, see the note at the bottom of the table.

(Disclaimer - My EV is out of commission atm, so I have yet to grasp the Zappi/Predbat nettle.)

R
#347 Rbor

geoffreycoan
PianSom

Thanks for the advice. The Zappi is good for charging from solar or from grid. There are workarounds to prevent the Zappi from draining a battery made by others than myenergi. Setting up scheduling on a Zappi seems to be a workaround and I always wait until it is dark before I plug in. Myenergi claims to be able to select cheaper slots but this is only possible using their portal (not in their app). There isn't a public API like GE's givtcp.
PianSom Thanks for the Zappi link – another about Octopus Intelligent Go. I will have to investigate the myenergi help documents further. In the link, Myenergi advise against using a Zappi for OIG.
Being low mileage, I charge my car in quite an ad hoc way and I will probably continue to do so. Last night I topped up the car in my ad hoc way for an hour using negative Agile pricing, which was nice.

I do now know something about predbat car charging, a project I will return to again.
For now, I will do more work on automations. I have watched many Youtube videos but I couldn't follow some, especially the ones that wanted me to access a script as a Service, and others that wanted a long id number without telling me where to find this. There are also automation scripts in other threads in this forum.
I did find a simple Youtube video that taught me how write an automation to switch on a light at a chosen time – a numpty success for me! And my Predbattting has taught me so much about where everything is in HA.

I do have an ASHP (1st winter) and Geoffrey is correct that the heat pump eats energy. I have two 8.2 kWh batteries and, pre predbat, these will get me through the day (supplemented by a bit of solar) provided that my daily load is <20 kWh. I purchased a 2nd battery for the ASHP but using Flux or Cosy, I can't fill them enough. I then moved to Agile in mid January, discovered Predbat, and have never looked back. I do know that Agile can have its moments though!
I do question whether I needed a 2nd battery, especially seeing Predbat make great use of picking up slots form the grid (and outgoing rate settling on 15p a unit). There have beed so many changes in the past year and I wonder whether DFS will become much more mainstream and automatically set up by ESO, National Grid or even suppliers such as Octopus?

My thoughts are to go back to Flux once solar really ramps up and heat pump use reduces. Although, would I do better sticking with Agile? I have a few weeks in which to decide.

For now, I will continue to marvel at what PredBat does. In the last week, my total energy costs are < £1 a day (not including Standing Charges) with the last 2 days leaving me in profit. I ditched gas when my ASHP was installed.
One comment: I notice that Predbat uses the previous days rates before 4 pm in estimating its plan. This is probably a small matter as Predbat is adjusting its plan all the time. I wondered about using estimated rates based on Weather data, in the same way as used by the excellent Octopus Watch app?

Rob

R
#348 Rbor

geoffreycoan
I have looked at your automation suggestions:

WHEN the entity binary_sensor.predbat_car_charging is set to the value True
THEN select the entity myenergy_zappi
<id> to the value you need to start car charging

WHEN the entity binary_sensor.predbat_car_charging is set to the value False
THEN select the entity myenergy_zappi<id> to the value you need to stop car charging

I fell at the first hurdle because the entity binary_sensor.predbat_car_charging doesn't exist for me in HA entities.
There is: binary_sensor.predbat_car_charging_slot but this seems to want a time, not True

PianSom .
I have found your entity: select.myenergi_zappi_charge_mode. I don't see the options but guess that I type in Eco+ as the Attribute.

Enough for now! I should be able to do this and to get HA to save my automation without returning an error message.
I hate automations ...... and I need to look at some more YouTube videos.

Rob

D
#349 DD

Rbor In the link, Myenergi advise against using a Zappi for OIG.

Perhaps I'm missing some context? Where does Myenergi advise against using a Zappi for OIG ? Got me a bit worried!
Perhaps you mean the bit about not mixing OIG with Home Assistant ?

#350 PianSom

Rbor
Sorry - I overlooked your point about being on Agile!

If, in HA, you go Settings/Devices+Services, Integrations/Myenergi, X Devices/Zappi, then under Controls you should see this -

R
#351 Rbor

DD Sorry, you are right.
Advice seems to be not to use HA with Zappi on IOG.
I will crawl back to my hole ......

Rob

R
#352 Rbor

PianSom Thanks. I have found it under control and then added an automation from the devices and settings/Zappi screen.
I finished up with an 'And with' statement: Current myenergi zappi-20464051 Charge Mode selected option
and I was able to then select Eco+ from the 4 choices.
I also use the Zappi rather than car for taking charge of my car-charging.
So I have part of a car-charging automation.

Rob

P
#353 pacemaker

@geoffreycoan I've been scouring entities - does the plan exist anywhere other than the "plan in HTML" entity? I was hoping it would be an attribute somewhere, but theres so many....

G
#354 geoffreycoan

pacemaker @geoffreycoan I've been scouring entities - does the plan exist anywhere other than the "plan in HTML" entity? I was hoping it would be an attribute somewhere, but theres so many....

No the plan isn't really easily accessible other than the html version, which is why it got added based on customer feedback.
There are the Apex charts, the Energy Rates card, the Home Cost Prediction and the Home Battery Prediction are all the different bits that make up the predbat plan. Each of these are driven by predbat output entities - you can see the specific entities used in the 'series' part of each chart.
But (in my view) the charts are quite hard to decipher and you have to read across several charts to work out what predbat is planning, and so hence how the html plan came about as an easier way of visualising the future plan.

There are also some specific entities, e.g. 'predbat.best_charge_start' is the time of the next planned charge.
I have a little dashboard of the key things I am interested in

Rbor I fell at the first hurdle because the entity binary_sensor.predbat_car_charging doesn't exist for me in HA entities.
There is: binary_sensor.predbat_car_charging_slot but this seems to want a time, not True

Great that you are making progress with automations (and learning lots about HA!).

I mis-typed it, the binary sensor the docs say you need to use to control your car charging in the automation is binary_sensor_predbat_car_charging_slot https://springfall2008.github.io/batpred/car-charge-planning/

binary_sensors are just true/false things, they don't take a time. Maybe you were meaning select.predbat_car_charging_plan_time which is the 'what time you want the car ready by' (per the docs)

make sure you set num_cars to 1 in apps.yaml as otherwise lots of the car sensors don't appear in HA

R
#355 Rbor

geoffreycoan Geoffrey.
Thanks for all your help with using predbat for car_charging.

I am admitting defeat for the moment.
I have spent hours on setting up automations today and have made very little progress. I find the initial choice of the type of trigger, condition or action almost impenetrable.

I will now concentrate on getting better with the parts of predbat that I can work with.
I will revisit predbat car_charging at a later date ......

Rob

G
#356 geoffreycoan

Rbor
Automations can be complex in HA until you get your head around how they work.

Step by step, the start charging automation

Automations
Create Automation
Create new automation

First bit you need is to define when the automation will be activated. Lots of things can be a trigger (e.g. time, when its 5pm, every 10 minutes, when an entity value is greater than, etc)
For this one we want to trigger the automation when Predbat says that its time to start the car charging, i.e. when binary_sensor.predbat_car_charging_slot is set to On

So, under the When section
add trigger
you want a trigger when something happens to an Entity (in our case the value is set)

You can trigger on Entity having a numeric state, or (wheat we want) it having a State
should see this

type the name of the entity that will trigger the automation in the first box binary_sensor.predbat_car_charging_slot

then you can choose whether the automation is triggered on an attribute of the entity (not needed for us, we are triggering on state)
and whether the entity state is moving FROM something or going TO something

so we trigger on it going TO the value On

click in the To box and you should see a set of values, choose On

you can optionally say that you only want the automation to trigger after an entity has remained in that state for a period of time (the FOR), we don't need that

so the trigger should look like this

now its the THEN DO

add action
you want to change the SELECTor for the my_energy zappi control to Eco+

SELECT

SELECT (a specific option)

should look like this, the select command is chosen

chose what Entity is going to be selected, so click the green Choose Entity

and type the my_energi zappi sensor name, I don't have that integration to so I'll continue with one of my GivEnergy inverter controls, the one that changes the inverter mode (H <id> control mode)

you can change multiple entities at the same time, e.g. turn off a load of lights with a single command, but for now the one entity is enough

and type in the final box the value to want to set the Zappi mode to, I'll choose "Eco" to set my inverter to Eco mode:

and that's the automation done. save it, give it a name, and then try it out you can click the three dots at the top and Run to run the automation (i.e. pretend the trigger has occurred). If you've got it right your zappi should start charging the car

PS: I don't have an EV so all this is informed guesswork from the documentation as to how I think it will work

R
#357 Rbor

geoffreycoan I have set up this automation and I 'think' it works.
However, there are some workarounds.
As soon as I plug in my EV to the Zappi, the EV starts charging. In Eco+ mode, charging is solely from solar and none takes place if solar power is less than 1.4 kW. If I set up a scheduled charge overnight, I wait until there is < 1.4 kW (or it is dark) before plugging in to prevent the EV from charging. The Zappi charges by automatically switching to full power at my scheduled charging time, and for how long.

I think a predbat automation could work by doing the same (but not setting up the scheduling within the Zappi app.)
Then I would set the automation to run at my scheduled time by adding a time in the initial 'When' Trigger' region.
I would then set the charging option to switch to 'Fast' at that time.
I could then follow this with another automation that changes the charging mode to 'Stopped'.
I know there is a 'smart' predbat entity: switch.predbat_car_charging_plan_smart to pick out the lowest rates, which I could also incorporate.

I have tried plugging in my car and I have experimented with changing the charging mode in the automation – it works!

But .... I can set this up using the Zappi portal anyway, which may be easier (and safer for me!)

With your guidance, I have learnt a lot more about automations so I should have more in my HA knowledge base.
I presume that the input_number.predbat_car_charging_threshold setting of 6 kW prevents any fast car charging at 7.4 kW showing up in the historic home load.

Rob

P
#358 pacemaker

been impressed with predbat, until tonight. I dont know why its doing what its doing.

Its holding my battery at 100%, from now until 1500 tomorrow (I cut the image it just continues as is), so running from grid until then in the plan. It just charged it from 90% to 100% in the most expense slot (0.20p/kWh) rather than just waiting till middle of the night when its much cheaper... Losing a bit of faith here...

G
#359 geoffreycoan

pacemaker It would be useful to know what your inverter and battery charge/discharge losses are, and what the battery metric is.
If you turn the html debug on you can see the effect of the losses in the charge and discharge rates.

The agile rates are quite flat at the moment so it may well simply not be economic to let the house run off battery overnight (incurring the inverter loss, discharge loss and battery metric costs), only to then have to incur all these again for charge up for the peak period.

My own chart is quite similar, holds charge most of the night

R
#360 Rbor

pacemaker
geoffreycoan
I am a predbat 'expert' of 7 days standing and trying to understand how predbat works. Predbat is a wily beast and seems to hunt out any opportunity for making a profit. Before predbat, my policy was to hunt out the cheaper Agile rates and to import then. I hadn't contemplated that I might be making a loss overall because of inverter and battery losses. After 1 week, my view is that predbat is amazing and it can only get better with Trefor's expertise.
Until last night (Wed am) Agile's night-time import rates have been low and predbat's overall strategy has been to charge in the early hours, export in the morning, charge in the afternoon, export 4-7pm, get battery down to 4 kWh and replay the cycle for the next day.
But today, Agile import rates have increased and there is little difference between Agile import rates and Grid rates.
Agile rates are also different across different regions. Comparing yours to mine, my rates seem to be about 0.7 p lower. Your boundary line between import/export/hold will be closer than mine. As Geoffrey states, turn the HTML debug switch on and you will be able to see the predicted rates, taking into account losses.
For comparison, I have shown your snapshot of rates from 00.00 - 02:00 am Wed against mine (I have used Thurs which Predbat copies across before next day rates released). You can then see our different Agile importing rates and the effect of losses on my rates. I run with Agile import and Octopus 15 p export.

I have an AC coupled inverter and my losses will be greater than from a hybrid inverter because of the 'extra' conversion in storing solar (DC->AC->DC).
My predbat plan for today makes much less use of the battery than when Agile rates were lower, but my battery is used more than yours, presumably because of your higher Agile rates. You can compare Agile rates across regions on https://energy-stats.uk

I am sure that Geoffrey will put me right if any of my information here isn't up to the mark.

PS. Predbat seems to weigh up many variables when choosing import/export/hold. I think it weighs up its Import threshold values (e.g. input_number.predbat_rate_low_threshold (expert mode)? which I can't find anywhere. Must be Predbat's secret!

Rob

G
#361 geoffreycoan

Rbor that all looks correct Rob, it is super-important to get your own personal balance between charging and discharging with the different loss %'s and battery metric as this is the core of what is planned. Lots of people, myself included, when first starting with predbat have questions about the battery behaviour not matching what they expect it to be.
I recently added an FAQ to try to explain things in more detail
https://springfall2008.github.io/batpred/faq#the-plan-doesnt-charge-or-discharge-when-i-expect-it-to

Its not the entire story and I will at some point come back to expand on it further, there's metric min improvement that also sets a pence threshold as to whether its financially worth charging or discharging.

Rbor PS. Predbat seems to weigh up many variables when choosing import/export/hold. I think it weighs up its Import threshold values (e.g. input_number.predbat_rate_low_threshold (expert mode)? which I can't find anywhere.

It could well be that this is missed from the documentation. Predbat has grown organically and when new features have been added they've not always been documented in the 'obvious' place. Some were documented in multiple places as well. As I have been going through the documentation I've been trying to resolve this; for apps.yaml I went through and exhaustively made sure every config item was in the docs. I've still got to go through the template apps.yaml file and make sure it matches. I've yet to go through the Predbat configuration guide exhaustively, its partially done, but its a big document to do and other things get in the way! Do have all the predbat_ prefixes in the documentation now.
And of course Trefor keeps adding new features all the time...

And yes agree, the agile rates do vary around the country, Surprisingly so. My rates (South East region) for overnight this morning are pasted above and seem to be a touch higher than @Rbor and lower than @pacemaker

Predbat still doing an amazing job, At 12:00 today, imported 11, exported 8kWh, total cost so far today 15p. After a period of cheaper agile rates in the strong winds we seem to be back to more 'normal' prices of 40p in the evening peak, 12-15p overnight.
At least the solar is picking up, 8kW generated so far today

R
#362 Rbor

geoffreycoan Good to see that I haven't suggested any dodgy advice.
This thread is fascinating – it shows how many of us have got to grips with how predbat works over time. When I first contributed just 10 days ago, little of this made any sense. Now, I think I have a pretty good understanding of predbat although I still have a lot to learn.
Your documentation is extremely comprehensive and I have learnt so much by working through the .md documents, to say nothing for your willingness to help us all out in this thread with our issues.

In the predbat plan, I have noticed that some import slots are now shown in bold and I assume that these are the 'priority slots' for import (at least until predbat tweaks the plan, as it does every few minutes).
Is this a new feature that Trefor has slipped in? He must do this to keep you on your toes.
Predbat must sit there every day just before 4 pm, in anticipation of the new rates so that the next days plan can be redrafted.

Rob

G
#363 geoffreycoan

Rbor In the predbat plan, I have noticed that some import slots are now shown in bold and I assume that these are the 'priority slots' for import (at least until predbat tweaks the plan, as it does every few minutes).
Is this a new feature that Trefor has slipped in? He must do this to keep you on your toes.

I have a feeling that this has always been there, but when I wrote the documentation for understanding the html plan, I didn't mention it, so maybe it wasn't?
Anyway, I've just looked at the code to work out what the bold signifies, and it indicates whether there is some charging (or discharging) planned anywhere in the slot. Predbat actually plans on 5 minute sub-slots that are then rolled up to the 30 minute agile slots and if any of these sub-slots has charging (or discharging) the import (or export) rate is shown in bold.
I'll add it to the docs.

Thanks for the positive feedback on the docs, I'm not finished yet (and maybe Trefor will ensure I never quite do finish!), but if there are things not clear, please say so I can try to improve it.
Compared to some other HA addons/integrations, the documentation is comprehensive. I looked at the myenergi one and its very thin by comparison

R
#364 Rbor

geoffreycoan It has been a pleasure getting involved with predbat and I hope that I have progressed from someone who asks 'How do I do this?' to someone who can offer suggestions for improvements or gaps in documentation. The docs are great.

Rob

G
#365 geoffreycoan

Predbat's auto-joined me to the saving session and amended the plan.

Plan before the saving session came through, the battery would have been released earlier in the peak to support house load on the (slightly) higher rates:

Updated plan after joining the saving session. Keeps the charge to 17:30, then releases some charge to house load, then a force discharge for the hour's saving session. Note the reduced predicted house load in the s/s as well

#366 PianSom

geoffreycoan
Very curious - why has the predicted load changed (before, during AND after the s/s)?

In my - clearly erroneous! - mental model I thought the predicted load was simply a function of historic usage plus a few scaling factors.

G
#367 geoffreycoan

PianSom two things at play here:

input_number.predbat_load_scaling - scaling of the historical load based on consumption today.
Mine is set to 1.15, so modelling that if its a heavy consumption day already (its cold, the heat pump has been on all night and day so consumption is higher), its likely to be proportionally heavier consumption for the rest of the day

input_number.predbat_load_scaling_saving - scaling down of the consumption during the saving session. Mine is set to 0.1, modelling that during the saving session we'll shift load, turn off the heat pump, etc to reduce consumption so more of the discharge gets exported rather than house consumed

R
#368 Rbor

Interesting. I haven't touched these two load scaling settings and this is the plan that predbat produced for me after auto-joining me to the saving session:

I wonder whether predbat would have charged my battery up more from mid-am (mostly on hold) if the savings session had been finalised earlier in the day.

My load controls are set to the defaults:
input_number.predbat_load_scaling = 1.0
input_number.predbat_load_scaling_saving = 0.1
I switch my Heat Pump to 'standby' for saving sessions.

Rob

B
#369 Boffinboy

Hi All, I now have some little weigh scale icons on the plan next to the rates - any idea what they represent?!

R
#370 Rbor

In the predbat-plan-card.md document, it states:

Rate symbols (import and export)
.........
? ⚖ - Rate that has been estimated using future rate estimation data (e.g. Nordpool)
........
When in doubt, take a look in the documents. Geoffrey has most things covered.

Rob

G
#371 geoffreycoan

Rbor Thanks Rob

Yes, new feature, the plan now shows the source of future rates, either saving session over-ride, manual over-ride, nordpool market estimate, etc

Rbor I wonder whether predbat would have charged my battery up more from mid-am (mostly on hold) if the savings session had been finalised earlier in the day.

Your battery doesn't get exhausted by the end of the saving session Rob, and the saving session discharge rate is so much better than the surrounding rates it'd still be worth Predbat doing a charge now at 14.5p, or even at the start of the peak at 29p if it was financially worthwhile.

B
#372 Boffinboy

Rbor thanks. Had missed the new feature!

#373 PianSom

Oh, that’s (of course) clever. Predbat moves to a “Callibration” mode when you’re calibrating after a firmware update.

Didn’t have to move it to Monitor, after all.

G
#374 geoffreycoan

PianSom yes another new and useful feature.

I've added this to the FAQ's

#375 Hook

I put mine into read only mode. I had enough to manually export and for the rest of the night.

I couldn’t understand why it wanted to charge my battery as peak rate.

G
#376 geoffreycoan

Hook Hard to tell what was happening without the plan card with debug mode or knowing what your losses and thresholds were. Sometimes if your load today is much less than the historical load, Predbat can over-compensate.
Last night I had the reverse, normally with cooking our battery gets exhausted during the peak period so Predbat sets it to Eco mode to minimise grid import. Yesterday my wife was out at Beavers so we cooked much later and the battery was still at 40% at 18:15 so I set a forced discharge for the remainder to earn a few pennies on the better export rate.

R
#377 Rbor

geoffreycoan I am trying to learn more about predbat and this reply is questions!.

  1. In your reply you said that you set a forced discharge. I know that I could revert to read only for a time but would I then set up the forced discharge using the GE app?
    The customisation.md document has a section on Manual control which I have been reading. I can't find the select.predbat_manual_discharge selector (and the charge selector) anywhere. Can you help me here!

  2. I have also been trying to understand the meaning of all the 'freeze' alternatives that crop up in the stars column of the predbat plan. I think I am getting there (although a few minutes later, it has gone from my fading brain). Why is there 'freeze charging' and 'hold charging'? They all appear somewhere in my plan today.
    What about just 'hold' on its own, which I think I have seen?

  3. I have notify set and get loads of notifications. These often differ from what the plan shows. Which is more recent?

Sorry for all the questions today. Thanks for any help

Rob

G
#378 geoffreycoan

Rbor

Sorry for the delay in replying, life and other stuff ....

Answering your questions

Rbor In your reply you said that you set a forced discharge. I know that I could revert to read only for a time but would I then set up the forced discharge using the GE app?
The customisation.md document has a section on Manual control which I have been reading. I can't find the select.predbat_manual_discharge selector (and the charge selector) anywhere. Can you help me here!

The "old" way of overriding what Predbat was planning to do was to set predbat to read-only, then do a force discharge in the app or manipulating the appropriate givtcp controls (I have scripts to do the common things so I would just run the discharge script).
But as of Predbat release 7.15.0, about 3 weeks ago, Trefor introduced extra controls to allow you to tell Predbat to do a discharge, charge or idle in a slot.
In the integrations/entities list you should be able to see them:

If you don't hen you may just be on too old a version. I'm on 7.15.21

Rbor I have also been trying to understand the meaning of all the 'freeze' alternatives that crop up in the stars column of the predbat plan. I think I am getting there (although a few minutes later, it has gone from my fading brain). Why is there 'freeze charging' and 'hold charging'?

The different Predbat statii are described here https://springfall2008.github.io/batpred/what-does-predbat-do/
There are quite a few that sound similar and you are not the only one who finds all the different statii confusing, so do read the doc carefully. Hold charge and freeze charge are very similar, quite why there are two almost the same, I don't know.

Rbor I have notify set and get loads of notifications. These often differ from what the plan shows. Which is more recent?

Notifications. Phah. Predbat does generate loads. You should get a notification every time predbat changes state (to charging, to discharging, idle, etc), but sometimes you still get multiples when Predbat re-evaluates the plan (load, current soc, etc) eg: discharging to 20% then discharging to 15% then discharging to 12%.
In terms of the notifications not matching the plan, they should always match, BUT the plan is shown in 30 minute segments and Predbat actually plans in 5 minute slots so there can be occasions where the overall 30 minutes might be one thing but a 5 minutes something else.
There are two toggles for notifications, predbat_set_status_notify (notify on change of status) and predbat_set_inverter_notify (notify on inverter change). The latter is recommended to be off as it will generate many more notifications.
Good news is Trefor has made some changes to reduce notifications - but looking at my phone it still seems to be generating a lot so I have reopened it (bug #748)

#379 PianSom

geoffreycoan But as of Predbat release 7.15.0, about 3 weeks ago, Trefor introduced extra controls to allow you to tell Predbat to do a discharge, charge or idle in a slot.

@Rbor
This thread is now way out of control, but if you scroll up lots of pages you will find this post of mine with code to put the new controls on a dashboard

R
#380 Rbor

geoffreycoan I have checked and I have these entities installed. I am also on v7.15.11. I have set the switch "Predbat automatic update enable" to 'on' and I am picking up any updates.

In the integrations/entities list you should be able to see them:

Thanks, I have now found the selector for manual change and manual discharge. I thought this would be under that 'control' section of the vertical stack card. But it is within the entities list via Device and Settings.
I wonder whether this should to be made clear in the help doc.

There are two toggles for notifications, predbat_set_status_notify (notify on change of status) and predbat_set_inverter_notify (notify on inverter change). The latter is recommended to be off as it will generate many more notifications.
I have just predbat_set_status_notify on. I don't mind the notifications but there are a lot of them because predbat is at it all the time!

I think predbat is brilliant, especially with its constant weighing up about whether it is cheaper to discharge from the battery or use the grid – very selective.
Today, predbat used the grid for most of the time with SOC at 4%. Tomorrow the plan is getting the battery SOC well up. My old way was to charge up the battery and to then use it, taking care not to let SOC fall too much. And to hunt out the lowest Agile slots (very time consuming). I guess that most of us did this.
I now just let predbat get on with it but spend my time looking at the rapidly changing plan.

My big decision for the summer will be whether to stick with Agile or transfer to Flux which was brilliant for me last year.

Thanks for your continued support.

Rob

R
#381 Rbor

PianSom geoffreycoan Thanks. I have added this code to the dashboard and the options are all there now. Just need to ensure I don't inadvertently select one!
Isn't adding spaces to get everything aligned correctly in the code frustrating?

At least I am not the first to need help in finding these selectors.

Rob

G
#382 geoffreycoan

Rbor Expanding on how to add the predbat controls to a dashboard is on my to-do list. Its not covered in a great deal of detail. I used to have a custom dashboard for predbat controls but finally weaned myself off and am using the dynamic entities card (https://springfall2008.github.io/batpred/output-data/) which automatically generates the controls in sections for you. As I said, its not well explained at the moment.

Agreed once you get comfortable, you just leave Predbat to it. The agile rates this weekend weren't great at all, not really cheap overnight and much the same in the day. Very strange, you'd think weekend would be cheaper with less demand. Tomorrow evening is looking cheap again, hurrah.

Yes, big decision over Agile vs Flux. At the moment I am leaning to staying on agile, but haven't really done anything to model different options. My average daily consumption in Feb is about 40% down on January and I can see I've almost exported as much so far in February as I did in the whole of January!

#383 PianSom

geoffreycoan am using the dynamic entities card

Is this a possibility for us HA Core users? I can’t quite see how predbat could get the dynamic entity list into the HA container, but maybe I’m missing something

(I’m assuming that your predbat updates the dashboard automatically for new entities- is that correct?)

G
#384 geoffreycoan

PianSom s this a possibility for us HA Core users? I can’t quite see how predbat could get the dynamic entity list into the HA container, but maybe I’m missing something

It works the other way round; I don't see why it wouldn't work for all HA user types ...

Predbat publishes controls and output entities to HA where you can add them to dashboards, etc. The dynamic entities card is just a Lovelace card that does a wildcard select of matching entity names (e.g. prefix "switch.predbat_*") and presents them in a list on a standard HA dashboard.
There's a set of different selectors for switches, input numbers, etc, with each set being in collapsable folder-like structure in the Lovelace UI just so you don't immediately get a dashboard of 100 controls in a serial list.
e.g. this is opened at the input numbers with the switches set being collapsed

Since its all UI side manipulation in HA Lovelace it should be OK. Does need two pre-requisite additional Locelace HACS controls installing first.
As I said, needs a better explanation expanding out, on my list alongwith a more expansive description of accessing predbat controls which is all a bit skimmed over

#385 PianSom

geoffreycoan
Sorry - I obviously wasn't being clear.

When I started out, IIRC the default predbat dashboard entities yaml (which is created by predbat) was - in my instance - created inside the AppDaemon Docker container, and I had to copy it across to the HA Docker container. (Yes, I had to make sure the necessary Lovelace dependencies were in place for it to work.)

But what happens now if that dynamic dashboard file is updated eg because new Predbat entities come into existence? My suspicion is that in your case your dashboard can automatically update itself (because the new yaml can just overwrite the old one). Whereas I suspect mine will not. Am I correct in thinking that? I certainly have not had any automatic updates to my dashboard so far ... Does yours automatically update itself?

G
#386 geoffreycoan

PianSom But what happens now if that dynamic dashboard file is updated eg because new Predbat entities come into existence? My suspicion is that in your case your dashboard can automatically update itself (because the new yaml can just overwrite the old one). Whereas I suspect mine will not. Am I correct in thinking that? I certainly have not had any automatic updates to my dashboard so far ... Does yours automatically update itself?

It works slightly differently from the default predbat dashboard entities.yaml which holds a fixed list of all the entities that Predbat has. This is created each time predbat runs and if any new entities are created by predbat they’ll be written to the yaml file, but because you have HA and predbat running in different docker containers you have to copy the yaml file between containers each time.

The dynamic entities is not a fixed list of entities, its client side Lovelace code that builds the list of entities dynamically when it’s displayed on a Lovelace dashboard.

How easily this will automatically work for you or not depends on how the container architecture works. I’m assuming there is some form of communication already in place between the predbat appdaemon container and the HA container? Is that automatic that HA can see the predbat entities or do you have to do some sort of manual config for each and every entity that predbat creates?
I’m expecting that as long as HA knows about the predbat entities (regardless of whether you have to link them across containers somehow or its automatic), the dynamic card should still work as its just building a dashboard based on the entities that HA knows about

I
#387 Ivan

PianSom I think it should work for you as well.

If you look at the yaml for this dashboard card, it is written in a way to include all existing 'entities'. Commands are written in the format .......

EDIT - the "asterix * in the code in not displayed in the pasted text below"

filter:
include:
- entity_id: predbat."asterix"cost"asterix"
- entity_id: predbat.rate
- entity_id: predbat.metric

so that all future entities set up in the same naming format will automatically be included. I'm not familiar with Python but I can remember using the asterix in MS DOS commands as an 'include all' many years ago.

#388 PianSom

geoffreycoan @Ivan
Thanks for the replies. It looks to me as if your dashboards are NOT updated by Predbat (other than for the inclusion of new entities, by dint of the asterix wildcards, but only IF they match).

I say this because the screen shot of Geoffrey's above doesn't match the code of the current dynamic entities card (which is found here) (In fact, even the icons differ, oddly.)

In particular, Geoffrey has the three "Manual" select. entities which are not included in the template. select.predbat_manual* does not appear in Trefor's template and will not be caught by it. It does appear in the code fragment I posted above.

So I assume you added the three entries to your dashboard yourself, Geoffrey? (I did the same, I just put them in a collapsible card, as you will have seen.)

G
#389 geoffreycoan

PianSom Thanks for the replies. It looks to me as if your dashboards are NOT updated by Predbat (other than for the inclusion of new entities, by dint of the asterix wildcards, but only IF they match).

Yes it relies on the wildcard matches covering new entities, which pretty much they do do. Originally there was only one select for predbat, for car charging, but over time more have been added (manual overrides, save/restore settings, update version selector), and you’re right, the dynamic entities doesn’t cover these. When I get to it, I’ll fix this, but if you add a select.predbat_* pattern it’ll cover it for you.
Yes I added these selectors manually to mine

I
#390 Ivan

PianSom

I added the manual overides as a separate dropdown/collapsable section.

S
#391 Slartibartfast

Nice to see do do is back ...

P
#392 pacemaker

Interesting IOG experience today and wondering if this is normal.

I plugged my car in last night and was given a massive charge session (7.30pm thru to 8am) (it's new and was delivered with no charge). I had set it to 90% target in Octopus and I have a granny charger.. so worked out almost right...

By 06.30am this morning the car hit 90%, so I still had 3 half hour slots at the 7.5p rate, according to the PredBat plan, which I assume the octopus integration is telling it too. The predbat plan continued to run from grid until the planned 8am end.

However looking now at the octopus integration "completed dispatches" attribute in the intelligent dispatching sensor, I can see that the cheap half hour windows stopped at 6.30am, there are none recorded after that. So a few questions:

1) Seems ok behaviour for Octopus, they said they would give me till 8am, charged it to target early, so the extra 3 half hour slots were not charging, so they are not "completed dispatches" anymore, they were removed. Right?
2) Seems these dispatches that aren't "used" or no longer valid, won't disappear from their API until after the fact?
3) If so, should predbat consider the "is charging" sensor to ensure the plan is accurate and against the right cheap or expensive rate?If planned dispatch but not charging, then consider it an expensive rate? seems to make sense?

G
#393 geoffreycoan

pacemaker I don’t have IOG or an EV so my comments are based on what I understand from the documentation & code.

If Octopus says that you are being given charge slots from 7:30am to 8am, then that’s what Predbat uses to plan as low rate import, so will charge the battery etc - it gets all this data from the Octopus Energy integration. So if Octopus subsequently decide that a slot is no longer cheap rate (I don’t know if they can do this, but let’s assume they can), or if Octopus throw in an extra low rate slot, then these changes are picked up by the Octopus integration and Predbat updates the plan - all automatically.

How the completed despatches works, I can guess that they record when the car was charged as opposed to what the charging rate was, but that’s a guess and you still got them as low rate slots regardless of whether the car was charging or not. If somebody else on the forum knows, or it may be a question for Bottlecap Dave on the Octopus Energy integration GitHub.

P
#394 pacemaker

geoffreycoan

thanks - yeah that is the question - if the completed dispatches are just when the car charging was used. I'll ask on the octopus integration - thx

Z
#395 Zakalwe

You only get the off-peak rates in out-of-normal-times if the car is actively charging. The integration can sometime under/over estimate the car charging times as there are many variables, such as battery temperature.

If the system offers you out-of-normal cheap timeslots and the car completes charging early then those slots are charges at peak rates. Similarly, the system can give you time slots that can change with no notice. The system is designed to dynamically hit your requested SoC at the time requested. It may get there earlier than planned or by using different charging times. Regardless, it will still get you the requested SoC by the requested time.

G
#396 geoffreycoan

pacemaker I was just looking at the Octopus integration docs
https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/blob/develop/_docs/entities/intelligent.md

Has this warning:

If you are using this to drive other automations for cheap rates (e.g. to fill batteries), you should perform additional checks to make sure your vehicle is actually charging. If it isn't, this sensor could be incorrectly on if during a dispatch outside of the standard off peak period and you will therefore not receive the off peak rate.

If you are wanting to know when you are within a guaranteed off peak period, you should use the off peak sensor.

I think you’d better raise a question for Trefor on the Predbat GitHub. Looking at the Predbat docs https://springfall2008.github.io/batpred/car-charge-planning/ it covers how Predbat gets the despatching slots from the Octopus intelligent sensor, but doesn’t make any mention either way of what happens when the car charging stops and as Zakalwe says intelligent dispatching stops.
I’d have expect that Predbat takes care of this, noticing that the charging has stopped and its outside of the normal offpeak rate, but should get this clarified

P
#397 pacemaker

geoffreycoan

Yeah I think it's clear there needs to be a check on the predbat side, just not sure if that's happening.

I noticed there is a setting in app.yaml that would help this (and wasn't set for me today):

car_charging_now:

  • 're:switch.charger'

car_charging_now_response:

  • 'on'

I've enabled those now, but also waiting for Trefor to confirm if predbat is in fact checking for that in the IOG charging logic.

J
#398 Jellybaby

Been trying so hard to get this damn thing working before buying a thin client for permanent HA home but I just cant get it working, all the videos I see after setting up the yaml its not adding the info to overview and the card that displays prices and whatnot isn't working either, done the copy and paste job from the guide and it just says this.

I am literally doing fresh installs and following guides pausing and unpausing on two monitors and I just cant do it, spent over 3 hours today alone.

EDIT
I don't even have a log file for predbat

J
#400 Jellybaby

geoffreycoan I typed html but it didnt come up with the exact name but it came up with the same picture as shown here

So I downloaded it as instructed.

Overview didn't update with any predbat info after setting it up and saving changes and restarting home assistant, it didn't create the log file for predbat and there was no info in system log about any errors

Think I might just give up for good, I got no problem with givtcp, setting up octopus or solcast but this thing I just cannot get going and there is absolute no step by step video that I can find for the AIO, ive tried following 3 or 4 different video guides and I basically copy pasted the homeassistant install AFTER getting givetcp and octopus and whatnot set up before I attempted to try predbat so I can just copy and paste the backup version of the HA VM to try again.

This thread might be a lot more useful if the forum software it was based on wasnt complete TRASH and refuses to load the whole damn thread.

R
#401 Rbor

Jellybaby I am trying to remember how I set up the HACS cards.
I think I found an html card by searching in HACS/frontend. After doing this, the card showed up as:

From your screenshot, it looks to be the same card but check out by scrolling to the bottom of the custom cards in HACS/Frontend. The extras that you have installed will be at the bottom.
I added the card to a dashboard by selecting 'Manual' (the card didn't turn up in the list).
I then pasted in the code provided in the predbat documentation and saved:
https://springfall2008.github.io/batpred/predbat-plan-card/#displaying-the-predbat-plan.
This then worked.
Whenever I have got stuck, my first port of call is the documentation and the many helpful folk in this thread.

The predbat documentation is second to none. Predbat is a complex beast doing so many wonderful things. It did take me a long time setting it up but since then it has controlled my battery completely, saving me time and money.
I have learnt a lot about how it works and interfaces with HA.

So try this and see if it works. Best of luck.

Rob

G
#402 geoffreycoan

Jellybaby Don’t despair, I’m sure together the forum can sort you out.

It looks to me like you have installed the wrong custom component. I just looked and found that there’s “Lovelace html card” which has that picture:

And the card it installs is called html-card:

The card you want is “HTML Jinja2 Template card” which has the same picture!:

But the card name is “html-template-card”:

I’ve tried this card and it doesn’t work. I have also spotted an error in the installation documentation, the corrected steps to follow are:

  • In HACS, click on Frontend
  • Click in the Explore and download repositories (blue button bottom right corner) and type 'HTML'
  • Click on 'HTML Jinja2 Template card', then click blue 'Download' then ‘Download’ again to install it
  • When prompted to 'reload your browser', click 'Reload'

This is a Home Assistant front end component that displays the Predbat plan (once predbat is running) so there won’t be any Predbat logging of this.

I can’t tell from what you are saying whether you have got predbat installed and running or not, but follow the above and you’ll get this issue resolved and can then look if something else is wrong.

I will correct the install documentation error. Thanks for explaining what you found

#403 PianSom

Jellybaby
This is what my HACS/Frontend screen looks like. Note that I too initially downloaded the INCORRECT "Lovelace HTML card", and needed to install the CORRECT "HTML Jinja2 Template card". They both have the image that you posted associated with them. (In my defence, this was before Geoffrey's magnificent work on the docs!)

You will not have all these HACS Frontends necessarily.

G
#404 geoffreycoan

geoffreycoan I've updated the Predbat documentation to the correct set of steps for installing the Jinja2 template card, also added a specific highlight about not installing the similarly named "lovelace html card"
Draft updated doc here: https://github.com/gcoan/batpred/blob/main/docs/predbat-plan-card.md

Also added HACS install instructions for Apex charts as that was an easy copy paste. Writing a fuller documentation of setting up the Apex charts and the dynamic entity cards (which are custom repositories you need to add to HACS) is on the to-do list for another day. Not forgotten but will take me longer to do.

R
#405 Rbor

geoffreycoan I have just tried adding the HTML Ninja card to a blank dashboard and it worked straight away.
Is it worth adding something about having to use 'Manual' and then just pasting in the code from the predbat documentation? I remember stumbling at this stage, expecting to see the HTML Ninja card in the choices.
The other cards custom cards that I downloaded from the HACS/Frontend page all seem to show up in the card choice, but not the HTML Ninja card.

Jellybaby Please persevere with Predbat – it is worth the effort and, once set up, it seems to look after itself. There is plenty of help in this thread.
Remember that Predbat is an organic and evolving piece of software with improvements being made to the software and documentation all the time.

Rob

G
#406 geoffreycoan

Rbor Is it worth adding something about having to use 'Manual' and then just pasting in the code from the predbat documentation? I remember stumbling at this stage, expecting to see the HTML Ninja card in the choices.
The other cards custom cards that I downloaded from the HACS/Frontend page all seem to show up in the card choice, but not the HTML Ninja card.

Thanks Rob for the suggestion, I've added that to the plan card doc - same link as above.
Also expanded the Apex card doc a bit with similar copy/paste advice.

Strange that the Jinja card doesn't appear on the list, I hadn't noticed. Must be a bug, I'll raise it.

Now, got to get back to painting and looking at my lovely replacement 9.5kW battery that arrived this morning (at 7:50am,ugh)...

J
#407 Jellybaby

Rbor I am giving up for the moment, I have spent way over 10 hours over a few weeks trying to get it going, settings auto populate the overview section and if I could get it to pop up there I know id be making progress but ive gone through so many guides I feel like im just wasting my time.

I done everything in the official predbat guide and it didn't even create a log that I could check to see whats going on.

J
#408 Jellybaby

PianSom When I turn gaming PC on later (only thing I got that will run HA atm but 60-80w idle draw is a lot for just HA) ill check see what mine looks like.

J
#409 Jellybaby

geoffreycoan I did have predbat installed and configured and deleted the 2 lines it tells you to to get it working but nada, before I shut PC down for the night I overwrote the home assistant install to before installing predbat so I only have to do that, file editor and card thing again.

I love that I don't have to start fresh and that I could just copy/paste the home assistant VM to where I had givtcp and octopus stuff set up.

G
#410 geoffreycoan

Jellybaby No problem, let us know if and when you want to have another go installing Predbat.

I assume you are following the installation instructions at https://springfall2008.github.io/batpred/install/ and are using the ‘combined AppDaemon+predbat’ install route. I’ve tried to make the instructions as detailed as possible, but if you get stuck, do share what you see and we can try to help.

You don’t of course have to use Predbat if you don’t want to. For simple ‘charge the battery up overnight’, the GivEnergy app is more than adequate, or you can write your own Home Assistant automation scripts which is what I did before I started on Predbat. Unfortunately that’s not totally straightforward either, there’s usually several controls you have to set in the right sequence for a charge or discharge, but there’s other people’s scripts on other forum posts if you need inspiration.
Predbat is worth it if you stick with it, but the learning curve for Home Assistant, Predbat, GivTCP, etc is steep. We’ve all been there !

ATB

J
#412 Jellybaby

Now I cant find the config file and clicking the back button doesn't do anything

J
#414 Jellybaby

geoffreycoan

This is how it came

Edit
Just seen you said off, ill change it now

J
#415 Jellybaby

I had everything up and running and something was pending restart so I restarted home assistant and card wouldnt work still and when I went to check I saw that I had 2 lovelace items that didnt load properly so I had to redownload them, is this a common thing?

I guess this thing needs a few days of 24/7 reading I guess to get to grips with whats happening.

Where is the drop down for predbat operating status to make sure its read only?

G
#416 geoffreycoan

Jellybaby I saw that I had 2 lovelace items that didnt load properly so I had to redownload them, is this a common thing?

No it isn't. Sometimes the different controls of home assistant can take a few minutes to start up after a restart, but once installed they don't need re-installing (in my experience).

Jellybaby Where is the drop down for predbat operating status to make sure its read only?

Adding the different controls for Predbat is something that needs to be explained better in the docs https://springfall2008.github.io/batpred/output-data/

The easiest way to access individual controls is:

Settings / Devices and Services / Entities and that takes you to a full list of all your entities and controls in Home Assistant.

In the search box you can search for specific entries, e.g. 'predbat' or the one you need is 'predbat_mode' to set the mode of predbat and 'predbat_set_read_only' to set it to read only mode

You can click on any entity and change the value from the entities list

J
#417 Jellybaby

Time zone is fine for predbat its Europe/London and even if it wasn't I am not sure what the near 10 minute discrepancy is?

EDIT
think I found the problem, had to change the other one I had a look and it was set as
time_zone: Europe/Amsterdam

But that should have been more than 10 minutes?

Found the drop down as well

Although I got cars set to 0 so not sure why its got a car charge time in there set hehe

V
#418 Vestas

Jellybaby Either the clock on whatever you're using to run HA or the inverter's clock has drifted. You need to resync whichever one it is.

J
#419 Jellybaby

Vestas Both are 100% fine, after I made the adjustment in the "appdaemon" config from Europe/Amsterdam to Europe/London its been fine.

J
#420 Jellybaby

maybe its not sorted

Tiume now is 20:58

Not sure why its ok with it most of the time then suddenly out then back to fine?

G
#421 geoffreycoan

Jellybaby it looks like either the PC time (which is being reported as app daemon time) or the inverter time is wrong.

You can sync the inverter time in the givenergy portal.

It's a warning not a fatal error but it could cause problems when you start letting predbat control the inverter if the times are different

J
#422 Jellybaby

Both times are spot on though and if there was an issue wouldn't it be a constant one rather than only cropping up every 40 minutes give or take

I have the All-In-One, no EV car and no iboost, I have some inquiries on the following I saw these but I don't know if they ALL relate to vehicle charging or not.
Circle = Should I turn off
Underline = What should I do

G
#423 geoffreycoan

Jellybaby answering your questions:

I honestly don’t know why you are getting time synchronisation warnings. I’ve never seen it happen. If it keeps happening then probably need to raise a GitHub issue and provide the log file for Trefor to look at. Weird.

If num_cars is set to 0 in apps.yaml, the car settings car charging hold, octopus intelligent charging will be ignored, but might as well turn them off.
Ditto turn off iboost but it should be ignored if its not configured in apps.yaml
Of the others:

  • inverter hybrid should be off as you have an all in one which is an AC coupled inverter. This is used as part of the charging loss calculations as there will be an inverter loss converting DC to AC and back to DC when charging solar power
  • combine charge slots. Depends on what tariff you are on. This joins multiple charge slots together into one long charge slot. Safe to leave on
  • set discharge during charge. Do you have an export tariff? This setting, if the rates are favourable for both import and charge in the same 30 minute period (e.g. 11p import, 15p export), Predbat will charge and then discharge in the same 30 minute period. If you turn this off Predbat will only do one thing in a 30 minute period. As you are starting off, turn it off for now
  • set status notify, leave on, predbat will send an alert to any devices you have the Home Assistant companion app installed on (assuming you have this installed on say your phone as an easier way of controlling HA). The alerts will be sent when predbat changes mode, e.g. from Charging to Idle, to Discharging, etc

Getting there. Be aware that Monitor mode DOES NOT plan any charging or discharging, it just monitors your current load and solar charging. Once you get the hang of seeing what’s in the plan you’ll want to change the mode to something else (e.g. Charging and Discharging) and set read only to true to see what Predbat plans to do, but don;t let it make any inverter changes (which is what the read only setting does)

J
#424 Jellybaby

hhmmmm, the agile prices are working for the plan chart so not sure why its having trouble with standing charge

Appreciate teh info on the other items I inquired about, they have been changed.

G
#425 geoffreycoan

Jellybaby can you share the bit of apps.yaml for the standing charge.

Personally I set my standing charge to zero so I only model the consumption in predbat, but the standing charge should work ok

J
#426 Jellybaby

geoffreycoan ofc
Is this enough

EDIT
I think I may have sussed it out, I was on early last years agile tariff and today was the changeover to the December tariff and it went from 37 to 42p, I checked in HA and the one circled here said unknown I guess due to the switch over, its now registering as 42p so ill see what happens.

EDIT
Looking at energy dashboard the costs seem off, as I am on Agile what should I be setting for price tracking and what entity? Also when battery is being charge should charge energy be in the negative?

G
#428 geoffreycoan

Jellybaby yes sounds like the standing change might have been affected by the switchover day, it looks ok now.
The setup of price tracking in the energy dashboard when you’re on agile is a bit complex as the rates change every half hour, but as @PianSom says, the instructions (wot I worked out and wrote!) are on the octopus integration page

#429 PianSom

geoffreycoan
You wrote those docs too??!! You really are civic minded - thank you

R
#430 Rbor

Jellybaby
geoffreycoan
I started to look seriously at predbat in late January. I spent a lot of time (documents and repeated views of the supporting youtube videos), getting to learn what the system has to offer. On Jan 30th, I switched read only off and activated charging and discharging (as I am on the Octopus outgoing 15p export tariff and import Agile).
I also stumbled with the additional HACS cards that need to be installed but help was forthcoming from this thread.
The predbat documentation is a great source of information: [(https://springfall2008.github.io/batpred/)]
Within this documentation, the configuration guide shows several examples of main settings for different tariffs and use scenarios.
The configuration guide goes much deeper and is a good reference for all sorts of settings. At first, I found this overwhelming but as I have learnt more about predbat, this guide start to make sense.
There is a guide for car charging. I have an EV but I do low mileage on an an hoc basis (manually grabbing low rate slots). I haven't let predbat loose on my car charging and have num cars set to 0 in the main apps.yaml file. I will move over to predbat car charging later.
I also have a heat pump and no gas.
A can't stop looking at the predbat plan, I have made a few tweaks to my settings.
I just let predbat do its stuff. I trust predbat to do a far better job than me for reducing my energy costs.
I also really like being part of this innovative system, rather like a pioneer. It is really good spotting an issue, flagging it, and seeing improvements in the documentation as a result (courtesy of Geoffrey).

You seem to be doing well and are nearly there.

Rob

Z
#431 Zakalwe

I to started using Predbat a couple of weeks ago.

For info, I have a HAOS running on a Pi 400. I am not a coder and really do not use HA for much other than monitoring. I really struggle at times with HA as it is far from user friendly. My biggest struggle has been with getting stuff installed. All too often the creator says things which leaves the user on an endless trail trying to work out installing different integrations, trying to decipher different creators ways of explaining things and so on.

Add in to that that very often installing these things requires you to edit YAML files. Great, if you have a rudimentary understanding of coding. Less so if you don't. I am firmly in the latter camp and to be honest I have no interest in learning to code. The amount of time that I have wasted trying to make this stuff work is ridiculous. Especially when the problem was something daft such as having the wrong indent in YAML.

A case in example- many of these cards asks the user to insert a line into ui-lovelace.yaml. I cannot tell you how many hours I have wasted trying to find that file. Or how many forum threads I have read trying to find info on it. Nowhere have I seen it said that all you need to do is create a file, call it "ui-lovelace.yaml" and job jobbed.

Now I am sure that many HA users will be rolling their eyes and muttering "thicko" under their breath. I don't care. I just want to be able to install this, use it and get on with my life. I am glad that you are out there creating this stuff for free, but there has to be an understanding that most people do not want to spend their Friday evening dicking about with this stuff.

Case in point- creating the various charts in Predbat. The user has to install other integrations to make the charts work. Those integrations have their own dependencies. Installing them requires the user to do too much interpretation

Having had this little rant, I do want to shout out Geoffrey Coan for his help and the work he is doing to improve the documentation. And, of course, Trefor for creating Predbat in the first place. After a couple of weeks use I am now comfortable to let it do it's thing. This morning I switched off the inverter notifications as I am comfortable with how it works. It really is worth sticking with as it finally has given me a "killer app" for Home Assistant.

G
#432 geoffreycoan

Thanks guys for the kind comments. I too love the power that Predbat gives in controlling my battery efficiently and getting the most out of it, it truly is my only killer app for Home Assistant.
My days of coding are so far behind me and TBH I don’t have the time nor the inclination to want to be adding new features (although I have contributed a few tweaks here and there to the Predbat code). I just started out being happy to share my own knowledge and experience gained in trying to use it, and seeing that others were asking the same questions, started adding to and rewriting the documentation to make it clearer and unambiguous. It is a complicated product, there’s lots of moving parts and I don’t think it would be a good idea to get the instructions down to ‘click this, click that’ as when something goes wrong the user would be stuck as to what to do. Having said that I am trying to add much more detail as to where things are in HA, how to follow the install and config instructions, etc so that people don’t get too lost. Fortunately Trefor lets me!

Installing the charts is way too complex, so definitely an area I will be changing when I get to it. As is the whole output data stuff. I’ve not seen the “edit up-Lovelace.yaml” instruction myself, so if you can show me where it is @Zakalwe I will definitely add more detail of what needs to be done.
TBH I started off with the charts myself, got annoyed that they were hard to read so adjusted them all so I could read them vertically, then mashed some together to show more information on them; but now I never even look at the charts I just look at the predbat plan. I think the charts are too complex to easily understand.

Agree over YAML, it’s too easy to mis-edit it and screw up your installation. I’ll find a suitable ‘introduction to yaml’ video and link it into the install instructions 👍

Z
#433 Zakalwe

geoffreycoan I’ve not seen the “edit up-Lovelace.yaml” instruction myself, so if you can show me where it is @Zakalwe I will definitely add more detail of what needs to be done.

IIRC, it is needed as part of adding in some of the other integrations that predbat needed. For example, when installing Apex Charts

It's more of a general point about how HA is set up. You end up having to install further bits to get the bit that you actually want to work , to work. And then you are at the mercy of how well written the install instructions are.

There are integrations that I abandoned months ago that I now have only recently managed to get working. Mainly down to my growing understanding of the platform. Having said that, I also fear updating as at some point an update will bork something else (for example, I have a NS Panel which is configured by a Blueprint. A recent update meant that all of the previous configuration no longer works and the panel needs a compete new configuration inputting).

J
#434 Jellybaby

Apparently that issue I was having was due to having givtcp set at 5 minutes, my portal already refreshes at 1m instead of 5m so thought id set a longer one to reduce the amount of updates on portal since its for the past week or two already been like 4-5x slower than it used to be.

Also I really need to manually sort dashboards at some point all that setting up has just plastered everything on home page and it takes a good 10-20s to load up when I want to check things, I didn't skimp on processor or memory for the VM though.

G
#435 geoffreycoan

Zakalwe That’s not particularly expansive documentation is it, and it implies a strong knowledge of HA and the config files.

I know HA gets a lot more complex if you are doing manual installs of the integrations, i.e. not using HACS, or have things running in different docker containers. I don’t know if that is your case but its starting to get outside of the scope of the Predbat documentation.
I’m running HAOS as a virtual machine running on a Windows 10 PC. HACS is an integration to HA and AppDaemon and GivTCP are running as add-on’s within HAOS, so in reality are running as Docker containers, but its all managed by HAOS so there’s no difficult config to worry about.

For me I just installed Apex Charts from HACS and there wasn’t any config files to edit. I know there wasn’t any instructions for how to install Apex Charts in the Predbat docs nor how to add the charts to a dashboard - I’ve added these now in the draft doc update https://github.com/gcoan/batpred/blob/main/docs/creating-charts.md but will be expanding further how to add the charts.

Thanks

J
#436 Jellybaby

Damn, just checked windows task manager and HA tab takes 1gb of memory fresh Home view with all that stuff on the dashboard, no wonder it takes a while to load everything lol, the tab was nearly 2gb before I closed it and reopened it to see what it was like on fresh open.

T
#437 The Black Cat

I finally got my export meter set up this week, it only took 14 weeks, so I decided to let Predbat have a go at doing my first forced discharge at 4pm today. Predbat started the discharge as expected but it was exporting to the grid at 6kW. However, my G99 is limited to 3.68kW and I checked with my installer this week what prevents the AIO exporting at 6kW and he set the "Grid Export Limit" in the remote control portal to 3660. In the predbat apps.yaml file I've got export_limit set to 3680 and the Predbat plan showed an expected export rate of 3.68kW for the time period.

Is there anything else in Predbat I need to set to limit the export rate?

I suspect the problem lies outside of Predbat, where do I need to look to get the export limit set correctly?

Thanks.

G
#438 geoffreycoan

The Black Cat However, my G99 is limited to 3.68kW and I checked with my installer this week what prevents the AIO exporting at 6kW and he set the "Grid Export Limit" in the remote control portal to 3660. In the predbat apps.yaml file I've got export_limit set to 3680 and the Predbat plan showed an expected export rate of 3.68kW for the time period.

Is there anything else in Predbat I need to set to limit the export rate?

In terms of Predbat, setting export_limit will model as you’ve found the export limit imposed by your G99.
The only other setting you could make is inverter_limit_discharge
https://springfall2008.github.io/batpred/apps-yaml/#inverter-control-configurations
But that will limit all of your discharge to whatever value you set, so if your house is using 1kW then you’ll only be exporting 2.68kW so its a blunt instrument

AFAIK the export limit imposed by the G99 is set in the inverter config by the installer, it’s a config that is not user changeable.

However, the G99 limit is set by the DNO because they believe that’s the “most” that export that your local grid connection can accept. I thought 4kW was automatically approved so it’s pretty awful if they have imposed a limit less than that. That worst case export is presumably calculated when all the other houses on your transformer connection (which could be 50+ houses) that have solar or batteries are also exporting at full wack. And there is bound to be some contingency built in as the DNO won’t actually do a site visit and physically measure the resistance, cable and transformer sizing, etc, etc.
There is the “just leave it” option. Not that I would suggest that of course.

G
#439 geoffreycoan

Jellybaby Damn, just checked windows task manager and HA tab takes 1gb of memory fresh Home view with all that stuff on the dashboard

That is crazy big.

I’ve just looked at my task manager, the Home Assistant Oracle Virtual Box (VM) is consuming 3.5Gb memory and about 50% of my CPU. If I look at the VM config it’s actually set to a maximum of 6Gb.

Microsoft Edge browser, I have 30 tabs open at the moment, with perhaps 6 of them on Home Assistant.
In total the 30 tabs are taking 880Mb of memory and 2.5% CPU.
I clicked on a few of the HA windows and browsed around a bit to stop them idling, the memory usage went up to 1000Mb (now dropped back to 930Mb), but individually the largest windows are only taking 235Mb.

I think you said you were runnng HA on a gaming PC, so it should have enough grunt. Surprising that you are getting so much memory consumed when I am using so little

J
#440 Jellybaby

geoffreycoan I am using my 24/7 PC to view home assistant and it was just the individual instance of chrome that was that high and I had it on top so its never hidden and opened a new tab, default it hovers between 150-200mb then going to overview 1gb.

I got 4 cores assigned to it along with 4gb of memory I believe but I can't edit settings to check as its still running but this is a new singular opening of firefox and waiting for "Home" to load

I had brave browser open in single window only and going back and forth configuring and whatnot and when I looked last night it was nearly 4gb for the browser.

J
#441 Jellybaby

Now I seem to have things more or less sorted im going to power down the VM and wait until I secure a lower power hungry device to run it on, won't be getting a Pi so will be a thin client or mini pc I think.

Current VM is using 4GB Ram, 4 Cores and 32GB Space.

#442 Hook

Jellybaby I don’t think the actual vm uses that much resource.

Seems to be your browser that does. What happens if you access it on your mobile phone? Does the pc resource stay the same?

Z
#443 Zakalwe

@geoffreycoan
At the risk of turning this into a Predbat support site..... Here's one for you. Last night I had the power go off to the house. I think that a de-humidifier that was drying some laundry popped it's heating element and tripped the breakers. it took me about 10 minutes to work out what went wrong and to get everything rebooted and back online.

Since then, Predbat is displaying this error:

I can confirm that the inverter's time is correct. It has had a time-sync command successfully sent and has been restarted a couple of times.

My HAOS has also been rebooted a few times.

The time in HA is correct. It looks like AppDaemon is running 9 minutes behind everything else.

The timezone is set as Europe/London in appdaemon.yaml:

The timezone is set as Europe/London in the Predbat apps.yaml

Although Predbat seems to be working and controlling the inverter fine, I'm at a bit of a loss to work out why it is displaying this message. Any ideas?

D
#444 danerf

Why does my predbat seem to have a heavy bias towards discharging between 4pm and 7pm? Surely towards the end of the day would make sense?
Does anyone else experience this? I wonder if it's learnt behaviour from the saver sessions.

V
#445 Vestas

danerf Higher export rates if its outgoing agile.

A
#446 Arg0t

danerf

I have this in my apps.yaml, makes the peak time less attractive if you are on a fixed 15p export. Avoiding that you lose out on saving sessions by building an export history in these slots. Counter productive for OE and the grid as they'd like us to export more in this slot in general to reduce generation needs.

  # To improve on saving sessions avoid export during peak periods
  rates_export_override:
   -  start: '16:00:00'
      end: '19:00:00'
      rate_increment: -5
J
#447 Jellybaby

Zakalwe I had this issue that was resolved by changing the polling time on the Givtcp addon, what is yours set at? I was told to set at 30-60s, could the cut have done something to that setting?

Z
#448 Zakalwe

Jellybaby
Where's that setting?

Dunno why a power outage would cause it to suddenly act up though?

J
#449 Jellybaby

Zakalwe unexpected shutdowns may cause a lot of weird issues, even in PC's, the setting for changing the time is this one.

Unfortunately since I only got the program working yesterday that is the only experience I have had with that message, if the time looks fine you may have to ask on the github or the Givtcp facebook group which there is a link for in the predbat page.

EDIT
The only reason I have it set at 54 is for some reason it won't go below 6 seconds and if I set it for 54s the refresh interval seems to be 59/60 seconds, its really weird lol.

Z
#450 Zakalwe

Ah, OK. It's a GivTCP setting rather than a Predbat one. I'll give that a go.

J
#451 Jellybaby

Good luck, I was told on Facebook that it should be 30-60s as too quick a time will cause problems as well. I originally had it at 5 minutes.

G
#452 geoffreycoan

@Zakalwe The frequency that GivTCP polls the inverter is the ‘self run’ setting in the GivTCP add-on config:

As you can see I have mine set to 20 seconds.

If it’s set too high so GivTCP polls infrequently then you could get the warning that Predbat issued that the clock times are out of sync - especially if GivTCP can’t connect to the inverter, e.g. the inverter is still reconnecting to the wifi after a power cut. I find mine can take 10 minutes or so to reconnect and after a reboot I often find that predbat goes into error state for the first one or two runs whilst everything is starting up again. You can always look at sensor.givtcp_xxxxx_last_updated_time which is the time the GivTCP data was last refreshed at.

It is advised to not set the GivTCP poll frequency too high because this can interfere with the 5 minute send of inverter data to the GivEnergy cloud. Equally too high it could disrupt using the GE app in local mode.
So hence I have it set to 20 seconds.
If you are balancing inverters or suchlike then you’ll need a higher refresh rate though.

Z
#453 Zakalwe

That worked!

Bizarre how it has been running fine until the power cut. Clearly a glitch in the Matrix!

J
#455 Jellybaby

Zakalwe Glad it sorted out for ya, if this was any other day you wouldn't have got a resolution anytime soon as I had this problem for nearly 2 days lol

G
#456 geoffreycoan

Thanks folks. I have added specific guidance to the docs about setting the self run frequency, added a new FAQ for what to do if you see this time mismatch warning, and also added links to some useful videos covering 'introduction to HA, YAML explanation, setting up givtcp, etc'

These are all in my fork of Predbat and will get pushed through in the next week

S
#457 spe

Boffinboy

I first tried using a Synology NAS as it was already available to me. But you will be better off on a discrete platform running Linux or HASS unless you want to spend a lot of time updating and maintaining the extra infrastructure required to run the containerised Add-Ons.

Runing Core HA Core is easy enough. Adding the other containers to get GivTCP working once was tricky, but I got there. The main issues arose when it came to updating all the pieces - which is almost daily in HA. Most scripting is not in place on DSM and I had to keep adding too many extra modules just to get basic updating services working.

I eventually gave up and bought an oDroid M1 with HASS installed on the eMMC unit, popped in a cheap 1TB SSD and haven't looked back. It just works, with no effort managing the infrastructure. Which leaves much more time to work on the automations.

I got mine from www.odroid.co.uk. Other HA users run on Raspberry Pi. There are lots of hardware choices. The key is that they are running HASS natively and that opens a lot of HA options to you. Even simple but very useful ones, such as having the Add-Ons option visible in HA.

S
#460 spe

geoffreycoan

"e.g. the inverter is still reconnecting to the wifi after a power cut. I find mine can take 10 minutes or so to reconnect and after a reboot I often find that predbat goes into error state for the first one or two runs whilst everything is starting up again. "

I am curious. Why isn't your router on the inverter's EPS circuit?

J
#461 Jellybaby

spe Bit cheeky to have power+case as separate purchases for that odroid

J
#462 Jellybaby

spe I got mine + 24/7 PC and Gaming PC on a Cyberpower UPS.

G
#463 geoffreycoan

spe am curious. Why isn't your router on the inverter's EPS circuit?

It will be - soon. My installer never quoted or even mentioned EPS to me as part of the install 🤷‍♂️

I’ve had to have the fusebox in the garage split into an EPS and a non-EPS box with my older FIT array and the hot tub moved onto the separate fusebox, a changeover switch and earth spike installed.
Am waiting for my installer to give me a date when they will come and connect the inverter EPS to the changeover switch.

R
#465 Rbor

geoffreycoan Checked Predbat plan this morning and it had crashed just after 4 am with an 'Exception Error'. I restarted HA and thankfully Predbat came back to life (took about 5 mins).

I checked the AppDaemon Predbat.log(s) and searched for 'error'. I found 72 errors starting at 4:12 am this morning. I have downloaded the file.

I then looked at predbat_debug.yaml. I found a very long file at 4 am but have no idea of what it might tell me.
Has anyone else had an issue this morning?

I checked my GE dashboard and my system seems to be continuing with what was its plan last night, basically charging!

Geoffrey, should I put my Predbat.log and predbat_debug.yaml files on GitHub for Trefor?
I have never posted directly to GitHub before. Where should I post the file and how do I do it?

So immediate panic over for me. But somewhat worrying after smooth running for the last 2-3 weeks.

Thanks.

Rob

G
#466 geoffreycoan

Rbor Geoffrey, should I put my Predbat.log and predbat_debug.yaml files on GitHub for Trefor?
I have never posted directly to GitHub before. Where should I post the file and how do I do it?

Yes if predbat itself crashed then it’s a good idea to raise an issue on GitHub and see what Trefor thinks. Since it runs on an appdaemon timer, if there is an exception it should normally just restart itself 5 minutes later, but there may have been a coding bug that meant you had to restart HA to clear it.

Go to the predbat GitHub repository and click the green New issue button https://github.com/springfall2008/batpred/issues
Fill in the template with as much information as you can including attaching the logfile.

You may need to create a (free) github account if you’ve not done so already

Glad to hear that a restart cured it.

#467 PianSom

Rbor
No issues here. Predbat just doing its standard overnight charge/discharge income generation thing.

B
#468 Boffinboy

spe I just run it in a VM on the NAS and it works as if it’s on a standalone machine 👍

R
#469 Rbor

geoffreycoan Thanks as always.
The issue is now posted on GitHub with the relevant log file.
Annoyingly, all my Predbat settings had gone back to default and I have desperately been trying to remember the tweaks I had made. I have even lost Expert mode.
Thankfully my apps.yaml file had not been touched.

I have saved my current settings. Phew – not the best start to the day.

For the record, I run HA on a Raspberry Pi 4 attached to a large 512 Gb SSD (Samsung T7). Really quick response and no chance of running out of memory.

Rob

P
#470 pacemaker

Jellybaby

I got a Home Assistant Green. Plug and play

J
#471 Josephiah

Hi @geoffreycoan, I'm looking at how to add a load forecast for our heat pump based on forecast outside temperature. I've had a look through the Predheat docs, and it seems wildly complicated, with a lot of scope for assumptions skewing the results. I've had a bit of a search on here and the wider web, but struggling to find much in the way of help for it (or indeed anyone discussing using it).
I'm wondering if a better bet might be to create a sensor which looks at the forecast temperature, then simply applies a scaling factor based on curve fit from previous data (I've got a fairly decent dataset now from a few months of operation, with a fairly clear trend).
Does this seem like a sensible option? Can you (or anyone else) offer any pointers on how to go about this? I'm not averse to going and reading up and trying things out, but any pointers you can give as to where to look/which methods I need to be learning would be much appreciated.
Thanks.

G
#472 geoffreycoan

Josephiah I think the heat pump forecast derived from outside temperatures would be interesting.

It’s something I have been wondering about as well but whilst I’ve got a number of Govee indoor room thermometers feeding into HA, I still don’t have an outdoor thermometer yet. Understanding the correlation between temperature, heat loss and kWh consumed by the heat pump - and ergo, whether changes being made to the heat pump settings are actually improving or not the heat pump efficiency.

First thing to consider is how you want the data to be accessed/viewed because I think this will have a major impact on how to develop such a solution.

I’ve looked very briefly at Trefor’s “sister” project (?) Predheat and can see the strong family resemblance, very similar settings, output, coding etc and even some of the docs being cloned from much earlier Predbat docs - with occasional references to Predbat terms in there as well.
I can see the idea of Predheat and in many respects it looks like a ‘dynamic’ heat loss survey. As you say though there are a lot of assumptions that can have a big bearing on the heat loss calculation - unrelated to GivEnergy but this article on common heat pump issues is v interesting, number 1 being the scope for errors in the MCS survey https://protonsforbreakfast.wordpress.com/2024/02/10/5-reasons-heat-pump-installations-have-problems/
After reading it I’m convinced my own heat pump is over-sized, but how to reduce the impact of that is another Q. Understanding heat pump forecast could be a tool in that thought process.

Anyway, back to what output from the heat loss prediction is wanted and how are you going to use it?

Predheat generates (I think) an hour by hour future forecast for heating kWh, in such a way that it can be graphed (Apex charts) and feed into Predbat. This would be interesting to model future battery activity but for me of limited use because my heat pump more than exceeds my battery capacity. Even when I get my new 9.5 commissioned I’ll still only be able to cover house load not heating. If you do want to forecast detailed time based heat pump demand then going to have to create the time-based forecast as a set of sensor attributes in HA and I suspect this is going to be v difficult to do with template sensors. You can write loops and iterators in Jinja2 but I don’t think it’s a natural language to do so in.

A better programming language approach would be to read the temperature forecast attributes and write the heat pump sensor data from Python code which you could run periodically in AppDaemon in much the same way as Predbat works today. Predbat itself is probably a much too complicated example to start from, I dare say there are other examples out there, but one I have done some modifications to myself is called OctoBlock. OctoBlock runs every 30 minutes, reads your agile price data and writes custom sensors for ‘cheapest X hour’ block of agile time. E.g. we have cheapest 1.5 hours for running our washing machine and dishwasher and I then calculate a time delay offset and display it in a dashboard for these to know the start time delay to program into the washing machine overnight.

That might be all getting too complex, and maybe a simpler starting point would be to create a single value forecast for tomorrow’s heat pump usage based on e.g. the met office temperature forecast. That would be suitable for fine tuning the heat pump config and the prediction model but less useful for feeding into predbat.
There’d still need to be an iterator across the time based attributes of the met office forecast entity but the output would be a single entity value rather than having to create forecast attributes with time stamps. I feel pretty confident that could be created as a Jinja 2 template sensor.

Sorry for the long answer that others may not be interested in….

R
#473 Rbor

geoffreycoan
Josephiah
This is an interesting discussion. I have also thought about how PredBat's load predictions could be applied to electrical heating (heat pumps, electric radiators, IR) and have wondered whether the predicted load could be adjusted based on temperature predictions, in a similar way to PV predictions from Solcast.
I have an ASHP which was installed last July. My system is controlled completely by weather compensation and it appears to be the correct size.
My weather compensation sensor typically records about 2ºC higher than temperatures from local weather stations but the ball park temperature is correct. I also have Open Energy Monitoring and my system is visible (with many others) on the public site: https://heatpumpmonitor.org/
My ASHP should deliver 20ºC to the whole house from 6 am to 9 pm, with a setback temperature of 17ºC for the rest of the day and night. PredBat will have picked this up anyway from my historical data.
Looking at my data, in the last 10 days, my daily mean temperature has ranged from 0ºC up to 11.5ºC.
For a mean temp of 10ºC, my heat pump is using 10 kWh per day.
At 5ºC, it is about 20 kWh per day.
At 0ºC, it is ~ 30 kWh per day.
(My base load is only about 7.5 kWh per day so my main winter load is from the heat pump)
So temperature makes a big difference on load, something that PredBat (currently) doesn't consider.
Daily weather forecasts could pick up predicted variations in temperature during the day (as PV data does).
Factors such as altitude can affect the data from Weather stations but this can easily be taken into account by 'scaling' within PredBat settings. I am based on the edge of a large northern city 250 m above sea level. My temperature could be 2ºC lower than the city centre.
PredBat could pick up my venue from information in HA.
I reckon that predictions for load would be more accurate overall than Solcast, which can be real hit and miss.
Has Trefor looked at other predictors such as PVGIS?

My view is that factoring temperature predictions into anticipated Load would be a great addition to Predbat. Whether this is used at all could be controlled by a switch (as with iBoost, etc.)

If anyone is interested, the data on https://heatpumpmonitor.org/ is a mine of information, comparing performance of different types and sizes of heat pumps and installers.

Rob


G
#474 geoffreycoan

Interesting discussion. As I said I don’t have an outdoor temperature monitor at the moment, but taking a proxy off the temp monitor in one of our sheds (albeit its an insulated shed so will retain heat), there is a clear correlation of outside temp to kWh for me too although there are a couple of outliers. E.g. 6 degrees=26kWh, 7=28kWh, 8=24kWh, 10=20, 11=16, 12=14, 12=18. My base load is something like 14kWh a day.

Maybe if this is common to a number of people we should put it in as an enhancement suggestion to Predbat for Trefor to look at? Could be to create a load curve similar to the charging and discharging curves based on input sensors for the heat pump consumption an outside temperature.
Simple daily figure or hour by hour?

Rbor I did look at the heatpumpmonitor some time ago but ruled it out as my heat pumps are not internet connected in any way (I have seen a video on connecting into HA via a modbus connection onto the ASHP, but this is very much on my lower list of priorities!). So other alternative was their monitoring box which would need wiring and plumbing into my heating circuit to measure flow rate & kWh output. Definitely interesting but invasive to the heating and expensive.

I do feed my solar generation to PVoutput.org though - scripts for this are elsewhere in the forum

W
#475 Wavy Davy

Geoff, Thanks for sharing your activity monitor automation. I have programmed this but I have 2 batteries so what would be the best way to add the second batt details? I could just do 2 automations but wondered if I could add the second one's details into a single automation.

G
#476 geoffreycoan

Wavy Davy I have two batteries (and two inverters) so wrote the automation to handle them both, then simplified it for the predbat documentation. That’s the purpose of the ‘inv_id’ and ‘batt_id’ variables in each of the triggers, just duplicate the triggers and set the variables for each of your battery sensors:

  - platform: state
    entity_id:
      - sensor.h_xxxx_status
    from: online
    for:
      minutes: 30
    id: no-givtcp-update
    variables:
      inv_id: inverter 2 (H)
  - platform: numeric_state
    entity_id:
      - sensor.g_yyyy_invertor_temperature
    for:
      minutes: 30
    below: 10
    id: no-givtcp-update
    variables:
      inv_id: inverter 1 (G)
  - platform: numeric_state
    entity_id:
      - sensor.h_xxxx_invertor_temperature
    for:
      minutes: 30
    below: 10
    id: no-givtcp-update
    variables:
      inv_id: inverter 1 (G)
  - platform: state
    entity_id:
      - sensor.g_xxxxx_battery_cells
    to: unknown
    for:
      minutes: 30
    id: battery-unavailable
    variables:
      batt_id: 9.5kW (G)
- platform: state
    entity_id:
      - sensor.h_xxxxx_battery_cells
    to: unknown
    for:
      minutes: 30
    id: battery-unavailable
    variables:
      batt_id: 5.2kW (H)

Here’s a fuller extract of my automation, you can see the repeated triggers with xxxx and yyyy for the different inverters and batteries.

When the trigger fires it sets the appropriate variable as to what has caused the firing, and then uses the variable in the alert message. This means you don’t need lots of different automations that are near identical

W
#477 Wavy Davy

I Have a discrepancy between hacs and predbat update status.
hacs is informing me that v7.16.0 is available and predbat says it's already installed. I do have predbat set to auto update, so should I switch this off and just update via hacs? or can I turn hacs update off, as it seems to lag predbat updates.

R
#478 Rbor

geoffreycoan correlation of outside temp to kWh

I think this could be done solely from hour by hour weather forecast and monitoring data for next 2 days.
You would need a 'base heat pump' energy which would then be tweaked by predbat depending on temperature, with fine tuning via a PredBat scaling control.
If my heat pump has a heat loss of 700 kW, at 0ºC and my house is set at 20ºC, the heat loss at 10ºC would be half the value: 350 kW with a difference of 35 kW for each 1ºC. Something like this could be the basis of PredBat adjustments based on temperature. This would need mapping to typical temperature distributions across a day.
A heat pump will contribute a large amount to the total load in the Winter months. I suppose this is taken partly into account from the previous 12 days of historical data. But winter temperature can fluctuate greatly.

Could a PredBat plan have an extra column for Electrical heating (as with PV column) with the 'Load' being the base load?

For PredBat, I don't think ultra accurate values would be needed for predictions – just the correct ball park.

I hope I am not writing nonsense here but you should be able to see the idea. Lots of food for thought.

geoffreycoan I did look at the heatpumpmonitor some time ago

Yes, Open Energy Monitoring gear is not cheap, but really nice to have!

Rob

G
#479 geoffreycoan

Wavy Davy I Have a discrepancy between hacs and predbat update status.
hacs is informing me that v7.16.0 is available and predbat says it's already installed

Yes I do too. I have 7.16.0 but HACS thinks I am on 7.15.4. Its started since I turned auto update on. I think the problem is that when predbat updates itself HACS doesn’t know about the change.
Also HACS only scans for updated versions once a day (unless you manually do ‘update information’ for each component in HACS) so Predbat can often be ahead of HACS.

There is an issue already logged on this. Whether Trefor can find a way to keep HACS’s idea of what version is installed, I don’t know. I am just ignoring it and relying on Predbat’s auto update

Rbor We should put a feature request in for predicting heat pump load in Predbat for Trefor to look into what’s easily possible. I’d need to graph it out but I don’t think the outside air temperature to heat generation required is entirely linear. For one thing there’s the hot water kWh in the total heat pump consumption, and that varies depending on how much hot water you’ve used as well as the OAT. That’s why I was thinking a correlation curve of average OAT to heat pump kWh based on historical data
Anybody volunteer to raise it?

D
#480 DD

geoffreycoan We should put a feature request in for predicting heat pump load in Predbat for Trefor to look into what’s easily possible. I’d need to graph it out but I don’t think the outside air temperature to heat generation required is entirely linear. For one thing there’s the hot water kWh in the total heat pump consumption, and that varies depending on how much hot water you’ve used as well as the OAT. That’s why I was thinking a correlation curve of average OAT to heat pump kWh based on historical data

Not a user of predbat, so just an outside observer... this seems terribly specific. Is there a case for just having an abstract sensor which outputs a prediction of how much extra power may be needed. That way, predbat doesn't have to worry about what that load is, just that it should take it into account in its sums. That way, it can be developed, parameterised and tuned separately from predbat itself. (And there can be competing implementations until a winner emerges.)

Z
#481 Zakalwe

I've seen this popping up a few times. I'm on Intelligent, so wondering why it would choose to charge and discharge during one 30 minute slot in the middle of the cheap period. I can't see why it would do this?

J
#482 Josephiah

geoffreycoan I guess it depends what data one has available. In my case, my HP separates out heating and DHW figures, so it doesn't seem like it should be that difficult to take a forecast temp, perhaps apply an offset based on the historical match between that and local measurements, and look up a curve (either lookup table or curve fit equation).
In my case I have an automation for DHW runs based on the best Agile slots, so would need to think about how to apply that appropriately. I don't see the need to run it on the same timeframe as PredBat - I'd have thought hourly would be plenty - anything faster than that might be subject to wild swings when cycling in milder weather.

But DD raises a good point. I can see the argument for including something specific in Predbat (majority of house load, fairly predictable, likely to be an increasingly sought-after feature) and just keeping it separate (difficult to customise for the foibles of everyone's different devices and schedules). So maybe it's better to think how can we use the existing load_forecast input to best effect, and come up with a separate automation/script to produce a suitable input...? I'd like to think I could now write out a fairly accurate forecast on paper of my own heating and DHW usage - just need to figure out how to translate that...

(And yes, is there a better forum for Predbat-specific discussion of this type?)

D
#483 DD

Josephiah another possible area of research is to consider thermal store as additional sort of battery which can be controlled. It depends so some extent on how tolerant you are to fluctuations in temperature, but it could be possible to run HP very slightly harder when power is cheap (storing heat), and back off slightly when price peaks (discharging heat).
Overnight, power tends to be cheaper, but source temperatures colder, so it's an interesting question of when it's better to tolerate lower cop to charge thermal "battery" when power is cheaper, vs storing the energy in chemical battery to use when outside temp., and therefore cop, is higher.
(I don't yet have a heat pump, but I hope it will be coming soon.)

D
#484 DD

Zakalwe the "why" is because it is profitable: import is 7.5p but export is 15p. Arguably the 30 min divisions are a bit arbitrary.
I think I've read that there's a param you can set to say whether it's allowed to charge and discharge within a 30-min block.
It's interesting that it chose that block to do it when others seem equivalent. If batteries are happiest around the 50% mark, then earlier might have better. But if they're happier when they're warmer, later might have been better. Perhaps this a compromise.
I suppose later is also better if you have EPS configured - better to charge as soon as possible in case there's a power cut.

P
#485 pacemaker

Zakalwe strange that you don't have the car column on the table if you're on IOG. It's there for me whether there is a smart schedule or not, showing which slots IOG will be using.

As to your Q is as others say, it's economical. I suspect it chose that slot because that's when the car isn't charging - again hard to tell when there is no car column, but that's the behaviour I see on IOG w/predbat - it takes advantage of half hour slots where the car isn't charging to charge/discharge battery to make some cash.

D
#486 danerf

Zakalwe What are you going to do with your 1p saving? 😃

P
#487 pacemaker

What are people setting for this in Predbat?

input_number.predbat_battery_loss is an assumed percentage figure for energy lost when charging the battery, the default 0.05 is 5%.

input_number.predbat_battery_loss_discharge is an assumed percentage figure for energy lost whilst discharging the battery, the default 0.05 is 5%.

input_number.predbat_inverter_loss is an assumed percentage figure for energy lost during the conversion within the inverter from DC to AC or AC to DC, the default is 0% for legacy reasons but please adjust.

Currently Mine is set to 3% for both charge / discharge losses and 4% inverter loss. I haven't touched these (so appears to be there on install) but get the feeling they are contributing to incorrect predictions. Are these right for my system (AC + 9.5 batt) ?

#488 PianSom

Zakalwe
Like you, I'm on IOG and I choose to work my battery hard. So Predbat does several of these charge/discharge slots for me every night.

For example, last night (from midnight) I imported costing £2.21, and exported generating income of £1.09, and ended at 5.30am with a full battery.

So Predbat is dramatically reducing the cost of my nightly charge (even after losses).

W
#489 Wavy Davy

regarding the predbat monitoring automation, what is the best way to check if it is setup and contacting correctly without having to disconnect the inverter.

J
#491 Josephiah

DD Yes, we certainly do this, both when we were on Cosy, and now on Agile, with a fairly simple "build up the temp by a degree or two ahead of the peak period then switch off and coast across it" strategy - worked well with HP alone; even better with battery added.

DHW runs (often the most intensive periods) are fairly easy to schedule for the cheapest Agile slots using the target rate sensor in HA. With the heating, you need to weigh up the benefit of fluctuating to catch the cheapest slots (so the pump will work harder at certain times) vs the efficiency gains of running the same temp 24/7. I recently changed to the latter (albeit keeping our "coast across the 4-7pm peak" bit), and the efficiency gains were fairly startling, in a good way.

Z
#492 Zakalwe

pacemaker strange that you don't have the car column on the table if you're on IOG. It's there for me whether there is a smart schedule or not, showing which slots IOG will be using.

I haven't configured it for car charging yet, mainly because I don't have the Tesla integration yet. The documentation refers to this integration: https://github.com/alandtse/tesla which states that it needs Tesla Tokens to generate the API authentication. However Tesla Tokens doesn't seem to be listed on Google Play any longer? Maybe another one for @geoffreycoan to amend?
So, I have no way to read the car's SoC. I do have a CT clamp on the cable feeding the car charger, so I am part way there, just need to extract my digit and work out how to set it all up.

danerf What are you going to do with your 1p saving? 😃

Spend it all in the one shop! 😃

DD the "why" is because it is profitable: import is 7.5p but export is 15p. Arguably the 30 min divisions are a bit arbitrary.

I'm not convinced. 30 minutes export nets 7.5p before conversion losses. It's pointless in the grand scheme of things.

Z
#493 Zakalwe

PianSom Like you, I'm on IOG and I choose to work my battery hard. So Predbat does several of these charge/discharge slots for me every night.

For example, last night (from midnight) I imported costing £2.21, and exported generating income of £1.09, and ended at 5.30am with a full battery.

So Predbat is dramatically reducing the cost of my nightly charge (even after losses).

Same here. At the moment it's discharging at full pelt, down to the minimum SoC that I have set (18%)

It seems to make sense to me that this is how it should work....judge the timings so it can discharge to hit the minimum SoC just at the start of the cheap period and then recharge the batteries back up. I just don't get why it would interrupt that charging to discharge for a few minutes. It would seem more logical to charge continuously back up to 100% and then discharge? For example, it finishes charging to 100% by 5AM. It could then start to discharge?
Maybe it's giving itself some room to ensure that it guarantees to hit 100% by the end of the cheap period?

It's not a massive issue...we are only talking about pennies after all. Overall I am very pleased with how it is working. It seems to be maximising the batteries to earn their keep.

G
#494 geoffreycoan

14 messages to reply to on this thread!

@Josephiah & @DD Agree we should make any prediction of heat pump house load as generic as possible. The load_forecast is one way to get it into Predbat but it has a very specific format required. Looks like its a single daily value with a 'last updated' timestamp.
I was thinking we could let Predbat do the calculation based on (1) historical daily consumption figure, (2) historical average temperature and (3) future predicted average temperature and as long as these were all configurable sensors it could serve many people. But equally could be outside of Predbat as a bolt-on piece of code. Not precious either way,

@Zakalwe the charge and discharge in the same half hour period is as has been said because its cheaper to import than it is to export, even after losses are taken into account. You can turn this on or off with switch.predbat_calculate_discharge_oncharge if you want to. I do find it strange that Predbat doesn't do this all night when rates are suitable - in your example the soc only just reaches 100% by the end of the night in the cheap period, so only opportunity for 1 discharge period,
If I look at my own plan for tonight, with rates low, you'd think there would be the opportunity for more active discharging to make more export income, but if it did then maybe I'd be getting stressed about the impact of over-active charging and discharging of the battery. I just trust Predbat to get it more right than I could do manually and let it get on with it

pacemaker my losses are charge 0.05, discharge 0.05, inverter 0.04.
If you look on this forum there are posts where people have measured their losses and come up with figures in the range 10-20%. Yours at 3, 3 and 4 is therefore on the low side. Mine at 5, 5, 4 is around the midpoint. 20% seems too extreme to me even if it may be accurate. It does seem there is no single right answer.

Wavy Davy you can shutdown the givtcp add-on to simulate a failure and test that the failure check automations are working OK. For the predbat running automation just set one of the critical sensors in apps.yaml to something invalid, e.g. the load sensor, to force predbat to crash.

@Zakalwe no idea about Tesla tokens, sorry !

P
#495 pacemaker

Zakalwe I haven't configured it for car charging yet, mainly because I don't have the Tesla integration yet. The documentation refers to this integration: https://github.com/alandtse/tesla which states that it needs Tesla Tokens to generate the API authentication. However Tesla Tokens doesn't seem to be listed on Google Play any longer? Maybe another one for @geoffreycoan to amend?
So, I have no way to read the car's SoC. I do have a CT clamp on the cable feeding the car charger, so I am part way there, just need to extract my digit and work out how to set it all up.

I can't help with the google play part, but you could consider using Tessie, and the Tessie integration in HA. It has all the same entities that Predbat can use, and frankly seems more stable than the Tesla Integration. I have both running right now and Tessie updates way faster, and has all usable entities (whereas there is some bugs on the Tesla integration). The only downside is that Tessie is $5USD a month, but there are a lot of extras you get that might be interesting to you.

Alternatively there should be other ways to get the Tesla API auth key, like https://about.teslafi.com mentioned in the integration above.

Z
#496 Zakalwe

pacemaker The only downside is that Tessie is $5USD a month, but there are a lot of extras you get that might be interesting to you.

I'm too tight to pay that, especially as I'll be changing the car later this year. #Scrooge

D
#497 danerf

My MG4 has no HA integration without losing the app functionality (you can only use it on one device). I have made three custom helpers.

  • Desired SOC
  • Current battery capacity (KW) in the car
  • Hypervolt car charger cannot tell if the car is plugged in. So, another to say if it plugged in or not (manually changed)

I considered putting a guide on my unique use case in the predbat documentation. Which section do you think this example would fit into best?
I'd have to google how to modify the documentation on Git Hub. It's all new to me.

G
#498 geoffreycoan

danerf I considered putting a guide on my unique use case in the predbat documentation. Which section do you think this example would fit into best?
I'd have to google how to modify the documentation on Git Hub. It's all new to me.

Thanks in advance for the contribution !

I’d suggest you add it to https://springfall2008.github.io/batpred/devices/ which details what 3rd party devices Predbat works with - Zappi Wallbox, Ohme, Tesla, etc.

There’s actually a guide to developing and enhancing Predbat including updating the documentation https://springfall2008.github.io/batpred/developing/ - the suggested mechanism is to use Codespaces which provides the Visual Studio editor with plugins for checking documentation markup and Python coding standards.
This is how I edit the documentation. I created my own fork of predbat then run Codespaces to edit the docs. When finished I push commit the changes in Codespaces (checking no errors on the bottom of the screen), sync the changes to my GitHub fork, and then in GitHub I create a pull request to tell Trefor that my changes are ready for review and incorporation into the main Predbat code base.

D
#499 danerf

geoffreycoan Are you sure it's that section? None of them are third-party integrations and are manually done.

G
#500 geoffreycoan

danerf I suggested it went in there as that page covers how to integrate with 3rd party devices such as Tesla charger, so thought your MG4 could follow the same pattern.

Car charging is actually spread over different bits of the documentation. As well as the above page there is:

As you've developed custom sensors then the other logical option is to put it in the apps.yaml doc, at the end, and signpost it from earlier on. But I still suggest the devices is a good match, and there needs to be signposting adding from apps.yaml doc to the devices page as at the moment there's really nothing in apps.yaml about configuring for specific chargers/cars.

I'll probably restructure the devices page as well at some point because at the moment I can see that Nordpool, Solcast and Octopus Energy all repeat stuff that is elsewhere in the docs and one of the things I've been doing is to remove duplication and improve internal cross-referencing so things are said only once and with sufficient detail for newcomers to understand

Anyway. just my 2p worth

J
#501 Jellybaby

Inquiry for the more advanced Home Assistant users, you know the default stuff that gets plastered on the overview page BEFORE you take control (apparently you cannot take control and have it auto add stuff) how would one go about setting those particular cards up, is there a guide for that somewhere?

Only asking as having all the default Givtcp, predbat and octopus stuff plastered one one page causes quite the delay in the tab fully loading lol

#502 PianSom

Jellybaby
IIRC when you change from automatically managed to manually managed it converts your existing "auto" dashboard into a manual equivalent.

After that, setting up dashboards is pretty easy - you can just create a new one under Settings, then go ahead and add cards to do whatever it is you want.

You have proxmox or some other VM system don't you? Why not just go ahead and try it; you can always go back to a backup if you get in to problems.

S
#503 SJB

Jellybaby I'm sure there is a guide somewhere but I'm not that expert.
I recently went through the exercise of moving items from the Overview Dashboard to separate dashboards.
You can create new dashboards in Settings>Dashboard.
You can then move cards by editing the Overview dashboard, clicking on the 3 dots in the lower right hand corner of the card and selecting move to view where you can specify the dashboard to move the card to.
The are also copy and paste options on that menu if you are so inclined.

Alternatively when you add a new dashboard you can choose to copy from an existing one - then you can removed the cards you don't want.

For simple list cards you can also add entities to a dashboard from the device page (Settings>Devices and Services).

J
#504 Jellybaby

Alternatively when you add a new dashboard you can choose to copy from an existing one - then you can removed the cards you don't want.

oooooooooooooooooooooooooooooooooooooooooooooo that is good to know, thanks.

G
#505 geoffreycoan

SJB @PianSom agreed

I leave the default dashboard with everything still defaulting on it as its useful to have a full reference page, but most things are on a custom dashboard with tabs for:

  • GivTCP status & inverter controls, Powerflow control, weather and solar forecast and a few predbat entities
  • Agile rates (predbat plan) and auto-calculated entities to show when its cheapest to put the washing machine on
  • Power meters for all the metered things in the house
  • Temperature charts for all the room temp monitors
  • Soc history, import history
  • Predbat controls using the auto-collapsible cards
  • Predbat graphs (don’t use these much now)
  • Power up controls

This and the Energy dashboard do most of what I want

You can change the default dashboard that opens for a user when they connect

#506 PianSom

geoffreycoan
What I really want in my HA is something that replicates and replaces the standard Power Graph picture on the GivEnergy portal (the one showing grid in/out, load, PV in, battery in/out and SoC) . Then I can just never use the portal again.

But I rather think it may involve me getting data exported to Influxdb/Prometheus, using Grafana to create a graph, and then using HA to display it

I keep on meaning to go and have a search to see if anyone has beaten me too it - they normally have. You haven't come across such a thing, have you?

G
#507 geoffreycoan

PianSom I use the GivTCP battery card and PowerFlow Plus to give an instantaneous view of what’s happening. The latter is very similar to the GE app home page

That and the Energy dashboard give me what I need.

I’m assuming you want something like this? Should be straight forward to do with Apex charts on the standard db.

Z
#508 Zakalwe

PianSom I keep on meaning to go and have a search to see if anyone has beaten me too it - they normally have. You haven't come across such a thing, have you?

There are a couple out there. Have a look at Oliver's "Speak To The Geek" Youtube channel- he details how to set them up.

https://youtu.be/6IbdPoZb5zc?si=3Jfo1vc3_4PPOEo5

https://youtu.be/C4Zh35E9wJE?si=rGgXqKiez0tGXzmO

I've set my PredBat dashboard up like this:

with another view showing "at a glance" whats going on with the numbers:

G
#509 geoffreycoan

geoffreycoan I just knocked this up in Apex. Need to sort out the + and - axes and scaling SOC, but sort of what you wanted?

I use a set of bar charts to show what the power breakdown across the monitored devices is:

#510 PianSom

Thanks @geoffreycoan @Zakalwe

Yes, that's the graph I'm after Geoffrey. Although much the same info is on your dashboard Zakalwe, I particularly like the portal graph.

The beauty of using Grafana is that - like the portal - it makes isolating the individual data series for examination very easy, and I am familiar with it already. That said, I wouldn't mind giving up that advantage if an Apex chart was easy to create. I've not used it other than as a casual user, so I will take a look at the docs.

EDIT - hmm, that WAS quick! I am now impressed @geoffreycoan

P
#511 pacemaker

geoffreycoan I leave the default dashboard with everything still defaulting on it as its useful to have a full reference page, but most things are on a custom dashboard with tabs

this is the way!

P
#512 pacemaker

started to get into custom card dev after I installed predbat, I needed a cleaner way to know WTF was going on.

You can see my custom predbat card just under the power flow card. It has the predbat status and short explainer, my IOG plan (when available) and the best daily cost I'm gonna hit with predbat.

I also customised the predbat table into a new card

I'm not even sure its better, but at the time I found the original card just too hard to read.

#513 PianSom

pacemaker
Nice work! Much food for thought. I really need to put some effort into dashboards.

For the power flow in the top left, how do you find it compares to the Inverter app (of which I am a huge fan - lots of info nicely presented)? Personally I'd also include some temperature readings too (of the AIO inverter, battery - which are on Inverter - and my PV inverter).

I do like your smoother solar vs forecast graph - much better that the default Energy dashboard one, which is bucketed by hour.

Like you, I am not a huge fan of the Predbat plan layout. For me the columns are in the wrong order - I don't much care about the Import/Export cost (which seem to stand out prominently, as they are first), but am interested in the projected state, SoC and Load. And it is just annoying that the running cost column is so far away from the cost columns.

A
#514 Arg0t

PianSom

Adding to the mix.
2 pages. A dedicated page for battery prediction, the basic set of apex charts, the plan and all the switches and entities, second page mixing predbat data with GivTCP and Solcast data. Leaning heavily on mini graph card.


Predbat status, next predbat charge and discharge events, chart with last 12 hours of grid, pv and consumption data graphed with current power, solar power, battery power, grid power and battery SOC.
House is using 485, no pv, battery discharging 567w, no grid, SOC at 11%.


Solar profile by string with string voltage. Solcast forecast with actual total and per string. SOC history with % per battery and predcat predicted remaining run time. GivTCP consumtion with some individual power graphs.


Grid usage with GIVtcp total import andtotal export, Octopus current import and export rates. Grid costs for the day showing day cost, day import cost, day export income.

G
#515 geoffreycoan

PianSom I've put a feature request in to allow user configuration of the predbat plan
https://github.com/springfall2008/batpred/issues/782

Could be useful for some people

@pacemaker +1 for the solar prediction graph. Like it.
One thing I did on my dashboard was to change the units of all the power entities I want to display to kWh/kW and display precision to 1dp, e.g. 2.6kW - made it a lot easier to read

D
#518 danerf

pacemaker I love the predbat table. Can you please share the code for that? I want to use it 🙂

#519 PianSom

Oh wow - lots of food for thought there. Thanks everyone!

That's a great chart @Ivan I can see me using that and @pacemaker 's solcast one as my mainstays. Though I think I'd prefer to keep power history and forecasts separate, personally.

@Arg0t - why the timestamp label? And what is the x axis on your charts - today, last 12/24h?

R
#520 Rbor

I am totally in awe by all these suggestions.
My dashboards pale into insignificance compared to these.
We could do with a repository where folk could upload the underlying code along with the the charts and customised cards.
Keep them coming and thanks so much to everyone who have posted their charts.
👏👏👏
Rob

G
#521 geoffreycoan

PianSom @Arg0t - why the timestamp label?

Trefor has been through all the Predbat entities and resolved some issues with missing ‘units’. The date/time outputs have this ‘timestamp’ unit of measure. Personally I don’t like it, it takes up too much space on the screen but haven’t thought of a better value to set it to yet

@Arg0t I like the graph of load, PV etc above. Haven’t got round to looking at the mini graph card yet. Apex is OK but it’s quite slow with things like this chart which is heat pump daily consumption vs outside temperature as it has to take the ashp_today_energy and do a max() on all the values across the day. Should be an easier way to read the end of day value. It also doesn’t seem to read long term statistics either, only works on the main 15 day history in HA so I can’t go back any further than the 2 weeks. Maybe Grafana is the answer but seems a lot of hassle and data duplication.

#522 PianSom

geoffreycoan Trefor has been through all the Predbat entities and resolved some issues with missing ‘units’.

Ah, that explains it, thanks. Yes, it does look rather odd

Did you know that some are still "*"?

J
#523 Jellybaby

I cant get nothing to go horizontal, I got the predbat plan card on fresh window and copying and pasting stuff over it just all goes below it and it taking 7-8 presses of page down to reach the bottom.

Also for those with Octopus for Gas how did you add that to Home Assistant?

W
#525 Wavy Davy

Jellybaby It's part of the Octopus Energy Integration. I don't remember doing anything other than setting up the integration and it gave me the gas entities. The only setting I have is the calorific value.

G
#526 geoffreycoan

Jellybaby I cant get nothing to go horizontal, I got the predbat plan card on fresh window and copying and pasting stuff over it just all goes below it

What do you have the page layout set to? The default ‘Masonry’ I find is hard to use, tiles get arranged to form a brick pattern but if you move them around they don’t always move where you expect them to.

I personally use the HACS front end component ‘layout card’ for most of my dashboards, and in particular the Grid layout https://github.com/thomasloven/lovelace-layout-card
Even if you’re not setting up a grid it does things like spread cards to be full screen width

J
#527 Jellybaby

geoffreycoan ill take a peek at that next time, thanks.

J
#528 Jellybaby

Wavy Davy Thats what I meant, what entity did folks add to gas consumption, there was only a short list when I looked earlier.

A
#529 Arg0t

geoffreycoan I tend to create utility meters for everything I want to monitor, use the riemann sum function to turn W into kWh then use utility meter to create a sensor that resets on the desired period.

@PianSom you can make the period whatever you want, I use 12 hours.

entities:
  - entity: sensor.givtcp_<redacted>_load_power
    name: Consumption
  - color: yellow
    entity: sensor.givtcp_<redacted>_pv_power
    line_width: 0.5
    name: Solar PV
    show_state: true
  - entity: sensor.givtcp_<redacted>_battery_power
    name: Battery Power
    show_graph: false
    show_state: true
  - entity: sensor.givtcp_<redacted>_grid_power
    name: Grid Power
    show_state: true
  - entity: sensor.givtcp_<redacted>_soc
    name: Battery
    show_graph: false
    show_state: true
hours_to_show: 12
icon: mdi:lightning-bolt
line_width: 2
name: Power
points_per_hour: 60
show:
  fill: false
  labels: true
type: custom:mini-graph-card
L
#530 lifco
entities:
  - entity: sensor.givtcp_<redacted>_load_power
    name: Consumption
    color: blue
    line_width: 1.5
    show_state: true
    show_fill: true
  - entity: sensor.givtcp_<redacted>_pv_power
    name: Solar PV
    color: yellow
    line_width: 1
    show_state: true
    points_per_hour: 60 # Increased points per hour for detailed information
  - entity: sensor.givtcp_<redacted>_battery_power
    name: Battery Power
    show_state: true
    show_graph: false
  - entity: sensor.givtcp_<redacted>_grid_power
    name: Grid Power
    show_state: true
    color: green
    line_width: 1.5
  - entity: sensor.givtcp_<redacted>_soc
    name: Battery
    show_state: true
    show_graph: false

hours_to_show: 12
icon: mdi:lightning-bolt
name: Power
points_per_hour: 60

show:
  labels: true

type: custom:mini-graph-card
G
#531 geoffreycoan

Arg0t I tend to create utility meters for everything I want to monitor, use the riemann sum function to turn W into kWh then use utility meter to create a sensor that resets on the desired period.

I too use utility meters, but looking through the ones I have setup, I only use them for two specific scenarios:

  • daily totals for the Shelly EM and Shelly PM1’s that only have a ‘total energy’ output
  • to provide abstract sensors such as import/export today, total PV, battery charge/discharge. This was from advice of speak to the geek, to use abstract sensors so that if you ever change your battery or inverter you can continue with the same entity names, just change the utility meter config, The import & export also handle the different tariff rates for Flux and Octopus power up

My Tasmota and Tapo smart plugs have daily consumption meters so I don’t need to use utility meters.

I have never used a Riemann sum in any of my HA at all. I have standardised on having all the power and energy entities displayed as kW/kWh to 1 decimal place, but I just changed the unit of measure from watts to kW.
I think I’d only use Riemann sum if there’s something that outputs power that I want to convert to energy (power over time). At the moment not found anything that I need to do that for (per string energy per day might be the one exception, at the moment I don’t track it but the per-string data provided by GivTCP is only instantaneous power, current and voltage so I think I’d need a Reimann sum for that)

#533 PianSom

Today is a sunny day. Lots of PV power. Predbat has charged up my battery to 100%. But it is now discharging it to export. The plan is that it will fill up again, and then be at empty just before 11.30pm tonight when the cheap rate starts again.

My question is - why the discharge?? Surely it would be more efficient to just leave the battery at full and export any excess solar.


P
#534 pacemaker

PianSom

well the solar will also export in this instance...

but its predicting your load until 11.30pm tonight and effectively making a guess that it can drop your SOC now and export and still be in good shape (the bare minimum) by 23.30

I often find though that it does this force exporting later in the evening when it can be more predictable. I've also found it will export my battery to 4% before 11.30pm and run from grid at the expensive rate (only in the last 30 mins, but not ideal IMO)

#535 PianSom

pacemaker
Well yes, but it would be more efficient (ie I would make more money) if it avoided any discharge and charge of the battery and left it at full, and just did the solar export. Right?

(And, yes - I find the same thing: a frequent top-up needed at 11pm after excess discharge.)

A
#536 Arg0t

PianSom

I expect overnight was less than 13.82p to charge after losses. So charge and discharge made more than charge and allow solar discharge.

T
#537 The Black Cat

I'm stil trying to get Predbat set up to work as I would expect. I'm on Octopus Flux tariff. Predbat plans to charge my battery to 98% tonight and according to its plan, with solar, it would reach 100% by 11:30am and start exporting to the grid. If you look at the costs including losses, the overnight charge to 98% will be at 19.05p/kWh and the export rate at 11:30 is 14.85p/kWh. So I can't understand why it wants to charge the battery that much overnight.
I've got the following parameters set:-
Battery loss charge 0.03
Battery loss discharge 0.03
Inverter loss 0.04
Best SOC keep 2.7
Best SOC min 0
Metric Battery cycle 1
Set Charge freeze off


I've got an AIO and as I can't trust it not to crash to zero when it gets near 20%, I have the "Best SOC keep" set high at 2.7.
I would have thought it was better to charge the battery overnight to a level such that with the solar during the day, it reaches 100% at 4pm, the start of the peak export period.
Any suggestions on the best parameter set-up will be gratefully received.

#538 PianSom

Arg0t
From full now, the comparison I'm making is between [discharge + charge] and [do nothing] over the morning.

In both cases I will have a full battery by noon, get to 11.30pm with an empty battery, and take advantage of the overnight 7.5p rate. So I think the overnight rate is irrelevant?

In the first case I will incur conversion losses, in the second I won't. Am I missing something obvious?

Z
#539 Zakalwe

PianSom (And, yes - I find the same thing: a frequent top-up needed at 11pm after excess discharge.)

I set a minimum SoC to prevent it over-draining the battery (3kWh). It also gives me a buffer in case the house usage is more than predicted. The gain of exporting an extra kWh is less than the loss incurred by having to import that kWh at peak rate.

W
#540 Wavy Davy

is this something I need to sort out, or just ignore it.

P
#541 pacemaker

Wavy Davy I got that error yesterday, I wondered the same... though predbat worked ever since without issue so it maybe something it fixes itself or just a temp issue...

G
#542 geoffreycoan

Wavy Davy this is saying that Predbat can’t talk to GivTCP via REST API so is falling back to using the home assistant GivTCP sensors to control your inverter.
As long as those sensors were all defined in apps.yaml, it’ll continue to work fine.
Rest is more efficient so is preferred. Could try restarting the GivTCP addon and should cure the warning

#543 PianSom

The last few days have seen solar generation starting up a bit more regularly. This seems to be leading to some issues.

I see two things which seem wrong to me
1 - as mentioned by @The Black Cat , I would have thought that Predbat would choose not to fully charge the battery overnight if significant solar generation is expected
2 - as I mentioned, when there is solar generation and the battery is full then I would have thought a battery export followed by a solar recharge would be less efficient than just an export of generation less load.

Is anyone else seeing these two effects? Or is it just a function of mis-configuration somehow?

P
#544 pacemaker

PianSom 1 - as mentioned by @The Black Cat , I would have thought that Predbat would choose not to fully charge the battery overnight if significant solar generation is expected

isn't the running commentary on this forum and other places that its better to charge overnight at cheap and export as much as you can of the solar? (assuming good price differences import/export). On Flux that was certainly the direction people were going, and it seems IOG way too (assuming 7.5 import and 15p export)

#545 PianSom

pacemaker
Ah, yes of course. I guess that must be it.

Doesn't explain number 2 though?

Z
#546 Zakalwe

Think of it this way. Ignoring inverter losses, if you are on Intelligent, then every solar-generated kWh you put into the battery instead of exporting costs you £0.075.

S
#547 SJB

PianSom 1. My plan for tonight is to only charge to 88% - it's planning to hold that charge in the battery until 0500. I have had plans in the past that just charged to a percentage and then switched to ECO mode. So Predbat can behave as you want in response to the predicted generation. Perhaps you need to tweak your settings a bit more.

  1. I haven't seen this behaviour but when generation is expected to be high enough I would be looking to empty the battery prior to the start of generation as it would be more efficient and cost effective for me to charge from solar but I have a Hybrid inverter and like to eliminate imports in the summer (<200Wh a day).
#548 PianSom

SJB
1 - out of curiosity, what settings are you using?

2 - this is what my AIO has been up to this morning. Lots of export spikes followed by solar recharge. Very wasteful.

G
#549 geoffreycoan

pacemaker isn't the running commentary on this forum and other places that its better to charge overnight at cheap and export as much as you can of the solar? (assuming good price differences import/export). On Flux that was certainly the direction people were going

All depends on the rates for import and export. For Flux after losses were included it wasn’t beneficial to charge overnight and then export the solar, it would actually lose about 1p a kWh. But nevertheless other people took a different view and did charge their batteries overnight. I personally didn’t and Predbat (which takes account of the losses) tends not to either.

One other thing to throw in is the variability of the solar generation and how much you have weighted towards the 10% forecast in predbat. Been getting loads of solar today but the 10% forecast is half the mid-point forecast so Predbat will be predicting something in between.

(My figures for solar generation today look weird as I have 3 arrays and only GE2 has a battery at present, so that’s all I’m feeding into Predbat. GE1 and the FIT array of course are still generating (14kW so far today) which reduces my import (cold day=lots of ASHP consumption) )

T
#550 The Black Cat

geoffreycoan All depends on the rates for import and export. For Flux after losses were included it wasn’t beneficial to charge overnight and then export the solar, it would actually lose about 1p a kWh. But nevertheless other people took a different view and did charge their batteries overnight. I personally didn’t and Predbat (which takes account of the losses) tends not to either.

This is what I thought when Predbat was planning for solar to be exported during the day export rate and not the peak export rate. You mention your Predbat does not do this, any suggestions as to why my Predbat setup is doing it?

A
#551 Arg0t

geoffreycoan How are you getting a 10% entity for Solcast?

G
#552 geoffreycoan

The Black Cat This is what I thought when Predbat was planning for solar to be exported during the day export rate and not the peak export rate. You mention your Predbat does not do this, any suggestions as to why my Predbat setup is doing it?

Looking at the plan you copied in above, Predbat is force discharging during the peak rate, but as you said in the original post, it does seem to be charging the battery more than it needs to overnight, resulting in day rate export earlier (at a higher rate after losses) than the night rate import.

Looking at the settings you shared, they look OK, but the losses are probably on the low side. Consensus on this forum seems to be that losses total around 10-20%, you’re on 10% which is the bottom end. Suggest increasing to 5%, 5%, 5%. Mine are 5, 5, 4 for comparison.
Assume you have not set predbat_hybrid_inverter to on as you have an AIO?
I would next look at the recommended settings for Flux and check you match them https://springfall2008.github.io/batpred/configuration-guide/#multiple-rates-for-import-and-export-eg-octopus-flux-cozy

And then whether you have set (or not) any of the performance switches https://springfall2008.github.io/batpred/customisation/#performance-related - these can impact the time period Predbat does the cost optimisation over

G
#553 geoffreycoan

Arg0t How are you getting a 10% entity for Solcast?

I’m using
- entity: sensor.solcast_pv_10_forecast_today
- entity: sensor.solcast_pv_10_forecast_tomorrow

Which are template sensors:

{% set d = state_attr('sensor.solcast_pv_forecast_today', 'detailedHourly') %}
{{ (d | sum(attribute='pv_estimate10')) | round(2) }}

And

{% set d = state_attr('sensor.solcast_pv_forecast_tomorrow', 'detailedHourly') %}
{{ (d | sum(attribute='pv_estimate10')) | round(2) }}

They sum the PV10% attribute out of the normal solcast forecast as its not available as a direct sensor

S
#554 SJB

PianSom Here you are (note my input_number.predbat_rate_high_threshold is set high to discourage exports between 1600 and 1900 to maximise DFS results, I would normally use 0):
input_number.predbat_battery_loss 0.05
input_number.predbat_battery_loss_discharge 0.05
input_number.predbat_battery_rate_max_scaling 0.98
input_number.predbat_battery_rate_max_scaling_discharge 1.0
input_number.predbat_best_soc_keep 0.33
input_number.predbat_best_soc_max 0.0
input_number.predbat_best_soc_min 0.0
input_number.predbat_calculate_plan_every 10.0
input_number.predbat_car_charging_energy_scale 1.0
input_number.predbat_car_charging_loss 0.08
input_number.predbat_car_charging_rate 7.4
input_number.predbat_car_charging_threshold 6.0
input_number.predbat_forecast_plan_hours 24.0
input_number.predbat_holiday_days_left 0.0
input_number.predbat_inverter_loss 0.04
input_number.predbat_load_scaling 1.1
input_number.predbat_load_scaling_saving 1.0
input_number.predbat_load_scaling10 1.0
input_number.predbat_metric_battery_cycle 0.0
input_number.predbat_metric_battery_value_scaling 1.2
input_number.predbat_metric_future_rate_offset_export 0.0
input_number.predbat_metric_future_rate_offset_import 0.0
input_number.predbat_metric_inday_adjust_damping 0.95
input_number.predbat_metric_min_improvement 0.0
input_number.predbat_metric_min_improvement_discharge 5.0
input_number.predbat_pv_metric10_weight 1.0
input_number.predbat_pv_scaling 1.0
input_number.predbat_rate_high_threshold 2.0
input_number.predbat_rate_low_threshold 0.0
input_number.predbat_set_reserve_min 4.0
switch.predbat_active off
switch.predbat_auto_update off
switch.predbat_balance_inverters_enable off
switch.predbat_battery_capacity_nominal off
switch.predbat_calculate_discharge_oncharge on
switch.predbat_calculate_fast_plan off
switch.predbat_calculate_inday_adjustment on
switch.predbat_calculate_regions on
switch.predbat_calculate_second_pass off
switch.predbat_calculate_tweak_plan off
switch.predbat_car_charging_from_battery off
switch.predbat_car_charging_hold on
switch.predbat_car_charging_manual_soc off
switch.predbat_car_charging_plan_smart off
switch.predbat_combine_charge_slots on
switch.predbat_combine_discharge_slots off
switch.predbat_debug_enable off
switch.predbat_expert_mode on
switch.predbat_iboost_charging off
switch.predbat_iboost_enable off
switch.predbat_iboost_gas off
switch.predbat_iboost_solar on
switch.predbat_inverter_hybrid on
switch.predbat_inverter_soc_reset off
switch.predbat_load_filter_modal on
switch.predbat_metric_cloud_enable off
switch.predbat_octopus_intelligent_charging on
switch.predbat_octopus_intelligent_ignore_unplugged off
switch.predbat_plan_debug on
switch.predbat_set_charge_freeze off
switch.predbat_set_charge_low_power off
switch.predbat_set_discharge_during_charge on
switch.predbat_set_discharge_freeze_only off
switch.predbat_set_inverter_notify off
switch.predbat_set_read_only off
switch.predbat_set_reserve_enable on
switch.predbat_set_status_notify on

S
#555 SJB

PianSom 2. That all looks very strange to me.
Is Predbat trying to maintain a battery level? It might be worth checking the GivTCP Control data in HA and seeing if what was set when but I suspect your best bet will be to ask Trefor directly via github.

G
#556 geoffreycoan

SJB Your predbat_metric_battery_value_scaling being set to 1.2 caught my eye as being unusual.
Mine is set to 1.0 and I had to go and read the manual to see what this does https://springfall2008.github.io/batpred/customisation/#scaling-and-weight-options - it values future energy stored in the battery at a higher rate and so will tend to preserve battery charge towards the end of the plan.

Not sure whether this should be on the default 1.0 ?

A
#557 Arg0t

SJB

alternate method to avoid discharge in the usual DFS windows.

  # To improve on saving sessions avoid export during peak periods
  rates_export_override:
   -  start: '16:00:00'
      end: '19:00:00'
      rate_increment: -5
S
#558 SJB

geoffreycoan Thanks Geoffrey.
It's been so long since I changed that I cannot remember why I changed it. It may have been because I was trying to reduce the propensity to export in the 1600-1900 spot and then have to import again (probably trying to bring the plan in line with my own automations).
Another setting to play with in preparation to the great summer export 🙂.
I'm afraid I have an irrational desire to minimise imports and to only import an the lowest Flux rate - haven't adjusted to the fact the Predbat is usually correct even if the saving is only 4p. Next Autumn I'll probably swap to Agile and then it might be a different story.

S
#559 SJB

Arg0t I know this was implemented just after Trefor told me what to do, he did not think I should change to rate_export_override and after all I have a working solution that does not require editing the apps.yaml.

#560 PianSom

SJB
Many thanks for posting - I find it such a pain to cut and paste these values So I really appreciate the effort.

My settings are broadly the same as yours (slight differences in the losses numbers), except
input_number.predbat_metric_battery_value_scaling - I have 1.0 (you 1.2)
input_number.predbat_load_scaling10 - 1.2 (1.0)
input_number.predbat_metric_min_improvement_discharge - 0.1 (5.0) !!!!!!!
input_number.predbat_pv_metric10_weight - 0.17 (1.0)
input_number.predbat_rate_high_threshold - 0.0 (2.0) !!!!!!!

So it looks like I need to focus on the last three.

My switch settings are pretty identical, other than:
switch.predbat_inverter_hybrid - off (on) - I have an AIO
switch.predbat_metric_cloud_enable - on (off)
switch.predbat_set_charge_freeze - on (off)
switch.predbat_set_inverter_notify - on (off)
switch.predbat_set_reserve_enable - off (on)

I will investigate these, but the "set charge freeze" looks suspicious.

EDIT - so it seems that the two input_selects you have different are designed to reduce discharges. I have the defaults, you have tailored to reduce. The middle one I am close to Trevor's recommended value (0.15) - you are a way off.

switch.predbat_set_charge_freeze is enabled by default, and allows Predbat to hold the battery level while charging. Doubt that is causing my issue. switch.predbat_set_reserve_enable I am against the default for some reason; I will move back.

T
#561 The Black Cat

geoffreycoan Looking at the settings you shared, they look OK, but the losses are probably on the low side. Consensus on this forum seems to be that losses total around 10-20%, you’re on 10% which is the bottom end. Suggest increasing to 5%, 5%, 5%. Mine are 5, 5, 4 for comparison.
Assume you have not set predbat_hybrid_inverter to on as you have an AIO?
I would next look at the recommended settings for Flux and check you match

I've changed my battery charge/discharge and inverter losses to 5% and I do have the hybrid_inverter switch off. I've changed the metric_battery_cycle to 0.5 (I have tried it at 0 and it made no significant difference).
I've checked the Flux setup and the parameters are set as recommend apart from the best_soc_keep which is set to 2.7 as previous described.
I've had a look at the performance related switches; I'm running on an old IBM T60 laptop so I've got calculate_plan_every set to 15 mins, calculate_second_pass off and calculate_fast_plan off.
Predbat is still planning to charge to 93% tonight which means it will start exporting solar to the grid at 12:30 tomorrow, again, it doesn't make sense to me as it is importing extra energy overnight into the battery at a cost of 19.13p, which means the solar tops up the battery earlier and then starts exporting excess solar at a rate of 14.86p (looking at the costs on the plan including losses). Even if you assume that the solar export only has the inverter loss of 5%, it would bring the export rate to about 16p which is still much less than it cost to import the extra energy overnight to allow the early solar export.


I'm at a loss as to what to do, are my assumptions incorrect that it must be better to just charge enough in the battery overnight so that I get to 100% at 4pm to allow a full export during the peak rate? I will have to try and work out the costs of doing it that way compared to the Predbat plan.

#562 PianSom

SJB input_number.predbat_metric_min_improvement_discharge 5.0

I have moved to this, to see if it stops my daytime discharges. Sadly not a huge solar forecast for few days, so may take a while to work out if it does the trick

S
#563 SJB

PianSom Many thanks for posting - I find it such a pain to cut and paste these values So I really appreciate the effort.

You're welcome - I found a script to pull out the entity details from HA, loaded into Excel, filtered out the ones I didn't need and pasted in - so quite easy in the end and well worth looking for as pasting pages of screen shots is tedious. Once I've modified the script to just get the Predbat control entities I might publish it. Roger "DJ" Moore's post is what I used. https://community.home-assistant.io/t/export-devices-and-entities/259465/6

PianSom input_number.predbat_metric_min_improvement_discharge - 0.1 (5.0) !!!!!!!
input_number.predbat_pv_metric10_weight - 0.17 (1.0)
input_number.predbat_rate_high_threshold - 0.0 (2.0) !!!!!!!

I wouldn't worry about these, as you know 2 are for discharge control, and predbat_pv_metric10_weight is set to 1 as I have pv_estimate=10 in apps.yaml. I had difficulty getting the PV predictions to work for my system, it usually matches or out performs the 10% figure, but 'most likely to occur' prediction is often way out - generally too high on days of low generation and too low on days of high generation. In the winter with more changeable weather the forecast is even worse. Having too high a prediction can mean importing outside of the preferred price range. I prefer to ensure I import at the low rate than run the risk of importing at the high rate. It's not perfect but it works for me. I'll be monitoring it in the summer but I think that as the weather stabilises the 10% figure will be more inline with the 'most likely to occur' figure.

switch.predbat_set_charge_freeze I turned this off as I don't want that behaviour, switch.predbat_set_reserve_enable I don't recall looking at this but I currently don't reserve anything other than the standard 4%.

A
#564 Arg0t

PianSom are you not neutering predbat? believe that will result in no discharge, from battery unless, it's worth 5p more than the price to recharge later.

#565 PianSom

Arg0t
Maybe, but at the moment - as you can see from the chart I posted above - the current behaviour is madness: cycling around discharge and then charge again when the sun is shining. Burning the battery losses for no good reason. I'm not sure the 5p hurdle will stop it altogether, but at least it may stop some of it...

If you have any other suggestions I am really all ears - please!

A
#566 Arg0t

PianSom doesn't it apply also in lower solar days? unless you make more than 5p a kWh it will not charge to discharge from grid.
My thinking is it must be of higher or equal profit to charge, discharge and then recharge from grid, but there are so many variables in settings and your personal needs it's hard to say it's explicitly X setting.
I'd probably go with input_number.predbat_metric_min_improvement_discharge = 1.0, to remove the fine margin gains but not completely avoid.

A
#567 Arg0t

PianSom may also be worth a github ticket.

G
#568 geoffreycoan

PianSom Think you should raise a GitHub issue, maybe Trefor has broken something.
Or install an earlier version to confirm it’s something that’s happened recently.

SJB an alternative way to extract your predbat settings is to just use the predbat save/restore settings feature, create a settings file and then copy/paste what you need out of it.
It is YAML formatted though so each entity spreads over several lines which makes it a bit voluminous

@The Black Cat I agree, it doesn’t look right. I can’t see anything obvious in your settings that is causing that to occur.
Looking at the predbat config docs, you could try (in suggested order):
(1) predbat_combine_charge_slots to off
(2) turning predbat_calculate_regions off
(3) calculate_second_pass to on
(4) calculate_tweak_plan to on
(5) calculate_fast_plan to on - I would have said having this set to off is the right setting, but worth a try

Otherwise I think it is looking like a predbat bug/unexplained behaviour. Try installing an older version of predbat to see if it behaves better, then this will give better info for a GitHub issue

Sorry I can’t advise on either of the two weird plan issues

A
#569 Arg0t

geoffreycoan any thoughts on how we could get entities that show the predbat calculated PV forecast as daily total with an hourly attribute?
predbat.pv_energy has all the data but it's cumulative from midnight today rather than a daily total.

G
#570 geoffreycoan

Arg0t Assuming you want to draw this in a graph alongside/instead of the solcast forecast as Predbat merges and weights together the PV 50% and PV10% forecasts.

It’s not immediately available as an entity output that I can see as pv_energy is like all Predbat entities a forecast from ‘now’ going forward with cumulative figures from midnight today.
In my case, the first value is 6.4 and then they stay flat overnight and start rising tomorrow about 7am.

predbat.pv_energy_h0 contains the ‘to now’ PV generation, again currently 6.4, so is it possible to iterate through the ‘result’ attribute of pv_energy and subtract the pv_energy_h0 value?

#571 PianSom

Arg0t @geoffreycoan @The Black Cat

I have raised an issue describing both behaviours. #791 if you want to follow.

Thanks for everyone's attention.

J
#572 Jellybaby

Was having another peek at the gas thing a short while ago and these are the options I have currently

Would I select the one with the lightning bolt for this

G
#573 geoffreycoan

Jellybaby its covered in the bottle cap dave Octopus integration docs https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/setup/energy_dashboard/

You can only get today’s gas data if you have a smart meter and an octopus home mini.

For electric you can proxy using your inverters import meter sensor if you don’t have a home mini.

BTW worth applying for a home mini, gives you semi real time consumption data in the Octopus app (and octopus integration). I applied to Octopus, and about 2 months later it arrived

J
#574 Jellybaby

geoffreycoan ah ill give it a read, still waiting for Gas to start showing on octopus account as I officially started on Wednesday so thought id get a head start on what to do 🙂

Don't have a Mini though so may be SOL

L
#575 lifco

As asked above, you can have unlimited slots, not just for the peak time like this

Simple 2 way

# To optimize session savings and minimize export activities during peak periods
rates_export_override:
  - start: '16:00:00'
    end: '19:00:00'
    rate_increment: -5  # Reduce export rate by 5 units during peak hours
  - start: '12:00:00'
    end: '14:00:00'
    rate_increment: -3  # Moderate reduction in export rate during mid-day hours

Or even more slots

# To optimize session savings and minimize export activities during peak periods
rates_export_override:
  - start: '16:00:00'
    end: '19:00:00'
    rate_increment: -5  # Reduce export rate by 5 units during peak hours
  - start: '12:00:00'
    end: '14:00:00'
    rate_increment: -3  # Moderate reduction in export rate during mid-day hours
  - start: '22:00:00'
    end: '23:59:59'
    rate_increment: -7  # Significantly reduce export rate during late hours
  - start: '00:00:00'
    end: '01:00:00'
    rate_increment: -4  # Reduce export rate during early morning hours
G
#576 geoffreycoan

danerf Congratulations on your first contribution to Predbat, adding how to setup your MG4 EV charging. I see it in the latest release that Trefor has pushed through this morning.

Also a number of doc enhancements from me including adding a set of ‘HA basics’ video links to the install guide

Enjoy!

R
#577 Rbor

geoffreycoan
Arg0t

any thoughts on how we could get entities that show the predbat calculated PV forecast as daily total with an hourly attribute?
predbat.pv_energy has all the data but it's cumulative from midnight today rather than a daily total.

I am interested in this and Geoffrey has a suggested fix.
I know that PredBat is about predicting behaviour in the future but having a one day (current day) view is really informative. I find having graphs spanning 48h can make it difficult to see trends.

In the Data Prediction ApexChart code, I have simply amended the 'span' part of the code to:
span:
start: day
offset: '-0h'
This gives me a nice current day view.

But how do I do this for tomorrow?

Rob

R
#578 Rbor

Rbor To add to my previous post, I can draw a graph for tomorrow but I want the values to start at zero, not the continuation values from 'today'.
Hope that makes sense.

Rob

R
#579 Rbor

geoffreycoan I have been looking at some of the docs and have spotted a couple of glitches in 'video-guides.md', Energy Tariffs section

The link to 'Playlist .......' instead links to a video on using Agile
The link to 'Octopus Agile import _ Agile Export' instead links to Intelligent Octopu, the same as the link above.

Rob

G
#580 geoffreycoan

Rbor Here’s a partial answer that will work in the evening when the sun has stopped shining to give you a chart from zero (i.e. excluding today’s generation) ….

I amended the data generator for best_pv_energy to subtract the value of predbat.pv_energy_h0 which is the ‘so far today PV generation’ figure. So not quite what you wanted if the sun is still shining today. There aren’t any predbat entities for solar tomorrow and I don’t think Trefor will want to create yet more output entities for different scenarios. It may be possible to do more clever looping and work out the value of the PV forecast at just before midnight and subtract that from the best_pv values, but that’s further investigation work …

Here’s the YAML for the original and ‘zero’ PV energy lines in Apex:

  - entity: predbat.best_pv_energy
    stroke_width: 1
    curve: smooth
    name: pv
    show:
      in_header: raw
    data_generator: >
      let res = []; for (const [key, value] of
      Object.entries(entity.attributes.results)) { res.push([new
      Date(key).getTime(), value]); } return res.sort((a, b) => { return a[0] -
      b[0]  })
  - entity: predbat.best_pv_energy
    stroke_width: 1
    curve: smooth
    name: PV ZERO
    show:
      in_header: raw
    data_generator: >
      let x=hass.states['predbat.pv_energy_h0'].state; let res = []; for (const
      [key, value] of Object.entries(entity.attributes.results)) { res.push([new
      Date(key).getTime(), (value-x)]); } return res.sort((a, b) => { return
      a[0] - b[0]  })
J
#581 Josephiah

geoffreycoan To pick up on the previous conversation (hmm, maybe should break this one out separately...) on predicting heat demand, I've started looking into this. From my digging through the barrel of learning curves that is HA, I reckon it should be possible to do it with a template sensor, but I just can't get it to work - I've posted some questions on the HA forum here, so will see if anyone has any suggestions.

A
#582 Arg0t

geoffreycoan Thanks for the starter. I'd be happy to extract the 23:55 results attribute from pv_energy with the current actual, then do the same for tomorrow and subtract today.
In the morning today would be forecast, through the day an updated forecast with actual, in the evening the actual.

This would at least allow me to measure easily the impact of load_scaling10.

L
#583 lifco

Here is mine that i use, pretty much what you want

- entity: predbat.best_pv_energy
  stroke_width: 1
  curve: smooth
  name: PV
  show:
    in_header: raw
  data_generator: |
    const formatResults = (results) => {
      return Object.entries(results)
        .map(([key, value]) => [new Date(key).getTime(), value])
        .sort((a, b) => a[0] - b[0]);
    };
    return formatResults(entity.attributes.results);

- entity: predbat.best_pv_energy
  stroke_width: 1
  curve: smooth
  name: PV ZERO
  show:
    in_header: raw
  data_generator: |
    const baseEnergy = hass.states['predbat.pv_energy_h0'].state;
    const formatResults = (results) => {
      return Object.entries(results)
        .map(([key, value]) => [new Date(key).getTime(), value - baseEnergy])
        .sort((a, b) => a[0] - b[0]);
    };
    return formatResults(entity.attributes.results);

- entity: predbat.best_pv_energy
  stroke_width: 1
  curve: smooth
  name: PV Average
  show:
    in_header: raw
  data_generator: |
    const averageEnergy = calculateAverage(entity.attributes.results);
    const formatResults = (results) => {
      return Object.entries(results)
        .map(([key, value]) => [new Date(key).getTime(), value - averageEnergy])
        .sort((a, b) => a[0] - b[0]);
    };
    return formatResults(entity.attributes.results);

- entity: predbat.best_pv_energy
  stroke_width: 1
  curve: smooth
  name: Normalized PV
  show:
    in_header: raw
  data_generator: |
    const maxEnergy = calculateMax(entity.attributes.results);
    const formatResults = (results) => {
      return Object.entries(results)
        .map(([key, value]) => [new Date(key).getTime(), value / maxEnergy])
        .sort((a, b) => a[0] - b[0]);
    };
    return formatResults(entity.attributes.results);

- entity: predbat.heat_demand
  stroke_width: 1
  curve: smooth
  name: Heat Demand
  show:
    in_header: raw
  data_generator: |
    const formatResults = (results) => {
      return Object.entries(results)
        .map(([key, value]) => [new Date(key).getTime(), value])
        .sort((a, b) => a[0] - b[0]);
    };
    return formatResults(entity.attributes.results);

# Define helper functions
calculateAverage: |
  const results = Object.values(arguments[0]);
  const sum = results.reduce((acc, curr) => acc + curr, 0);
  return sum / results.length;

calculateMax: |
  const results = Object.values(arguments[0]);
  return Math.max(...results);
S
#584 SJB

SJB I found a script to pull out the entity details from HA

I promised a more Predbat configuration specific solution. The easiest way I have found to get the Predbat settings from HA for pasting here (or other places) is to use a script like the one below in the Template section of Developer Tools.

{% for state in states %}
{%- if ('input_number.predbat' in state.entity_id) or ('switch.predbat' in state.entity_id) %}
{{ state.entity_id }}={{ state.state }}
{%- endif -%}
{% endfor %}

This gives:

the contents of the rhs box can be copied and pasted.

A
#585 Arg0t

lifco

Can we get that as an entity?

G
#586 geoffreycoan

@SJB
Neat script, thank you, if you don't mind I will add this to the predbat documentation as a useful way of exporting the config

Arg0t unfortunately not, I tried creating a template sensor with the above script, and:

Would need to set a sensor attribute instead of the sensor state, and I don't think you can do that

R
#587 Rbor

This is a query about the PredBat plan.

From 12:00–13:00 (Two 30 minute slot), I have a PV predictions of 1.05 and 0.97 kWh
Does this mean that my kWh over the hour is 1.05 + 0.97 = 2.02 kWh ?
Or is it the average of (1.05 + 0.97)/2 = 1.01 kWh ?
I suspect that 2.02 kWh is correct and fits in far better to what I am seeing happen.
..... with similar argument about Load.

Thanks

Rob

R
#588 Rbor

I am trying to make sense of the Apex charts.
I have copied my Data Prediction graph.

I am trying to consolidate the values shown above the chart with the chart and the values shown below the chart on the key.
The 'Actual' values (up to the blue vertical dotted line) all agree.
The 'Prediction' values don't seem to agree at all.
An an example,
Above the chart, PV is shown as 18.4 kWh
The PV line for accumulated PV over the chart is 22.0 kWh
The PV value shown below the chart 34.3 kWh

I can't see how the three PV values are linked.
There are similar discrepancies for Load, etc.
The discrepancies seem to occur on other charts also.
....... or maybe I have just lost the plot!

Rob

G
#589 geoffreycoan

Rbor The PV prediction and load prediction are per half hour slot. So if you want the total over an hour, add them up.
Bear in mind that the PV figure is between the PV 50% and PV 10% estimates from solcast, depending on your weightings in predbat. And of course the solcast estimate is just a prediction anyway.

The graphs I find are not massively useful any more. The only one I really used to use was the rates over time overlaid with load over time. And I use the predbat plan for that now.

But answering your question, the figures at the bottom, for PV are PV best, which will be to the end of your forward plan window. I think you said that you had truncated your plan to only show tomorrow’s data. The totals though are as output by Predbat.
And the totals are from midnight last night counting forward, so are offset by today’s generation/consumption, which as we said earlier makes them harder to use.

P
#590 pacemaker

danerf

I have now made my custom Predbat table card public. Install instructions are available on the repo: https://github.com/pacemaker82/PredBat-Table-Card

Currently supports configurable columns (any columns in any order), as well as some styling. Feel free to make any requests on the repo itself.

R
#591 Rbor

pacemaker I have just downloaded your plan card and have it installed and running in my dashboard. A brilliant enhancement. Well done and very much appreciated by me.

Rob

P
#592 pacemaker

Rbor Thanks mate.

Already flying in with the updates, I made @PianSom cry with some bad alignment 🙂

G
#593 godfreym

pacemaker Thanks for this, I looks ggod

G
#594 geoffreycoan

pacemaker That looks really cool, a great addition to the Predbat ecosystem,

Trefor hasn’t responded to the ticket I raised last week about adding more configurability to the predbat card from within predbat, things like column order, number of decimal places, reset total cost at midnight.
https://github.com/springfall2008/batpred/issues/782

There’s part of me that doesn’t like the idea of having to post-process the predbat plan card, double handling all the data, slows the dashboard down as it has to parse the HTML in JavaScript, munge around, re-output and then render it, etc.

Of course counter view is that we’ll never get something that fits everyone in the core product, especially things like colours and icons can be very much a matter of personal preference. Yours definitely looks prettier, less ‘hard functional’ than the core product.

Of course room for both options. i would like more flexibility in the core product, and for some people that’ll be enough of an improvement, and for others, they’ll want even more. See what Trefor says I guess

D
#595 danerf

pacemaker that is fantastic! Thank you very much

P
#596 pacemaker

geoffreycoan yeah as soon as trefor changes the HTML my card is screwed, I 100% agree. Just filling a gap for now until the data in the table can be more readily available from entities (ideally!) at which point I'm happy to switch the data source over from the source HTML

P
#597 pacemaker

Added support for import/export in single column, special treat for @PianSom

#598 PianSom

pacemaker
You know in your heart that I was right ...

I've started a GitHub Discussion of some other suggestions here, if anyone wants to chip in

W
#599 Wavy Davy

pacemaker Love the table but do I have to do anything else other than add the text "import-export-column"
I get a error

R
#600 Rbor

pacemaker I have updated the card but the display hasn’t changed in my dashboard. I tried deleting the card and adding it again but still no difference. Any idea what is going wrong?

Rob

D
#601 danerf

Rbor Sorry if this question is very stupid, but have you updated the PredBat Table Card in HACS?

W
#602 Wavy Davy

I have now....... ooops
That sorted it. Thanks forgot to do that.

P
#603 pacemaker

Yes sorry all - you need to force update from HACS or wait for HA to tell you its ready to update (which takes some random amount of time)

PianSom I've started a GitHub Discussion of some other suggestions here, if anyone wants to chip in

Thanks will take a look later.

R
#604 Rbor

danerf Thanks. This is why I hate HA. Every time I make some progress, there is another button to press, usually hidden away (Redownload).
Anyway, I have redownloaded and reloaded but made no difference.
I also deleted the card and loaded it afresh. Still no change.
I am running in Export mode so would this be the reason?

Rob

D
#606 danerf

Rbor it's a big learning curve for sure

R
#607 Rbor

A query about Predbat car charging using a Zappi and Agile.

I have set up an automation (using the zappi example from the Car charging planning documentation).

In my apps.yaml, I have added the car_charging_battery_size and car_charging_limit:
The car_charging_soc: is set as 0 and the yaml comments refer to a 'sensor'.
The zappi won't know the soc % until the EV is plugged in and I assumed that this would be picked up.
This morning I set everything up and plugged my EV in. My current SOC is 75%.
I have car charging plan smart enabled, my charging rate and threshold set. I also have a Car charging planned ready time set and car charging hold enabled. I have watched the video twice more.

Predbat produced a plan, using the cheapest Agile slots but starting from 0% as my SOC (allocating many slots adding up to my total battery size). I just needed 25% of my total battery size to get to full charge.
Is there a way of getting the soc % without having to input this into apps yaml for every car charge?

Thanks

Rob

G
#608 geoffreycoan

Rbor The car_charging_soc: is set as 0 and the yaml comments refer to a 'sensor'.
The zappi won't know the soc % until the EV is plugged in and I assumed that this would be picked up.

Predbat produced a plan, using the cheapest Agile slots but starting from 0% as my SOC (allocating many slots adding up to my total battery size). I just needed 25% of my total battery size to get to full charge.
Is there a way of getting the soc % without having to input this into apps yaml for every car charge?

From: https://springfall2008.github.io/batpred/apps-yaml/#car-charging-integration

“To make planned car charging more accurate, configure the following items in apps.yaml:

  • car_charging_soc - You should configure this to point to a sensor (on the HA integration for your EV charger) that specifies the car's current % charge level. If not set, Predbat will default to 0%.”

You need to configure car_charging_soc to point to the Zappi sensor for your EV Soc. Appreciate it won’t have a value until you plug the car in, but once you do, Predbat should recalculate the plan correctly

That’s my read of the docs anyway

D
#609 DD

Rbor The zappi won't know the soc % until the EV is plugged in

The zappi has no way to access the car's SoC - that's not communicated along the AC charging cable. You'd typically need an integration using the car's API to retrieve the status.

G
#610 geoffreycoan

DD thanks. Spo Rbor with this limitation, if you don’t have a car API that can be interrogated for the Soc, create a custom numeric helper, point apps.yaml to your custom helper (eg: input_number.manual_car_soc), and you’ll have to manually set the helper to the car’s Soc value to get predat to calculate the plan accordingly

D
#611 DD

(There are some enhancements being made to the AC charging Comms, so that, for example at a public chargepoint the car can identify itself to the chargepoint, for billing purposes. The standard signalling protocol is very simple, but I think they're superimposing an optional ethernet-style signal on top. I'm not sure if sending SoC is part of the dataset. See "plug and charge" and ISO15118.)

R
#612 Rbor

geoffreycoan
DD
Thanks for the advice.
Now to find out how to set up a helper in HA! Predbat has taught me so much about HA.

I have investigated obtaining an API key for my EV. Not easy getting hold of them and there may not be an integration for HA. Some companies charge.
PredBat car charging looks like it runs smoothly on Octopus Intelligent with Octopus doing much of the heavy lifting.
But other tariffs such as Agile are more difficult. Still I have everything set up for Predbat car charging if I go that way.

Meanwhile, I will schedule charges with my Zappi using the myenergi app, selectively choosing the cheapest Agile rates.

Rob

R
#614 Rbor

geoffreycoan
Thanks.
I have set up the helpers and have linked them to my apps.yaml file.
danerf
I have worked through the section about MG but wondered whether this was a workaround for Hypervolt Car Charger and whether this is needed with a Zappi.

In this section, I noticed the following:

In Homeassistant, turn on the Predbat creates switches.

switch.predbat_car_charging_hold switch.predbat_car_charging_manual_soc switch.predbat_car_charging_plan_smart

switch.predbat_car_charging_manual_soc should start on a new line.

I found the last part of this section, including the example, confusing:

Finally, for simplicity, add the below to your HA Dashboard. Once the charger is switched to true and your Target SOC % is higher than the kWh currently in the car, Annoyingly, you have to calculate the kWh your vehicle has in total by taking the Percentage left in the car / 100 * Total Capacity of Battery.

I wasn't sure where I was to include this information, nor whether it is specific for a HyperVolt.

Setting up Predbat for manual car_charging, rather than via Octopus Intelligent is not a straightforward task (at least not for me!)

My conclusion after all this is that I should charge my EV using the zappi app rather than predbat .......

Rob

#615 PianSom

Hey @geoffreycoan

Do you use the default HA Energy dashboard at all? I keep an eye on it - partly for the Solcast graph (until I get around to implementing the real time one referred to above in this thread) but mainly to keep an eye on my current daily energy costs. For the latter I have followed the BottleCapDave (your?) instructions about picking up the current p/kWh cost of import from his integration.

It strikes me now that actually Predbat has a more accurate cost, since it knows about both Power-ups and Saving Sessions (long may they last), whereas sensor.octopus_energy_electricity_REDACTED_current_rate knows about neither and so the daily total is wrong. (I know there are timing differences in payment dates, but don't really mind about that.)

As far as I know, though, Predbat does not expose its "adjusted" current rate as a sensor I could use. Am I right about that?

G
#616 geoffreycoan

PianSom Yes I use the HA Energy dashboard all the time. I use Predbat for daily consumption monitoring and the Energy dashboard for yesterday/last week and all historical analysis of kWh and cost.
I have all 3 of my inverters and now 2 batteries feeding into it, and (recent hack) the ASHP registered as Gas consumption so I can see that consumption over time as well.

I followed the speaktothegeek video guide for setting up multiple tariffs on my import utility meter for when I was on Flux, and had these broken out in the energy dashboard for peak import, day import, etc. When I moved to agile of course this wasn’t much use and so I worked out how to get the current cost driven off the BottlecapDave Octopus integration, and feed that into the dashboard in place of the day rate.

The power up event was an extension of the speaktothegeek multi tariff approach. I added an additional “free” tariff to the utility meter and I have an automation that swaps between the ‘day’ tariff and the ‘free’ tariff for the saving session period. So I get data like this:

Only thing this doesn’t do is the saving session income which could be done by extension with another tariff, but its not something I’m bothered about

P
#617 pacemaker

For those interested, the custom Predbat plan card I've been working on has come a long way since last mentioned. HA install instructions here: https://github.com/pacemaker82/PredBat-Table-Card

A few things:

  • As mentioned before, supports all columns, including moving them around how you want, and have as many as you want.
  • Supports light and dark mode now, will auto switch
  • Supports showing adjusted prices only (Predbat's HTML debug mode prices in (brackets))
  • Supports import/export prices in single column
  • Cleaner UI elements including clear day delineator
  • Added Plan Last Updated time

Thanks to @geoffreycoan and @PianSom for all the great suggestions.

R
#618 Rbor

pacemaker I like what you have done here.
The bold line at the end of the day is good – saves me searching the time column to get the end of the day.

Some suggestions for alignments and emphasis.

  1. In my view kWh for Load is shown below Load, not alongside as in your screenshot:

Would it be worth considering showing units and % below PV, Load, Car and SOC, as in Trefor's plan?

  1. Look at the PV entries as generation reduces:

    Could the number be aligned for consistency?
    Is there a similar situation for the Cost column where there is no pence shown (or is it OK here?)

  2. I like the 'Last updated' line at the top. Should this all be embolden (or the time embolden)?

Keep up the good work ......

Rob

P
#619 pacemaker

Rbor

Hello - thanks for the feedback.

1) This is just text wrapping in action. The width of the table you have means that the columns are crushing together. The PV column next to it has wider content (the sun and value) v.s load so keeps the entire column wider. Some options are minimum widths to force consistent headers, or as you say, have the unit on the next line. The only trouble with the latter is for those with wide tables (full screen) the header titles will look a bit odd. I'll take a look though.

2) Is just following Trefor's plan, he doesn't use a sun icon for the low PV values in grey. I can add one though to make it align. The cost (and any column) with no value will just show a "-" if you set the YAML code up per read me (or the cell will be empty)

3) Maybe - will take a look!

Thanks again for the suggestions.

R
#620 Rbor

pacemaker Looking at your YAML entries, column width is set to 100.
I can get the Load kWh on a single line, if I increase this to 200 kWh but it then far too wide for a mobile device (such as my iPhone and iPad). My desktop shows the same.

Would the PV, Load, Car, SOC and Total Cost clowns stand out better with units below?
Screenshot below is taken from my desktop (24" screen) for my default desktop view.

But I use my mobile devices for Predbat much more for viewing Predbat Plan.

Hope comments are useful.

Rob

P
#621 pacemaker

Rbor

yeah the width is 100% of the container. If you use the card in the standard multi column templates, then the 100% width is much less than the 1 column/1 card template which uses the entire width of the screen.

Either way I am considering how I might be able to react depending on the viewport (mobile vs desktop) and alter the headers appropriately.

I pushed 1.1.8 this morning which force added the grey sun icons in to fix that alignment. (you can see it working in the screenshot)

R
#622 Rbor

I have redownloaded v1.1.8 and the grey sun shows up nicely on desktop. iPhone and iPad. It is a neat fix.

Rob

R
#623 Rbor

pacemaker Just noticed. There is no Car/kWh column on your plan. Will this only appear if Predbat has allocated charging slots? On Trefor's plan, Car and iBoost columns only appear if they are 'actiatived' via yaml or a predbat switch.

Rob

P
#624 pacemaker

Rbor you need to add car-column to the card YAML config. All columns on my custom card are opt-in via the card YAML. Details in the readme

W
#625 Wavy Davy

pacemaker Can you check auto switch as mine hasn't.

P
#626 pacemaker

Wavy Davy Can you check auto switch as mine hasn't.

sorry I am not following...

W
#627 Wavy Davy

You said it should auto switch (light/dark) I assume based on HA scheme settings. I have mine set to dark but the table is light scheme setting.

J
#630 Josephiah

I'm not sure if this is one for @pacemaker or one I should raise on the Predbat Github:
I've never quite understood what the final cost column is representing. I get that it increments up and down depending on consumption/generation, but why does it seem to start at an arbitrary value? Wouldn't it make more sense if it reset to £0.00 (or perhaps the value of your daily standing charge) at midnight?

J
#632 Josephiah

Thanks geoffreycoan But this is exactly what I am getting at: it doesn't show a reset to zero (or standing charge value) at midnight, neither on my cards, nor in the example in the documentation. Wouldn't it make more sense to do so? And feels like it would be a fairly easy change to make.

G
#633 geoffreycoan

Its working to design even though that design may not seem intuitive.

The way that predbat works is it predicts future cost from midnight today going forward. This is the way Predbat works and feeds all the charts and graphs.

In the example above, in the 23:30 slot it starts off with £1.47 cost so far today, there is 86p of cost incurred in the slot. So at the start of the 00:00 slot the total from midnight will be £1.47+86p = £2.33.

Same carries on for all the following slots.

At midnight predbat will reset the ‘cost today’ to zero or your standing charge. If you take a look just after midnight tonight you will see the Total column resetting.

For readability @pacemaker has added a solid line to the predbat plan card (which reformats the predbat html card) to denote the end of each day, but he’s not manipulating the underlying predbat data which as I said accumulates from midnight tonight.
Potentially could request a feature request for the predbat plan card to recalculate tomorrow’s total charges by subtracting the 00:00 Total cost from all subsequent entries.

P
#634 pacemaker

The card total cost doesn’t “reset” until midnight happens. When you are looking at tomorrow’s total cost you are seeing it in addition to today’s cost up until that time. At midnight predbat will show standing charge plus predicted cost in that first hour, and so it continues.

This is predbat behaviour btw. My card just reflects the same data. I could mess with it but I’m hesitant to veer off

J
#635 Josephiah

geoffreycoan thanks, understood. I wonder if this would be a useful feature request, then, as I think it would make the output more intuitive...?

pacemaker how about adding it as an optional additional column, giving users the option of choosing between the original data and a "sanitised" version for more intuitive viewing?

P
#637 pacemaker

Josephiah pacemaker how about adding it as an optional additional column, giving users the option of choosing between the original data and a "sanitised" version for more intuitive viewing

Tend to agree with @geoffreycoan not to further mess with the data, but an option (that’s off by default) could be an option for those that really wanted it. Something I’ll definitely ponder.

N
#640 neomancer

Does anyone know if switch.predbat_set_charge_low_power when enabled will handle any clipping? my array is 6kw on a 5kw inverter, my only concern is that if predbat is handling the charge rate, it will not increase battery charge rate once i hit 5kw on the solar.

S
#642 SJB

PianSom Actually the charge rate is the maximum from the inverter or the setting inverter_limit_charge.

The switch.predbat_set_charge_low_power only changes the charge rate when you are charging from the grid. Most of the time when charging from solar you aren't likely to be charging from the grid (I know Agile/Power up customers might have different possibilities) and the charge rate will be set to the maximum for the inverter or what you've specified in apps.yaml.

Interesting idea to increase charge rate to manage clipping, I usually lower it. I haven't quite worked out how Predbat will help me with that.

R
#643 Rbor

PianSom
neomancer
I had missed the significance of this yaml entry.

I have a SolarEdge 5kW PV inverter and GE 3.0 AC coupled battery inverter.
I have therefore added the values to 8000 W. I had it set as 3000 W.
This seems counter-intuitive.

Rob

G
#644 geoffreycoan

Rbor The inverter_limit in apps.yaml is only there for Predbat to model clipping AFAIK.

Predbat doesn’t do anything to manage clipping. The switch.predbat_set_charge_low_power only is as @SJB says only used for grid charging the battery and is used by Predbat to calculate the lowest charge rate to charge the batteries at to reach the target SoC by the end of the charge period. Charging the battery at a lower charge rate through the night will (a) improve battery life and (b) keep the batteries warm throughout the night rather than blasting at full charge then holding at 100% SoC for half the night.

neomancer if you have a 6kW array on a 5kW inverter you’re not going to see a massive amount of clipping, only on the hottest peak of sun in the summer. My largest array is 6.24kW of panels on a 5kW inverter. So far this year I’ve only seen 4kW peaks.

Sounds like if people want to include smart varying of the battery charging based on predicted solar and peak clipping this it should be a feature request for Predbat

N
#645 neomancer

As it stands. The charge rate is being managed by predbat as hoped, I don't think it differentiates between solar or grid charges for slow charges.

Any solar excess over 5kw at the moment is going to the battery.

V
#646 Vestas

Oh my word, the docs on predbat got better since the last time I looked.

Nice work 🙂

R
#647 Rbor

I have found the following entity related to car charging:

I can't find any details in the documentation.
Does anyone know what the entity does?

Thanks
Rob

G
#648 geoffreycoan

Rbor I have found the following entity related to car charging:

I can't find any details in the documentation.
Does anyone know what the entity does?

Looking at the Predbat code, it appears that this is set to the time that Predbat will start charging the car. Its in HH:MM:SS format. I’ll add this to the documentation.
Around line 6586 onwards if you want to have a look yourself.

Its been a couple of weeks since I have been back on the Predbat documentation. The last set of changes I made have all been merged in by Trefor but I haven’t made any new changes for a little while. One of the big remaining jobs to do is to go exhaustively through the customisation doc as I’m sure there are other bits missing. I cross checked apps.yaml against the code when I was doing that doc and found and fixed a few anomalies.

J
#649 Jellybaby

Disregard

A
#650 ajcrewe

I'm trying to get predbat to talk to my EDDI solar diverter. All the doc refer to iBoost integration but does anyone know if it is possible to control an EDDI instead? I was imagining something in apps.yaml might do this redirect but is the iBoost comms hard coded in somewhere?

S
#651 SJB

ajcrewe iBoost usage is modeled not taken from an integration. I don't think Predbat communicates with iBoost at all.

A
#652 ajcrewe

SJB How does it do the boost only when the gas price is higher than the elec price then as I think that would have to be part of predbat. I've had a peer at the code but I'm not good enough to work out what it is doing.

G
#653 geoffreycoan

ajcrewe I'm trying to get predbat to talk to my EDDI solar diverter. All the doc refer to iBoost integration but does anyone know if it is possible to control an EDDI instead? I was imagining something in apps.yaml might do this redirect but is the iBoost comms hard coded in somewhere?

As ever, the information is in the documentation ! https://springfall2008.github.io/batpred/customisation/#iboost-model-options !

As @SJB says, Predbat models when its effective to use iBoost or not and includes it in the prediction calculation.
There shouldn’t be any reason why you can’t use an EDDI instead of an iBoost (and I’ll look to make this clearer in the documentation), the key bit is the binary_sensor.predbat_iboost_active entity which will be enabled when iBoost/EDDI should be active - you’d need to create a simple automation to trigger the boost when this is set and turn it off when not set.

ajcrewe How does it do the boost only when the gas price is higher than the elec price then as I think that would have to be part of predbat. I've had a peer at the code but I'm not good enough to work out what it is doing.

Predbat reads your gas price from the Octopus Energy integration and works out what is cheapest to use to heat the hot water (based on boiler efficiency). You need to set metric_octopus_gas in apps.yaml to pick up your gas rate and turn on the switch switch.predbat_iboost_gas.

Rbor I’ve added documentation on predbat.car_charging_start to the car charging part of ‘output data’.

S
#654 SJB

ajcrewe It does not. Predbat predicts that the iBoost will run when the gas price is higher, but it doesn't tell the iBoost to do anything. I don't think that the iBoost integrates with anything, I presume that users of this modeling functionality in Predbat manually program their iBoost.

A
#655 ajcrewe

geoffreycoan Thanks I think I get it now. Am I right that predbat sets binary_sensor.predbat_iboost_active when the appropriate conditions are set and that I need to create the automation that does the relevant thing when that value changes.

G
#656 geoffreycoan

ajcrewe Thanks I think I get it now. Am I right that predbat sets binary_sensor.predbat_iboost_active when the appropriate conditions are set and that I need to create the automation that does the relevant thing when that value changes.

Correct yes, thats the way it works.

I’ll add a sample automation when I next update the documentation, but meanwhile you can copy/adapt the one I wrote for car charging automation which works the same way https://springfall2008.github.io/batpred/car-charge-planning/
(and I need to fix the formatting of that automation as its all messed up. Grr. Always stuff to do…)

Z
#657 Zakalwe

There's no way to control an iBoost remotely.

G
#658 geoffreycoan

Zakalwe Have to admit I assumed there was a HA integration for iboost given the way its documented in Predbat. But not something I have so no personal experience of using them.

I did find https://github.com/JNSwanson/ESP-Home-iBoost which seems to be a way of communicating between HA and iboost based on an ESP, but not a straightforward HA integration

P
#659 pacemaker

Interested in thoughts about my scenario. I have extra car charge slots this morning. Predbat is expecting that my solar will be good based on the solcast prediction, so isn't planning to force my battery not to discharge into the car:

My solar is terrible this morning compared to prediction (way below even the 10%), though Predbat is expecting greatness - how can I ensure the battery doesn't drain into the car?

P
#660 pacemaker

Nevermind, at the last minute (literally as the plan rolled onto 9am) it changed its strategy... phew.

G
#661 geoffreycoan

pacemaker Wow, you can see how Octopus make their money. 31p on Octopus Intelligent Go, and my agile rates are under 10p for most of today.

I’m getting loads of solar at the moment, 5.5kW coming in off the panels.

You can tweak the metric 10 weighting so Predbat is more pessimistic towards the 10% PV, but if its less than the 10% prediction there’s not a lot you can do. What times of day is your automation to re-collect your solcast forecasts because I’ve seen it does change sometimes

P
#662 pacemaker

geoffreycoan You can tweak the metric 10 weighting so Predbat is more pessimistic towards the 10% PV, but if its less than the 10% prediction there’s not a lot you can do. What times of day is your automation to re-collect your solcast forecasts because I’ve seen it does change sometimes

my prediction is usually pretty good, so I'll probably just leave it. It works most of the time 🙂

Z
#663 Zakalwe

geoffreycoan
I see that Marlec have released Ver2 of their Buddy accessory for the iBoost. That now has buttons replicating the buttons on the iBoost and it allows a small measure of remote control (previously all the Buddy did was provide monitoring and display).
The control options are limited as far as I can tell. I think that it only allows you to start a Boost session, which powders the immersion at full pelt. This will drain batteries or import if PV gen is low.

V
#664 Vestas

Zakalwe The boost function isn't designed to work with PV input. Its simply a short term boost like you have with Hive thermostats or any other number of stats. Nor are the timed functions - they simply replicate what you have on any other system. ie - what time do you want heating on and for how long?

Basically its an old device (still useful) from the not so long ago days when PV systems were "use it or lose/export it". All it does is dump excess power and try to replicate the controls which were in place before it was installed.

I think there's probably better solutions for people wanting to integrate water heating than Marlec trying to retrofit "smart" tech onto something which doesn't really need it.

TBH for most people its only really useful now if you're going to start clipping or you're purely old-school electric (no ASHP/etc) as the cost of heating water using gas is less than you could get for export on Octopus Outgoing Fixed.

Bit of a digression....

Obviously its superficially greener using the excess solar but given its not a good idea to leave a gas system boiler totally idle for months you might end up with a repair that blows the carbon budget. Or you might not - we sort of combine it, gas boiler water heating is on for 30 minutes a day in summer & usually only runs for 5-10 minutes or so if its been a nice day. The other thing you can do with dual-fuel system water heating is if you're viewing the hot water tank as an energy store then adjust the electric thermostat upwards a bit, so its getting heated to say 65C or so. That way when the iBoost heats up via solar you've got hotter water stored than the water heated by the gas boiler, so you use less gas for the daily boiler cycle in summer. You don't want to go above 65C as most of the cartridge valves in modern mixer taps are only specced to that, and they do fail/leak - I have that T-shirt 🙂 Everything else is fine bar the cartridge valves, old-school taps win out here...

J
#665 Josephiah

geoffreycoan

Rbor

DD

I think I've managed to add, after a hideous battle with learning a lot about HA templating, a working forecast of heat pump demand based on forecast temperatures using Predbat's Load Forecast input. Take a glance here - it's fairly basic, and relies on you gathering a little data to derive curve fit coefficient, but it seems to work pretty well, and hopefully it's helpful to some others: https://github.com/springfall2008/batpred/discussions/837

P
#666 pacemaker

Interested to know why Predbat is making these decisions to force discharge my battery early in the evening (at 18:00) (during peak demand) running the risk of running out later. Surely it would be better to just do it at 22:30 with the other discharge if there is any left?

R
#667 Rbor

Today was a day of Calibration woes.
I have two GE 8.2 kWh batteries daisy-chained to a AC 3.0 coupled inverter.
At 5:45 pm, I checked everything in advance of the saving sessions. I found that my batteries were charging at full pelt, whereas the Predbat Plan had them discharging.
I checked Predcat to find my current status shown as 'Calibration'.
I checked the GE portal and spotted an inverter warning that I had experienced a BMS low voltage at 11:25 am. On checking, both batteries had recorded 1 kWh. And the batteries had been charging ever since on a calibration.
The calibration finished at 6:35 pm just after the saving session and having charged during 2.5 hours of the peak tariff.
Checking back, the same behaviour happened on 12th Feb: Low BMS warning following by an automatic calibration.

Has anyone else experienced such behaviour and might it be more likely to occur from the constant charging and discharging through running Predbat?
Should I flag this as a potential Issue on Github or is this just my batteries wanting to look after their health and kicking Predbat out for calibration.

For me, I guess it was just one of those things. At least it kicked in when the batteries were empty. Pity it didn't start 2.5 hours earlier, before the peak tariff time and the saving session.

... and Predbat had been running so well .....
☹️

Rob


#668 Hook

My Predbat seems to struggle with saving sessions. Always wants to charge up just before on peak rate when I have plenty of battery.

I’m usually around and just stick it in read only mode and do it manually but today I was out.

At 5.20pm it charged my battery up from 93% up to 100%, held it until 6.30pm before reverting to normal…brilliant.

G
#669 geoffreycoan

Hook I don’t have any problem with my Predbat in the saving sessions. It just auto-joined (although it did have problems with that, getting error 500 about 3 times but I think that was the Octopus server being busy) and then planned a discharge during the session. Before the session it was in Eco mode supplying the house from battery, and afterwards switched back to Eco mode OK.

What do you have input_number.predbat_load_scaling_saving set to? I have mine set to 0.1 to indicate we will use only 10% of the normal house load (I turn the heat pump off for the saving session) and this does cause Predbat to do the required force discharge rather than just leaving it in Eco mode.

I had my own issue in the saving session with inverter number 2 just not discharging at all, it was sitting there doing not a lot despite being instructed by predbat to force export. I think it was having a moment, I did reset to defaults in the portal and then it sulked and wouldn’t talk to GivTCP. I eventually got it exporting using the BBC basic app on my phone and then right at the end of the saving session it decided it liked talking to GivTCP again.
Good job I was at home watching it. All for maybe £1.75 of extra export in that half hour.

I have a different issue about Predbat calculating plans it can’t achieve. This is because I have dissimilar sized batteries on my two inverters and Predbat assumes that the total battery capacity can be charged at 2x the inverter charge rate (2600w). In reality the 9.5kWh battery takes twice as long to charge as the 5.2 battery so Predbat plans say a 3 hour charge that isn’t long enough.
I’ve put a feature request in but have had to resort to setting to read only and start the charging on the 9.5 inverter earlier otherwise its only about half full at the start of the peak rate.

pacemaker I don’t know. I assume you are on a flat export rate and Go for the import.
It would be worth you doing a price over-ride in the peak period to improve your history for DFS:

  # To improve on saving sessions avoid export during peak periods
  rates_export_override:
    -  start: '16:00:00'
       end: '19:00:00'
       rate_increment: -5

You could extend this to later in the evening to save the export until later? There was someone else who had a similar issue raised on Predbat that was having the problem that Predbat would over-discharge at 11pm causing grid import just before the cheap Go period. Might be worth you finding that issue on github to see what was said?

R
#670 Rbor

geoffreycoan
Hook
I have checked further the behaviour of Predbat/inverters/Batteries yesterday (14/03/2024).
See two posts ago for details:
Rbor

Today was a day of Calibration woes.

From the PredBat status report, Predbat has clearly gone into 'Calibration' status mode for most of yesterday.

I have also attached a screenshot of yesterday's GE Power Graph from the GE portal.

I can't see anything in the PredBat documentation about 'Calibration'.
From the GE portal and Octopus Watch, I had virtually identical behaviour on 12th Feb but HA no longer has historical data that far back.
So does PredBat go into 'Calibration' mode every so often? Or is this something initiated by GE?
My GE Inverter notifications also shows a low BMS voltage on 14th March and 12th Feb. However, yesterday PredBat appears to have started its Calibration at 08:07 am, some 3.5 hours before the low BMS warning, although coinciding with the bottom level of my BMS voltage.

Any suggestions? Or does PredBat do this every month? (I have only been on PredBat since 30th Jan).
I will flag a potential issue on GitHub.

Thanks

Rob

R
#671 Rbor

Hook Can you check your Predbat status report for yesterday, 14/03/2024?
Is the entity: predbat.status
For context, see my recent reply: Rbor
See what the stats was leading up to the saving session and whether you had a 'calibration'.

Thanks

Rob

P
#672 pacemaker

geoffreycoan There was someone else who had a similar issue raised on Predbat that was having the problem that Predbat would over-discharge at 11pm causing grid import just before the cheap Go period. Might be worth you finding that issue on github to see what was said?

yeah I have this exact issue. Most nights this is my behaviour:

Sometimes it works out ok and I don't start importing from grid, other days it over discharges. My unit costs are very static (IOG with fixed export) so that's at least predictable. My load is usually pretty stable too at those times... bit strange... will hunt on GitHub

#673 PianSom

pacemaker
I had that problem a while ago. The advice at the time was to increase the minimum reserve charge level. There are two - one "hard" and one "soft". (I don't really understand the difference between hard and soft in this context.) But it was suggested I increase the soft one - Best SOC Keep, I think. As opposed to Best SOC Min.

I recently reduced it back to 0, and the problem has not re-emerged for me. Yet.

P
#674 pacemaker

PianSom

Ah yes this is what I was trying and I guess I didn't realise there was a hard and soft. I must have been setting the hard, as all I achieved was setting the minimum SOC to 6% and then importing from grid, when I really want predbat to stop discharging at 6% and leave me until 4% to run from battery.

#675 PianSom

pacemaker
Ah, so maybe that is what Best SOC Keep means - "do not discharge to grid below this level". As opposed to "do not discharge ever below this level". Maybe.

I sometimes wish that Predbat's HA interface had useful tool tips, for those of us who struggle!

R
#676 Rbor

PianSom
pacemaker

Thanks. These settings are not easy.

I am on Agile and the 'Configuration' document suggests setting Best SOC keep to 0.5.
The settings are described in the 'Customisation' document under 'Battery margins and metric options'.
In Predbat, Best SOC keep is in kWh and I have two 8.2 kWh batteries. So the percentage will be very different from one battery.
I have tweaked this setting up to 0.7 which is just over 4% of 16.4 kWh. I assume that this is the SOC for the inverter as each battery will have its own setting.

I don't really understand the nuances between these settings!

Rob

G
#677 geoffreycoan

Rbor PianSom

Just to recap what the best Soc values mean, they are both in kW:

best_soc_min is the minimum level that Predbat will allow the battery to fall down to. This is the hard limit. If your battery level falls below that Predbat will charge the battery back up to above the minimum, regardless of what the import rate is.
I think the prime intent of this is to have a minimum level that predbat will retain for use of the battery as an EPS.

best_soc_keep is the soft minimum level that Predbat tries to ensure the battery stays above. Its the ‘just in case I have extra load’ limit. It can be exceeded if demand is greater than expected and it won’t trigger a recharge if you drop below it.

Tooltips on HA controls would be useful I agree.

Rbor I can't see anything in the PredBat documentation about 'Calibration'.
So does PredBat go into 'Calibration' mode every so often? Or is this something initiated by GE?

Calibration mode is explained in the FAQ’s https://springfall2008.github.io/batpred/faq/#warn-inverter-is-in-calibration-mode maybe I should add it to the general description of Predbat modes in ‘What does Predbat do’.

To be clear, Predbat does not “go into calibration mode” on its own and it doesn’t force a calibration of the battery. What Predbat is doing is recognising that your inverter has started a battery calibration and is pausing Predbat activities until the calibration has finished.
The calibration would either be something kicked off by GivEnergy or its just something random that your inverter decided to do - there is a suggestion that corrupt data caused by GivTCP can cause a calibration to start but that’s not been demonstrated. To me seems like an excuse to explain an unexpected calibration.

R
#678 Rbor

geoffreycoan Thanks.
I am going to contact GE about my unexpected calibrations.
I get no calibration notifications at all on the GE portal. I tracked it down to a calibration from the Predbat status report.

So what is the difference between:
input_number.predbat_best_soc_min
input_number.predbat_set_reserve_min

Rob

G
#679 geoffreycoan

Rbor So what is the difference between:
input_number.predbat_best_soc_min
input_number.predbat_set_reserve_min

best_soc_min as above is a kW value that predbat won’t let the battery drop below so is used in the predbat plan

set_reserve_min is the minimum soc percentage value that the inverter is set to when doing a forced discharge or Eco mode and is the min value the inverter will let the battery drop to. Its a value sent to the inverter

There is some overlap but they do slightly different things. I was thinking the other day about maybe increasing the set_reserve_min to give me some more contingency in the battery for EPS mode, but decided not to in the end as I would rather use the full battery.

Yes worth talking to GE about the unexpected calibration and why there’s nothing in the logs

#680 Hook

Rbor I’m not at home at the moment. But I checked it at the time.

There was no mention of calibration. But mine always has an issue around saving sessions so I need to look into the settings when I get time.

Rest of the time it’s usually fine.

P
#681 pacemaker

Hi folks,

Wanted to share that the custom Predbat card hit 1.5 and at this point is pretty much stable. @geoffreycoan kept me honest and ended up building in lots of custom options over the past couple of weeks, including allowing to use the existing predbat card style, or mix and match (which is now my own preference).

The part I like the most is changing the table based on your device. HA comes with a conditional card, which allows you to show different cards per condition. One of those conditions is screen size. So you can effectively have as many columns of Predbat info as you want on a big screen, but also setup a second version of the card with less columns for when you're on the go on mobile. (documented here)

I spent some time updating the readme to document everything, as well as add more example usage. Let me know on the GitHub if there's anything you want to see https://github.com/pacemaker82/PredBat-Table-Card

#682 Hook

"What do you have input_number.predbat_load_scaling_saving set to? I have mine set to 0.1 to indicate we will use only 10% of the normal house load (I turn the heat pump off for the saving session) and this does cause Predbat to do the required force discharge rather than just leaving it in Eco mode."

Just had a look and it was set to 1, although I'm pretty sure it was set to 0.5 when I first encountered the issue. Set it back to 0.5. Is it referenced in a config file somewhere?

G
#683 geoffreycoan

Hook Just had a look and it was set to 1, although I'm pretty sure it was set to 0.5 when I first encountered the issue. Set it back to 0.5. Is it referenced in a config file somewhere?

Its described in the Energy Rates part of the documentation https://springfall2008.github.io/batpred/energy-rates/#octopus-saving-sessions

Its worth periodically making a manual save of your Predbat configuration - there’s a drop-down predbat control that does this. A couple of people have reported their predbat savings getting lost/reset, often after an upgrade of Home Assistant. Its never happened to me, but better safe than sorry

P
#684 pacemaker

still struggling with the terminology used (I know its in the docs but it seems so opposite)

Take this for example:

My status is due to be "Freeze Discharge" for the next few hours. But the actual behaviour is to ALLOW battery discharge, not freeze it. The behaviour is that the battery will cover load if solar can't, so it will discharge as needed. The battery will not charge, so excess solar goes to grid.

To me this is 'freeze charge' because that is literally what its doing.

One day I hope Trefor makes this a bit clearer....

G
#685 geoffreycoan

pacemaker I know these Freeze modes are confusingly named, I have expanded the descriptions of these modes at least twice to try to explain.

The way I think of it, there’s two parts, there’s the freeze and there is the discharge.

The SoC is the bit that is frozen (so it won’t rise) but the battery is in Discharge mode so if the load is too high the SoC can be drained down.

Maybe we could persuade Trefor to change the names to something more meaningful, but that depends on finding something that is clearer and more unambiguous. If only there was a way of rewriting the Predbat output to make it more understandable (with tooltips maybe) 🤪

P
#686 pacemaker

geoffreycoan Maybe we could persuade Trefor to change the names to something more meaningful, but that depends on finding something that is clearer and more unambiguous. If only there was a way of rewriting the Predbat output to make it more understandable (with tooltips maybe) 🤪

The sicko in me did do that 🙂

G
#687 geoffreycoan

Predbat going mad tonight and tomorrow morning, Norddata is predicting loads of negative priced electricity

P
#688 pacemaker

geoffreycoan that's some serious battery exercise there! I'm of the view to use the battery as best you can but this seems on the extreme side 😆

R
#689 Rbor

pacemaker You are not the only person confused by the terms. I constantly have to read up what they mean. And then we have 'idle' the 'hold' variations and 'no charge' in the mix.
In your new card, I have moved the SOC column so that it is immediately after the state column.
So I have the sequence:
State, SOC, limit

I find that this sequence has the related 3 columns next to one another and easier to interpret.

Rob

R
#690 Rbor

geoffreycoan Yes, I noticed this earlier.
Predbat predicts by end of day balance at –£7.54p. 😀
Let's hope that this materialises.

Rob

G
#691 geoffreycoan

I agree it seems a bit extreme. It also makes it hard to plan putting on other appliances like the washing machine to maximise the negative import revenue.

I think I’ll see what materialises at 4pm and if the plan is still like this I’ll probably turn off ‘charge on discharge slots’ and maybe put some force charge & discharge instructions in to make it a more even plan.

Agile pricing has been weird recently. Earlier in the week it was quite expensive, peak prices around 40p and the low rates at 15p all night, then I’ve had a few days where my export has pretty much balanced the import money wise, and now I’ll be making a decent profit in a day.
Does make me think the decision to move to Flux or stay on Agile is going to be harder to make. Still got to model it out properly but the rough calculation indicated I’d only be £5 a month better off on Flux. I’m assuming that as I’m on the fixed 15p export rate it can’t change for a year?

Oh BTW, spotted a bug in Predbat with all this negative pricing. The effective import rate (after losses) is more negative than the actual import rate - which can’t be right.

#692 PianSom

Here's another puzzling thing - how can my system possibly spend 70p between 23.30 and 00.00 tonight? I have a AIO 6kW inverter and the load is not expected to be high. 70p at 8.31p/kWh is 8.4kW.

Confused.

T
#693 The Black Cat

PianSom how can my system possibly spend 70p between 23.30 and 00.00 tonight?

Does it include the standing charge?

R
#694 Rbor

geoffreycoan According to Octopus Watch, my energy cost over the last 7 days has been –£6.65 in my favour. PV generation is now well up with average of 19 kWh daily over last week. And heat pump is now using about 9 kWh daily. Nice to get to this stage.

Agile or Flux for summer is the decision, with so little difference between Flux daytime export (provided that my 15p export isn’t reduced). Mine is supposed to be fixed until 18th Nov. And the peak Flux rate is much reduced from last year.
We just need Agile rates to be a few pence below 15p and Agile and predbat could actually beat Flux.
With a lot of solar generation, Intelligent Flux wins out but then Octopus and GE take over the inverter from Predbat.

My current thinking is to stick with Agile for the summer especially with predbat optimising everything. But I have not yet received my April tariff details from Octopus.

Rob

P
#695 pacemaker

Rbor

I couldn't help myself and added a new configuration use_friendly_states in 1.5.1 (out now)

P
#696 pacemaker

PianSom that is standing charge included

G
#698 geoffreycoan

PianSom as others have pointed out, the 00:00 slot includes standing charge.
All explained in the documentation .. https://springfall2008.github.io/batpred/predbat-plan-card/#understanding-the-predbat-plan

Personally I don’t set metric_standing_charge in apps.yaml so all my figures in HA are just for consumption. The HA Energy dashboard doesn’t include standing charge and I can’t affect that, so prefer not to see it.

@Rbor Similar situation for me, things have definitely swung round. My PV is averaging somwhere around 25kWh a day and is certainly double my heat pump consumption thats around 12kWh every day.
Over the last week, 10 days, export is greater than import costs, a few pounds negative, but its quite a recent change, on the 8th and 11th March my heat pump was up to 25kWh on what must have been colder days.

I just messaged Octopus to ask if the Agile or Fixed Outgoing rates would change in April and they confirmed they wouldn’t be 🎉

#699 PianSom

geoffreycoan I just messaged Octopus to ask if the Agile or Fixed Outgoing rates would change in April and they confirmed they wouldn’t be

I am on Fixed Outgoing ending 12 Dec 24. I wonder whether it is possible to change the end date to whatever they are offering now? There would appear to be no downside if you can, since there is no penalty to exiting for a higher rate should one be offered.

R
#700 Rbor

geoffreycoan

I just messaged Octopus to ask if the Agile or Fixed Outgoing rates would change in April and they confirmed they wouldn’t be 🎉

I still want to see this in my Octopus Tariff Change email!

My Agile December 2023 import tariff runs fixed until 18 Jan 2025.
If my SC doesn't change until then, I have an incentive to stay with Agile.
Up here in Yorkshire, Ofgem's SC for my region is set to increase on April 1st from 56.00p to 67.44p per day (about £3.40 per month).
At least Octopus charge 4% less but ........

Agile rates are set on wholesale prices. Will these also drop with flexible rates for gas and electricity falling?
I wonder whether Flux day export rate will be less than Outgoing 15p....

Rob

R
#701 Rbor

geoffreycoan Have seen the post 4 pm Agile rates. I am just sorting out which appliances to set going tonight and tomorrow morning.
I may even use the tumble dryer.

We need to make the most of days like this. Agile does have its moments .....

Rob

G
#702 geoffreycoan

Rbor I still want to see this in my Octopus Tariff Change email!

I don't think we will be getting a tariff change email. I'm pretty sure they have to give a month's notice and there is less than that to go to 1st April. Besides our standing charge went up mid February anyway when we got moved from the Nov 22 Agile to the Dec 23 Agile tariff.

Rbor Agile rates are set on wholesale prices. Will these also drop with flexible rates for gas and electricity falling?

Its the other way round. The wholesale rates are already dropping which is why Ofgem has reduced the flexible rate price cap for the next 3 months - its a formula based on wholesale rates and future rates. Since Agile is priced based on wholesale + margin, we see the benefit in the Agile rates automatically. When I started on Agile in October my average unit rate was 18.5p/kWh, in February it was 12.7p, so I think we're seeing the benefits already.

Interesting seeing the after 4pm Octopus Agile rates, they weren't as low as the Norddata pricing had it, only 2 actual negative slots and a lot of zero pence ones.

Predbat planned a lot of charging and discharging:

So I turned 'calculate discharge on charge slots off' and its only 40p less profitable with nowhere near as much charging and discharging.

There's a decent amount of solar tomorrow so I don't know why Predbat is freeze discharging for a good chunk of the zero pence period. It may refine the plan better as it gets nearer to execution but I'll put some force charges in to ensure the batteries are full before the peak period

R
#703 Rbor

Interesting.
This is my predbat plan from 1 am Sat. I haven't got as many Charge, then Discharges as you had.

We are adjusting the columns in pacemaker's Predbat plan card to suit our needs.
I think this is a neat enhancement.

I haven't changed any of predbat settings. I am not confident enough yet to tweak these.
Predbat also seems to change its settings so often, how will they finish top?

Overnight, I have dishwasher, a washing load and I am topping up my EV. With this overnight load, I reckon predbat will be doing some tweaking.
I think I am better off charging overnight than during the 0p sessions tomorrow as solar would be used first. I want excess solar exported rather than being used for my house load alone. (I don't know whether my logic is sound here, but it sort of makes sense to me). Temperatures have plummeted this evening here so my heat pump will also be more thirsty tomorrow.

I moved onto Agile on 18th Jan from a succession of Flux, then Cosy. Agile with Predbat has nearly halved my energy bill!

Let's hope that Agile prices keep this low overall. Since moving to Agile on 18th Jan, my average import rate has been 10.03 p/kWh.

Sadly for me, I can't now imagine life without predbat! It seems to have taken over my life. It seems to have taken over yours!
Looking back at the early contributions to this thread, I can understand them now! When I started, I really had little idea about what folk were asking.

Rob

G
#704 geoffreycoan

Rbor Yes Agile+Predbat is a very powerful combination. I was able to manage my batteries with Home Assistant and home-grown automations when I was on Flux, but it was a lot easier with Predbat and I definitely wouldn’t have moved to Agile without Predbat. Great software even if sometimes we don’t understand it!

Agile has also been about half the cost of any other tariff for me with the heat pump through the winter. Its cost me more than you because up until just over 3 weeks ago I only had my 5.2 battery which was only just enough to get me through most of the peak period.

Agree with your strategy of maximising income by exporting as much as possible during the day. I’ve been playing with my own plan as it seemed to be going in to the peak period with comparatively little stored charge. Part of my problem is that Predbat doesn’t (yet) correctly calculate the charge & discharge rate for multi-inverter/dissimilar battery configurations like I have which can result in my batteries not delivering the plan. I put a load of Charge overrides in but at the moment have taken them out, will see how it evolves tomorrow.

Looking at your own plan, a couple of observations: you might want to put a negative export rate override in the peak period from 4-7pm to persuade Predbat to not export during the period that DFS saving sessions usually occur.
Also if Predbat doesn’t decide to import during the negative rate periods (at 15:00) then you can put a force charge in to make it happen and earn a massive 0.61p per kWh of import

#705 PianSom

On a pretty regular basis these days Pedbat chooses to do a discharge when I don’t think it’s sensible. I’d be interested in any thoughts about why this is happening.

(I am importing on IOG - cheap 23.30-05.30; exporting Fixed. Predbat has standard internet and battery losses applied, but nothing especially unusual in settings.))

There are two types of occasions when this happens:
1 - towards the end of the day when the battery is full, the sun has gone and expected load is low. Often around 7.30pm. I would have thought it more sensible to delay any discharge until much later (10/11) in case unexpected load occurs.

2 - at the start of the day, after an overnight full charge, when lots of PV generation is expected. Predbat will choose to export, only to have the battery then recharged from generation over the next few hours. This clearly inefficient.

Are these behaviours seen by other people? Anyone got any sage advice?

(Trefor suggested disincentivising 2 by introducing a Metric Battery Cycle Cost - which I am keen to avoid as it seems like just a sticking plaster.)

R
#707 Rbor

geoffreycoan Thanks for your continuing advice.
I have added some manual force charges this morning prior to the 0p tariff kicking in.

Hadn't thought about discharging during 4-7pm potential DFS slots. I guess we are paid for 'excess export' over and above what we usually export 4-7pm on the day of the DFS.
As we are probably done with DFS now, I will leave this.

You mention a negative export override 4-7pm.
Is this the entity: input_number.predbat_metric_future_rate_offset_export
And would I need to set up an automation to set this 4-7pm and then to put back at 7 pm?

I have a forced charge in place for 15:00 and look forwards to my 0.61p of import bonus.

I feel exhausted setting up so much energy use. But there aren't many days like this.😁

Rob

G
#708 geoffreycoan

Rbor Hadn't thought about discharging during 4-7pm potential DFS slots. I guess we are paid for 'excess export' over and above what we usually export 4-7pm on the day of the DFS.
As we are probably done with DFS now, I will leave this.

You mention a negative export override 4-7pm.
Is this the entity: input_number.predbat_metric_future_rate_offset_export

No, you do it in apps.yaml like this:

  # To improve on saving sessions avoid export during peak periods
  rates_export_override:
    -  start: '15:00:00'
       end: '19:00:00'
       rate_increment: -5

This adjusts the export rate by -5p to 10p during the peak period so as to not export then. We probably are done with DFS saving sessions but I’m still leaving mine in and as you can see I actually start mine at 3pm because like @PianSom I am finding that Predbat is getting a bit enthusiastic about export, exporting a bit more than I would ideally like and not preserving for unexpected additional load. Given I’m on a fixed export tariff there’s no benefit to exporting early and I was finding that Predbat was exporting just before the evening peak which worried me.

@PianSom Suggestions would be to increase best_soc_keep, add export overrides to dissuade early export, and increase input_number.predbat_load_scaling to scale predicted house load.

I too don’t want to use the battery metric.

I believe that there is a fault with input_number.predbat_metric_min_improvement_discharge where it doesn’t seem to correctly compare the relative price of exporting now vs future import rates. I’ve seen examples where the battery is exported only to then have to import later not at a beneficial rate. Logged this earlier in the week. Trefor has tried one fix but its still happening.

pacemaker the negative rate fix in the table card works perfectly, thanks

#709 PianSom

Thanks geoffreycoan

I’ve experimented with increasing the soc keep (as I was getting a small import every day at 11pm), so don’t want to change that. I could try increasing the house load or add export over-rides but, like changing the battery metric, it feels like that is addressing the symptom and not the illness.

I’m glad (in a non-gleeful way!) that you share my experience, and I’ll wait and see how the code develops from the issue you have already raised.

R
#710 Rbor

I have the Nordpool data accessed via my apps.yaml settings which shows up in my Prebat Plan.
Do you know whether Predbat use this data in its predictions, rather than using the rates from the previous day?

Thanks

Rob

G
#711 geoffreycoan

Rbor I have the Nordpool data accessed via my apps.yaml settings which shows up in my Prebat Plan.
Do you know whether Predbat use this data in its predictions, rather than using the rates from the previous day?

Yes it does.

You can usually see your plan change at around 10am when the norddata arrives and Predbat recalculates the plan, substituting the norddata price predictions from the default ‘roll yesterdays price over to tomorrow’

You can comment the norddata rows out of apps.yaml and it’ll revert back

#712 PianSom

Now there's a Status I haven't seen before. Doesn't look good ...

R
#713 Rbor

PianSom If it's any 'consolation', I got the same (never seen it before):

What time did you get your status report?
It doesn't really make any sense, setting max reserve and getting back min instead.

I experienced some very strange behaviour from my inverter early this morning. It seemed to be trapped within 'idle' mode and, on the GE portal, it looked like the inverter had dropped offline. I tried restating it and spent some time trying to improve my wi-fi signal near to the inverter.
Eventually, things came back (after I had switched inverter off and then my batteries off and on. I even rebooted my router). I did also received one of those BMS over voltage notifications earlier.
Perhaps there was some outage at GE?

Rob

P
#714 pacemaker

predbat is talking locally to your inverter via givtcp so any GE outage shouldn't really affect it, unless that outage in turn makes your inverter/givtcp to go loopy, but not sure that is the case with these things.

In terms of the error, I think this is just standard warning guff, it retries. I've often tried to send an action to the inverter via API and it fails (for unknown reasons), then you try again and it is fine. I see this same error every now and then in Predbat but just ignore it and assume it's just one of those failed attempts.

#715 PianSom

Rbor What time did you get your status report?

Around 1.45 I guess

Thanks pacemaker - I've not seen that status before, but was keeping an eye on the system as we were at the tail end of a Power-up around then and I wanted to do a manual charge (since Predbat, for whatever reason, had decided that then was a good time to discharge). I've noticed retries happening in the GivTCP logs, but not seen one hit the Predbat interface before. Back to normal now.

EDIT - just checked; there was nothing untoward in the GivTCP logs around then

P
#716 pacemaker

PianSom

Also as it's a warning (WARN) and not an error, I think it's ok, unless it keeps happening.

B
#717 Blasteh

PianSom assuming it's AIO and it was charging at the time this error happened?

I run a custom version of predbat with the setreserve removed during charging, this bug was never acknowledged even though I raised it
https://github.com/springfall2008/batpred/issues/494

no idea if it's the same bug or a different one as predbat has changed a lot since I raised that.

G
#718 geoffreycoan

Blasteh I’ve just replied to your issue on Github, sorry it has got overlooked, think there is a core fix in predbat that will help you with the issue.

@Rbor @PianSom you might want to look if its worth trying this for you as well if you’re getting the same error.

I’ve just looked through my predbat.status history for the last few days and I haven’t seen this error at all which seems to concur with it being an issue with newer inverters/inverter firmware, not being a gen 1 issue. I do get occasional “ Status changed to Inverter 1 unable to read REST data from http://homeassistant.local:6346/readData - REST will be disabled” messages which I put down to general GivTCP/comms flakiness.
I have BTW just changed my apps.yaml to put all the non-REST commands back into the file. I had been running with just the few uncommented in that predbat needed to create the charge and discharge curves but I thought that on the occasions when REST fails it wouldn’t be possible for Predbat to fallback to non-REST if I left most of the GivTCP HA controls commented out.

R
#719 Rbor

geoffreycoan Blasteh PianSom
Geoffrey, Thanks for your advice. I have checked out the Github issue 494 and have read your reply.

I initially toggled 'set_reserve_enable' off as recommended by Trefor.
After seeing your reply on Github and here, I have re-enabled 'set_reserve_enable' again.
In my apps.yaml, I have changed 'inverter_reserve_max' from 100 to 98 and will see if this sorts things out.
I am running Predbat 7.16.8 and am 'Up-To-Date'.

I have a GE AC3.0 coupled inverter which can charge and discharge at 3kW.

When I had the issues early this morning, I receiving many strange status values.
Looking back, these two values cropped up repeatedly:

And of course, I received this:

I also received many status values about differences between inverter time and appdaemon time, but this seems to be common.

Although I am running REST in apps.yaml, I kept all the non-REST command in anyway.

Once I retrieved my GE setup, all status reports have been as expected.

PS I have also checked my appdaemon/predbat log in HACS.
I have the lines:

File "/usr/lib/python3.11/_strptime.py", line 349, in _strptime
raise ValueError("time data %r does not match format %r" %
ValueError: time data 'unknown' does not match format '%H:%M:%S'

Should I raise this as an issue or is it nothing to worry about?

In my givtcp log, the only adverse line is:

AssertionError('Unexpected response from remote end: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response'), <traceback object at 0x7f85ad4a00>)

Is this an issue (for givtcp)?

Rob


G
#720 geoffreycoan

Rbor It rather looks like GivTCP is occasionally failing to talk to the inverter. Hence the ‘unable to read rest data’ failure and the strptime error that is saying its receiving the time value ‘unknown’ from your inverter and so can’t convert this. The mis-match of inverter and app daemon times also points to lack of data coming from the inverter.

There is a givtcp monitor I wrote in the predbat documentation that alerts if givtcp is not communicating for more than 30 minutes - you could try this with it set to 5 minutes https://springfall2008.github.io/batpred/output-data/#givtcp-activity-monitor
You do get occasional comms failures from givtcp to the inverter, I had two yesterday, but the following predbat run it worked fine so I’m not too worried about mine. If it happens very frequently then its something to look into, start with the wifi comms

R
#721 Rbor

Thanks,
I have adapted your automation for my inverter, etc, from output-data documentation .
The hard bit was finding the mobile id, which I solved by initiating a dummy animation for my iPhone, which revealed the id.
HA places so many obstacles for us to negotiate.

I have 2 batteries. In the code, there are several lines referring to 'battery id'.
Should I repeat these lines for each of my batteries? (I have done!)

On the plus side, since my problems yesterday am, I have only had 1 instance of an adverse status report:

  • Inverter 0 REST failed to setChargeSlot1

The command worked when resent 3 minutes later.

I am also trying 'inverter_reserve_max': 98

I worked on my wi-fi connectivity yesterday and my connection to the GE inverter is now labelled as 'Excellent'.
Such a pity that older inverters don't have the option of a wired ethernet connection. I have no choice as there has only been one AC coupled GE inverter from 2022 and this relies on the dongle. GE should update their AC coupled inverter but GE seems to concentrate on its hybrids and AIO.

Rob

#722 PianSom

Rbor The hard bit was finding the mobile id, which I solved by initiating a dummy animation for my iPhone, which revealed the id.

It's perhaps easier to go to Developer Tools in HA, then choose Services. Search for "notify." and you will get a list of all the notification services you have running

G
#723 geoffreycoan

Rbor Yes you can simply duplicate the appropriate trigger lines in the automation for extra batteries. There’s 3 different triggers for loosing connection to the inverter and 1 for loosing connection to the battery, so its just the last trigger you need to duplicate.

I have this morning shortened and simplified the GivTCP automation so it doesn’t need the different trigger id’s and choose command in the action section, new version in my fork of predbat, it’ll get pushed through with my next release to Trefor https://github.com/gcoan/batpred/blob/main/docs/output-data.md

Good news on the wifi connectivity. I put a mesh wifi node in my garage where the inverters are. Sometimes they still decide to connect to a node further away in the house though 🤷‍♂️
I do wonder if GivEnergy don’t see a future in the AC coupled inverters and see the AIO as the natural replacement? As you say no product releases for some time.

#724 PianSom

I was just looking at my Predbat logs and this INFO field made me question something. I am wondering about the export limit, which I think is picked up from GivTCP?

Inverter 0 with soc_max 13.57 kWh nominal_capacity 2.66 kWh battery rate raw 6000 w charge rate 6.0 kW discharge rate 6.0 kW battery_rate_min 0.0 w ac limit 6.0 kW export limit 6.0 kW reserve 4.0 % current_reserve 4.0 %

(Note I have set battery_scaling: 0.85 to adjust the AIO battery size from that reported by GivTCP.)

The AIO battery inverter is certainly a 6kW inverter. My issue is that the AIO Gateway has an export limit of, I believe, 18.4kW. So if I am generating solar of 6kW (which my solar inverter can do) and discharging my battery at 6kW (and have zero house load) then I could be exporting at 12kW - twice the export_limit.

Exporting at > 6kW has occasionally happened already this month. Does this mean that my Predbat predictions of export will be wrong?

EDIT - should I - and other similar AIO users - set export_limit: 18.4 in apps.yaml to address this?

G
#725 geoffreycoan

PianSom Looking at the predbat code around line 2214, export_limit and inverter_limit (ac limit in the log) are coming from your apps.yaml not GivTCP. They are both set in watts not kW https://springfall2008.github.io/batpred/apps-yaml/#inverter-control-configurations

Its probably inverter_limit you need to set. export_limit is for G98/99 DNO limits

And to answer your original question, if set too low then predbat’s model of export kW would be wrong (slightly)

#726 PianSom

geoffreycoan
Thanks Geoffrey. I think I did fall foul of this issue today (as it was a sunny Power-up day).

Changing export_limit in apps.yaml does not affect the reported limit in the log. 🙁

But if I change inverter_limit won't Predbat then assume that I can import to my battery at 18.4kW - which I clearly cannot?

G
#727 geoffreycoan

PianSom I had another look at the code, immediately after retrieving inverter_limit and export_limit from apps.yaml there’s this code:

        # Can't export more than the inverter limit
        self.export_limit = min(self.export_limit, self.inverter_limit)

So this is why you can’t set export limit higher than inverter limit.

PianSom But if I change inverter_limit won't Predbat then assume that I can import to my battery at 18.4kW - which I clearly cannot?

According to the documentation, inverter_limit is only used for modelling max AC output from the inverter. I’ve had a look through the code and that’s certainly how it appears to work.
Battery discharge and charge rates are ‘battery rate raw’ in the above log message, which (at a quick scan) looks to come from GivTCP although you can over-write these if you want to.

#728 PianSom

geoffreycoan
Looks good. With the inverter_limit (somewhat counter-intuitively) set to 18400 I get

Inverter 0 with soc_max 13.57 kWh nominal_capacity 2.66 kWh battery rate raw 6000 w charge rate 6.0 kW discharge rate 6.0 kW battery_rate_min 0.0 w ac limit 18.4 kW export limit 18.4 kW reserve 4.0 % current_reserve 4.0 %

R
#729 Rbor

PianSom Thanks.
I tried this and the device was still shown as its name (as in Devices) with no numeric id.

Rob

D
#730 danerf

Rbor I had this after updating PredBat via HACS, it added some data to the conf file about REST APIs. I had exactly the same errors as you until I hashed it out.


  # When set use the REST API rather than HA entity for control, should be more reliable/faster to control
  # Set one per inverter
  # If using Docker then change homeassistant.local to the Docker IP address
 HASH THIS PART   # giv_rest:
 HASH THIS PART # - 'http://homeassistant.local:6345'
 HASH THIS PART   # - 'http://homeassistant.local:6346'**

  # If not using REST then instead set the Control here (one for each inverter)
  # - you can delete this section if using REST
  charge_rate:
    - number.giv_{geserial}_battery_charge_rate
    - number.givtcp2_{geserial2}_battery_charge_rate
G
#731 geoffreycoan

Rbor You don't need the device id, you just need the name of the appropriate notify service to call:

I call notify.all_devices to send a notification to all devices using the HA companion app, or I can notify specific devices by calling the appropriate service for a specific device.

PianSom I was just going to update the documentation to put this tip in for AIO users, but went to double check the inverter limits on the datasheets first, and I'm not sure the value 18400 is quite right for inverter_limit.

The AIO documentation makes a big point that the AIO can output "7.2kW at peak (6kW steady state) PLUS any PV output". You're correct that the GivGateway has a limit of 18,400w, but that's the theoretical limit not a practical limit for your setup.
The documentation says that if you have a separate solar and battery inverter then you should add them together.
if your solar inverter is limited to 6kW then shouldn't you have inverter_limit set to 12000w - i.e. 6000 PV limit + 6000 AIO stead state limit, or 13200 (6000+7200) if you want to put the peak inverter limit in?

danerf Rbor I had this after updating PredBat via HACS, it added some data to the conf file about REST APIs. I had exactly the same errors as you until I hashed it out.

I don't think that's quite right. One of the limitations of the way predbat updates either by the predbat auto update or via HACS is that it ONLY updates predbat.py, it does NOT update apps.yaml. So if Trefor introduces new features in Predbat that require new config in apps.yaml you have to manually copy/paste that into your own apps.yaml file from the template in Github - this is covered in the 'updating predbat' bit of the documentation https://springfall2008.github.io/batpred/install/#updating-predbat

If I delete the hash's out of the bit you hashed out, it looks like there's an indentation error in your giv_rest bit of the apps.yaml

instead of

 giv_rest:
 - 'http://homeassistant.local:6345'
 - 'http://homeassistant.local:6346'**

It should be:

  giv_rest:
    - 'http://homeassistant.local:6345'
    - 'http://homeassistant.local:6346'

i.e. two spaces before 'giv_rest' and then a further two spaces before the dash (so four in total).
If you only have one inverter the line with 6346 can be commented out

Tidying up and making apps.yaml easier to understand and align to the documentation is on my to-do list!

#732 PianSom

geoffreycoan I'm not sure the value 18400 is quite right for inverter_limit

geoffreycoan you have a separate solar and battery inverter then you should add them together

Yes, you are quite correct, and I agree with your analysis.

That said, in practical terms it probably doesn't matter. It is hard to imagine a scenario where I would have the possibility of exporting 12kW, let alone 18.4kW! But I will be changing my config to 12000.

The 7200W output is - IIRC - limited to just a short period (30 secs??) so I think can and should be ignored for Predbat purposes.

EDIT - I am thinking of installing a second AIO idc. At which point the 18.4kW limit may become a little less theoretical!

EDIT2 - AIO battery inverter can output 7.2kW for 10 secs, 6.5 kW for 30 secs, 6kW sustained

J
#733 Josephiah

Hi folks, quick question: does the "Best SOC Max" value affect charging from solar as well, or just grid charging? I.e. if I set it to say 8.5 (out of 9.5kWh), will it stop grid charging at 8.5 and continue solar charging? Or will it stop all charging?

Part of the reason for asking is that I've noticed our system clipping a few times because the battery is full (either because the solar has been better than forecast, or Predbat has charged over-enthusiastically overnight and not left enough space ahead of a sunny day). So could setting Best SOC Max to something lower be a way of combatting this? Or is there a better strategy with a different parameter?

Thanks.

P
#734 paddyb

Hi Guys,
looking for a quick pointer if anyone can help, I'm having some issues with Predbat predicting my house load, for the last few days it has undercalculated, resulting in the battery running out way quicker than the plan.
I have been investigating the "In-day adjustment" graph and the logs. I have found this entry:

Current data so far today: load 46.13 kWh, import 46.8 kWh, export 0.0 kWh, pv 2.3 kWh
Today's load divergence - 125.76 % in-day adjustment 124.48 % damping 0.95x, Predicted so far 5.3 kWh with 2.36 kWh car excluded and 26.46 kWh import ignored

Does anyone know what causes it to ignore the 26.46 kWh import in this example?

Also, my 'days_previous' is 2,3,4,5,6,7,8 if relevant.

S
#735 SJB

Josephiah I don't know how 'Best SOC Max' works, but I'm not sure that Predbat will help you mitigate clipping.
I've been looking into the same thing myself and haven't managed to stop Predbat importing at cheap rates, Sometimes it will reduce the amount imported but Predbat appears to want the battery full by midday which doesn't help mitigating clipping. I haven't managed to get Predbat to allow the battery to run low in expectation of PV generation - it always enthusiastically discharges in the peak export window (I'm on Flux) and then imports in the low import window (or even at the mid rate). It may be that we haven't hit high enough PV predictions to modify this behaviour significantly.
May be we will get a prolonged sunny spell and I'll be able experiment a bit more but for now I've switched Predbat to Monitor so as not to import.

Last summer I managed my clipping by:
Discharging the battery in the morning before PV production ramps up.
Setting the battery charge rate to about 50% to increase the window of reduced clipping.

This gives me about 5kWh extra generation a day when there is sustained clipping.

For Flux in the summer when you have more than enough PV generation to fill the battery and run the house I think importing in the cheap slot has negligible savings and if you want/need to mitigate clipping then you are losing out by importing.

T
#736 The Black Cat

geoffreycoan So if Trefor introduces new features in Predbat that require new config in apps.yaml you have to manually copy/paste that into your own apps.yaml file from the template in Github

Would it be a good idea to put new apps.yaml entries at the bottom of the file (if possible) with a date in the comments, so it's easier to identify the new features?

I
#737 Ivan

The Black Cat @geoffreycoan

Likewise I think it would be useful for a similar notification mechanism to exist for any changes to the default dashboard. I have simplified the default dashboard to remove all references to the car charger (as I don't have one) and have changed the order to put the switches/entities I use the most at the top. I therefore don't just copy across the dashboard - I manually check it for new items and just yesterday discovered a new "Predbat Active" switch had been added.

I guess others may be tailoring the dashboard to their specific needs and hence this feature is likely to be useful for several of us.

J
#739 Josephiah

SJB Hmm, interesting. I had thought "predicting how much space to leave in the battery for the following day's solar" was a large part of the point of PredBat, so was assuming I just have the balance of settings a bit off - maybe I need to play with the load scaling and PV scaling parameters a bit.

Ran a quick experiment last night, and it seems Best SOC Max can potentially help us here:

This is with Best SOC Max set to 6kWh - you can see the plateau overnight, followed by solar charging from 7ish to 8.30ish pushing straight through that barrier.

So the answer to my basic question appears to be: "Best SOC Max doesn't restrict solar charging".

But how much that helps overall is a different question - I guess it might be automate-able in some way, possibly based on the predicted load/generation. Would need a bit of thought/experimentation to work out whether this approach could help with clipping without interfering too much with PredBat's general operation.

But again, isn't that meant to be part of the core point/functionality of PredBat in the first place...? Maybe I just need to add a feature request that clipping effects are taken into account - at present, IIRC, I don't think PredBat "knows" the full unclipped capability of my hybrid inverter on DC charge...

G
#740 geoffreycoan

Josephiah Hi folks, quick question: does the "Best SOC Max" value affect charging from solar as well, or just grid charging? I.e. if I set it to say 8.5 (out of 9.5kWh), will it stop grid charging at 8.5 and continue solar charging? Or will it stop all charging?

I've had a look at the predbat code and best_soc_max only affects the forced battery charging as far as I can see, it shouldn't set a maximum soc for solar charging.

As SJB says, predbat at the moment doesn't have the capability to set lower slower rate trickle charging to reduce solar clipping. Something being discussed on https://github.com/springfall2008/batpred/issues/886

The Black Cat Would it be a good idea to put new apps.yaml entries at the bottom of the file (if possible) with a date in the comments, so it's easier to identify the new features?

At the moment apps.yaml is a bit of a mess, its been incrementally added to and there's things in all sorts of places.
I plan to restructure apps.yaml to bring more structure to it, grouping logically related settings together more and aligning better with the documentation structure. So adding new settings to the bottom would be against that.
But the problem is harder than that, it also covers new switches and controls which get added to the predbat documentation, again its easy to overlook these. At the moment unless you read the details of every release carefully and in most cases actually have to read the code changes to see what's happened, its easy to miss things. Like the new Predbat Active switch.

I have a suggestion to improve this, just submitted as a feature enhancement for consideration
https://github.com/springfall2008/batpred/issues/895

Josephiah But again, isn't that meant to be part of the core point/functionality of PredBat in the first place...? Maybe I just need to add a feature request that clipping effects are taken into account - at present, IIRC, I don't think PredBat "knows" the full unclipped capability of my hybrid inverter on DC charge...

Answered your question above about best_soc_max. Correct, at the moment Predbat doesn't know what your solar generation capacity is, just the inverter throughput. TBH though it doesn't really need to know the max DC output of your panels, the solcast prediction is what's important and how predbat plans to use it. At the moment its very much a 'max rate charge to full' from solar or grid charge, not a trickle charge to reduce clipping

paddyb Current data so far today: load 46.13 kWh, import 46.8 kWh, export 0.0 kWh, pv 2.3 kWh
Today's load divergence - 125.76 % in-day adjustment 124.48 % damping 0.95x, Predicted so far 5.3 kWh with 2.36 kWh car excluded and 26.46 kWh import ignored

Does anyone know what causes it to ignore the 26.46 kWh import in this example?

Looking at the predbat code, what it appears to be doing is going through your import data and ignoring what it sees as being deliberate import, the comment in the code is:

# Ignore periods of import as assumed to be deliberate (battery charging periods overnight for example)

This is immediately after similar logic to exclude car charging data from the load prediction.

S
#741 SJB

Josephiah I guess it might be automate-able in some way, possibly based on the predicted load/generation.

That's what I'm thinking. I'm planning on running Predbat in Monitor mode, using the Predicted SoC at say 0700 to control what extra to discharge in the peak export rate slots. I'll also use it as a double check at the start of the low import slot to see if I need to add to the battery.

Good to have some clarity on Best SOC Max.

P
#742 paddyb

cheers geoffreycoan , that makes sense now. I think the root cause of my issue was actually my 'days_previous' settings. I was averaging the previous load for the last week, but then i noticed we've had a bit of a cold snap here for the last two days, and my ASHP is consuming more energy than the 'average' I'd been calculating...My average theory works well most of the time, but i see now it can fall foul to spiked increases...I have shortened my days_previous to 2 days for the moment, which might better align... Maybe I should look into 'predheat' 🙂

G
#744 geoffreycoan

paddyb I have the same days_previous set to 2 through to 8 to deliberately average out the up's and down's of the ASHP consumption.
I also increased 'input_number.predbat_load_scaling to 1.15 so that if its a cold day today and the ASHP is consuming more, Predbat will increase the predicted load today as a result.

TBH my ASHP consumes far more than my 14kWh battery capacity and goodness knows how we use that much in the house anyway so as long as Predbat predicts and charges enough to get me through the evening peak period I don't look in too much detail at the individual hourly predictions as other than the initial daytime ramp up at 10am and the hot water coming on at 11 which both are predictable, the ASHP turns on and off when it feels like and mucks up any detailed prediction anyway

D
#745 DD

SJB I think I'm probably going to have to implement something similar. But because I'm not (yet) a predbat user, I'll just have to key an eye on what they're doing, but implement it directly on top of modbus.

P
#746 Phil_H

geoffreycoan I've seen on several occasions recently people saying they have days previous of 2-8, why is this? It feels like people are after the previous week's load so why not 1-7? (is 1 not yesterday?)

G
#747 geoffreycoan

Phil_H geoffreycoan I've seen on several occasions recently people saying they have days previous of 2-8, why is this? It feels like people are after the previous week's load so why not 1-7? (is 1 not yesterday?)

The short answer is “its complicated”

You can set days_previous to 1-7 but for longer plan forecasts there are some consequences to doing this.

Long explanation in the apps.yaml documentation https://springfall2008.github.io/batpred/apps-yaml/#understanding-how-days_previous-works

#748 PianSom

Phil_H
Ah, you obviously missed post #151 of this thread above!

🙂

P
#749 Phil_H

PianSom how could I have been so careless!

W
#750 Wavy Davy

Just got this message on my dashboard.

Do I just ignore it or does it require some action?
What is "Rest"

P
#751 paddyb

REST is a communication protocol that predbat uses to communicate to GivTCP (which then in turn communicates with your inverter). I have had a few occurrences of this, but it usually resolves itself on the next poll in 5 mins time...
Things you can try to resolve if not, in the GivTCP addon settings, there is a parameter 'Self Run Loop Timer' which might be set too fast, I use 30 seconds and its fine for me. (lower number = faster, and sometimes the inverter can't keep up if it's asked to do a lot of things at once)

Also in the predbat apps.yaml file, you will find the configuration

givtcp_rest:
    - 'http://homeassistant.local:6345'

You could change this to the IP address of homeassistant instead, assuming your Homeassistant box has a fixed/static IP address. Sometimes the local name resolution for homeassistant.local might not work or be slow....
so as an example, 'http://192.168.100.10:6345' instead, and obviously make sure to use your real address, this is just an example for formatting/syntax...

R
#752 Rbor

Wavy Davy
Hi, I have been receiving all sorts of status messages. This is a screenshot from earlier this morning:

I have flagged these as 'issues' on Github but nothing really resolved.
Like you, I find that the intended Status change is actioned after about 5 min, as you can see in my screenshot.

Predbat still seems to be 'doing its thing' but it is really frustrating seeing these messages.

paddyb
Things you can try to resolve if not, in the GivTCP addon settings, there is a parameter 'Self Run Loop Timer' which might be set too fast, I use 30 seconds and its fine for me. (lower number = faster, and sometimes the inverter can't keep up if it's asked to do a lot of things at once)

This is my setting:

I have wondered about increasing the Loop timer setting to 60 seconds to see if that improves things.

The AppDaemon/Inverter 'time' disparities suggest to me that one end of the handshake (probably the inverter) is on a go slow. I know that the GE inverter syncs data every 5 minutes in 'Away' mode and on the web portal. But 'Home/Local' should be immediate, so I wonder whether this may be the cause as the timing disparities are over 5 minutes.

I may try changing the yaml configuration from homassistant.local to the actual numeric alternative.
I have also thought about commenting out the REST lines and relying on the HA lines in apps.yaml as REST, for me, seems flaky (Sometimes).
I have also tried the advice in the apps.yaml documentation (See below) and this work for me, so communication is happening.

To check your REST is working open up the readData API point in a Web browser e.g: http://homeassistant.local:6345/readData

There is some really useful information under 'Inverter control' in the documentation.

Coincidentally, since starting this reply, I have just received a further timing message in my status report, which cleared 5 min later:

Rob.

R
#754 Rbor

Wavy Davy I deleted the 2nd line after looking at the lines below in my apps.yaml suggesting 'one per inverter':

> # When set use the REST API rather than HA entity for control, should be more reliable/faster to control
> # Set one per inverter
> # If using Docker then change homeassistant.local to the Docker IP address

While I have the apps.yaml file open, I am going to try the numeric IP address.

Rob

P
#755 paddyb

Wavy Davy two entries there is fine/normal/default. Its in case you have two inverters. If you dont, you can safely delete the second line or comment it out. Its not really used if you only have one inverter...

W
#756 Wavy Davy

Thanks all.
Deleted the second line and changed the address to ip address. So far so good.

G
#757 geoffreycoan

All correct. I'll try the IP address trick, can't do any harm and bypasses any potential local DNS issues. I have my GivTCP scan frequency set to 20 seconds and get these REST timeouts about once a day on average :-( but they can be safely ignored and the next predbat run works fine.

W
#758 Wavy Davy

geoffreycoan My frequency was at 20 and it's only just started having problems, so I changed it to 30, which didn't seem to cure it.
Now Ive changed to the ip address may change it back to 20 and see if it's now ok.

W
#759 Wavy Davy

How do I tell if rest is working?
I changed the frequency back to 20 and immediately got an error message saying rest would be disabled, but I suspect it may be because I restarted givTCP. The message has now gone away but would like to know if rest is disabled or has cleared.

P
#760 paddyb

Predbat will run every 5 mins and does not remember or save anything really from its last run, it recomputes everything with fresh data every time. If you still have the rest line present, and it does not complain the next few times it runs, then its working fine. I'd imagine if you waited 15 mins, it would have re-ran probably 2 or 3 times in that window...

G
#761 geoffreycoan

paddyb Predbat will run every 5 mins and does not remember or save anything really from its last run, it recomputes everything with fresh data every time

That used to be the behaviour, its now slightly less energetic at re-running, you can set 'input_number.predbat_calculate_plan_every (default value 10 minutes) to how often predbat does a full revaluation of the plan.

But absolutely, if you don't get an error on the subsequent 5 minute run, predbat is working fine with rest again

T
#762 The Black Cat

Has anyone else noticed that since the clocks went forward on Sunday the predicted load in the plan is an hour later than expected? Typically we do most of our cooking at 18:30 but this week the heavy load on the plan is showing at 19:30. As I'm using 7,14,21,28 as my days_previous setting, it's going to take 4 weeks to work its way out of the plan.

R
#763 Rbor

The Black Cat I have my days_previous set as 2,3,4,5,6,7,8 with weighting=1.
This is to take from the whole of the previous week.
In my predbat.log for today, 4th April, I have loads of warnings such as:

2024-04-04 10:35:05.183099 INFO pred_bat: : Historical day 4 has 5 minutes of gap in the data, filled from 18.32 kWh toWARN make new average 18.38 kWh (percent 100%)
2024-04-04 10:35:05.193235 INFO pred_bat: WARN: Historical day 5 has 5 minutes of gap in the data, filled from 15.69 kWh to make new average 15.74 kWh (percent 100%)

This suggests a glitch when clocks changed and is working through my 7 days!

I think HA saves historical data for 10 days only. I wonder whether your pattern counts as 4 days. There was something back in this thread somewhere about historical days. Looking back, take a look at replies around #315.

Rob

R
#764 Rbor

My predbat is stuck on 'charging'.
Late last evening, predbat discharge down to 4% and then charged up to 100% from about midnight until 6:00 am with a short session of discharging to catch the lower agile rates. But since 2:00am, it has stuck on 'charging'. See my predbat and status.
How can my predbat be 'charging' when the SOC has been 100% from 6am–2pm?
Should this not be 'idle'?

Could there be predbat values that I should look to tweak.
I have trawled through all the documentation and the values look fine (to my eyes!)

Thanks

Rob

G
#765 geoffreycoan

The Black Cat yes I have noticed that predbat’s idea about historical load is an hour out as well. It probably should be raised as a github bug but TBH my ASHP load varies things so much its less of a concern for me. Nice to see my consumption dropping off though as we’re in warmer weather.

As Rbor says, HA default history is only 10 days so unless you have increased this in your HA config (mine is 14 I think).

@Rbor the messages about missing historical data are again normal. My house load is a template sensor that calculates the load every 5 minutes (from import-export+PV-battery charge+battery discharge), so logically there would never be gaps, but I still get occasional warnings about load history gaps. I think its that maybe there wasn’t data retrieved from givtcp or somesuch.

Your query on ‘predbat stuck on charging’. If you look at the plan the export and import rates after losses are almost identical, so depending on what you have battery metric set to (default 0.5p) and the metric_min_improvement’s set to, predbat could well decide its just not worth discharging for and its cheaper to grid import. I get this sometimes as well, long periods of holding the charge. I think yesterday was like this. It should change come the peak rate.
There’s a long predbat FAQ on how to optimise the plan if its not quite as you expect it to be

J
#766 Josephiah

It's looking like a cracking night/day on Agile, which Predbat is celebrating with an enthusiastic jig:

So, what do we think about buying at -ve rates then immediately selling at 15p? Unethical/undermining the point of plunge pricing? Or a happy perk to be exploited?

V
#767 Vestas

If its negative I'd tend to say its taking the proverbial to then export immediately at 15p. Negative means they need to dump renewable (wind tomorrow) generating capacity so putting it back on the grid immediately seems wrong to me. At peak time, yeah no problem.

Pretty sure I'm in the minority though.

N
#768 naltsta

Vestas I’d be interested in a semi agile export tariff… fixed 15p export is only when prices are positive. In exchange some boost to export if import prices go over 40p

G
#769 geoffreycoan

I personally don't have any major hangups about the fixed 15p export rate even when import rates are considerably lower.

Octopus are in the business of making money and seem to be doing OK with the commercial model they have already. Sure I'm making a tiny bit when I import at a low price and then export the brown energy at 15p, but Octopus are making off me all the rest of the time when I export at 15p and the rates are higher.

On Flux they pay 27p to export in the peak, but Agile its a flat 15p to export regardless and of course 30-40p to import in the peak - they're making money off import and export rates and this is one of the few times I'm making a bit back.

Actually I find predbat doesn't go too mad with importing and exporting, I think this might be because I turned calculate discharge on charge slots off, but my plan doesn't do much uping and downing of the battery which TBH suits me fine. Its there to be used but no point in thrashing it all the time.

During tomorrow afternoon I'm going to have little opportunity to make anything off the -3p agile import slots. My Solcast prediction (which doesn't include the 4kW FIT array, only the GivEnergy arrays) has me generating 2-3kWh every slot. I'll never manage to consume that much generated electricity let alone import some more!

R
#770 Rbor

geoffreycoan My predbat is very similar.
Predbat is aiming for a low SOC of 6% for me at midnight and will then charge (and discharge) during the night (although predbat does constantly shift the goalposts). I can't make use of all the low slots – I could fill my battery 2 or 3 times. I do have washing and dishwasher going and I am topping up my EV.
Tomorrow, if there is good solar generation, my house load will by charged primarily by the sun. So the blue negative slots are 'wasted' on me unless I use a load of electricity. I have an ASHP but, with temperatures up, even that is not going to need much electricity to tick over.
Assuming my logic is sound, really low and negative rates are useful during the night but with good solar generation, not needed.

Rob

#771 PianSom

Josephiah
I don’t really understand issues about using a service that is being paid for.

I completely get concern about the climate crisis. I understand that lots of people want to reduce carbon emissions and manage their lives to do this. So if that’s the concern - go for it. Do what you can to reduce demand at all times, especially peak. Its in everyone’s interests.

But if you decide to leave decisions about the climate to governments, regulators and the like (the ones who manage the system on behalf of all of us) then what is the issue with using the power services you are offered now at the price you are being offered them at?

An analogy - I wouldn’t understand anyone who stopped watching iplayer, because their internet provider thought they’d just be sending emails and hadn’t charged them enough. Bad luck, BT/Virgin/Sky/whoever - time to catch up with your customers and put your prices up.

So if your power provider offers you power import and export facilities at a price that works for them, then why not use them? The power company and the regulator can and will change the rules if they don’t like what is going on.

J
#772 Josephiah

Vestas
geoffreycoan
PianSom

Interesting to get the full range of responses in such a small sample! And yes, can fully understand all of those. I think I land on "it probably is taking the proverbial a little in this specific circumstance, but hey, their rules".

I'm going to let it run it's course this time, partly just as a bit of a stress test on our new battery - will be a good illustration of whether my cell voltage issues are now properly fixed or not.

But then for general use, I'll probably restrict the charge rate back to 50% or something (on Agile, usually no need to fill up at full rate all the time, unlike Cosy or Flux). The main exception I could see to that would be when an upcoming saving session is detected - will think about setting up an automation to increase the allowed charge rate in that circumstance, then revert to lower rate once it's over.

#773 Hook

They have their business model which is working for them and us. Their turnover was £9.4 billion last year.

I have no issues with sticking to the rules that they have provided. Well I say I, I mean the little terminator who lives in my computer charging, pausing and discharging my battery whilst watching the weather.

#774 PianSom

If it helps salve any consciences then have a read of the Octopus export t&c's. They are not obliged to pay you for any "brown energy" (energy that you import and subsequently export). They actively chose to do so though. So their eyes are open.

Anyway - back to Predbat. Holiday season is looming once again, and I was thinking about the holiday setting. Let's suppose - because it's true - that I have a 21 day history setting (so max days_previous is 21) and am going to be away for 10 days starting tomorrow (which I'm not!). What is the best thing to set Holiday Days Left to?

Possible answers:

  • 32, being 10 (days away) +1 (as holiday starts tomorrow) +21 (days of history). So for over a month Predbat just looks at the just yesterday's consumption to decide on today's likely consumption, while it builds up a history picture again.
  • 18, being 10 + 1 + 7 (and I change my max days_previous to just a week). Over 3 weeks post-return I slowly build my history again and then put it back to how it is now.
  • something else?

Would it be a useful setting to be able to "freeze" a consumption history, use the current "just use yesterday" logic while away, then "unfreeze" when the holiday ends and use the old history until a new one becomes available? Sounds complicated, and Trefor may have already thought about this and rejected it.

Interested in views.

R
#775 Rbor

Remember that we have chosen smart tariffs. We tend to be 'enthusiasts' who monitor our energy usage closely.
Most users are on the flexible tariff.

With panels, during the day, my home load will come from solar generation, not the grid.
I could wait until low rates at night to push my washing through the tumble drier on grid plunges , or do my baking then. But if I use the system as intended, I would use the solar energy that I generate and just let Predbat do its thing.

Octopus take great pride in their Agile plunges and I cannot see them giving with one hand and taking away with the other for users generating solar energy.
Agile Outgoing is separate from Agile, available for several other tariffs (IOG, Cosy, Flexible).

If there are plunges (and these are really few and far between over the whole year), then I would hope that I can take advantage of them. After all, I get paid 15p a unit for exporting back to the grid.
My 15p units are sold back to the public for much more (last year, very much more).
These are the rules.

If the National Grid, wants to incentivise usage of excess generation, there could be incentives:

  1. A reverse DFS where the plunge reduction is available to all tariffs.
  2. Free electricity at plunge times for all.
    ................

This could be available to users with smart meters for monitoring half hour usages.
It might even incentivise more to get smart meters.

Rob

G
#776 geoffreycoan

PianSom What is the best thing to set Holiday Days Left to?

Possible answers:
32, being 10 (days away) +1 (as holiday starts tomorrow) +21 (days of history). So for over a month Predbat just looks at the just yesterday's consumption to decide on today's likely consumption, while it builds up a history picture again.

Then documentation says to set holiday days to the number of days away, and then when you are back you set it again to your days previous whilst you build up your history.

Personally I would set it to:

  • days away
  • then when I’m back I’d set it to say 3 to let history build up for 3 days
  • then after 3 days I’d let predbat use the history rather than taking just the prior day and I’d adjust days_previous to 3 days, then next day 4 days, etc as my history builds back up

Maybe in theory you could copy your history into a custom load sensor and use that when you get back. I think you’d have to adjust all the times though as I’m pretty sure predbat is counting backwards X hours (which is why the historical load is out after the clock change).
Too hard.

Rbor In the East of England Octopus with the DNO UK Power Networks are giving free electricity for selected postcodes when there’s excess in the network. Its called Octopus Power Up’s. Both @PianSom and I are in the covered area although we sometimes have different events. I had one on Friday for instance, 10-1pm, free electricity.
It seems Octopus are trying this for a year with a view to wider rollout

#777 PianSom

geoffreycoan Then documentation says to set holiday days to the number of days away, and then when you are back you set it again to your days previous whilst you build up your history.

Yes, I never really understood what the purpose was of the reset on return. Is it actually different from just setting to the sum of the days away and days previous?

I suspect you are correct - that Trefor has already thought of the more complicated solutions and discarded them. Pity. I really try and avoid manual intervention.

geoffreycoan although we sometimes have different events. I had one on Friday for instance, 10-1pm, free electricity.

Just to give a little more colour @Rbor , in March I had 7 Power-up events. All but one were 3 hours of free electricity (one was 2.5 hours). IIRC in all cases I was notified a day before. I input the details into Predbat, which usually scheduled a discharge and charge. But generally I didn't make too much effort to shift my consumption otherwise, and - unsurprisingly - they often coincided with high solar generation times so I had more free electricity than I knew what to do with. I used free electricity costing a bit more than £25 for the month. (They charge as normal - I am on IOG, so about 30p/kWh during the day - then rebate later.) Of course I will also have made money from the prior export. Say 12kWh x 15p x 7 = another £12 or so.

Not as attractive as Saving Sessions, but not to be sniffed at.

V
#778 Vestas

Josephiah I'd support exporting negative rate imports to recover standing charges* at any time though 🙂

*OfGem apparently recently admitted that some of the increase in standing charges was to penalise (not their word, but their intent) PV owners who they felt might be "avoiding their fair share" of infrastructure costs.

J
#779 Josephiah

PianSom If it helps salve any consciences then have a read of the Octopus export t&c's. They are not obliged to pay you for any "brown energy" (energy that you import and subsequently export). They actively chose to do so though. So their eyes are open.

That seems like it'd be a difficult thing for them to measure. Even if you built an algorithm that detected repeated import/export, I'm not sure it would be possible to reliably separate "legitimate" use from "illegitimate".

V
#780 Vestas

Josephiah Also they'd have to pull all their marketing, both online and elsewhere and would probably have to pay a few million for misselling (you can't have an advert which contradicts a contract term). They're getting away with it now because nobody has complained to the ASA/Ofgem.....

R
#781 Rbor

geoffreycoan
PianSom

I have seen you both commented about 'Power ups' and I always wondered 'What are they?'
I found a description on Octopus web site.
Will find out at some stage whether they are to be expanded to other DNO regions.

Rob

R
#783 Rbor

Hook Thanks. I have just applied.

Rob

G
#784 geoffreycoan

The power-up’s are great. We try to load shift into using them, so instead of putting the washing machine, tumble dryer etc on overnight in a cheaper agile slot we wait until the next day power up if there is one.

We’ve been getting about 10% of our entire consumption free so far this way.

eg 2024 YTD:
3592kWh paid import for £509, 434kWh free import for £0, 1010kWh export for -£160
Net 3006kWh for £346

April so far we’re making money

#785 PianSom

geoffreycoan
How many slots did you have in March? Interested in the variation with mine

G
#786 geoffreycoan

PianSom looking through my email invites:

7/3 1-3:30pm
8/3 1-3:30pm
12/3 11-2pm
13/3 11-2pm
21/3 11-2pm
27/3 11-2pm
28/3 11-2pm
29/3 3:30-6:30pm
5/4 10-1pm

#787 PianSom

geoffreycoan
Seems I wasn't invited to the one on the 12th. But otherwise identical.

They are all still sitting in my apps.yaml - maybe I ought to Spring clean!

#788 PianSom

In case you missed it … the latest version of Predbat introduces a new optional feature: the ability to use a new add-on called PredAI, which uses an AI engine to predict future load required based on what has happened in the past, and takes as input any HA sensor (eg weather, presence, pv output, as well as load). This should enable better load prediction than the current method, which is a simple algebraic function of historic load.

Impressive stuff. I’m looking forward to trying it out.

https://github.com/springfall2008/predai/blob/main/predai/DOCS.md

B
#789 Boffinboy

PianSom I saw this and was curious! Intrigued to hear what others are finding. I’m reluctant to upgrade yet because v7.16.11 seems to have messed up the min export improvement threshold for me. I have had it set very high at 18p to basically only export for DfS or for a short period when rates are particularly low, under v7.16.10 this resulted in very little export. Under v11 with the low / negative rates the battery was being cycled, for far less than 18p gain per 30 min, so suggested the parameter was being ignored or something was not working correctly.

#790 PianSom

Boffinboy
Yes, I have mine set to 4p, and yet still saw some odd cycling yesterday. I too suspect something has gone awry.

P
#791 pacemaker

PianSom

As with all things Trefor, there is a big leap needed to understand it all from the docs 🙂 But I appreciate his work!

So what for example is the benefit to adding an external temperature sensor in his example? It would be nice to know a bit more about what exactly is happening and how adding different entities might impact it. Or is it to say we shouldn't care and let the AI figure it out?

For example I have a weather station with lots of HA sensors - should I add them all? If not, which or why?

[EDIT] Oh maybe the clue is at the start of the doc there:

predict future values of sensors given the history of that sensor.

So effectively any sensor you put in there, Predai will predict future values of it. Then swap the existing sensors out (like load) with the new AI sensor in the predbat YAML.

Definitely interested in how that might work for solcast prediction vs reality vs real weather. My Solcast prediction is bad on bad days, great on clearer days. Was hoping to get a better one...

#792 PianSom

pacemaker
My understanding (which is possibly completely wrong!!) was that the array of sensors which are taken as input are used WITH one another to produce a forecast for each sensor.

So taking historic load, Solcast, weather, presence, whatever, ... will give you a forecast for all of these, but most especially load. This could be useful eg if you see a lower heating demand for sunny days than for cloudy days, even given the same external temperature.

I am looking forward to finding out whether my understanding is correct! But I can see me having to offload this prediction mechanism to its own machine. I have an unused coral.ai TPU lying around somewhere. Wonder if I can use that ... Hmmm

P
#793 paddyb

pacemaker Not an expert in neuralprophet, but typically things 'like this' predict the overall output by using the previous values of the inputs you tell it to learn from (your sensors). So if you supply a senor with kWh load, and another one for the Outside temperature, it will try to predict the future kWh values, and will take account of the correlation the temperate had on the kWh in the past... e.g. usually if it's colder, the kWh will be higher...
As I understand it, you can supply multiple sensor references, and it will try to compute an output based on the previous influence of all sensors defined. I think this could be a cool feature. I am going to run some experiments with some 'Heating Degree Day' sensors, which should accurately predict the future use of my ASHP...

I suppose, just be aware, everybody's understanding of 'AI' is different. At the end of the day, it's basically just 'pattern matching' - if you feed in waffle, you will get waffle out, regardless of the cleverness of any algorithm...

G
#794 geoffreycoan

pacemaker Yes it is lacking in information about what it does, how to use it, and how to train it.

For instance, temperature, do you need an average daily temperature to correlate to daily house load, or a real-time sensor?
The temperature sensor is I am pretty sure there for the benefit of heat pump owners like me whose heat pump consumption is very definitely related to outside temperature. In the winter my heat pump consumes between about 60% and 80% of my daily house load depending on temperature, so getting a way to have predbat figure load based on temperature was something us heat pump owners were keen on.

There is a prior attempt to do this, plotting heat pump consumption to outside temperature https://github.com/springfall2008/batpred/discussions/837 that could be fed in to the predheat entry in apps.yaml.
I created the correlation graph for my own heat pump consumption with my front porch temperature sensor and there wasn’t an obvious linkage at all! I suspect something in the way that HA calculates average temperatures was the issue, but swapping to a weather station at Cambridge Airport (that doesn’t operate on weekends!) gave a much better graph. But I never progressed to then feeding this into predbat.

Haven’t looked at predai yet and its not really a priority now I have turned the heating off.

I have been quite happy with 7.16.11 and the metric min discharge improvement. Recent previous versions of predbat I found were too enthusiastic with discharging the battery for no profit, or worse, discharging to low soc levels to then need grid import later in the evening. With 7.16.11 AND turning the experimental Calculate Secondary Order Slots OFF (default is ON) has markedly improved the quality of my plan.
I find I am now no longer having to put force Idle’s in to the plan to stop discharging either side of the peak period. Discharging now occurs later in the evening when the rates drop and if I have excess SoC in the battery. The only discharging planned at the moment is for tomorrow morning when (rolling today’s prices forward) there are import peaks at 6:30, 7:30 and 9:00 that predbat discharges in, with charges in the lower periods betweentime

R
#795 Rbor

Predai looks very interesting.
I have installed it from HACS repository but haven't done anything with it.
I run my Viessmann heat pump on weather compensation and I have some entities set up in HA.
There is a sensor entity for the outside temperature which seems to work well. See below.

geoffreycoan
I have been quite happy with 7.16.11 and the metric min discharge improvement. Recent previous versions of predbat I found were too enthusiastic with discharging the battery for no profit, or worse, discharging to low soc levels to then need grid import later in the evening. With 7.16.11 AND turning the experimental Calculate Secondary Order Slots OFF (default is ON) has markedly improved the quality of my plan.

Geoffrey, my metric min discharge improvement control is set at 0.1 p which is the default from the documentation.
I can't find anything about Calculate Secondary Order Slots but notice that the switch is on.
What does it do? You are suggesting that turning this switch off improves things.

Thanks

Rob

G
#796 geoffreycoan

Rbor Geoffrey, my metric min discharge improvement control is set at 0.1 p which is the default from the documentation.
I can't find anything about Calculate Secondary Order Slots but notice that the switch is on.
What does it do? You are suggesting that turning this switch off improves things.

My metric min discharge improvement is 0.2, I increased it to try to dissuade predbat from discharging when it wasn’t profitable, but it still seems to do so. Raised github issue 861 but no real progress on it https://github.com/springfall2008/batpred/issues/861

Trefor made changes in the latest release to how min discharge works, it now calculates the difference over the whole slot rather than just instantaneous rates. Also in the last release calculate secondary order slots was introduced, but nothing in the documentation as to what it does! I think its experimental. Anyway, there is some discussion about it on https://github.com/springfall2008/batpred/issues/924
Apparently by default predbat chooses the most expensive import slots to discharge in, so leaving lesser expensive slots ‘free’ for import if needed. The secondary order switch changes this behaviour, choosing instead to delay discharging to later. For me this has been much better, giving plans I don’t have to do force idle’s in to stop discharging ahead of or just after peak, and preserving my soc to later on. With a flat 15p export rate there’s no benefit to discharging early with the disadvantage of potentially having to import later.

Unfortuately my LG heat pump isn’t easily integrable to HA so I don’t have the ASHP OAT. There is a modbus connection approach which I will look at, but not top of my priority list so I don’t have easy access to the heatpump data - other than electricity consumption via a Shelly EM clamp on the electrical supply.

#797 PianSom

geoffreycoan Unfortuately my LG heat pump isn’t easily integrable to HA so I don’t have the ASHP OAT. There is a modbus connection approach which I will look at, but not top of my priority list so I don’t have easy access to the heatpump data - other than electricity consumption via a Shelly EM clamp on the electrical supply.

Slight digression off-topic - apologies to everyone uninterested.

Geoffrey - have you looked at third party alternatives? I inherited a Daikin AC unit, and have just installed a couple of new ones. I was a huge fan of the Faikin third-party ESP32 based controller, and have installed two more on the new ones even though they have the Daikin wifi module installed as standard, as the third party ones are not cloud-dependent. Installation was extremely easy (old was a plug in, new ones a new adapter and a couple of Dupont cables), and HA integration is standard.

I see there similar-ish things exist (see here, here for example) for LG kit. Possibly worth investigating, if you haven't done so before.

G
#798 geoffreycoan

PianSom Geoffrey - have you looked at third party alternatives?

I see there similar-ish things exist (see here, here for example) for LG kit. Possibly worth investigating, if you haven't done so before.

Oh no, nightmare, more projects to add to the list !!

There is an LG wifi module but (a) its £250-ish, (b) I have two ASHP’s so need two, (c) a YT video by Rod Mcbain (?) said they were pretty limited in what they can do.
Rod then put out a YT video connecting his LG Therma V (same as me) to HA using a modbus connection to ethernet bridge. I found there was several HA community posts about this kind of solution, but at the time filed it under ‘future projects’.
I was quite jealous when I saw Oli Speak to the Geek published a YT video on connecting his Daikin into HA using an ESPhome based solution, seemed very easy, and I did a search but didn’t find anything for my LG.
Of course now you find two, and I’ve just found two more here and here.

Got a large box of new Shelly toys arriving tomorrow (£46 of VAT and import duties later, Grr), but will start looking more seriously at the different options. Be good to have something in place before next winter.

R
#799 Rbor

geoffreycoan
My metric min discharge improvement is 0.2, I increased it to try to dissuade predbat from discharging when it wasn’t profitable, but it still seems to do so. Raised github issue 861 but no real progress on it https://github.com/springfall2008/batpred/issues/861

Thanks. I have looked through GitHub issue #861. There is some good experimental work there.
I will try metric min discharge improvement 0.1 and Calculate Secondary Order Slots OFF.

Rob

#800 PianSom

Rbor
I have just tried Calculate Secondary Order Slots to OFF, and have found that my discharges of the battery have moved to much later in the evening. This is exactly what I want, as I was getting fed up with the 7.30pm discharge and then wondering if I'd then make it to the 11.30pm cheap rate.

Thanks.

#801 Hook

I'm considering jumping over to agile from iog. Can I get prebat to only charge my car on negative slots?

I don't let it control the car atm, and it just pauses/charges the battery during any extra slots.

B
#802 Boffinboy

PianSom would you mind posting in the issue? https://github.com/springfall2008/batpred/issues/924 With mine set at 18p it was cycling in single slots for 1-2p gains per slot…. So there is clearly a meaningful bug in the calculation. Most people seem to run very marginal values. Maybe it only becomes evident at higher ones. I know 7.16.11 seems to have improved behaviour for @geoffreycoan but the patterns there seemed to be only marginal differences I think? @geoffreycoan would you mind trying to set a very high value eg 20p and see if you get the same issue I have under 7.16.11?

#803 PianSom

Boffinboy
I'll have a read through and post tomorrow, if that's ok. ATM all seems to be working just as I'd like, but will experiment further.

G
#804 geoffreycoan

Hook I'm considering jumping over to agile from iog. Can I get prebat to only charge my car on negative slots?

Yes you can, there’s a new ‘min car charge price’ in predbat that does just this. But negative slots are rare, maybe a few days a month when its windy and sunny.
Have a look at the Octoprice app to evaluate whether IOG or Agile is better for you. All depends on how much overnight charging you need.

Boffinboy I have done some tests with higher min soc discharge rates. There is a linkage of rate to discharging but I agree, it doesn’t appear to be “as described”. Have posted on your issue my different plans. Sorry I only went up to 10p

B
#805 Boffinboy

geoffreycoan thanks for testing. Definitely something funky going on! It almost seems worse the higher the value. I’m going to stick on v7.16.10 for now

#806 Hook

geoffreycoan

Thanks, I have a charger at work, so my home charging is sporadic.

#807 PianSom

Boffinboy
So I have had a read, though haven't done any more experimentation. But things for the last two days have been happening exactly as I'd like them to - the early evening discharge has now moved to late evening. See below from the execellent Octoprice site. Before I was having a large discharge around 7.30pm, then a last empty-out before the 11.30pm cheap rate started. Now my discharge seems to happening as late as possible. I'm still very vague about what "Calculate Secondary Order Slots" actually does, but I guess it's all part of the Art of Predbat.

So I feel a bit churlish about posting on the Issues tab!

D
#808 deanjesper

Sorry if this has been asked before but I couldn't find anything - is there a way of preventing Predbat from charging and discharging during the off-peak window (11:30-5:30 on IOG) so it only charges up and doesn't discharge until later on in the day?

G
#810 geoffreycoan

PianSom turning off “set discharge during charge” will stop predbat discharging and charging in the same slot (well sort of, it will still sometimes do this but much less frequently than if its turned on)

@deanjesper I’d suggest if you want to stop discharging in the offpeak window you set a negative export price adjustment in apps.yaml. This is exactly what I have done to stop discharging in the peak period for DFS. I’m probably going to leave it in place to preserve the SoC for late evening. Doesn’t need much, just -5 is enough for me
https://springfall2008.github.io/batpred/energy-rates/#manually-over-riding-energy-rates

D
#811 deanjesper

geoffreycoan that has worked a dream! Thank you

B
#812 Boffinboy

PianSom no worries. From @geoffreycoan ’s experimentation too it seems it is definitely not working correctly as described. Seems to be fine for most people, thankfully, but the way I’ve been preferring to run with a high export threshold seems to throw it off and generate regular export that it shouldn’t make. I’ve preferred the high threshold as it meant it could still do DFS, or take advantage of very low prices, but not hammer my battery for low benefits when it’s already cycling a fair bit.

D
#813 deanjesper

geoffreycoan hmmm... my plan showed as charge from 11:30-5:30 but it still charged and discharged last night


B
#814 Boffinboy

On a different note, anyone tried predai yet? I was looking at the documentation and it’s not clear to me what it uses as the inputs for the model. It reads as if the sensors you list in the config are the ones PREDICTED but I had sort of assumed you’d also have to specify the input parameters. Maybe it takes all of HA sensors? Or maybe the documentation is not fully accurate and you need to specify the inputs in the configuration

G
#815 geoffreycoan

deanjesper hmmm... my plan showed as charge from 11:30-5:30 but it still charged and discharged last night

You would think after losses there’d be no benefit to charging and discharging overnight.

Maybe adjust the export rate so its zero pence? What have you got min discharge rate improvement set to? You could increase that as its now calculated per slot, although as noted its not working entirely as expected, the higher the value the less the discharge there is

D
#816 deanjesper

geoffreycoan I'll try that. I think it's set to the default of 0.1.

#817 PianSom

geoffreycoan You would think after losses there’d be no benefit to charging and discharging overnight.

My Predbat shuffle (IOG vs Fixed) reduces my nightly battery charge cost by about a third. So my net cost is about 5p/kWh for a full overnight charge, every night.

Ignores sunk battery capital cost, of course.

#818 Jase1703

I backed out of PredBat last October due to being heavy ASHP user, no gas, AIO gets used up in hours, now getting back in and boy has it come on in development. I’ve had a successful winter on IOG only charge EV once per week. Going to make the switch to Agile but nervous about car charging so looking for a few tips for an occasional EV charger on Agile packing an AIO whilst running PredBat, oh and Zappi 2 on charging duties, no iboost no pointless Eddi. 8.8kw PV EW split. I’ve just taken two evenings reading all of this post so know I’m in the right place to ask. Octopus site shows me that in recent months I would be marginally better off on Agile but that’s without PredBat.

G
#819 geoffreycoan

Jase1703 start off with predbat in Monitor mode and get a feel for how it operates.

Then suggest you set it to Charge and Discharge or just Charge AND turn read-only on. That way predbat will calculate what it should do to your battery but not make any changes until you are ready

Predbat can plan your car charging using the cheapest slots https://springfall2008.github.io/batpred/car-charge-planning/
You’ll need to configure the appropriate HA controls and apps.yaml to actually do the car charging. Or if its infrequent just charge it yourself manually

I used predbat all winter on Agile, with an ASHP so high throughput and only a gen 1 inverter so 2.6kW output, and for a lot of the winter just a single 5.2kW battery. It did a fine job of finding the cheapest slots and preventing the worst of the peak import rates

W
#820 Wavy Davy

Whoopee, first day this year Octopus monthly export is more than my month to date import + standing charge. Predbat doing a great job. Thanks to all who helped me set it up particularly Geoffreycoan

G
#821 geoffreycoan

Wavy Davy 👍 I assume that is month to date figures?

Interesting that you’ve imported more than exported and are profitable, just shows how low the agile rates have been recently.

I’ve seen a massive swing-round in profitability as well. Not including standing charge as I don’t track that in HA, January cost me £244, February £91, March £16 and now April to date is -£35. Apart from 3rd April that cost 74p and 6th that was 7p, I’ve been in profit every day this month so far. Happy days. Predbat is amazing at managing the battery.

W
#822 Wavy Davy

geoffreycoan Yes that's month to date. I do track daily import and export amounts, but don't add them together on a daily basis. Maybe I should, would be easy to do as I have the half hour amounts for both. I don't do the tracking in HA I use a separate spreadsheet, don't know how to in HA.
I can see the spreadsheet getting more complicated!!

#824 Jase1703

geoffreycoan thanks for the pointers, I’ve made the switch to Agile, thought this would take a few days but was within an hour.
Re EV charging, I notice that the myenergi app allows user to schedule charges based on a minimum agile price. I’ve tried it and the app shows I’ve captured the next 4 slots below 0p, so it seems to work. I guess my question is; how does PredBat see this and what should I deselect to allow it to run unhindered? Am I better to set up a similar strategy within PredBat using the automations suggested in the GitHub text?? Remember I’m not a big EV charger.

G
#825 geoffreycoan

Jase1703 If you are not a big EV charger then the simplest thing is probably if you just charge the car as and when you need it using the myenergi app. Predbat will just see the additional load but it won’t hinder the charging from occurring.
The only thing that might be a bit of a pain is if myenergi devises one set of slots and Predbat is doing a discharge in that slot, which means you’ll discharge your home battery into the EV which is a bit wasteful. You can set predbat to do a force charge in those slots if you need to.

#826 Jase1703

geoffreycoan good advice thank you, I’ll probably find some time to build it into PredBat this week.

D
#827 danerf

I've seen people on this thread mention ASHP in the past. Can you use PredBat to manage the ASHP turning off and on at expensive/cheap times? Or do you put this in charge mode and leave Predbat to figure out the rest? I'm interested to hear how people manage this.

G
#828 geoffreycoan

danerf Can you use PredBat to manage the ASHP turning off and on at expensive/cheap times?

I have an ASHP so I’ll give you my perspective.

In short, yes you possibly can, but wouldn’t recommend it.

With Predbat you can schedule external things based on electricity rates and excess solar power (unlikely in winter!). iBoost and Car charging are “built in” but these can be repurposed to turn on and off anything you want to.

That of course depends on you having appropriate remote control integration to your ASHP. Mine is an LG Therma V which doesn’t have any remote control although @PianSom has kindly (!) pointed me to some ESPhome based projects that I’ll need to look into.

But then the ‘is it recommended’. In short, no. Have a look at this Heat Geek video https://youtu.be/c88Wv1HSlXs where they crawl through various strategies and tariffs (including Agile and Cosy) to find out which is cheapest to run with. A heat pump is best if its run ‘long, low and slow’, just generating enough heat to replace lost heat out of the house. If you run it more like a conventional boiler, turning it on and off when you want the house warm, it will require higher flow temperatures to get your house up to the required temperature and that in turn is much less efficient.

I have tried both strategies, the ‘on when you need it’ and ‘run it all day at a lower temperature’ and my experience was that there wasn’t a great deal of difference in energy consumed but the house was certainly warmer and more comfortable all the time with the low and slow strategy.
This winter I ran with the heat pump on all day, I set a higher load today scale factor (so a colder day would mean more energy and thus predbat would predict more required for that day) but just let predbat cope with it. Even with (most of the winter) only a 5.2kWh battery it worked fine and there was enough battery capacity to just about see me through the evening Agile peak.

The only time I turned the heat pump off was for the period of the DFS saving sessions. The house kept its temperature sufficiently for the hour or so it was off.

D
#829 danerf

geoffreycoan As always Geoff, a great well detailed reply.

Octopus are installed our heat pump (EDLA06E2V3) recommends keeping it on all day as stated, 'low and slow'. Today when looking into 'Octopus Cosy' I saw two 4-hour windows at cheaper energy rates, which made me question the low and slow and wonder they are encouraging customers to heat the house up in the two windows.

The load scaling factor is interesting, did you have a temp forecasting algorithm planning your scale and auto-adjust it?
If you had the opportunity to control is via automation, do you think you would be? Eg turning it off between 4pm and 7pm.

S
#830 shawry

Does predbat plan show more than a couple days? mine only seems to show the rest of today, plus all of tomorrow.

I have just put it in read only mode, Am I correct in assuming it plans what it would do, but doesn't actually carry it out, so if that's the case, is there an easy way to compare what has happened to what predbat would have done?

Also, currently on Octopus Go, though am in the process of getting a zappi fitted and was going to go to IOG due to cheaper rate, and a higher export. But is seems that using predbat the consensus is Agile is the way to go? Does that still give the 15p export tariff, or does it have its own/the 8p one?

V
#831 Vestas

danerf made me question the low and slow and wonder they are encouraging customers to heat the house up in the two windows.

Most people moving from another central heating system are used to that sort of setup - heat in the morning/evening.

Constant heat is preferable and in a well insulated house more economical, both in terms of power consumed and lifespan of parts.

In fact for people with well insulated houses and gas boilers with weather compensation its much the same really. Edit - although perhaps not in terms of parts as the boiler may end up cycling on/off.

G
#832 geoffreycoan

danerf Today when looking into 'Octopus Cosy' I saw two 4-hour windows at cheaper energy rates, which made me question the low and slow and wonder they are encouraging customers to heat the house up in the two windows.

Yes that’s definitely what they are encouraging their customers to do, but I had my doubts about the practicality of it, and the heat geek video shows that its not a good approach to try to drive the temperatures up for 4 hours then let them coast for the peak period.
I personally ruled Cosy out when I looked at the winter tariff options as I knew my heat pump would use more than my battery capacity even with a double Cosy charge-up. The import rates outside the Cosy periods are not great, Agile was cheaper for me.

The load scaling factor is interesting, did you have a temp forecasting algorithm planning your scale and auto-adjust it?
There is a discussion on the predbat github about creation of a model to work out the factors using historic load and temperature, and I got as far as creating the graphs and got reasonable correlation between heat pump load and temperature, but that’s as far as I got. There’s also now the new predai model Trefor has created but I haven’t looked at that.

But on the basis that I knew heat pump load would exceed battery capacity from previous years running I haven’t done anything more complex than that. Just let the load scaling I input indicate to predbat that if load today is higher than history then scale the rest of today’s load.

If you had the opportunity to control is via automation, do you think you would be? Eg turning it off between 4pm and 7pm.

I do plan to get my heat pumps integrated to HA at some point but at the moment its more to get better data like flow temperature, hot water temp and SCOP. Automating the hot water would be useful, e.g. cheaper periods and high solar generation.
The heating, I don’t know. At the moment we control it via a master thermostat that’s in the hallway - programmed (from memory) to 18.5 degrees from 10am (I delay the morning heating to let Agile rates drop a bit), 19 from 1pm, 20 from 3pm, 18 from 11:30pm. Other than really cold nights the house keeps its heat well overnight and its usually at or just above 18 degrees in the morning. A bit more intelligence to vary the step-up’s based on agile rates would be useful but not absolutely essential to me.

G
#833 geoffreycoan

shawry Does predbat plan show more than a couple days? mine only seems to show the rest of today, plus all of tomorrow.

Yes, you can set the plan hours to any duration you want. I personally have mine set to 24 hours which gives me most of the next days cycle. The period is 24 hours AFTER the first charge cycle https://springfall2008.github.io/batpred/customisation/#calculation-options

I have just put it in read only mode, Am I correct in assuming it plans what it would do, but doesn't actually carry it out, so if that's the case, is there an easy way to compare what has happened to what predbat would have done?

Yes assuming you set mode to Charge & Discharge or Charge then when read-only is switched on the battery will be left in Eco mode and predbat will plan the activity but not actually make any changes.
You can see how the SoC and cost vary of the predbat plan (called ‘Best’) and the baseline inverter activity (called ‘Base’) in the Apex charts https://springfall2008.github.io/batpred/creating-charts/

Or just take screen shots of the predbat HTML plan showing battery SoC and current cost today and the projections, then a few hours later compare the HTML plan to the current situation. Predbat runs every 5 minutes so it’ll show you current SoC and cost today updated continually.

Also, currently on Octopus Go, though am in the process of getting a zappi fitted and was going to go to IOG due to cheaper rate, and a higher export. But is seems that using predbat the consensus is Agile is the way to go? Does that still give the 15p export tariff, or does it have its own/the 8p one?

There are many factors to decide which is best for you. If you are a high EV charger and have sufficient battery capacity to last you through the day then IOG is a good tariff. Agile rates are generally a little higher than Go/IOG overnight but the last few weeks have been very cheap/negative. With agile you can export either with a variable rate export tariff or the 15p fixed export rate. Most people including me are on the latter.

S
#834 shawry

geoffreycoan Thankyou 🙂

Ok, Ive just bit the bullet and gone live to see how it pans out, however also DM'd Octopus to switch to Agile so I can move to the better export tariff too, I will see whether its moving to IOG when I get the charger installed, I only have a PHEV which limits the use overnight

J
#835 Josephiah

danerf
After the first couple of months, I changed our HP to run constantly (barring the exception noted below), and got a fairly startling increase in performance (bumping CoP from around 4 to around 5). We started on Cosy, which got us savings of ~ 14%, but once we got our battery switching to Agile beat that by miles (savings more like 40-50%).

The exception: I set ours to gradually ramp up to 21˚C from 13:00 to 16:00 (when Agile tends to be cheap), then setback the target to 18˚C, coasting over the 16:00 - 19:00 by using the house as a thermal battery, before going back to our standard 19˚C for the rest of the night/day, as show below. Works very effectively. (But as we head into warmer weather, I'm considering just running at 19˚C all day long, as our battery should have enough capacity to bridge the gap even with the HP running.)

The other thing I do is to schedule our DHW runs (we usually need 2 per day) to run in the cheapest slots day and night using the target rate sensors in BottleCapDave's Octopus integration. Again, works really nicely.

G
#836 geoffreycoan

Josephiah Sounds like not dissimilar approach to me of ramping up during the day aligned to the Agile prices. Looks like there wasn’t any noticeable temperature drop during the peak rate set-back either which is great, I think we would have more loss if I did the same, but worth considering for next year.

Have to admit I have turned the heating off about 10 days ago as the weather got warmer. Boy do I notice the difference in electricity consumption ! The 5.2 battery (4.2 usable) is enough to get us through the entire peak and sometimes up to midnight now, that’s with cooking as well.

You have your heating on overnight at 19 degrees? We found that was too high for us so set it back to 18. Horses for courses.

The DHW we only heat once a day and that’s enough to last us all day. In the winter I did run it for a while overnight on the cheaper agile periods but its been on from 11 to 3pm as we’ve come out of winter. Have extended the DHW time now to 8pm so it heats up again after any evening baths. I found that our ASHP was heating the hot water via a mix of the heat pump and the immersion heater; took ages to work out how to change the settings to stop this, but now got it on ASHP only. Using about 1.5kW a day now so hardly worth shifting it back to overnight agile rates so I can export marginally more in the day.

J
#837 Josephiah

geoffreycoan Started with small setbacks overnight, but in the winter the recovery time in the mornings was so long that it was only a few hours difference compared to running it 24/7 - and even less of a difference in energy use/cost once we factor in the harder/less efficient running in the mornings to get the house back up to temperature. As I said, I was startled by the improvement in CoP - it was a proper "oh, when heat pump geeks say you get the best out of them when you run them the same round the clock, they really mean it" lightbulb moment. The other major improvement was switching to our Vaillant's "Eco" DHW mode, i.e. slower but more efficient - again a startling jump up in CoP from around 2.6 to around 4.0 for DHW.

I also think, though I haven't fully thought this one through, that in winter, because the thermostats are in the most central (effectively best insulated) rooms, setting back tended to lead to all the other rooms dropping by several degrees before the thermostats noticed their 1˚C drop (making the morning recoveries even worse).

19˚C all round seems to work for us, more or less. We're in the Highlands - not consistently warm enough yet to consider switching off! And a household of 7, so we get through a lot of hot water!

#838 Jase1703

It’s hard to give a definitive ASHP answer or strategy, too many variables. After struggling for 10 years with ASHP and radiators with a central thermostat we changed to UFH in 4 zones. Strategy since January has been heat rooms overnight on cheap IOG for 5 hours to 22degc, rooms drop max 2 deg any more and heating comes on again. However this is pointless because UFH takes hours to respond. I’m now on Agile and next winter will set room stats to target 3 lowest agile periods every day (educated guess work). I can’t see how a 24hr low and slow programming would work the heat pump would still turn on and off as temp targets are hit in each room. On agile it would be better to have targeted heating periods avoiding usual teat8me peaks rather than allowing the ASHP to randomly come in and out. Tricky. I’m sure there are room stats that can track agile rates somewhere but the lag in UFH would be too great.

G
#839 geoffreycoan

Jase1703 Is your 4 zone UFH with an ASHP or a coventional gas/oil boiler? I’m not sure it makes much difference but the advice as I understand it from heat geeks etc is not to zone your system (with valves) at all. Zoning with valves results in different areas requiring water/no water, resulting in big jumps up and down of the heat demand.
Instead the advice is to have all areas open to take water at the same time, and manage the temperature in the areas by reducing the flow rate to match the heat loss in that area. That way the heat pump is on a low slow setting all the time and you don’t get big spikes in demand that for a heat pump are much less efficient. Same advice applies to gas/oil boilers. Need weather compensation to set the flow temp as well for this to work.

You can coast the heating through the more expensive electricity price periods like @Josephiah does, relying on the thermal mass of the house to not require heating in that period - and UFH’s are particularly good at that - or you can do as I try to do and just leave the heat pump to do its thing when it wants to and rely on stored battery power to mitigate against the peak prices.

One thing I am hoping to achieve if/when I get integration to my heat pump is the ability to see the COP being achieved, or at least calculate it based on heat pump raw data. The LG control panel just doesn’t have this information so it makes optimising the setup based on just kWh consumed much harder.

#840 Hook

After moving from iog to Agile plugged my Tesla in last night and was surprised when I was granted Octopus slots.

I've found smart charging in the phone app and turned it off, but what do I need to do to get predbat to control charging? Can it use the octopus integration to control my car? Looks like a right faff, to do it through the Tesla integration involving setting up domains and proxies and exposing HA to the internet.

G
#841 geoffreycoan

Hook Once you move off IOG the whole ‘Octopus slots’ things ceases. I suspect you were granted some just because Octopus’s systems hadn’t caught up with your tariff change.

If you are on IOG then car charging is very easy, its all done by the Octopus app and predbat gets its daya from the Octopus integration. If you are not on IOG then you either have to setup the charging manually (e.g. in your EV app) or let predbat schedule it for you based on cheapest agile rates.
https://springfall2008.github.io/batpred/car-charge-planning/

I have no experience with an EV much less a Tesla so can’t advise on how or what needs to be setup to control the EV scheduling from Home Assistant. Sorry

#842 PianSom

Interesting Predbat behaviour forecast for today.

It’s a sunny day forecast, and I am starting the day with a nearly full battery. Lots of export forecast. But there is a Power-up 1pm-3.30pm, so free electricity this afternoon. (I have an AIO, so 6kW inverter.)

The battery will start the Power-up full, and the load is predicted to be less than generation for the whole time (actually all day, once the battery has filled up in the next hour or so). So Predbat is planning to almost completely ignore the Power-up. It will be doing a “Maintaining SOC” - make sure the battery stays full. I am therefore not expecting to utilise the free electric at all.

Seems very counter-intuitive. But I can’t think of any way to increase my income further than that today. So well done Predbat. Again.

R
#843 Rbor

When import rates are close to 15p, Predbat seems to work on getting the battery fully charged (almost my 'old way').
Any sub 15p rates today (after losses) are early pm and charging of battery is then done via excess solar anyway with any top ups from grid. Lower import rates seem to be a waste when there is excess solar ! We need them during the night.
No difference to me though as no power ups up here in Yorkshire.

Predbat is a beast – I can't imagine life without it now.

Rob

G
#844 geoffreycoan

PianSom I have the same power-up event for 1-3:30pm and although my 5.2 battery is 70% this morning, predbat is planning on discharging it this morning and then filling it back up again in the 0p period.
I guess that’s because the entire 4.2kW usable can be filled in about 2 hours.

Very sunny though, all 3 arrays are lit up and generating a total of around 5-6kW right now. Going to be another profitable day 👍

#845 PianSom

Rbor Predbat is a beast – I can't imagine life without it now.

Absolutely true!

I am now so dependent on Predbat that I am starting to get concerned about resilience. My long standing HA Docker instance is pretty damn reliable, but has a lot of moving parts and dependencies. I am starting to wonder if I should get a standalone machine just for my home energy management. But my suspicion - though I haven't thought it through yet - is that it is already too intertwined.

Z
#846 Zaz

I was considering two mini PCs running HA with one running in a read-only state so having a cold standby. Might be a little overkill! :-)

#847 Hook

Is there anyway I can give it a maximum price slot that it will charge in?

Say for example I never want it to charge if the slot is over 10p?

G
#848 geoffreycoan

Hook there anyway I can give it a maximum price slot that it will charge in?

Say for example I never want it to charge if the slot is over 10p?

You can do this with EV charging, specify the max charging price, but not for your battery, no.

I’m not sure its a useful feature to have anyway. Predbat plans your charging and discharging to minimise your bill. It will only charge the battery if there is future predicted house load that would otherwise have to be supplied by grid import at a higher price than charging the battery (after conversion losses).

e.g. future import price is 15p, predbat would only charge the battery if charging and then discharging the battery results in a cheaper bill than paying the 15p in the future.

#849 Hook

It seems to be charging at 14p when I have enough battery to cover house load until solar comes out.

G
#850 geoffreycoan

Hook would need to see the plan to better understand what predbat is planning over the day, what tariff you are on, it may be charging the battery at a relatively cheap rate to have sufficient soc to then discharge later on at a more beneficial rate or may be charging because of best_soc_keep.

Have a look at this FAQ https://springfall2008.github.io/batpred/faq/#the-plan-doesnt-charge-or-discharge-when-i-expect-it-to

Tuning the best soc and battery metrics (min charge/discharge) can usually get the plan to be what you want although the out of the box settings are pretty good

#851 Hook

I did some tuning around metric min improvement charge/discharge, looks better now.

S
#852 shawry

Ok, so I see the running costs on the right hand side of the plan as an indicator, and all looks good on agile for today, however I’ve just checked the energy tab of HA and I can’t seem to get the costs right, anyone give me a clue of which sensor I should be using to reflect the correct cost of my imports and exports?

G
#853 geoffreycoan

shawry Have a look at BottleCap Dave’s guide for setting up the energy dashboard https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/setup/energy_dashboard/

I personally use the givtcp_xxx_import_energy_today_kwh and octopus_xxx_current_accumulative cost for import and givtcp_xxx_export_energy_today and 15p fixed rate and it works great for me.

You can use the octopus home mini sensor if you have one of those but I prefer to use the inverter entities as they are a close copy of my octopus meter readings and they’re updated in near real time and don’t rely on the cloud API.
If you want to use actual octopus readings so it absolutely matches your energy bill and don’t have an OHM then the best you can do is to use the previous day readings from Octopus

S
#854 shawry

geoffreycoan

Thankyou, will have a scan tonight after work. I may have to delete all my settings in the energy tab and start from scratch as despite setting it to a flat 15p for export its still calculating using the 8p rate.

G
#855 geoffreycoan

shawry
Here’s a couple of screen shots of my energy dashboard setup. I thought I was using current accumulative cost, seems I am using current rate instead. Mine is slightly more complex as I have for legacy reasons a set of day/peak/offpeak/free utility meters from when I was on Flux that point to GivTCP xxx Energy H Import Energy Today kWh
Now I am on agile I only use the day and free utility meters and if I was doing it now I would do the same and rely on the current rate from the octopus integration

Export

R
#856 Rbor

geoffreycoan Thanks for the advice.
I do have a Home Mini and have set this up to point to BottleCap Dave's entities.
On the energy dashboard, I am seeing the correct current consumption and the cost is close.
I am unsure what to do for the Export rate. You are using the givtcp and I have looked at the configuration which is linked to MQQT. This is what mine looks like (It is a mess and points to my old Flux tariff. I am now on Agile import and fixed 15p export). Any advice for how to set this up for agile (I have selected the 'dynamic tariff' button).

BottleCap Dave is just consumption and not export, as far as I can see.
The energy dashboard is picking up my import costs via Dave's entities. But the export just shows –£0.00 for 15 kWh exported.

Thanks

Rob

G
#857 geoffreycoan

Rbor what you are showing above is the GivTCP tariff stuff, I think that only works for simple eg Ecomy 7 / Go type tariffs. To my knowledge there’s no concept of more complex tariffs such as Agile or Flux. So ignore all that, the night/day and tariffs in GivTCP are not useful IMHO.

In the energy dashboard:

Import:
Consumed energy = sensor.givtcp_xxxxinverterid_import_energy_today_kwh
use an entity with the current rate, entity = sensor.octopus_energy_electricity_XXXXmpan_current_rate

Export:
Energy returned to the grid= sensor.givtcp_xxxx_export_energy_today_kwh
Use an entity with thecurrent rate = sensor.octopus_energy_electricity_xxxxmpan_export_current_rate

This is using the inverter to give you your import and export kWh and the octopus integration to give the current rate.
I’ve described this in the Octopus integration docs.

You can use the OHM sensor for current import consumption but I just used the inverter reading as it was close enough if I measured over a month it was within a kWh of my inverter meter reading. And it didn’t rely on octopus to process the meter readings from OHM and then spit them back via the octopus energy API.
For export as you said there’s no OHM reading of export data so you have to either use previous day in the energy dashboard (instructions in the link I provided earlier), or use the GivTCP export meter kWh reading.

For export rate you can hard code 15p into the dashboard but doing it this way means that if the rates ever change you won’t ’restate history’ with a changed fixed rate.

R
#858 Rbor

geoffreycoan I have set up Export entities as in your reply to shawry and to me.
But I am also seeing a calculated Export 'cost' based on 8p, rather than 15p.
35.9 kWh exported is reported as a –£2.94 p 'cost'. The 'cost' should be –£5.39 p.
If I look at the entity in Settings and entities, it shows up as a 15 p cost per kWh.
So something isn't quite right here.

Rob

G
#859 geoffreycoan

Rbor The energy dashboard uses home assistant statistics not the raw sensor values (that’s why there is a delay in adding new sensors before you can use them in the energy dashboard and why the dashboard only updates every couple of hours)

Try having a look at the statistics for your export energy sensor : Developer Tools / Statistics
export_current

I suspect that the statistics still have the 8p value. You can click on the ramp with arrow icon and see the history.

Looking at my own history for this sensor it seems that it holds + and - delta’s, so if I look at when I was being given the Flux export rate I can see +12p/kWh at 16:00 and -12p at 19:00 each day and then 0’s every 5 minutes in the more recent history. So I think you just need to add a +7p in the appropriate date/time in your statistics history.

DO take a backup beforehand !

R
#860 Rbor

geoffreycoan I now have Export set up correctly. For today so far, the energy dashboard shows 28.2 kWh exported for £4.23 (28.2 * 0.15 = £4.23, so success).
Yesterday, I was trying to change the settings directly from the 'energy configuration' option under the 3 dots on the energy dashboard but nothing was sticking.
I then discovered that changes to the energy dashboard must be carried out from the 'Dashboards' button under 'Settings'. HA never fails to amaze me sometimes by its user-unfriendlyness.

Rob

I
#861 ImpPhil

Does anyone know why I get this +60p at 23:30 in my plan?

S
#862 shawry

standing charge I would assume, mine jumps by 69p

G
#863 geoffreycoan

ImpPhil yes it is the standing charge. Bit strange its in the 23:30 slot as I’m sure it gets applied at midnight not 23:59 - so may be a bug/feature of clock drift or BST/GMT? Raise it as a GitHub bug if you feel strongly about it.

Rbor I then discovered that changes to the energy dashboard must be carried out from the 'Dashboards' button under 'Settings'. HA never fails to amaze me sometimes by its user-unfriendlyness.

That is weird that it does that. I only discovered the three dots Energy Configuration fairly recently, I have always been editing via Settings/Dashboards and grumbling occasionally about it being a pain to get to.
Once I found the Energy Configuration option I’ve only ever been using it now to add new monitored devices so if it doesn’t work for energy rates then sounds like there might be a bug in HA.

Rbor For today so far, the energy dashboard shows 28.2 kWh exported for £4.23 (28.2 * 0.15 = £4.23, so success).

Today’s been my best generation so far this year. 53.4kWh generated, 41.1kWh exported for £6.16 income. Bring on the summer!

S
#864 shawry

This does the standing charge in the 23:30 timeslot as it makes the addition in the following slot, so it reports its going to in the slot previous (in essence I think its activated at 23:59)

R
#865 Rbor

Predbat v7.17.2 crashed predbat!
I have had predbat automatic update enabled.
At 18:00 pm 24th April, v7.17.2 automatically installed.
This was followed by error messages and predbat freezing.
I spotted this at 19:30 pm but the time stamp at the top of my predbat plan was still on 18:00, with no updated lines since 18:00–18:30. Well and truly frozen.
I tried restarting HA but this made no difference.
The fatal status report was:

Changed to ERROR: Exception raised type NoneType doesn't define round method

I had also been trying to install the carbon intensity integration, adding the necessary files to custom_components and add lines to my apps.yaml. I also enabled the carbon switch.
I never got this to work. I wasn't really sure about linking in to the National_UK data. I don't know if this had contributed to the crash.

I have now unenabled automatic update and have managed to get predbat unfrozen by going back to v7.17.1

I have posted an issue in Github for Trefor screenshots and predbat.log. From the number of tweaks that he has made in rapid succession, the introduction of carbon intensity into Predbat seems to have had a rocky ride.

Anyway, after a traumatic hour, I have my predbat back .... with autoupdate and the carbon switch turned off ...
🤞

Phew

Rob

G
#866 geoffreycoan

Rbor Rob, strongly recommend that you install the GivTCP and Predbat monitoring automations that (I wrote) in the Predbat documentation https://springfall2008.github.io/batpred/output-data/#automated-monitoring-that-predbat-and-givtcp-are-running-ok

Newer versions of both automation are in my fork and will get pushed through to Predbat in my next PR https://github.com/gcoan/batpred/blob/main/docs/output-data.md/#automated-monitoring-that-predbat-and-givtcp-are-running-ok

I took at look at the Carbon Intensity thing today. Whilst I might be interested in it for long term price planning (e.g. knowing when agile rates are likely to be low), I'm personally not bothered about having it within predbat. So I have let predbat auto update through the 3 releases of this new functionality, I have added the extra lines to apps.yaml (and then afterwards commented them out as not using them) but I haven't installed the integration which looks to be a faff manually copying files.

If you comment the Carbon line out of apps.yaml you should be able to auto update to the latest version with no issues.

Then separately fiddle with getting the carbon thing working before trying it in predbat.

Trefor is great at pushing out new features and functions but maybe let them stabilise a bit first ....

R
#867 Rbor

geoffreycoan I have the automations set in predbat but whether I had input them correctly, I don't know.
I will update them now from your GitHub fork.
I have had enough of carbon intensity!

Rob

R
#868 Rbor

geoffreycoan Geoffrey, I have looked back at the automations and have updated them.
I have also looked at this section, which I hadn't actioned before:

You will need to enable a binary sensor for each add-on to be able to use these triggers: Navigate to Settings / Devices and Services / Devices and search for 'GivTCP'. Click on the GivTCP add-on, and under 'Sensors', click 'XX entities not shown'. Click the 'Running' sensor, then the cogwheel, and Enable the sensor.

I have done this, although I don't really know what I am doing!

Repeat these steps for the Mosquitto add-on.

I can't see how to do this. There are 11 mqqt devices and they are all linked to givtcp, with no cogwheel in sight!

Rob

G
#869 geoffreycoan

Rbor You didn’t follow the instructions carefully enough Rob ! (And for once I got them right as well!)

You have to click on the add-on name in the list of devices. The add-on’s are represented as a device as well as all the devices that are linked to the add-on (such as the GivTCP entities).

There’s a few sensors available for each add-on that are not enabled by default. The latest version of the monitor checks that GivTCP and Mosquitto broker are running and uses the ‘running’ sensor to do this. Actually I just thought I could add Appdaemon as well.
There’s also sensors for CPU and memory usage for each add on. I’ve enabled these for Studio Code Server and Appdaemon and have another automation that restarts either of these add-ons if the CPU % gets too high. Studio code server in particular has a memory leak that randomly causes it to take over my HA server.

R
#870 Rbor

geoffreycoan You are right and I have now enabled the running sensor for mosquitto broker.
My error (and I spent ages on this) was to naively believe that 'mqqt' was an abbreviation for 'mosquitto broker' but they appear to be different, MQQT an integration, and 'mosquitto broker' a device, all part of the HA rabbit hole of understanding which hasn't yet become firm in my fading brain.

You also state:

As an extension to the above, instead of just alerting that GivTCP has a problem, the automation could also restart GivTCP add-on which usually cures most GivTCP connectivity issues. Restarting GivTCP does however lose the current GivTCP log in Home Assistant.
To restart the GivTCP add-on, add the following at the end of each 'sequence' sub-section within the action section:
- service: hassio.addon_restart
data:
addon: a6a2857d_givtcp

Do you recommend that I add these lines of code? And you refer to each 'sequence' sub-section but isn't the action just one sequence? (more HA rabbit holes for me!)

On the plus side, since effectively wiping out 'carbon intensity' predbat has run smoothly overnight with no adverse status reports at all. My latest predbat log (from midnight today) shows zero errors now, down from 18 NoneType/Round errors from yesterday evening.

Rob

S
#871 SteveCook

Does anyone know what this means (the status line) please and how i might fix it.
Thanks in advance

R
#872 Rbor

Have a look in the apps.yaml documentation: Battery Charge/Dicharge curves.
Nothing to worry about and you should be able to stop the warning.

Rob

G
#873 geoffreycoan

Rbor Do you recommend that I add these lines of code? And you refer to each 'sequence' sub-section but isn't the action just one sequence? (more HA rabbit holes for me!)

Ah yes, I will fix that. The automation had multiple ‘if triggered by this do this’ code in it and the latest version in my fork collapses all that down into a single action. The text is a hang-over from how the automation was written previously.

Whether you add the ‘restart givtcp’, up to you. Trefor has added similar ‘restart givtcp’ logic in predbat now but to be honest I haven’t enabled it nor do I have it in my givtcp error detection automation. I prefer to know that there’s a givtcp issue and I want to look at the logs first to determine what the issue is before restarting.

SteveCook Does anyone know what this means (the status line) please and how i might fix it.

As @Rbor says, have a look at the documentation on setting the battery curves https://springfall2008.github.io/batpred/apps-yaml/#battery-chargedischarge-curves

If you can share whats in the apps.yaml we can help debug it. Most obvious thing is to check the YAML indentation

S
#874 SteveCook

geoffreycoan
Whoa thanks, i will have to look and read and try to even get where you are suggesting i look. regards steve

S
#875 SteveCook

i watched the install video and set my 9.5 the same as the vide (i think)

S
#876 SteveCook

Predbat can compute this curve automatically if you have enough data, restart the add-on and look in the logfile for the data

once set here Predbat will no longer re-compute the curve.

Can also be set to 'auto' to just use the calculation curve, not recommended if you are using low power charging mode.

battery_charge_power_curve:
91 : 0.91
92 : 0.81
93 : 0.71
94 : 0.62
95 : 0.52
96 : 0.43
97 : 0.33
98 : 0.24
99 : 0.24
100 : 0.24

G
#877 geoffreycoan

SteveCook Your YAML is invalid :-(

The battery curve figures should all be indented two spaces

so should be:

  battery_charge_power_curve:
    100 : 0.46
    99 : 0.46
    98 : 0.46
    97 : 0.88
    96 : 0.93
    95 : 0.97
    94 : 0.97
    89 : 0.98
    88 : 0.98

or I have mine set to auto so predbat generates the curves for me:

  battery_charge_power_curve:
    auto
  
  battery_discharge_power_curve:
    auto
S
#878 SteveCook

geoffreycoan
Thanks. I cut and pasted the 4 lines of text above for auto.
Did a HA restart, but the status line still has the same error?
Regards
Steve

G
#879 geoffreycoan

SteveCook can you have a look at what the details of the error are in the appdaemon.log file.

At a guess you've not enabled the GivTCP entities in apps.yaml that predbat needs to work out the curve from your charging history (details of these entities are in the documentation), so check those, but let's see the logfile

S
#880 SteveCook

new message just appeared?
Any ideas what i need to do please?

S
#881 SteveCook

The invertor time error above error has just disappeared and the original error about incorrect power curve has just come back

G
#882 geoffreycoan

SteveCook the error about clocks being wrong is just a warning that the clock from the inverter and the clock home assistant has differ. If it's a one off, ignore it.

It does usually point to there being comms issues talking to the inverter (see the GivTCP log) so if it keeps happening you'll need to resolve the underlying issue

S
#883 SteveCook

geoffreycoan
Geoffrey. Thanks for humouring (helping me)If I knew how to look in the appdaemon log fle I would.
My enable debug slider is "off"

S
#884 SteveCook

geoffreycoan At a guess you've not enabled the GivTCP entities in apps.yaml that predbat needs to work out the curve from your charging history (details of these entities are in the documentation), so check those, but let's see the logfile

How do I enable the GivTCP entities please?

G
#885 geoffreycoan

SteveCook Hi Steve

You don’t need the enable_debug slider to be on, the default log should give you enough details of the error

Instructions for how to find the logfile are in the documentation under ‘output data’ https://springfall2008.github.io/batpred/output-data/#predbat-logfile

And the specific things you need to change in apps.yaml to enable the battery charge curve to be calculated are in the documentation https://springfall2008.github.io/batpred/apps-yaml/#battery-chargedischarge-curves under the bit “If you are using the recommended default REST mode to control your inverter then you will need to uncomment out the following entries in apps.yaml”

Just find the bit in the logfile where it reports an error calculating the charge curve. The charge curve is only calculated when predbat starts or restarts, so to force the error (to save wading through lots of debug log messages), either restart the AppDaemon add-on or just make an edit to apps.yaml - either will restart predbat and cause the charge curve to be attempted to be calculated

S
#886 SteveCook

G
#888 geoffreycoan

SteveCook I’ll have to look at the code to see the circumstances why it generates that warning message - unless you want to take a look yourself as an exercise for the reader …..

It is only a warning and predbat will continue to work just fine, it will just assume that the battery can charge to 100% at full rate whereas in reality the battery tends to back off the charge rates as it gets full. The battery will still fill to 100% fine with this warning, its just that predbat’s prediction of when the charge will finish will be slightly wrong.
I ran for 6 months without a charge curve set with no obvious adverse issues, but I’ll look at the code for you

S
#889 SteveCook

Thanks. i cut an pasted this into the config from the instructions. nothing about discharge though. still get the error
battery_charge_power_curve:
91 : 0.91
92 : 0.81
93 : 0.71
94 : 0.62
95 : 0.52
96 : 0.43
97 : 0.33
98 : 0.24
99 : 0.24
100 : 0.24

S
#890 SteveCook

2024-04-25 14:15:06.063046 INFO pred_bat: Inverter 0 sensor.predbat_GE_0_scheduled_discharge_enable set to False
2024-04-25 14:15:06.067646 INFO pred_bat: Inverter 0 scheduled discharge enable is False
2024-04-25 14:15:06.074330 INFO pred_bat: Inverter 0 discharge windows currently [{'start': 0, 'end': 0, 'average': 0}, {'start': 1440, 'end': 1440, 'average': 0}]
2024-04-25 14:15:06.077772 INFO pred_bat: Find charge curve with sensors sensor.givtcp_sd2227g888_soc_kwh and number.givtcp_sd2227g888_battery_charge_rate and predbat.status and sensor.givtcp_sd2227g888_battery_power
2024-04-25 14:15:08.194525 INFO pred_bat: Find charge curve has 8.0 days of data, max days 8
2024-04-25 14:15:08.282079 INFO pred_bat: Note: Can not find battery charge curve (no final curve), one of the required settings for predbat_status, soc_kw, battery_power and charge_rate do not have history, check apps.yaml
2024-04-25 14:15:08.285707 INFO pred_bat: Find discharge curve with sensors sensor.givtcp_sd2227g888_soc_kwh and number.givtcp_sd2227g888_battery_discharge_rate and predbat.status and sensor.givtcp_sd2227g888_battery_power
2024-04-25 14:15:10.057124 INFO pred_bat: Find discharge curve has 8.0 days of data, max days 8
2024-04-25 14:15:10.150980 INFO pred_bat: Note: Can not find battery charge curve (no final curve), one of the required settings for predbat_status, soc_kw, battery_power and charge_rate do not have history, check apps.yaml
2024-04-25 14:15:10.169022 INFO pred_bat: Found 1 inverters totals: min reserve 0.38 current reserve 0.38 soc_max 9.52 soc 9.52 charge rate 2.6 kW discharge rate 2.6 kW battery_rate_min 0.0 w ac limit 3.6 export limit 3.6 kW loss charge 3 % loss discharge 3 % inverter loss 4 %
2024-04-25 14:15:10.192336 WARNING pred_bat: pred_bat: Entity predbat.charge_limit_kw not found in namespace default
2024-04-25 14:15:10.193533 INFO AppDaemon: pred_bat: Entity predbat.charge_limit_kw created in namespace: default

G
#891 geoffreycoan

SteveCook Interesting. Is it a new GivTcp or predbat installation?

The error from the log is pointing to either you’ve left one of the sensors commented out in apps.yaml for charge or discharge (details of the sensors predbat needs are in the apps.yaml battery charge curve doc linked earlier) OR there isn’t enough history for predbat to find the curve.
But then it says there is 8 days of history found so its a bit weird in that respect.

#892 Hook

I have auto update on and was surprised at the new battery freeze update.

Not sure why it would freeze my battery at peak rate so I can use the grid. Usually it would have me on house load. And it knows there won’t be enough solar to cover house load.

G
#893 geoffreycoan

Hook I’m getting a lot more freeze charging with this new version as well. It froze charge all night when the import rates were around 14,15p; where there wasn’t enough differential to make it worthwhile discharging the battery.

The Load calculation has got more complex in this release as well, its now modulating the load up and down over the 30 minute time period to model the ups and downs of normal life, kettle turned on, etc. PV model has had this for a while but its new to load model. I think this means its a lot harder to just look at 30 minute load and compare it to 30 minute PV.

Looking at your plan, its only the first 7am slot where your PV is definitely lower than your load over the period. I agree it would have been slightly better to leave the battery in idle, but its only 1p of potential import.
The rest of the plan, the 30 minute PV forecast is higher than the Load so should be OK.

Personally I think it would have been better to be in Eco/Idle mode in case the PV is lower or load higher, which is part of the comments on a GitHub ticket 897 that led to this change so I suspect we’ll see more tweaking - do add your screen shot to the ticket so Trefor can see what’s happening

#895 Jase1703

geoffreycoan same here, seeing more freeze charge events than before. Happy to let PredBat run and learn as from your explanation it seems to be making reasonable moves. Important to let PredBat do its thing, it works harder at it than I am willing to.

#896 Hook

At the moment with the last few agile days, it's probably better just to be in ECO mode.

I'll see what it predicts it'll do at 4.

S
#897 shawry

So mine looks like this, not sure it should be holding charge at 14:30, or in the early hours. Though I fully admit Im an absolute noob at this 🙂

#898 PianSom

FWIW no Freeze events here on IOG.

The major change seems to be that the evening "discharge battery to make some cash" slot has moved from about 11pm where it has been for the last month or so, back to 7.30pm where it was before.

#899 Hook

Stuck it in Read Only mode for now.

Tomorrow doesn't look that great for Agile.

G
#900 geoffreycoan

I’ve added my own screen shots to the GitHub issue that spawned the freeze charging change, https://github.com/springfall2008/batpred/issues/897

Generally the predbat plan does seem to be freeze charging at appropriate places when import rates are similar to future export rates, but I have found a bug that the lowest priced future rate slots are set to Eco not Freeze Charge. Progressively as you get towards these time slots the plan improves and the lowest price slots move to freeze charge.

But not great for agile tomorrow.

R
#901 Rbor

I have now re-enabled 'predbat automatic updating' and am now on v7.17.3. I have noticed bracketed values now appear for PV and Load (with (10%) in the headers) when in Expert Mode and with HTML Plan Debug enabled.
See screenshots below for 'after' and 'before'.
I have looked on GitHub but can't see anything to explain the rationale.
Do you know what these signify? I wonder whether the values have influenced the increased use of Freeze/charge and Freeze/discharge.

Rob

G
#902 geoffreycoan

Rbor I have noticed bracketed values now appear for PV and Load (with (10%) in the headers) when in Expert Mode and with HTML Plan Debug enabled.

The PV 10% almost certainly comes from the Solcast 10% estimation model so you get a measure of the range of potential PV in a slot rather than it always being a single figure.

I’m guessing that the load is the raw figure and Load 10% is the modulated figure after going through one of the predbat estimating modules. But if Trefor didn’t add to the documentation I’ll have to look at the code to work it out ….

R
#903 Rbor

geoffreycoan I thought this might mean more work for Geoffrey!
I must try to get to grips with the various 10% values.
Overall, the Freeze options work for me and I can understand the logic that it may be more cost effective to use the grid than the battery with losses when Agile rates are close to 15p. But from GitHub issues such as 897, and in this thread, the freeze options don’t always work.

rob

#904 Hook

I’m seeing a few oddities after the last update.

I was expecting charge to be frozen, but it’s being charged from solar.



#905 Hook

Hook

Just checked again and now the battery is discharging.

G
#906 geoffreycoan

Hook I’m seeing a few oddities after the last update.

I was expecting charge to be frozen, but it’s being charged from solar.

Have a look at the descriptions of the Predbat status https://springfall2008.github.io/batpred/what-does-predbat-do/

The Freeze statii get a lot of people confused.

Think of it as two things, the SoC is frozen and the battery is charging if there is excess solar. So what you saw is perfectly normal.

The second screenshot definitely shows it exporting, what did the predbat status show as? Predbat recalculates the plan every 5 minutes so it quite well could have swapped from freeze charging to discharging if the SoC has risen to the point where it things it doesn’t need all that stored power. I know it was only 1% difference between the two screenshots and they were 5 minutes apart, but sometimes this happens.

I try to be relaxed about what predbat does to the plan as it gets it more right than I could (or would want to) get it to myself manually. Sometimes it does do odd things like charging and then discharging but the more recent releases seem to have stopped some of this behaviour happening for me and its freeze charging and holding SoC a lot more.
I have calculate secondary order slots off and this helps to keep the SoC stable by delaying exporting until later on

#907 PianSom

A disappointing plan for this afternoon's Power-up. It should start the discharge earlier, discharge much more, and fill up to 100%

How's yours looking @geoffreycoan ?

G
#908 geoffreycoan

PianSom Much the same, its got progressively worse, last night it was planning on starting the discharge at 13:30, now it plans to start at 3pm. I know my plan is never quite right as it doesn’t properly take account of my differing battery capacities, but if there’s 2 hours of free electricity it should discharge for 2 hours beforehand.

I have artificially inflated my house load for this period but isn’t seemingly making a difference. At least mine isn’t discharging in the free period.

Similar happened to the last power up event. I’ve put my own automations in place to drain both batteries from 1pm.

#909 PianSom

geoffreycoan
At least yours is getting to 100%. Think I am going to have to do a manual over-ride, something I generally try to avoid.

Generally speaking, predbat is still doing a good job though. Here's my consumption for April - you can see it mostly has the overnight charge/cash-in/charge cycle nailed. The only issues that are apparent are a question over why it is not charging reliably from 11.30pm (when the cheap rate starts), and the fact that it stuffed up a Power-up. (I had 7 Power-ups last month - which are mostly very clear from the heat map. But on one of them I got free electricity worth 2p!)

#910 Hook

geoffreycoan

I got fed up last night and put it in read only mode so I was on eco.

It’s grand plan was to pause my battery discharge at 10.30pm and use the grid for house load when my slots were 13.9p when I had 78% in the battery and there were 10.8p slots at 3am.

Ironically it’s not been right for me since the Improvement to freeze charging behaviour

G
#911 geoffreycoan

Hook If its not working right for you then do log a GitHub ticket.

Worth checking what your metric battery cycle cost is and metric min discharge is, these can affect the plan quite a lot. There’s an FAQ in the documentation on tuning the predbat options to improve the plan.

Comparative plans from the latest and an older version of predbat can help to show any issues.

For me, Predbat is doing better at the moment than it used to do. Had an issue with today’s power up event, but for tomorrow morning’s it is planning to fully discharge and then charge the battery up.

#912 Hook

How do I apply an older version?

R
#913 Rbor

Hook Like this:

Rob

G
#914 geoffreycoan

Hook the control is select.predbat_update

Make sure you turn off auto-update first (switch.predbat_auto_update) as otherwise you’ll get automatically re-upgraded to the latest again

#915 PianSom

geoffreycoan Had an issue with today’s power up event, but for tomorrow morning’s it is planning to fully discharge and then charge the battery up.

My plan for this morning is spot-on too. Very odd.

R
#916 Rbor

This is another comment related to freeze status and use of no GE PV inverter data. I am using v7.17.6.
I do wonder whether the freeze options are complicating the plan and whether I would be batter off just with 'idle'.
This morning, the status for my first lines in my predbat plan (with battery SOC 100) read:

06:30 Freeze charge
07:00 Freeze charge
07:30 Idle
08:00 Idle

My PV plan exceeded my load. But actual PV was much lower as I had thick mist.
Predbat was following its plan, importing from the grid when the import rate was over 17 p. (I am on Octopus fixed outgoing of 15p)
When I reach Idle at 07:30, Predbat stated to use the battery.

Early mornings can have very variable sun.cloud/mist, .... but the plan is followed based on average (I think).
Is this too much rigidity when data is variable?

Currently, I have the default pv_today line in my apps.yaml:

pv_today:
- sensor.givtcp{geserial}pv_energy_today_kwh

In documentation, https://springfall2008.github.io/batpred/apps-yaml/#days_previous/historical data, I see the following under Data from Home assistant/pv_today:

If you have an AC-coupled inverter then enter the Home Assistant sensor for your PV inverter.

I have a GE AC coupled inverter for my battery and a SolarEdge PV inverter.
I have checked Solaredge.yaml and have found:
pv_today:
- sensor.solar_panel_production_kwh # This is a custom sensor - see Readme on how to create or comment out
#
I can't find any relevant Readme and I don't understand whether this line will be used from HA or from the SolarEdge sensor (which isn't enabled by default – I don't appear to have permissions to enable it).
I am also confused whether historical data is taken from the relevant inverter or from HA.
And where does Solcast data come into all this? (Generally, I am getting a reasonable agreement of actual against Solcast)
Should I consider using GE cloud? I don't want to do this as it appears to update only every 30 min from documentation.

Overall, Predbat is working well for me but this appears to be a glitch. Should I flag as an issue on GitHub?
Are you able to offer advice for what to do here.

Rob

G
#917 geoffreycoan

Rbor Hi Rob, lots of questions, things in there !

Starting off with the first bit, I think you should raise a github ticket (or maybe add to the existing ticket that led to the freeze charge changes). In that other ticket the point was made that if consumption exceeds plan or PV is lower then with a freeze you’ll get grid import whereas with Eco you won’t have this side effect.
Especially with your battery being 100% charged, the only benefit to freezing the SoC would be if the rates were going to increase during the day and your battery SoC needed to be retained to meet that future load. I’m guessing this isn’t the case and so the freeze charge was unnecessary and caused you more import than should have been.

Both the PV plan and the load plan don’t just take the historical figures, they modulate these based upon potential variances. For PV it modulates between the PV10 and PV50 solcast forecast figures. If you want to make predbat take a bit more of a pessimistic view then you can increase input_number.predbat_pv_metric10_weight - I have mine set to 0.3 rather than the default 1.15. If there’s more solar, its upside, but better to be more pessimistic than less.

If you look at the givtcp(serial)pv_energy_today_kwh, what’s in that sensor? I’m not that familiar with the AC coupled inverters but do they have a CT clamp around the AC cable coming from your PV inverter so they can measure the PV generation? This would probably enable this sensor to be populated.
If its zero or wrong then you’ll need to find another way of getting the PV generation into predbat. The advice in the instruction is to use a HA sensor from your PV inverter as presumably that’d be more accurate.

The solaredge.yaml config file is principally for people that are using a solaredge inverter and connected batteries. There are instructions for setting it up in the documentation https://springfall2008.github.io/batpred/other-inverters/

  • it looks like there’s a modbus integration needed and then some custom sensors to create for the pv generation.m There may be another integration for the PV generation, I don’t know.
    TBH if you are getting appropriate pv energy already in the givtcp sensor you are using, that’d be good enough I’d think.

The Solcast data is just your solar forecast, there’s no PV actuals in the solcast data. That would come from givtcp or directly from your solar inverter.

As regards using the GE cloud, personally I don’t see any benefit to it, to send the data from your home up to the GivEnergy cloud only for it to then control the inverters remotely. All that internet traffic and dependencies and then the low timeliness of data as well.

R
#918 Rbor

Geoffrey, sorry for the barrage of questions.
I will add to the GitHub ticket. It looks like freeze has problems in some circumstances.
With rates so close to 15p, idle is probably the better bet for borderline decisions.
This is my ongoing plan, SOC 100 throughout and you can see some of the freeze/hold suggestions.

The plan is working fine now because pv > load now. The battery is essentially just being bypassed, as it should be now. But why the freeze statuses in the plan with SOC at 100?
I will think about tweaking input_number.predbat_pv_metric10_weight. Mine is set at 0.15. My metric battery cycle is set at 0p/kWh.
I thought about CT clamps after I had sent the reply. I do have a related CT clamp and this enables the GE app and portal to monitor my pv. So this one isn't an issue.
Would some freeze issues be solved by turning this switch off?: switch.predbat_set_charge_freeze

Rob

G
#919 geoffreycoan

Rbor I’m getting the same behaviour, the 12:00, 12:30 and 13:00 slots were all freeze charge (maintaining soc) which is all OK as long as PV > load.

Like you I don’t think this is optimal. Yes could turn off freeze charge but as much as possibe I would like predbat to have all its tools available and deliver the best plan for me all the time.

For these three slots I Just did a force idle for these periods. I doubt there will be the house load, maybe the kettle, but better safe than sorry.

Glad you are sorted on the pv generation. I’ll maybe soften the words in the documentation about PV sensor for AC coupled inverters.

#920 Hook

I’ve turned off freeze charge and it looks a lot better for me.

No pausing the battery and using the grid. Now it just discharges the battery and charges in cheapest slots.

Here is a before and after:

R
#921 Rbor

geoffreycoan Thanks.
I will look at changing freeze charging to Forced Idle if I pick this up in my plans.
in GitHub, I have added a brief comment to the long ticket #1028 to add more weight to the issue.

Rob

R
#922 Rbor

Hook Interesting.
22:30–22:30. freeze charging OFF is cheaper.
But looking at 00:00–04:00, the freeze charging plan saves money over the plan with freeze charging OFF.

Rob

R
#923 Rbor

Extract for my plan 06:00 - 07:00 tomorrow morning:

06:00 Planned charge when SOC 100?
06:30 Freeze Charge when import more expensive and PV < Load.
07:00 Import is cheaper here so grid would be cheaper and battery power can be discharged anytime.
Collectively, 15 p spent from grid despite battery having SOC 100 and PV should shortly exceed Load.

I think Forced Idle is better for 06:00 and 06:30.
The only proviso is that Predbat often changes the plan over time.
We are also only talking about pennies.

Rob

#924 Hook

Rbor yes, I noticed its predicts it will save money, but based on a lower load than my house normally uses. But by the end of the day its predicted to be 9p up without freeze discharge.

Plus my daughter sometimes turns on her electric radiator. So I’d rather have a safety blanket built in with battery discharge rather than using the grid.

#926 Hook

Glad it’s not just me. Thanks for the link. I don’t like posting in GitHub if I’m not sure it’s an actual issue.

Rbor

#927 PianSom

Is it just me having difficulty in upgrading to v7.17.10? Attempting to seems to crash Predbat silently, I think.

R
#928 Rbor

v7.1.10 automatically upgraded for me just fine.
When Predbat has crashed on me, I have managed to resurrect it by restarting the appdaemon-predbat add on.

Rob

D
#929 Dpe

PianSom
I have also tried to update this morning and the install button does not seem to start the install, although Predbat does seem to continue to run

R
#930 Rbor

Although my upgrade to v7.17.10 went smoothly, I did experience crashes when upgrading to v7.17.6 and v7.17.2.
In both cases, I finished up turning automatic upgrade OFF and downgrading by 1 (such as 7.17.2 to 7.17.1). I flagged both crashes as issues in Github and the v7.17.2 crash was identified as a bug and fixed.

So downgrading may help but good to do this 1 step at a time.

Rob

R
#931 Rbor

I have just joined in with predbat errors during an automatic upgrade from v7.17.10 to 7.17.11.
My status report:

I have logged an issue in github #1054

I have since successfully upgraded to v7.17.11 manually.

Rob

#932 PianSom

Looks like the bug has been quashed. New version out to test.

EDIT - which doesn’t seem to have done the trick for me 🙁 Github issue reported

R
#933 Rbor

I have added my own comment to your issue #1057, together with my appdaemon-predbat log.
The different versions of v7.17.x seems to be having a choppy time ...... It will get there.

Rob

W
#934 Wavy Davy

Rbor Me too.

S
#936 SteveCook

So what has happened with my predbat please.
I cannot find any updates in HACS. U have redownloaded in HACS and restarted HA?
Ant help/guidance/directions would be much appreciated.
Thanks
Steve

S
#937 SteveCook

Rbor
How do I do a manual upgrade plese?

G
#938 geoffreycoan

SteveCook Unfortunately you are on the version of predbat that crashes when it tries to auto update itself.

There’s three ways out of this:

  1. Edit the predbat.py file to correct the coding bug that causes predbat to crash in the update routine - details in https://github.com/springfall2008/batpred/issues/1057

  2. If you are using the HACS install of predbat you can manually install the new version from HACS. It should have picked up that there is a new version, or you can click the three dots against Predbat, ‘update information’, then come out of HACS and back in again and you should be prompted to update to the latest version.
    Once you install predbat from HACS you will need to restart appdaemon and it should all be good

  3. If you used the combined appdaemon-predbat install then you will have to revert to an earlier version of this add on and then let it auto update itself to the latest version. If you’ve taken a backup of the appdaemon-predbat add on when upgrading it you can restore that backup (system/backups), or if not, you will need to uninstall the whole add-on, restart HA, then install it again and turn auto-update on and it should upgrade to the latest (fixed) version

S
#939 SteveCook

Thanks. I will try and get my head around what you are saying.
It was hard enough installing it in the1st place to try and remember exactly how/what I did when I installed it.
Ta
Steve

#940 Hook

I’d actually switched off auto updating so am about 5 releases behind thankfully.

Can anyone confirm the latest release is actually working?

G
#941 geoffreycoan

Rbor Hook As the conversation on https://github.com/springfall2008/batpred/issues/1035 shows, working out whether predbat has got the plan ‘right’ is not straight forward.

I don’t know if its something I can ever properly and totally explain in the predbat documentation as the figures you need are not really readily to hand, and adding them to the predbat plan even debug mode is going to make it all too complicated.

Here’s what I think the comparison should be…

  1. Import rate in brackets gives you the effective rate to charge the battery from grid (import rate adjusted for inverter loss and charging loss)
  2. Export rate in brackets gives the effective rate for export income or the cost of meeting house load if you discharge the battery (export rate adjusted for inverter loss and discharging loss)

So the comparison of battery discharging and then later recharging from grid is straight forward from the debug plan

  1. But when charging the battery from solar the kWh charged with a hybrid inverter will be reduced by just the charging loss figure, and with AC coupled, both the inverter and charging loss figures.

  2. The cost of recharging the battery with solar has to be compared against the ‘lost export’ potential revenue which would be the export rate adjusted for inverter losses.

  3. With freezing the battery SoC is being held and the house load is met from grid and cost is just the import cost.

  4. The charging bit of freeze charging (when soc < 100%) is making the comparison between charging the battery (incurring charging loss and for AC, inverter loss) against just exporting solar now - so a repeat of point 4.

  5. The comparison of the cost benefit of the charging bit of freeze charging is cost of grid import vs using the battery and then recharging it. So is 5 (import cost) vs 2 (battery discharge cost) - (kWh from 3) * (lost solar export income rate 4)

I think that’s how it works, but have to admit that even having spent half an hour trying to puzzle it out, I am not entirely sure I have got it 100% correct in every scenario.
It does show how with 16 or 17p import rates can be more cost effective to freeze the SoC rather than let the battery discharge and then have to be charged up again later.

And also to throw in to the mix, ‘value’ of stored battery SoC and the impact of rates increasing later in the day if you have to then import at a higher price because the battery is exhausted.

If we can find a way of simplifying this then happy to add to the documentation, but suspect this may be just too complex…..

G
#942 geoffreycoan

Hook I’d actually switched off auto updating so am about 5 releases behind thankfully.

Can anyone confirm the latest release is actually working?

Latest release 7.17.12 is working absolutely fine for me

Z
#943 Zakalwe

Rbor
Same here. Woke up to find the batteries at 33%, having dumped most of their contents onto the car. Luckily the car only needed 20kWh last night.
I turned off auto updates, reverted to an earlier release and then manually updated to the latest version. That seemed to have worked.

I can't complain too much ..it's free software and has worked impeccably for the past few months.

R
#944 Rbor

geoffreycoan Hook Zakalwe
7.17.12 works for me also, although I first needed to restart the appdaemon-predbat addon before I could revert first to an earlier version (with automatic update OFF).
I then upgraded to 7.17.12 and switched automatic update ON again. The bug seems to be fixed.

I have grappled with the rationale for identifying cost effective rates for import and export. This is really complicated and even when I think I have understood, I then get confused again.

I can see that freeze charging is from the grid and cuts out losses. When agile rates are close to 15p. my battery is mostly being bypassed, just being topped up by the grid in freeze charging or with excess solar exported to the grid. (At least I think that is correct!)

My conclusion is that Predbat understands these intricacies and I don't!
I am leaving predbat to do its thing. I fear that attempts by me to interfere is probably going to make things less cost effective.
...... but do tell me if I am wrong!

Rob

Z
#945 Zakalwe

I'm on Intelligent so it's pretty simple. Discharge down to 12% at 23:30. Charge back up to 100% during the cheap period. Export as much as possible during the day.
Rinse and repeat.

S
#946 SteveCook

please excuse my ignorance by how do I restart he appdaemon-predbat addon to get the time right?

S
#947 SteveCook

I think I have followed the guidance and the message has gone away.
Still have the error about battery charge power curve though!
I appear to be on V.7.18.0 is that good?

G
#948 geoffreycoan

SteveCook when you say ‘get the time right’, not sure I understand your issue. If you are getting predbat status’s saying that the appdaemon and inverter times are different then this indicates that Home Assistant has lost communications to the inverter. Either the inverter has dropped off the network, is having a ‘moment’ or GivTCP is having problems. Restarting GivTCP can often resolve these kind of inverter comms issues but if it keeps happening the it points to a more underlying wifi issue.

To restart an add-on (either appdaemon-predbat or givtcp), Settings / Add Ons / <add on name> then restart

G
#949 geoffreycoan

SteveCook I appear to be on V.7.18.0 is that good?

That’s the latest release, published earlier today. Includes more bug fixes and ability to optimise for CO2.

S
#950 SteveCook

SteveCook
Thanks. I went to inverter settings and hit the time one and the HA error went away.
It has just come back though.
I think I edited both time zones to Europe/London and hit save and did a restart.
HA update just installing.

G
#951 geoffreycoan

SteveCook that should be all OK then. Sounds like you have your clocks all set correctly on the inverter, Home Assistant, AppDaemon and predbat.

If you keep on getting errors about the clocks being 5 minutes out then it does suggest an underlying network issue with Home Assistant talking to your inverter. See what’s in the GivTCP add-on log, if you see lots of timeout errors then this also indicates an issue. You might need to have a wifi repeater nearer your inverter to improve the signal strength.
Its not a critical issue but if it keeps happening then predbat may not be able to communicate reliably to your inverter when it wants to start and stop charging etc.

I’ve not installed HA 2024.5 yet. I see 2024.5.1 is out already, ahead of the usual Wednesday update schedule. I’ll probably wait until about 2024.5.3 to be sure its stable

R
#952 Rbor

PianSom I have seen your latest addition to Github #1057.
I am in process of adding another reply (I am on 17.18.0 although I have now downgraded to 17.17.12 with autoupdate OFF).

I had no appdaemon errors but my status report is stuck on idle despite HTML plans showing discharge.
I tried everything but have set up a Force discharge at 21:30 which has got the start
I should be able to post my reply after 22:00 when I will be able to see if the status changes to discharge to match plan or goes back to idle.

Rob

G
#953 geoffreycoan

Rbor I had the same issue as @PianSom. Predbat auto updated to 7.18.0 but then died with thread errors and it was only after I saw the github issue that I found my own had died.

Managed to get it back by restarting appdaemon, turned off auto update, manually downgrading (using the predbat version selector), then upgraded successfully to 7.18.0 which is now running fine

@Rbor might be worth you restarting appdaemon and/or givtcp

#954 PianSom

Rbor
I just came here to post a warning!

EVERYONE - beware of updating to 17.18.0 - me, Geoffrey and Rob have all experienced issues. If you have auto-update ON or manually update then I suggest that you check that Predbat is operating correctly by looking at the time stamp of the last update.

In my case an Appdaemon restart solved the problem.

R
#955 Rbor

PianSom I have just noticed that there is a v7.18.1 !!!
I am sticking with v7.17.12, steering well clear of v7.18.X with automatic update OFF, until the dust settles.

Rob

G
#956 geoffreycoan

Rbor I don’t blame you. I’ve left auto update off for now. There’s been a few updates of late that haven’t worked quite as well as they ought to have.

7.18.0 is working fine for me. I’ve not turned any of the carbon stuff on and TBH don’t really plan to do so.

7.18.1 seems to be a fix for Carbon on in Monitor mode

S
#957 SteveCook

well trying to reset the time didn't work. Got up to let the cat in and the battery is flat.
Time is skewed 552 minutes
Can anyone steer me what i need to do please?
This has been running fine for about 6 weeks

#958 PianSom

I manually updated to v7.18.1 this morning. Update went ok, and after a brief status of "ERROR: Exception raised Pool not running" it reverted to a rather less worrying "Idle".

G
#959 geoffreycoan

SteveCook well trying to reset the time didn't work. Got up to let the cat in and the battery is flat.
Time is skewed 552 minutes
Can anyone steer me what i need to do please?
This has been running fine for about 6 weeks

If the “time is skewed” then it means Home Assistant/predbat isn’t getting the same time from the inverter as it is expecting.
Either GivTCP has lost communications with the inverter or the inverter is stopped talking to the world.

If you look at the Logbook in Home Assistant you should see a steady stream of entities changing in HA. In particular you will see the GivTCP inverter time entity changing every polling period, in my case every 20 seconds.

Things to do:

  • restart GivTCP
  • restart Home Assistant (usually restarting GivTCP is enough)
  • power the inverter off, turn off panels and battery first, then the inverter then reverse. This forces the inverter to reconnect to your wifi
  • do a ‘reset to defaults’ in the portal

There is a Home Assistant automation in the predbat documentation that will alert you if this happens https://springfall2008.github.io/batpred/output-data/#automated-monitoring-that-predbat-and-givtcp-are-running-ok

S
#960 SteveCook

geoffreycoan
Hi and thanks.
the inverter is GE Hy5.0 Gen 1 and has been fine for 18 months and has a BT wifi disc about 10ft away.
I have been using predbat for about 6 weeks and not had these time errors before.
I am flummoxed now.
Steve

S
#961 SteveCook

Appdaemon time seems to match PC, and I keep resetting the inverter but the portal page shows it online and "green" in the GE portal but it now appears to be 1.5 hrs behind PC time according to the predbat error statement?!

G
#962 geoffreycoan

SteveCook What’s in the GivTCP add-on log? You should see a series of status messages when predbat changes controls on the inverter. You get occasional errors but if its saying its 1.5 hours behind then the inverter isn’t communicating with HA and likely there is a lot of givtcp errors. Restarting givtcp is first thing to try

Look at the givtcp_xxxx_invertor_time it should match close enough and the HA history should show steady stream of updates from the inverter:

S
#963 SteveCook

geoffreycoan
It is now 13:56 according to PC.
I have gone to MQTT and looked up inverter time and it says7th May 09:43.
HA logbook shows lots of activity

G
#964 geoffreycoan

SteveCook Steve, the activity is from predbat and the octopus integration, nothing from givtcp which you should be seeing as you do on mine (the g* and h* are my two inverters, I changed the name in the config).

Points to givtcp not talking to the inverter. What’s in the givtcp log (system/add-on’s/givtcp then log tab)

And I would try restarting givtcp but lets see (hopefully) errors first

here’s mine as an example, there’s one error but a lot of successful updates occurring.

also, do check your givtcp configuration looks something like this:

S
#965 SteveCook

Thanks
I restarted GivtCP, Mqtt etc and the time error has gone. Dont know what this log will tell you.
Regards
Steve

G
#966 geoffreycoan

SteveCook Each of those INFO messages saying failed are that a command being sent from predbat via GivTCP to the inverter failed. GivTCP sends the update message then does a read afterwards to check that the command has been accepted, so repeated failures indicate (usually) a communications problem between GivTCP and the inverter.
Restarting GivTCP can get things going again but if it keeps happening then the underlying issue needs resolving. Might be worth rebooting the BT node (power on/off) in case that’s not working, and it might be that moving it further away actually improves the signal

#967 PianSom

Hello @geoffreycoan

Is Predbat planning on stuffing up tomorrow's Power-up for you too?

G
#968 geoffreycoan

PianSom no its doing OK for me tomorrow, planning a discharge 2 1/2 hours before the 2 hour period, which given it discharges at 2.4kWh and charges at 2.7kWh is about right

Only issue I will have is that with differing size batteries on the two inverters it will apply an aggregate SoC discharge limit - draining the 9.5 slightly too far and not quite draining the 5.2 enough for a 2 hour charge up. But this is maybe 1/2kWh or 7p of extra discharge income difference

#969 PianSom

geoffreycoan
Turns out that Predbat is actually pretty smart.

I have input_number.predbat_metric_min_improvement and input_number.predbat_metric_min_improvement_discharge set to 10p (for reasons which escape me at the moment, but seemed like a good idea at the time).

Setting those back to 1p means that Predbat will choose to do a discharge in advance of the Power-up. Just like your sensible plan. I have a DNO export limit, so in the sunshine I now have a long, slow discharge.

But the net monetary benefit (ie decrease in Cost) of this discharge and subsequent free charge is ... 30p!

The problem is losing out on 15p/kWh of export while charging for free, I think. Predbat really is very good.

G
#970 geoffreycoan

PianSom Well this morning’s plan has completely changed to no discharge and holding the soc through the free period

And this is despite my free period having an artificially increased load_factor in apps.yaml to encourage an import.

Why the plan has changed so dramatically 🤷‍♂️

I had therefore enabled my automations to set read only mode and discharge the batteries for 2 hours then recharge.

I checked and my metric min discharge improvement was set to 5p. Changed it to 1p and no difference to the plan.

But your message got me thinking about missing out on the export income. In previous power up events we have been putting everything on in that period and definitely have been importing, but now we are generating so much and with the agile rates being near 15p overnight, we’ve been putting the washing etc on during the day instead.

If I set the load_factor in apps.yaml to 1 so we swap from importing at 0p to exporting at 15p then the revised plan shows exporting in the period for £1 extra income over the 2 hour period!

Might as well do that then.

The charge, discharge at 15:30 and then solar recharge afterwards seems spurious though. Predbat planned the same yesterday

#971 PianSom

geoffreycoan
It really isn't a trivial business, working out the optimal strategy, is it?

As ever, I am coming to the conclusion that (swings and roundabouts all considered) it's probably best just to leave Predbat to do its thing most of the time.

#972 Hook

I stuck mine in read only mode last night as I noticed it was charging at 13.2p which made no sense as I had plenty in the battery. It wanted to do another little charge at 11.30am this morning.

I decided to revert from the latest version 7.18.1 back to 7.17.6 to see if that made a difference. Huge improvement.


S
#973 SteveCook

why cant i get my Predbats to look like yours.
Debug mode is on, expert mode is on.
Restarted HA etc

G
#974 geoffreycoan

SteveCook If you use old_skool_columns in the predbat table card it uses some of the original predbat html plan colouring rather than the new

Here’s mine:

      - type: conditional
        conditions:
          - condition: screen
            media_query: '(min-width: 0px) and (max-width: 767px)'
        card:
          type: custom:predbat-table-card
          entity: predbat.plan_html
          columns:
            - time-column
            - soc-column
            - state-column
            - limit-column
            - import-column
            - pv-column
            - load-column
            - cost-column
            - total-column
          old_skool_columns:
            - soc-column
            - state-column
          odd_row_colour: '#181f2a'
          even_row_colour: '#2a3240'
          table_width: 100
          stack_pills: false
          force_single_line: true
      - type: conditional
        conditions:
          - condition: screen
            media_query: '(min-width: 768px)'
        card:
          type: custom:predbat-table-card
          entity: predbat.plan_html
          columns:
            - time-column
            - soc-column
            - state-column
            - limit-column
            - import-column
            - export-column
            - pv-column
            - load-column
            - cost-column
            - total-column
          old_skool_columns:
            - soc-column
            - state-column
          odd_row_colour: '#181f2a'
          even_row_colour: '#2a3240'
          table_width: 100
          fill_empty_cells: true
          stack_pills: false

There’s two conditional cards in there, one for narrow screens (mobile portrait) that shows less columns, and one for wider screens (PC, ipad, mobile landscape) that shows a bit more

G
#975 geoffreycoan

Hook Interesting. There’s been various bug fixes to the plan in the 7.17’s but the only major change in 7.18 is introduction of carbon consumption optimisation - assume you are not using this?

For both plans though I’d say the discharge from 9am-11am is unnecessary. Yes you are gaining from extra export but your battery reaches 100% full on solar during the afternoon, so what you gain from the extra export you lose from less export later on in the day.
From your icon it says you have a hybrid inverter, which would even more question the plan for me as the discharge is at export - inverter and battery discharge losses, in my case 13.68p, whereas if you didn’t discharge, just let the battery charge to 100% and then export the excess, you’d start exporting at export - inverter losses, somewhere around 14p earlier in the afternoon.

Its the same situation with the charge and discharge at 10:30 and 11:00, and my discharge at 15:30, with a flat export rate there’s no benefit to discharging and then recharging from solar, you incur an extra set of discharge/charge losses for no financial benefit.

I think predbat wants to do mine at 15:30 because I have an export rate override in apps.yaml during the peak to prevent export during what was the DFS saving session period. I’ve left mine in to preserve the battery Soc for the peak period - although at the moment there’s no issues with Soc, its only getting to 50/60% overnight at the moment and my batteries are full by 9am most mornings.

#976 Hook

geoffreycoan

No I'm not using any carbon optimisation.

I suppose the interesting thing is the older software is 10p ahead at 3.00pm and the battery has a higher SOC. It's still on read only mode so not actually controlling anything at the moment. I was just interested to see what changes the software would make.

W
#977 Wavy Davy

Has anyone tried the "friendly States" setting?
tried "use_friendly_states: true" at the end of my Predbat Table card but it made no difference.
It still showed the normal state icon.

G
#978 geoffreycoan

Wavy Davy Hmm. It worked for me. I set use_friendly_states: true and got:

The use friendly states works with the old_skool_columns I think.

@PianSom decided to let predbat keep the battery charged up and not bother charging with the free electricity, instead exporting for the period. At 12:00 we were exporting 6.2kWh. Its dropped down to 4kWh of export at the moment as the heat pump has come on to heat the hot water and I’ve put the dishwasher on, but its still the right choice to export not import

#979 PianSom

geoffreycoan
Wish I had done the same! I reduced my minimum charge/discharge costs so Predbat could do its thing. It then shilly-shallied around a bit discharging and charging in a loop. Then discharged and is now charging (mostly) from solar. So actually very little benefit from the power-up

Lesson learned!

W
#980 Wavy Davy

geoffreycoan I got it working by starting the table config from scratch using the examples on the GitHub, and now its fine.

W
#981 Wavy Davy

My plan seems to have abandoned discharging the batteries.
Next schedule discharge is 15:00 today and the same tomorrow.
its relying on solar to charge the batteries

W
#982 Wavy Davy

Thinking more about it, it's probably due to there being not much difference between the import cost's and my 15p export.

R
#983 Rbor

Undocumented predbat settings.
I have been checking through my predbat control settings: input variables and switches.
I didn't find any that looked to be incorrect but I have found some that I can't find in the documentation:
The brackets show the setting in my Predbat.
Variables
In-day adjustment damping factor (0.95)
Switches
Enable Cloud Model (ON)
Enable Cloud Divergence Model (ON)
Inverter SOC Reset (ON)

Can anyone tell me what these mean?

Thanks

Rob

W
#984 Wavy Davy

Just checked mine
in-day damping factor is 1.15
Enable Cloud Model (ON)
Enable Cloud Divergence Model (ON)
Inverter SOC Reset (OFF)
I've not changed any of these, like you curious what they do.

R
#985 Rbor

I have found them all! In Customisation section of the documentation:
[https://springfall2008.github.io/batpred/customisation/]
I am unsure that I understand or appreciate what they do for my system so I will follow the defaults.
These are the sections with the defaults(?)

Battery margins and metric options
in-day damping factor (0.95)

Cloud coverage and load variance.
Enable Cloud Model (ON, I think)
Enable Cloud Divergence Model (ON, I think)

Inverter control options
Inverter SOC Reset (OFF, I think)

Rob

#986 PianSom

Is anyone else's HA logs filling up with stuff like

WARNING (Recorder) [homeassistant.components.recorder.db_schema] State attributes for predbat.load_energy exceed maximum size of 16384 bytes. This can cause database performance issues; Attributes will not be stored

A while ago I followed the logger hack suggestion in the doc FAQs here and added the line to my configuration.yaml. I am now up to 4 predbat entities being ignored, and every time I add one in a new one seems to pop up.

G
#987 geoffreycoan

PianSom Hadn’t noticed this one, but having had a look, I’m getting alerts for load_power_best and 5 other predbat sensors including load_power as you are:

The fix is the same as in the FAQ’s, to exclude the specific error text string. Looks like the attributes contain the forward projection for every 5 minutes from now to the end of the plan, for use in the Apex charts.
Its only a warning message that the message attributes is too long, but entity attributes are not stored in the recorder db anyway, so its a bit of a worthless warning.
I will update the FAQ’s to add these extra error texts.

predbat.load_energy looks like another bit of predbat weirdness. The entity value seems to range between 30 and 80 and right now is saying 49kWh. No idea what this is recording because according to my load sensor we’ve used 16kWh in the house today.

@Rbor glad you found the documentation on those predbat entities. I have tried to make sure that everything is at least somewhere in apps.yaml or customisation documentation, but customisation still hasn’t been reviewed and updated by me end to end, I’ve done bits of it so far. Trefor recently merged my last 6+ weeks of updates into the base so its up to date with the enhanced givtcp failure monitor for example now.
Time to get back on the documentation I guess

@Wavy Davy Yes the agile rates are rubbish at the moment, 14-18p overnight. Cheaper than the standard variable rate but nothing like the Go or IOG overnight. I’m getting a lot of freeze charging overnight and the battery is only getting down to 85% tonight and 71% tomorrow night. Its then fully charged by solar by 8am in the morning.
Export revenue is good, 56kWh exported for £8.50 of income although with all the freeze charging I’ve incurred 92p of import costs overnight.

R
#988 Rbor

Here's another for the collection:

Here's 2 more linked to appdaemon-predbat:

I will add the logger lines from the FAQs to my configuration.yaml file and see if they disappear.

Rob

R
#989 Rbor

Historical day WARN in predbat.log.

My predbat log is now pretty clean with no errors or warning.
However, I am receiving a WARN during each run of the plan.
I have these 4 historical day WARN statements (152 in total!), always referring to the same days (with 4 sometimes shown as 2). The values are always about the same, but sometimes different by small amounts.

2024-05-09 19:30:05.357074 INFO pred_bat: WARN: Historical day 2 has 55 minutes of gap in the data, filled from 10.45 kWh to make new average 10.86 kWh (percent 96%)
2024-05-09 19:30:05.368906 INFO pred_bat: WARN: Historical day 5 has 50 minutes of gap in the data, filled from 12.98 kWh to make new average 13.45 kWh (percent 97%)
2024-05-09 19:30:05.387012 INFO pred_bat: WARN: Historical day 7 has 10 minutes of gap in the data, filled from 11.71 kWh to make new average 11.79 kWh (percent 99%)
2024-05-09 19:30:05.399428 INFO pred_bat: WARN: Historical day 8 has 50 minutes of gap in the data, filled from 15.62 kWh to make new average 16.18 kWh (percent 97%)

My apps.yaml contains the following statements for historical days, copied from the apps.yaml documentation:

days_previous:
- 2
- 3
- 4
- 5
- 6
- 7
- 8

days_previous_weight:
- 1

forecast_hours: 48

Has anyone else seen anything like this? Or is there anything wrong with my code?

Rob

R
#990 Rbor

v7.18.2

I have just noticed another update from Trefor.
After recent updates, I have the automatic update switch OFF.
I will wait before updating to see if anyone shouts.

Rob

G
#991 geoffreycoan

Rbor Your configuration for days_previous is absolutely fine Rob, its the same as mine

And I get these errors as well, e.g. just now:

2024-05-09 23:56:22.468832 INFO pred_bat: Historical data totals for days [2, 3, 4, 5, 6, 7, 8] are [17.31, 19.33, 19.48, 19.83, 23.07, 22.71, 24.27] - min 17.31
2024-05-09 23:56:22.471030 INFO pred_bat: Model filter enabled - Discarding day 2 as it is the lowest of the 7 datapoints
2024-05-09 23:56:22.472886 INFO pred_bat: WARN: Historical day 3 has 15 minutes of gap in the data, filled from 19.33 kWh to make new average 19.53 kWh (percent 99%)
2024-05-09 23:56:22.475627 INFO pred_bat: WARN: Historical day 5 has 25 minutes of gap in the data, filled from 19.83 kWh to make new average 20.18 kWh (percent 98%)
2024-05-09 23:56:22.478938 INFO pred_bat: WARN: Historical day 6 has 5 minutes of gap in the data, filled from 23.07 kWh to make new average 23.15 kWh (percent 100%)
2024-05-09 23:56:22.482369 INFO pred_bat: WARN: Historical day 7 has 5 minutes of gap in the data, filled from 22.71 kWh to make new average 22.79 kWh (percent 100%)
2024-05-09 23:56:22.490203 INFO pred_bat: WARN: Historical day 8 has 10 minutes of gap in the data, filled from 24.27 kWh to make new average 24.43 kWh (percent 99%)
2024-05-09 23:56:22.496796 INFO pred_bat: Historical days now [3, 4, 5, 6, 7, 8] weight [1, 1, 1, 1, 1, 1]

It makes no sense to me as to why I am getting warnings about missing load history because I have a custom daily house load sensor that calculates load every 5 minutes (its a time trigger template), so if HA is running, it runs automatically every 5 minutes. Maybe there’s the odd gap when I have rebooted HA, but every day, and 25 minutes one day, just can’t be the case.
So maybe HA failed to record the sensor every 5 minutes, predbat times out or glitches on the history load, or something else.

In the grand scheme of things, Predbat works its way round the gaps it thinks exists, and its only a forecast of historical load so I’m not fussed about it too much. Do wonder why it happens though.

I have other errors in my predbat log about indexes being exhausted. Have mentioned to Trefor and he acknowledges the bug, but still there. Maybe one day I will fix them myself, but maybe not a priority.

BTW the reason for my custom load sensor is with two inverters that share the house load between them, neither of them have an accurate idea of what the load is, and adding the two together resulted in an over-stated load. So I work out the load myself (formula is in the apps.yaml documentation), and I moved it to a timed template rather than just a normal template as when one of the underlying sensors goes unavailable (e.g. PV from GivTCP) I’d get horrible swings in the daily load figure. By taking a sample every 5 minutes its granular enough for predbat but less likely to swing.

And I’m holding off with auto update as well at the moment. Upgraded to 7.18.1 yesterday but there’s been a few ‘not great’ updates of late

R
#992 Rbor

I have been looking at my givtcp log and configuration.
In the givtcp config, I have the following:

Could this be conflicting with the days_previous settings in apps.yaml?

Rob

G
#993 geoffreycoan

Rbor I very much doubt it Rob. This is part of the solar forecast automation module within GivTCP which is a stripped down version of the Palm solar forecaster. There’s a speak to the geek video on using this. Think of it as a much simpler version of predbat that plans an overnight charge - its not ‘agile aware’ so could only use it on tariffs like Go or Flux.
The whole of this module is turned off in my GivTCP config

W
#994 Wavy Davy

Can someone tell me what I do to stop getting this error message every time I restart HA.
Restarting appdaemon usually gets rid of it, but it just annoys me.
What do I edit in apps.yaml?

#995 Hook

How would I downgrade to a an older version of predbat that is no longer listed in the drop down menu?

I'm interested in looking back at v7.16.x releases.

G
#996 geoffreycoan

Wavy Davy The error is that appdaemon has picked up a copy of the template apps.yaml file which it can’t operate with.
I only get this when I update predbat from HACS (its a known issue), never when I restart HA.
The fix is to restart appdaemon as you’ve found.

You could try restarting HA and all the add-on’s. As I said I don’t get this issue when I restart HA only. Strange.

Have you tried leaving it 5 minutes to see if it fixes itself?

Hook if you follow the manual HACS update instructions in the documentation you can install a specific version https://springfall2008.github.io/batpred/install/#hacs-update
Remember to turn off auto update first and you will need to restart appdaemon afterwards.

You may find that HACS doesn’t display the version you want, you can get a specific release from github https://github.com/springfall2008/batpred/releases - you will need to unzip the source code file and copy predbat.py in place of your version in the Home Assistant directory

#997 Hook

geoffreycoan Brill, thanks for that.

Simple enough. I've gone back to 7.16.0 to see what nefarious plans it would implement.

R
#998 Rbor

Compared with a few weeks ago, my logs are much cleaner.
In givtcp, the only remaining error is:

This error always coincides with a change in predbat status.
I have checked my predbat.log and there is no error or glitch at all at the times of the givtcp error.

Have you any idea what this may be?
I do have a GE AC coupled inverter and the firmware (D0.535-A0.535) is very old, having not been updated for general circulation since 2022. The firmware for GE hybrid converters and the AIO seem to have received all the attention. So I don't know whether this refers to a 'battery object' that isn't in my inverter.
I am running battery firmware version 3015.

Rob

G
#999 geoffreycoan

Rbor it's not just you Rob, I get these errors in my givtcp log. There's 4 in a row today but since it's not logging successful reads I think it's just a transient error message that the inverter can't get the battery data.
I'm on a gen 1 hybrid which also seemed to have been abandoned until this beta version 191/193 was discovered recently

2024-05-10 06:21:08,776 - Inv1 - write       -  [INFO    ] - Setting battery discharge rate to: 0 (0)
2024-05-10 06:21:10,282 - Inv1 - write       -  [INFO    ] - Setting battery discharge limit 0 was a success
2024-05-10 06:21:49,772 - Inv1 - write       -  [INFO    ] - Setting battery discharge rate to: 2600 (50)
2024-05-10 06:21:50,356 - Inv1 - write       -  [INFO    ] - Setting battery discharge limit 50 was a success
2024-05-10 16:38:36,687 - Inv1 - read        -  [ERROR   ] - Battery Object empty so skipping
2024-05-10 17:44:01,735 - Inv1 - read        -  [ERROR   ] - Battery Object empty so skipping
2024-05-10 18:39:21,896 - Inv1 - read        -  [ERROR   ] - Battery Object empty so skipping
2024-05-10 19:19:48,921 - Inv1 - read        -  [ERROR   ] - Battery Object empty so skipping
2024-05-10 20:26:50,108 - Inv2 - write       -  [INFO    ] - Setting battery charge rate to: 0 (0)
2024-05-10 20:26:51,939 - Inv2 - write       -  [INFO    ] - Setting battery charge rate 0 was a success
2024-05-10 20:30:09,429 - Inv2 - write       -  [INFO    ] - Setting battery charge rate to: 2600 (50)
2024-05-10 20:30:11,066 - Inv2 - write       -  [INFO    ] - Setting battery charge rate 50 was a success
R
#1000 Rbor

Thanks. It is 'reassuring' that I am not the only person to see this error.
For me it usually comes down in twos or fours.
I have no evidence that the error messages are preventing predbat form operating effectively.
I will continue to ignore the error but it is so informative that I wouldn't know where to start anyway.

I have noticed that Trefor has another update: v7.18.3, but I will continue on v7.18.1 for the time being.

Rob

W
#1001 Wavy Davy

anyone got this error with 7.18.3

Have tried downgrading to 7.18.0 and it goes away so it is 7.18.3.
I have gone back to 18.3 for the time being, but have stopped auto updates.

R
#1002 Rbor

Wavy Davy whenever I have updated predbat, I have seen this exception. I have assumed it is just one of those things that happens in going from one version to another. I have ignored it. Hope this is correct.

#1004 Hook

I’m on 7.18.3, it didn’t want to start until I rebooted predbat as it looked like the predbat active switch was stuck on.

It’s fine now.

#1005 PianSom

Seems I am the only one who updated to 7.18.3 without any problems at all. So far, anyway.

#1006 Hook

I did notice a 7.18.4 update at one point, but it disappeared.

W
#1007 Wavy Davy

i must have installed predbat using hacs (don't remember but have a /homeassistant/appdaemon/appdaemon.log and don't have a /addon_configs/46f69597_appdaemon-predbat/predbat.log file).
Is it possible to revert this to only updating with predbat. This would stop me getting update notification's in hacs and hopefully stop some error notifications.

#1008 PianSom

3 -> 4 -> 6 -> 8 and back to 2

Got errors on upgrades, so went back to 2 to be safe. Poor old Trefor.

G
#1009 geoffreycoan

PianSom I have extended the FAQ entry to supress all the predbat 'large message' warnings I was getting in my HA logs, then went through and checked the predbat entities and added extra filters for those entity attributes that have lots of history in them, so hopefully this should kill all off these warnings off for now and in the future. New FAQ on my fork - https://github.com/gcoan/batpred/blob/main/docs/faq.md#predbat-is-causing-warning-messages-about-exceed-maximum-size-in-the-home-assistant-core-log

Rbor predbat.best10_metric is included in the filter now.
The other message about a JSON parse issue from appdeamon-predbat, its actually a HA bug, I was getting it as well, from other add-on's as well.


#1010 PianSom

geoffreycoan
Thanks. I’ve been adding them in dribs, but will now copy in your list.

R
#1011 Rbor

geoffreycoan Thanks. You have put a lot of work into this list.
I just had one of these entries in my configuration.yaml file.
They are now all copied in.

Rob

#1012 Hook

I’m back on IOG and have noticed that predbat discharges during peak times now. Was that a recent development as it used to discharge towards the end of the evening before 11.30pm

It’s a good change if it’s been done purposely.

#1013 PianSom

Woo hoo! Post #1000.

I win! 🙂

#1014 PianSom

Hook
I am also on IOG , and have switch.predbat_set_discharge_during_charge set to ON, and I have very different results from you. I'd be interested to hear how your plan looks if you flip that switch.

FWIW I much prefer my discharge being late in the evening, just in case I have a late, surprise increase in load.

(See https://github.com/springfall2008/batpred/issues/1069)

#1015 Hook

PianSom I also have set discharge during charge to on.

G
#1016 geoffreycoan

geoffreycoan Rbor I have noticed bracketed values now appear for PV and Load (with (10%) in the headers) when in Expert Mode and with HTML Plan Debug enabled.

The PV 10% almost certainly comes from the Solcast 10% estimation model so you get a measure of the range of potential PV in a slot rather than it always being a single figure.

I’m guessing that the load is the raw figure and Load 10% is the modulated figure after going through one of the predbat estimating modules. But if Trefor didn’t add to the documentation I’ll have to look at the code to work it out ….

I've updated the documentation to add explanation of the bracketed values for PV and load on the predbat plan card. Also added explanation of the CO2 columns as they were missing.
https://github.com/gcoan/batpred/blob/main/docs/predbat-plan-card.md

Extended the FAQ on 'clock skew' warnings, much the same text as earlier in this thread,

Issuing a PR for these as I am away from tomorrow for a week

7.19.0 is working absolutely fine for me, no issues with upgrading to it, and I haven't seen the 'sticking pause charge' problem any more

#1017 PianSom

A note for AIO users

GivTCP returns number.givtcp_SERIALNO_battery_charge_rate and ...discharge_rate as both being 6kW for the AIO. But looking at actual experience reported by GivTCP my battery can actually discharge at around 6.27kW and can only charge at around 5.8kW

This level of accuracy makes little difference day-to-day, but on days like today - a Power-up day - when I am doing a sustained discharge followed by a sustained charge over a 4-5 hour period it would be nice if Predbat could use the more accurate figures to produce its forecasts.

I have therefore changed input_number.predbat_battery_rate_max_scaling_discharge ("Battery rate max scaling discharge") to 1.045 (=6.27/6) and input_number.predbat_battery_rate_max_scaling ("Battery rate max scaling charge") to 0.97 (=5.825/6)

@geoffreycoan - at one point you were planning a special page for Predbat AIO users. You may want to include this tip?

G
#1018 geoffreycoan

PianSom thanks for the tip. Predbat does suggest values for the charge and discharge rate from the 'auto generate charge curve' routines https://github.com/springfall2008/batpred/blob/main/docs/customisation.md#scaling-and-weight-options
I have my charge at 0.98 based on what predbat calculated.

Yes I do plan a 'tips for different inverter and battery types', there's a few specific settings for the AIO, and some for Gen 2's & 3's, and 5.2 & 2.6 batteries. At the moment these are buried away.

#1019 PianSom

geoffreycoan
<sigh> Thanks.

Maybe I got my numerators and denominators he wrong way around. I have now moved to Trefor's suggestions (even though I don't understand them).

R
#1020 Rbor

geoffreycoan I would welcome a document listing the default settings in predbat (if that is possible).
When experimenting with settings, it is all too easy to lose track of what I have changed.
The individual documents do often show defaults but not always.

We will be lost without you for a week. Let's hope that v7.19.0 works smoothly and doesn’t throw up many issues – it seems to have had a good start.
Do have a good break away from predbat, if that is possible!

Rob

G
#1021 geoffreycoan

Rbor geoffreycoan I would welcome a document listing the default settings in predbat (if that is possible).
When experimenting with settings, it is all too easy to lose track of what I have changed.
The individual documents do often show defaults but not always.

We will be lost without you for a week. Let's hope that v7.19.0 works smoothly and doesn’t throw up many issues – it seems to have had a good start.
Do have a good break away from predbat, if that is possible!

You can find the defaults from looking at the predbat source code - but I recognise that isn’t for the faint hearted. If you save the predbat settings before you make any changes then another option is to look at the save file.

I don’t think adding another documentation page is a good idea though, it’s then yet another thing to have to maintain. What I’ll try to do is add default values to the documentation where they’re missing.

I’m off flying my Microlight to France tomorrow. Calais by lunchtime then heading south. Hopefully get to Bordeaux and Lourdes before back to the UK.

PianSom might be worth raising a GitHub ticket to query the predbat calculations. Certainly my charge value is about right, but discharging greater than the inverter rate, maybe predbat doesn’t expect this to happen?

#1022 PianSom

geoffreycoan
Sensible idea - will do.

Have a great break. A LONG time ago I was a hang-glider, and always looked jealously upon you micro lighters and your ability to go where you wanted. Not sure I ever had France in mind though ... Try to avoid checking in with your solar several times a day - it will be fine in Trefor's embrace!

V
#1023 Vestas

PianSom I was a base jumper until I nearly killed myself. I only mention that as statistically hang-gliding is more likely to result in an injury/death. Strange but true 🙂

R
#1024 Rbor

I like being on the ground ......

R
#1025 Rbor

geoffreycoan Adding default values to the existing documentation is the way to go.

Rob

#1026 PianSom

Vestas
My fave hang-gliding memory is that the bolt that fixed the A frame to the harness and kite frame was called the "Jesus bolt". On the grounds that if it gives then the next thing you say or see will be ...

Anyway, enough off-topic boomer talk!

G
#1027 geoffreycoan

PianSom called the Jesus bolt on my microlight too…

Vestas i used to do skydiving before I took up flying. Lots of skydives but never a single BASE jump, too scary for me

S
#1028 SteveCook

Gen1 Hy5.0 and 9.5kw battery.
Looking at Predbat last evening it showed the battery would get down to 8% before the off peak charge at 02:00, yet for the last few nights I have checked back and my battery is not getting below 50% , instead I am importing from around 20:00 to 02:00.
I have looked everywhere for some sort of setting that might be driving this?,
Any ideas please to help with my ignorance

#1029 PianSom

SteveCook
Im guessing you have checked the obvious settings - like making sure predbat is still enabled?

Have you checked the predbat logs? Have you checked the home assistant logs?

I think a bit more information is needed to help diagnose your problem …

R
#1030 Rbor

SteveCook PianSom
I presume this is Flux. You should be getting export 4-7pm at peak flux export rate, not starting at 7 pm.
Check that your Predbat mode is 'Control charge and discharge'. If it has slipped into 'Monitor', predbat won't do anything.
Worth also checking logs for appdaemon-predbat add on and givtcp add on.

Rob

S
#1031 SteveCook

Thanks.
Not really sure what I am looking at where I am looking for logs - sorry!
Predbat is on "control charge and discharge"
Read only is "off"
Predbat Active toggle seems to turn itself on and off around the :00 and :30 times
Predbat seems to be controlling but battery bottoms out at 50% and goes no lower

R
#1032 Rbor

SteveCook
For logs, select Settings and add-ons.

Then select the add on from what you see. Mine are:

Select the add-on and you will see a log option, top right, e.g.

Select log. The final part of my appdaemon-predbat log is:

Predbat active seems to toggle when predbat is doing something:
See [(https://springfall2008.github.io/batpred/output-data/)]

Hope that helps

Rob

S
#1033 SteveCook

Thanks.
This is what I see

S
#1034 SteveCook

R
#1035 Rbor

SteveCook try restarting the appdaemon-predbat add on. This often gets predbat back in action. You should then get a clean log like mine (bottom of log)

Rob

S
#1036 SteveCook

Rbor thanks. How do i do that

R
#1037 Rbor

SteveCook Go back to the screen below.
Select 'restart', bottom left.

You will probably be asked to restart HA.
Hopefully this will sort out issue. Look at the appdaemon log and see if you have a clean section at the bottom.

If you're not sure about restarting HA, select the hammer icon for Developer tools on the left of the main screen and there is an option there.

You were right to check out your status report which confirms that your installation has a problem.
If it has worked, you should get 'nice' reports coming through.

Hope this sorts out your problem.

Rob

S
#1038 SteveCook

Thanks

R
#1039 Rbor

SteveCook looking promising. The bottom section of the log looks very much like mine.

Check the status report.

Rob

S
#1040 SteveCook

R
#1041 Rbor

This status report is not an error but you can do something about it.
You will need to visit your apps.yaml file and your predbat.log.
See [https://springfall2008.github.io/batpred/apps-yaml/#battery-chargedischarge-curves]

I find it useful to have the set status notify switch enabled. This shows me that predbat is doing its job.
It should be enabled by default. (towards the bottom of Predbat/Control/switches.
See [https://springfall2008.github.io/batpred/customisation/#inverter-control-options]

I knew none of this when I started to use Predbat back in January. I spent a lot of time with Trefor's videos and with the documentation, which is excellent. I have learnt so much, not only about Predbat, but about where to find things in HA.

So your next task is to burrow into your apps.yaml file.

Rob

M
#1042 ma9mwah

PianSom

I've tried looking for the auto curve output in the appdaemon.log file but just cannot see it in mine. I've tried deleting it then restarting but just doesn't seem to show it. I'm i looking in the wrong place?

R
#1043 Rbor

I think you need to look in the predbat.log
See also my comments in #1027 earlier today.

Rob

M
#1044 ma9mwah

im pretty sure im in the right file as i see all this:

2024-05-17 14:21:23.181380 INFO AppDaemon: AppDaemon Version 4.4.2 starting
2024-05-17 14:21:23.182224 INFO AppDaemon: Python version is 3.11.9
2024-05-17 14:21:23.183120 INFO AppDaemon: Configuration read from: /config/appdaemon.yaml
2024-05-17 14:21:23.183866 INFO AppDaemon: Added log: AppDaemon
2024-05-17 14:21:23.184529 INFO AppDaemon: Added log: Error
2024-05-17 14:21:23.185090 INFO AppDaemon: Added log: Access
2024-05-17 14:21:23.185704 INFO AppDaemon: Added log: Diag
2024-05-17 14:21:23.541383 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2024-05-17 14:21:23.880268 INFO HASS: HASS Plugin Initializing
2024-05-17 14:21:23.880611 WARNING HASS: ha_url not found in HASS configuration - module not initialized
2024-05-17 14:21:23.880908 INFO HASS: HASS Plugin initialization complete
2024-05-17 14:21:23.881519 INFO AppDaemon: Initializing HTTP
2024-05-17 14:21:23.882012 INFO AppDaemon: Using 'ws' for event stream
2024-05-17 14:21:23.888451 INFO AppDaemon: Starting API
2024-05-17 14:21:23.891811 INFO AppDaemon: Starting Admin Interface
2024-05-17 14:21:23.892543 INFO AppDaemon: Starting Dashboards
2024-05-17 14:21:23.914176 INFO HASS: Connected to Home Assistant 2024.5.3
2024-05-17 14:21:24.045792 INFO HASS: Evaluating startup conditions
2024-05-17 14:21:24.052785 INFO AppDaemon: App 'pred_bat' added
2024-05-17 14:21:24.054695 INFO AppDaemon: Found 1 active apps
2024-05-17 14:21:24.055342 INFO AppDaemon: Found 0 inactive apps
2024-05-17 14:21:24.055862 INFO AppDaemon: Found 0 global libraries
2024-05-17 14:21:24.056535 INFO AppDaemon: Starting Apps with 1 workers and 1 pins
2024-05-17 14:21:24.058203 INFO AppDaemon: Running on port 5050
2024-05-17 14:21:24.063290 INFO HASS: Startup condition met: hass state=RUNNING
2024-05-17 14:21:24.063877 INFO HASS: All startup conditions met
2024-05-17 14:21:24.207354 INFO AppDaemon: Got initial state from namespace default
2024-05-17 14:21:26.071730 INFO AppDaemon: Scheduler running in realtime
2024-05-17 14:21:26.079553 INFO AppDaemon: Adding /homeassistant/appdaemon/apps to module import path
2024-05-17 14:21:26.081224 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/batpred to module import path
2024-05-17 14:21:26.082104 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/batpred/config to module import path
2024-05-17 14:21:26.084225 INFO AppDaemon: Loading App Module: /homeassistant/appdaemon/apps/batpred/predbat.py
2024-05-17 14:21:26.518125 INFO AppDaemon: Loading app pred_bat using class PredBat from module predbat
2024-05-17 14:21:26.520919 INFO AppDaemon: Calling initialize() for pred_bat
2024-05-17 14:21:26.620108 INFO pred_bat: Predbat: Startup predbat
2024-05-17 14:21:26.622097 INFO pred_bat: --------------- PredBat - update at 2024-05-17 14:20:00+01:00 with clock skew 0 minutes, minutes now 860
2024-05-17 14:21:26.624226 INFO pred_bat: Sanity check:
2024-05-17 14:21:26.625982 INFO pred_bat: Sanity scan files in '/config' : ['dashboards', 'predbat_dashboard.yaml', 'www', 'apps', 'compiled', 'namespaces', 'appdaemon.yaml']
2024-05-17 14:21:26.632632 INFO pred_bat: Sanity: Got app_dir /homeassistant/appdaemon/apps
2024-05-17 14:21:26.634421 INFO pred_bat: Sanity: Scanning app_dirs: ['/homeassistant/appdaemon/apps']
2024-05-17 14:21:26.636697 INFO pred_bat: Sanity: Got predbat.py in location /homeassistant/appdaemon/apps/batpred/predbat.py
2024-05-17 14:21:26.638723 INFO pred_bat: Sanity: Got apps.yaml in location /homeassistant/appdaemon/apps/batpred/config/apps.yaml
2024-05-17 14:21:26.685499 INFO pred_bat: Sanity: /homeassistant/appdaemon/apps/batpred/config/apps.yaml is a valid pred_bat configuration
2024-05-17 14:21:26.688454 INFO pred_bat: Sanity: Confirmed correct version v7.19.1 is in predbat.py
2024-05-17 14:21:26.697453 INFO pred_bat: Sanity check has passed
2024-05-17 14:21:26.847042 INFO pred_bat: Regular expression argument geserial matched ^sensor.givtcp_(.+)_soc_kwh$ with ch2316g146
2024-05-17 14:21:26.849814 INFO pred_bat: Regular expression argument pv_forecast_today matched ^(sensor.(solcast_|)(pv_forecast_|)forecast_today)$ with sensor.solcast_pv_forecast_forecast_today
2024-05-17 14:21:26.852419 INFO pred_bat: Regular expression argument pv_forecast_tomorrow matched ^(sensor.(solcast_|)(pv_forecast_|)forecast_tomorrow)$ with sensor.solcast_pv_forecast_forecast_tomorrow
2024-05-17 14:21:26.855281 INFO pred_bat: Regular expression argument pv_forecast_d3 matched ^(sensor.(solcast_|)(pv_forecast_|)forecast_(day_3|d3))$ with sensor.solcast_pv_forecast_forecast_day_3
2024-05-17 14:21:26.858274 INFO pred_bat: Regular expression argument pv_forecast_d4 matched ^(sensor.(solcast_|)(pv_forecast_|)forecast_(day_4|d4))$ with sensor.solcast_pv_forecast_forecast_day_4
2024-05-17 14:21:26.861537 INFO pred_bat: Regular expression argument octopus_saving_session matched ^(binary_sensor.octopus_energy([0-9a-z_]+|)_saving_session(s|))$ with binary_sensor.octopus_energy_a_95846981_octoplus_saving_sessions
2024-05-17 14:21:26.865116 INFO pred_bat: Regular expression argument metric_octopus_import matched ^(sensor.(octopus_energy_|)electricity_[0-9a-z]+_[0-9a-z]+_current_rate)$ with sensor.octopus_energy_electricity_xxx_xxxx_current_rate
2024-05-17 14:21:26.868739 INFO pred_bat: Regular expression argument metric_octopus_export matched ^(sensor.(octopus_energy_|)electricity_[0-9a-z]+_[0-9a-z]+_export_current_rate)$ with sensor.octopus_energy_electricity_xxx_xxx_export_current_rate
2024-05-17 14:21:26.871886 INFO pred_bat: Regular expression argument metric_standing_charge matched ^(sensor.(octopus_energy_|)electricity_[0-9a-z]+_[0-9a-z]+_current_standing_charge)$ with sensor.octopus_energy_electricity_xxx_xxx8_current_standing_charge
2024-05-17 14:21:26.877525 INFO pred_bat: Updating HA config expert_mode to True
2024-05-17 14:21:26.903135 INFO pred_bat: Updating HA config active to True
2024-05-17 14:21:26.925864 INFO pred_bat: Updating HA config pv_metric10_weight to 0.3
..
..
..

I just don't see the auto curve anywhere in it

#1045 PianSom

ma9mwah
The curve set up happens after those log messages. Here's the context for me:

2024-05-17 15:10:45.142881 INFO AppDaemon: pred_bat: Entity sensor.predbat_GE_0_scheduled_discharge_enable created in namespace: default
2024-05-17 15:10:46.441917 INFO pred_bat: Inverter 0 SOC: 13.3 kW 98 % Current charge rate 6000.0 w Current discharge rate 5340.000000000001 w Current power -1238.0 w Current voltage 52.0
2024-05-17 15:10:46.443904 INFO pred_bat: Inverter 0 scheduled charge enable is False
2024-05-17 15:10:46.445818 INFO pred_bat: Inverter 0 charge windows currently []
2024-05-17 15:10:46.447316 INFO pred_bat: Inverter 0 Charge settings: timed charged is disabled, power 6.0 kW
2024-05-17 15:10:56.487167 INFO pred_bat: Inverter 0 Wrote scheduled_discharge_enable to False successfully and got off
2024-05-17 15:10:56.489336 INFO pred_bat: Inverter 0 sensor.predbat_GE_0_scheduled_discharge_enable set to False
2024-05-17 15:10:56.490375 INFO pred_bat: Inverter 0 scheduled discharge enable is False
2024-05-17 15:10:56.491460 INFO pred_bat: Inverter 0 discharge windows currently [{'start': 0, 'end': 0, 'average': 0}, {'start': 1440, 'end': 1440, 'average': 0}]
2024-05-17 15:10:56.492512 INFO pred_bat: Find charge curve with sensors ...

Make sure (1) that you have battery_charge_power_curve: auto in your predbat config file and (2) that you have uncommented all the entries in the config file that look like the below. (They are needed for the curve calc, in spite of what the original comment from Trefor says).

  # If not using REST then instead set the Control here (one for each inverter)
  # - you can delete this section if using REST
  charge_rate:
    - number.givtcp_{geserial}_battery_charge_rate
#    - number.givtcp2_{geserial2}_battery_charge_rate
M
#1046 ma9mwah

ah, I had deleted all the bits that said could be deleted. All working now

W
#1048 Wavy Davy

Anyone else had a problem with predbat importing during peak period?
Mine displays status as calibration and has been importing from mains since about 15:30 until I noticed and stopped it just after 18:15.
Have not seen Calibration before, but the history says it's been doing that for 5 hours.

W
#1049 Wavy Davy

Ok, just checked the documentation and calibration is the Givenergy battery calibration, not predbat.
Just annoying that they do it at peak times not when import is cheap.
Hasn't done that since installation 12 months ago.
Hope this is not a yearly occurrence.

R
#1050 Rbor

Wavy Davy This happened to me a couple of months ago coinciding with SOC dropping to near minimum SOC and battery voltage dropping right down.
See my screenshot below. It is worth looking at yours.

Predbat does include an entry in documentation.
https://springfall2008.github.io/batpred/faq/#warn-inverter-is-in-calibration-mode

I did phone GE to ask why my battery had calibrated without warning. There are entries somewhere back in this thread. I remember that Geoffrey suggested tweaking the charging rate down during any peak period and then increasing when rate reduced. But it was too late!

Rob

W
#1051 Wavy Davy

Mine was fairly similar.

Just wish there was a warning and you could schedule the calibration.
I suppose in the grand scheme of things it's not a big cost, but just annoying.

W
#1052 Wavy Davy

Rbor Rob, What's best way to tweak the charge rate, Is it in inverter>settings>battery options>battery control on the givenergy app? or is there a predbat setting?

R
#1053 Rbor

The GE app has changed since I last used it (pre predbat days) but try:

  • top right cogwheel
  • battery settings
    You should see options for charge and discharge power.
    You can go this also within the web portal
  • My inverter
  • Settings
  • Battery options

I find the app easier.

I have 2 batteries daisy-chained to a GE AC coupled inverter. Their SOCs wander apart in use and they usually get close again at the SOC extremes (I think this is their design). I think the 4% reserve is linked to inverter SOC reading and I wonder whether 1 battery may get down to 0% SOC with the other at say 8% SOC, averaging 4% and whether this triggers drop in voltage and recalibration. But this is my theory and may be completely wrong.
I guess I could increase the reserve but that wastes battery. If it happens rarely, then I can live with it, especially if I can tweak the charge rate down at peak rates and back up again afterwards.

So no hard and fast answers.
Worth a call to GE though and see if you can gain more info which you can share here.

Rob

W
#1054 Wavy Davy

Got a VERY quick response from Givenergy (8 mins)

Hi Dave,
You wouldn't be able to get a pre-warning for this I'm afraid as the system will initiate this when it detects that the battery is not performing optimally. This can happen at any time as it is automated maintenance. Only we can initiate a calibration manually at certain times but you cannot schedule the system to perform a calibration by itself.

Kind regards,

Lewis

So down to us to watch out for it.
Shame predbat doesn't have a function to limit charging during peak hours.
Maybe an HA automation?

S
#1055 SteveCook

GE Hy5.0 9.5battery 3015
So I turned predbat "off" - set to Read only and Monitor.
I have checked everywhere I can think of in GivEnergy portal and battery still stops discharging at around 50% and starts pulling form grid.
Predbat the previous day shows it will get to around 9% by 02:00 before charging starts, but it always arrives there at about 50% after using gid power through the evening rather than using the battery.
Any pointers where else I should look or do.
Thanks
Steve

S
#1056 SJB

SteveCook
Any settings changed in Home Assistant don't show up automatically in the Portal. Did you get the portal to read the current inverter settings (My Inverter -> remote control, then read each category separately). Alternatively look at the GivTCP Control entities (assuming you've put then on a dashboard) - is the reserve or cutoff set?

Have you tried resetting the inverter to defaults in the portal since you turned off Predbat?

S
#1057 SteveCook

Hi.
Thanks
Thanks. Yes I reset the inverter in the portal a couple of days ago.
I have not set any dynamic tariff or solar forecasting running in GivTCP.
Nothing set in Portal as far as I can see.
I have looked in notifications and I see BMS over voltage warnings every night around 04:00-05:00 ish that auto clear. I have emailed support.
Regards
Steve

#1058 PianSom

SteveCook
I find the Inverter phone app is great for a quick check of any stray inverter settings. Worth a look there. Swipe left from home page.

S
#1059 SteveCook

Thanks.
On Android app
But if swipe from the left i get a list of headings
If I swipe from right to left nothing happens
Notifications
Home Dashboard
Smart plugs
Smart Tariff
etc
..
..
I cannot see any inverter settings

If I go to settings it gives me
Account
Preferences
Setup wifi Dongle
Local monitoring

Nothing about inverter

#1060 PianSom

SteveCook
Wrong app. 😄

Courtesy of @hoggy -

BBC Basic App:
iOS: https://apps.apple.com/gb/app/inverter/id6443976497
Android: https://bbcbasic.co.uk/inverter.apk
Windows: https://bbcbasic.co.uk/inverter.exe
MacOS: https://bbcbasic.co.uk/inverter.dmg
Linux: https://bbcbasic.co.uk/inverter.zip
Raspberry Pi (32-bit): https://bbcbasic.co.uk/inverter-rpi.zip
Raspberry Pi (64-bit): https://bbcbasic.co.uk/inverter-rpi64.zip
Source code: https://www.bbcbasic.co.uk/inverter_source.html

R
#1061 Rbor

SteveCook I would phone GE. They can look at your system and should be able to identify any issues.
Looking at your portal settings, I notice that your Battery charge power and Battery discharge power are not set to maximum.
I have compared mine and mine are both set a max.
Your reserve is 4% so that shouldn't be preventing getting below 50%.

I have iOS GE app and the cogwheel, top right, gives access to 'battery settings' from where you can select battery power, discharge and reserve.

Rob

S
#1062 SteveCook

Thanks
I set the discharge rate down as since the 50% issue started a few weeks ago I looked today in notifications and have a load of BMS over voltage warnings that occur and auto clear around 04:00 each night. There is a post that says to do this
I have emailed GE support

R
#1063 Rbor

It could be that your battery has issues. Could be faulty cells. I would phone them. I have phoned several times in the past and they generally answer quickly and are helpful.
I have had the odd over or under voltage error which is quickly cleared. But this has always happened when approaching 100% SOC for over and 4% for under. I wouldn’t expect this to happen at 50%.

Rob

S
#1064 SteveCook

PianSom
Thanks, but I do not know how to put .apk files on my phone as an app - Doh....

S
#1065 SteveCook

Rbor
Reply just come from GE. I have asked them about the "slow rate calibration" and whether i can set that or they do it remotely

The only reason the alarm is appearing as one of the cells is peaking at 3.6V, The cells aren't out of alignment by any means but a slow rate calibration could help the cells stay below the voltage limit.

J
#1066 Jellybaby

where is teh read only option?

R
#1067 Rbor

Jellybaby It's in Control/switches:

Rob

J
#1069 Jellybaby

mucho gracias, despite being monitor only for some reason it kept changing discharge rate to max but it didnt change charge rate.

S
#1070 SteveCook

SteveCook
GE remotely set the battery to forced discharge .Battery ran down overnight to 4%. Charged overnight to 70% at 05:00 and then battery too on the load discharging to 60% before sun came up and then charged to 100%
All seems to be working.

#1071 PianSom

I have woken up this morning to a VERY strange Predbat plan - charging and discharging all day long.

On a quick investigation, it seems that my IOG import rate is no longer being picked up by the Octopus integration - HA reports "Unknown" and It seems to be defaulting to the last known value of 7.5p. (Combined with an export rate of 15p, this explains the Probate behaviour.)

Anyone else??

N
#1072 neomancer

Pretty sure the octopus api is down. You can't even see details on their website.

#1073 PianSom

neomancer
Confirmed. Just seen the same thing.

EDIT - temporary solution - I have manually set my import rate in apps.yaml with

  rates_import_override:
    - start : "08:00:00"
      end : "23:30:00"
      rate : 28
      date : "2024-05-25"
    - start : "23:30:00"
      end : "05:30:00"
      rate : 7.5
      date : "2024-05-25"
Z
#1074 Zakalwe

Yep, same here.
I've disabled Predbat in the meantime.

#1075 PianSom

I imagine the problem can't be hitting the Agile people - there would have been more screaming

#1076 Hook

Yep. Woke up to mine charging the battery.🤬

S
#1077 SteveCook

Flux rates are flatline on Octo R&D site. NO off peak import or peak export rates

#1078 PianSom

My Octopus web site is now back up (it displays the IOG tariff, which it didn't earlier), and my iOS Octopus app no longer crashes when I ask for tariff details. So, improving.

Octopus integration still not showing Current Rate though

EDIT - integration now showing the correct rate

N
#1079 neomancer

Same. Fixed for me now

R
#1080 Rbor

I'm on Agile and luckily for me, no issue

Must be at Octopus's end with IOG

Rob

#1081 PianSom

Discussion about what Predbat behaviour might have been better started here

N
#1082 Northwarks

Hi all - Has anyone managed to display the new pounds attribute that was introduced recently in the savings charting at all?

R
#1083 Rbor

PianSom The discussion area doesn't seem to be looked at.
I have seen 7.20.0 and there are now updates 7.20.1 and 7.20.2.
In Trefor's area on Facebook, he seems to have a band of brave folk trying out these versions. Lots of errors.
I like to see what happens but do not contribute.
Trefor is trying to get predbat as a standalone add-on that does not depend on appdaemon at all (or even HA?)
I am out of my depth here but I am certainly interested to see what is happening.

For me, v7.20.x looks dangerous and I am not dipping my toes into it until it settles down. A few folk on Trefor's facebook page have downgraded back to 7.19.7 which seems to be pretty stable and that is where I am.

Rob

R
#1084 Rbor

Northwarks This is what I see in my chart. The £ sign is tiny, the wrong size, and on the wrong side of the numerical value. It looks like £ has just replaced the position of p.
The number if in £ though.

Rob

#1085 PianSom

Rbor
Yeah, dramatic lack of engagement.

Personally, I think it’d be good if Predbat dropped into a fail safe Eco mode if any of the critical inputs failed. But i completely get it that it may not currently check the veracity of its inputs. Anyway.

I moved to 7.20.0 yesterday with only a minor hitch (and posted an error log posted to GitHub without response). Maybe I should try and overcome a long time antipathy to Facebook and gave a look over there. Or - screw it - maybe not 😄

N
#1086 Northwarks

Rbor Ahhh right mine still displays in pence, I imagine the £ symbol is an ApexChart constraint and not predbat - Thanks.

R
#1088 Rbor

Northwarks This is my yaml for the Apex Chart
See last 2 lines.

type: custom:apexcharts-card
header:
show: true
title: Total Cost Saving
show_states: true
colorize_states: true
graph_span: 30days
span:
start: day
offset: '-29days'
now:
show: true
series:

  • entity: predbat.savings_total_predbat
    stroke_width: 1
    curve: smooth
    name: Predbat saving
    attribute: pounds
    unit: £
  • entity: predbat.savings_total_pvbat
    stroke_width: 1
    curve: smooth
    name: PV/Battery saving
    attribute: pounds
    unit: £
R
#1089 Rbor

PianSom I don't like Facebook either. I use a rubbish name and a throwaway email address. I turn all setting that I can find to private and don't contribute. I bet Facebook can still find me so I use it solely to find out what is happening. I don't trust it at all.

Rob

N
#1090 Northwarks

Rbor Yep that fixed it … thanks

G
#1091 geoffreycoan

Wow, 60 odd messages on this thread whilst I was away. Thanks Rob and all for answering questions.

I'm sticking on 7.19.7 as well, I'm not sure I fully understand whether there would be any advantage to me of running predbat "standalone" (as I use the octoblock app as well to calculate cheapest agile slots, I'm probably going to retain app daemon anyway), and it seems a brave jump forward that was bound to have some teething problems.
I thought the direction of travel was to make predbat into a proper HA integration, so not sure about this.

For me 7.19.7 is working absolutely fine apart from a persistent desire to discharge my battery from 15:00-16:00, just before the export rate override I had to dissuade export in the DFS saving session period. This discharge is pointless because then the battery gets refilled by solar - would have been better to just keep the battery full and let the excess solar export. I fix this with an automation that sets a force idle in these two slots every day.
Not raised it as a bug and maybe I should remove the DFS export override instead.

Good holiday away, we got as far as Bordeaux, back via La Rochelle, Dinan and the Normandy beaches. 20 hours flying, 1500 miles.

Here's a couple of photos, coming into Calais and playing with the big boys at La Rochelle

R
#1092 Rbor

Good to see you back in predbatland. We have missed your expertise and have tried to keep everything afloat.
Truly impressive photo of Calais. Looking at your flymobile, you are a truly braver person than me.

Trefor seems to be set on shifting predbat as a standalone add-on, free of appdaemon:
It is worth looking at Trefor's various projects at [(https://github.com/springfall2008)].
Predbat_addon looks scary, really alpha software at this stage. I will steer well clear while braver people than me trial it. I only joined predbat at the end of January and it is a really impressive piece of work that has progressed in leaps in bounds over the history of this thread.
Like Geoffrey, I am sticking with v7.19.7 for now, which seems reasonably stable.

Rob

#1093 PianSom

geoffreycoan
Welcome back - glad to see you survived!! 🙂 Wonderful pics!

I’m not sure I share your antipathy to the new version. AppDaemon is a bit of a beast, and predbat (as far as I can tell) only uses it for access to the HA namespace. So removing the dependency is surely a good thing, in principle? Anyway, 7.20.4 is working just fine here. (Well, with the same quirks as earlier versions.) I just hope Trefor publishes a version to dockerhub - I hate having to build and maintain my own containers.

(BTW even though it is YEARS since it was last updated I still use Occusim under AppDaemon to generate semi-random home activity while I’m away. Possibly worth a look for the next jaunt.)

N
#1094 Northwarks

I’m relatively new to Predbat and apart from a few upgrade issues (just couldn’t upgrade?) which forced me to remove Predbat altogether and start afresh I’ve had no issues
, I have it on auto update (brave I know) 7.20.5 seems to be running fine here. It seems to be managing charging and export on Flux fine for me.

Removing reliance on AppDaemon seems like a sensible long term strategy.

D
#1095 DD

HA requirement was blocking my consideration of predbat. No objection in principle to HA, but since it is there to integrate sensors together, but predbat is getting all it's information from external (web-based) sources, there didn't seem any good reason to layer it on top of HA.
That said, integrating with a car charger is a reasonable justification. And I suppose therefore the possibility of integrating with things like car charging is a justification. (IOG means that it's not enough to simply avoid discharging during generic cheap rate.)

R
#1096 Rbor

PianSom
Northwarks
Based on your thumbs up for v7.20.x, I have just upgraded directly from v 7.19.7 ... to v7.20.6!

Fingers crossed, nothing untoward happened. No exception, no need to restart appdaemon (although I did anyway). In fact, a very smooth update.
So I am now also up to date.

In my incognito Facebook presence, Trefor seems to have a hard core 5-10 trialers for his stand-alone predbat. I would be well out of my depth. There is a lot of to-ing and fro-ing, ironing out glitches. The software is very raw but improving ......

Rob

G
#1097 geoffreycoan

I'm not anti the new version, I just saw it as a big change and thus was likely to be some bugs and I'm leaving those for others to sort out 😉

Similarly I've only just upgraded to the May release of HA and I won't upgrade with the June release until likely 2024.6.2 or.3

Maybe this is a stepping stone towards predbat becoming a fully fledged HA integration. I can't really see a path to having predbat totally without HA as that means it'd have to roll in all the other integration dependencies as features within predbat - solcast, octopus integration, givtcp, car charging, etc. Plus now I've got HA I like the automation platform options it brings

R
#1098 Rbor

geoffreycoan On his facebook page, Trefor has written:

The idea is to test this addon for a while for dropping support for predbat-appdaemon and eventually appdaemon altogether.
The addon also has instructions on how to run Predbat in its own Docker contain or even on a standalone PC/Server outside Home Assistant altogether (but still talking to Home Assistant as before).

I don't understand how predbat links into this but I think Trefor's main push is to remove the need to run appdaemon with predbat so that predbat is a standalone addon.
Reading some of the comments from his testers, development has sometimes been a bumpy ride.
Our v7.20.x seems to be in the same vein, but without removing appdaemon dependency altogether.

I want to start to learn what is going on as I am really picking things up as I go along.
A project for me ....

Rob

Z
#1099 Zakalwe

It's on the wonk, again...

R
#1100 Rbor

Worth trying a restart of the appdaemon-predbat add on first.
Unless this is linked to Octopus? I assume this is IOG.

I am on agile and my predbat plan is fine.

Rob

Z
#1101 Zakalwe

Rbor yes, it's on IOG. Everything up to date and HA restarted.
Looks like either the Octopus API is down again or Predbat is not picking up the correct export/import rates?

#1102 Hook

Yep same here. Octopus api again.

R
#1103 Rbor

I have had a look on Trefor's Facebook page and there are many with same problem. They reckon it is octopus API playing up again. Is it worth switching predbat onto monitor mode to see if inverter switches onto eco mode?

Rob

#1104 Hook

I noticed it about 1am. Stuck mine into read only mode and set a time charge.

In eco mode now.

#1105 PianSom

Same here. Woke to a discharging battery. Sigh.

Moved to Monitor mode, which put it back into Eco. Then Read Only, just in case.

Z
#1106 Zakalwe

Rbor
Yeah...I put it in Monitor mode and the inverter then defaults to Eco.

#1107 PianSom

Very annoying. Lots of laundry to do, cloudy and rainy, and an almost empty battery.

Going to cost a few quid. Just makes me realise how dependent I’ve become on Predbat.

Time to look into hard coding my tarrifs in apps.yaml. As a stop gap until Octopus stop buggering about.

Z
#1108 Zakalwe

PianSom
For those on IOG or other "fixed" tariffs then that would seem like a really sensible option.

Z
#1109 Zakalwe

Looks to be back working again. Octopus API fault was the root cause.

A
#1110 Arg0t

Any suggestions how Predbat could handle failures in dependent APIs gracefully? Not a fan of simply automating a flip to eco.

Personally, if either solcast or octopus numbers are not available for the next calculation window have predbat use the history on those entities to average over the recent period and use an estimated value.

#1111 PianSom

Arg0t
I did start a Discussion over on GitHub. But I don’t think anyone important (ie Trefor) is listening.

R
#1112 Rbor

Arg0t
PianSom

In my anonymous Facebook spying capacity, it looks like Trefor is investigating how he might check the Octopus API status and, if it is broken, to fall back on previous historic days.

Is it worth flagging the Octopus API problem as an 'issue' on Github as these are picked up by Trefor if relevant. It would add greater weight to the problem and for a solution.

On Solcast, it looks like a developer has removed a Solcast HACs add-on from HA:
https://api.github.com/repos/oziee/ha-solcast-solar
I haven't used this but it is clear that some have.
Trefor is well aware of the Solcast issue.

Rob

R
#1113 Rbor

Do we know how many Octopus tariffs are affected by the API issues?
Is it just IOG but what about others such as OG, Flux, Cosy, IOF?
Agile is fine (for me)

Rob

#1114 PianSom

Rbor
Oh dear. It seems he has had enough of the end-user abuse he got when there was a problem a few days ago, and has pulled his code. Serious toy throwing.

https://github.com/hacs/integration/issues/3745

Last time there was an API issue, Rob, someone in this thread (I forget who, sorry) said it affected Flux also.

#1115 Hook

So does this mean that the solcast element in predbat will stop working?

Mine hasn’t been affected so far.

#1116 Jase1703

Hook no, just not maintained or updated by the originator, but if you already have it in your HA environment you can still use it. Not available to new users if it does get removed from HACS

#1117 PianSom

Hook
No. The working code has been downloaded into your Home Assistant and will carry on as normal for now.

But it has been abandoned, and so if and when something changes (either in Solcast, or possibly even in HA) it might break. Hopefully before then another GitHub code developer/use will pick up the code and carry on supporting it.

I'd say these are the perils of using open-source free software, but I've seen the same thing happen with legit paid-for product. At least with Github there's a community out there who have access to the nuts and bolts of the software.

R
#1118 Rbor

I would be surprised if Flux is affected as the slots are set.
IOF could have issues as that is completely dynamic.

IOG is more dynamic depending on demand outside of the set night slot.
Although Agile is dynamic, this is on a daily basis. Once the slots have been decided, they are set from 4 pm until 11:30 pm the following day.

I have Solcast set as an HA integration, nothing from HACS (except via the givtcp add-on, via MQTT).

Some folk are saying that the HACS Solcast add on developer has come off GitHub and that he might have been pressurised by Solcast itself.

I haven't been affected by Solcast (as far as I know). I have an old account and still get 50 daily calls rather than the reduced 10). Perhaps if Solcast drops, a predbat workaround could be to fall back on historic data after checking Solcast status.
All this is a reminder that we depend on so many different pieces of software and developers, glued together by HA and ,for Predbat, Trefor's heroic efforts.

Rob

#1119 PianSom

Oh dear. Maybe @Jase1703 and I spoke too soon.

See https://github.com/hacs/integration/issues/3746

To quote:

The repository no longer exists, or has been taken private.

HA no longer starts if the integration was previously installed, because HACS attempts to look for the repository on github and can't find it.

At the very least, it should be marked as archived.

This is the error that is shown when HA starts now:

[custom_components.hacs] <Integration oziee/ha-solcast-solar> GitHub returned 404 for https://api.github.com/repos/oziee/ha-solcast-solar

A
#1120 Arg0t

Rbor Flux is impacted.

R
#1121 Rbor

PianSom Wow. Quite a thread on Github. A sorry tale.
Let's hope that something positive comes out of this but looks like someone else will have to take this repository forwards via one of the forks.

Rob

R
#1122 Rbor

PianSom I have just checked details of my solcast integration:

Does this mean that if I restart HA, HA will refuse to open?

Rob

#1123 PianSom

Rbor
I think it means exactly that.

I certainly am not attempting a HA restart to find out. It looks like a lacuna (a miss) in the HACS code. So if a repository is deleted (not just archived) then HA fails.

Nightmare!

#1125 PianSom

Thanks @neomancer - added.

To summarise for anyone coming late to the party ....

The problem
Predbat relies on forecasts of PV generation in order to decide when to discharge or charge. The most common way of getting a forecast is to use Solcast's. They have had some issues recently, and this caused some people to moan to the person that developed the code that pulls the forecasts from Solcast and puts them into Home Assistant (where Predbat picks them up). That person has had a major hissy fit, and has deleted all his code. This deletion means (due to a bug within the part of HA that deals with this stuff) that HA will not restart if you close it down right now .

The potential solution
This is a temporary fix only.

Go to the HACS tab (on the left). Go to Integrations. Click the three dots in the top right. Click on Custom Repositories. Where is says "Repository" in grey paste this link - https://github.com/Dehumanizer77/ha-solcast-solar then choose Repository as a Category then click Add.

This should allow HA to restart if it is shut down.

My advice is - DO NOT TRY TO RESTART JUST YET. Wait for others to confirm that this is working. As they say on tv, this is a developing story.

A
#1126 Arg0t

PianSom It works 🙂

Z
#1127 Zakalwe

PianSom Go to the HACS tab (on the left). Go to Integrations. Click the three dots in the top right. Click on Custom Repositories. Where is says "Repository" in grey paste this link - https://github.com/Dehumanizer77/ha-solcast-solar then choose Repository as a Category then click Add.

I don't see "Repository" under Category, just Lovelace, Integration, AppDaemon and Theme?

#1128 PianSom

Zakalwe
My typo, sorry.

Integration

Z
#1129 Zakalwe

Thank you

V
#1130 Vestas

Sadly this is one of the problems with open-source software - drama queens who take their ball home because someone hurt their feelings 🙁

Z
#1131 Zakalwe

Vestas

Or alternatively, people who give their time up for zero rewards gets pig-sick of being insulted by randoms on the Interwebs.

V
#1132 Vestas

Zakalwe Which equates to drama queen in my book. You do ANYTHING online for free and someone is going to have a go at you for whatever reason. Can't deal with that then don't do it, simple as that.

The guy's a tosser for the way he pulled the repo, knowing full well the effect it would have.

R
#1133 Rbor

I am nervous about what to do next. Any advice?
My Solcast was v4.0.16, not the most recent version.
Should I download the forked repository, and will this then 'take over' my existing integration?
Or do I just sit things out until this has settled down?

It looks like I am OK unless I have to restart HA. Will I be covered now that the forked version is live?
Or could I lose the ability to load HA?

Whatever I do, I will backup first.

Your nervously

Rob

W
#1134 Wavy Davy

Rbor How do you find out which version you have?
When I click on "hacs/integrations/solcast pv solar" I just get a spinning wheel.
Presumably because the integration has gone.

#1136 Hook

Forking hell, what a kerfuffle.

Glad I rebooted my PC, before it got pulled.

R
#1137 Rbor

Wavy Davy If I select Devices & Services, I see this:

If I then select 1 Service, I see this:

Hope it works for you.

Rob

W
#1138 Wavy Davy

Thanks,
yes seem's I have 4.0.23

N
#1139 neomancer


this feels apt

R
#1140 Rbor

PianSom I have tried to get the new repository and I get this error message:

Help!

Rob

S
#1141 SteveCook

make sure you select "integration" as category

#1142 PianSom

Rbor
Oh dear. This may be a function of HAOS, which I don't use. Has any HAOS user on here tried and failed too?

In your shoes I think I would consider removing the Solcast integration altogether and pausing my use of Predbat. I would be doing everything I could to avoid the worst case - HA failing to start and needing to be re-installed from scratch. Though - being a risk-taking sort - I may wait for a day or so (with my fingers crossed) to see if a new solution emerges. And hope that my system doesn't want/need a restart in the mean time.

(To remove the integration one would go to Settings/Devices & Services/Solcast PV Forecast/<three dots top right>/Delete )

I have the Forecast.Solar integration on my system. It may well be that Trefor will incorporate that into Predbat shortly - who knows.

Sorry not to have more definitive advice - It's really a shit-show.

R
#1143 Rbor

SteveCook
PianSom

I get the error message when I select the url for the Hacs repository, before I get to the option to select Integration.
I am going to hang in with what I have got, keeping my fingers crossed and hope that a working resolution emerges.
I have all the solcast files within my predbat setup. As long as I don’t restart HA ………

Rob

#1144 PianSom

Rbor
Here's a link from a user who - like you - says that they can't add another repository.

Here's a link from a HA forum moderator who says that it is fine to add a new repository (and who, by implication, says it will work ok).

Chaos and confusion reign.

I'd be interested to see a full screenshot of what happens when you paste the link I suggested. You shouldn't be able to "select" it.

#1145 Cdent

PianSom I've tried to install the new repository, but get an error too. I've added it as a customer repository but when I go on to it and click download I just get an unknown error.

I've removed the original one, renamed the custom_configuration folder and restarted but the new one won't download/install for some reason, will raise an issue in the morning

R
#1146 Rbor

PianSom
Cdent
OK, I have managed to add the forked Solcast repository.
I didn't realise that integration repositories come from the Integrations option. My others have come from add-ons.

I can see it in Devices & Services/Add integrations but only one instance of Solcast is allowed at a time.
My current version is working and I am tempted to stick with this to see if anything more definite emerges.

Cdent: Did you run into problems after removing the old Solcast and you then tried to add the forked Solcast?
I am so fed up with this. Why didn't the developer just leave their repository on GitHub. Removing it is affecting so many people.

Rob

R
#1147 Rbor

One ray of light is that Trefor seems to be working on a Solcast resolution with his Facebook clan.
One of his squad has commented:
We really are screwed if anybody p**ses you off @Trefor

That's me done for the day .....

Rob

R
#1148 Rbor

Looking at my apps.yaml file, there are several entries specific to pv and solar.
So why do I need this removed solcast integration at all?
Would I be safer just deleting the integration and allowing predbat just to use the info in the apps.yaml file?

Rob

#1149 Cdent

Rbor that's where my problems started, unfortunately I had a power issue that knocked my home assistant offline so forced a restart, breaking solcast.

Once I removed the old integration and then deleted the repository, I renamed the old folder instead of deleting it. Maybe that's where I went wrong? But it won't let me add the new repository so I'll have a look when I get some more time after the weekend.

Forecast solar seems to be OK, but isn't integrated with Predbat, not that I'm using it at the moment.

R
#1150 Rbor

Cdent So you could still get into HA with the old solcast integration there?

Rob

#1151 PianSom

Just to make my life a bit more fun, Virgin broadband went down at 1.30am and they’re saying expected return time is 5pm.

Sigh. First world problems indeed.

Interestingly, the only Predbat issue seems to be a warning in status that it can’t get my standing charge for today.

#1152 Cdent

Rbor yeah, surprisingly I could. I'd seen this and all the issues so didn't want to restart but it was fine doing so, just lots of bits of dashboard with missing entities and Predbat with no forecast

G
#1153 geoffreycoan

Rbor Looking at my apps.yaml file, there are several entries specific to pv and solar.
So why do I need this removed solcast integration at all?

Solcast integration provides a set of entities that can contain your solcast solar forecast
You then have an automation that retrieves your solcast forecast every X hours and updates the HA entities
The apps.yaml configuration then tells predbat what the entity names are that contain the solar forecast

Would I be safer just deleting the integration and allowing predbat just to use the info in the apps.yaml file?

If you delete the integration then you'll get no further updates to your solar forecast. The forecast contains data for today, tomorrow and about 5 days forward
So in about 5 days time predbat will believe you're living in the dark ages with no sun at all ☹️

I've added this new solcast fork to my HACS configuration so hopefully this will enable HA to restart, but not going to restart it or apply any upgrades until it's clear how to keep solcast working.
It's awful how some people have behaved to the author of the integration but I don't agree with the way he went nuclear, affecting far more people than the few trolls

Z
#1154 Zakalwe

There's a real irony here. We use HA to remove the dependency on vendors cloud systems and servers, and to prevent our stuff being bricked if a vendor shuts shop (see Spotify and their Car Thing debacle).

And here we are with bricked HAs due to one bloke taking his bat and ball home...

G
#1155 geoffreycoan

Zakalwe And here we are with bricked HAs due to one bloke taking his bat and ball home...

Agreed. We would have been OK if it wasn't for a HACS bug that doesn't expect the guthub repository to just be deleted

S
#1156 SteveCook

Hi all. Sorry for my ignorance. I have followed the posts as best I can
I appear to have solcast v.4.0.22 running and giving me data.
What MUST i NOT do now to avoid braking anything
TIA Steve

R
#1157 Rbor

... and if I add the forked Solcast repository, I have to remove the old one first.
Should I also remove the Solcast folder in custom_components (or change the folder's name), together with the json file.
Or would the forked repository over-write the custom_component entries?

I am not going to do anything yet to see if someone comes up with a more permanent fix in next few days.

Over on his Facebook page, Trefor is hinting that he may try to incorporate the links to Solcast in predbat.
We need to look after Trefor ........

Rob

W
#1158 Wavy Davy

Had a couple of goes in the past at adding remote access following the "speek to geek" video.
Before I had problems getting the port forwarding done on my router.
Had another go and got through it all then realised I would have to restart HA, which at the moment is a no no. So have had to leave it at that point for now. Just when I thought I was doing well getting it installed, have to sit back and wait. Hopefully we get a solution soon. Will I be ok leaving it all set up but not restarted? Can't think why not but not sure.
One advantage is that I had to return the router to defaults due to a problem with port forwarding, and then reset it all, and this has cured another problem where My laptop took ages to connect to the internet, so not all bad.

#1159 PianSom

geoffreycoan I've added this new solcast fork to my HACS configuration so hopefully this will enable HA to restart, but not going to restart it or apply any upgrades until it's clear how to keep solcast working.

This is exactly what I have done also.

I am hoping a HACS update will be forthcoming which will address the underlying bug. I will restart then, and keep my fingers crossed until then.

B
#1160 Boffinboy

Was planning to update Predbat to 7.20 series and do various other updates as it’s a weekend so can spend a bit of time fixing if needed. Instead I have held off and am sitting here living in fear of HA restarting and not being able to boot! I run it as a VM on my Synology, so I’m not even really sure what I’d have to do if that happened… Have added the forked repo into HACS but not entirely clear that this solves the not able to restart bug.

G
#1162 geoffreycoan

Leeshore Merging solcast in to predbat reduces the dependencies and install for new users although personally I like being able to also use the solcast data in dashboards and the energy dashboard and I'd probably prefer to remain as is

Reading https://community.home-assistant.io/t/solcast-global-solar-power-forecast-integration/334681/314 it looks like there are at least 2, maybe 3 people offering to own the code. Have to see it settle down but great to see the community spirit

I had a quick look at forecast_solar and it appears to only allow config of one panel orientation, so for people like me with panels on both sides of the roof, this is a problem. Maybe a paid plan option? Also is just a single forecast not the 10% (or equivalent)

R
#1164 Rbor

I watched Trefor's video introducing v7.21.0

I have been so fed up with this whole Solcast episode, I decided to give v7.21.0 a spin.

  • I inserted the necessary lines into my apps.yaml.
  • I added the forked Solcast integration into HA and immediately unenabled it.
  • I then updated to v7.21.0. Logs look good. I restarted appdaemon-predbat, although I may not have needed to.
  • Predbat.log looks good, showing new entries for pv today and pv tomorrow. I do have new entities for these.
  • And as a final brave test, I restarted HA.

All OK. My predbat is running fine. I will see how the pv prediction show up tomorrow.

No guarantee that this will work for everyone but it has worked for me – and I do not feel as out of control as I did when this all hit a few days ago.

Rob

B
#1165 Boffinboy

Rbor fantastic! whereabouts do you see the video?

When you say you added the forked repository, do you just mean you added it as a custom repository or did you also enable a second instance of solcast alongside the one that no longer exists, or something else?

R
#1166 Rbor

Boffinboy
Look back at recent comments over the last few days in this thread, including from PianSom and geoffreycoan .
Several forks available now.
See https://community.home-assistant.io/t/solcast-global-solar-power-forecast-integration/334681/314
I installed this custom repository through hacs/integrations: https://github.com/Dehumanizer77/ha-solcast-solar
For Trefor's latest videos, go to: Trefor's youtube channel:
https://www.youtube.com/playlist?list=PLTjtFJ0drtomKJzT7oZ3pCa0kzvFzUA_u
Trefor posted 2 yesterday about Solcast and his recent developments.
It is all action on the Trefor front.

You can't enable a 2nd instance of the Solcast integration. Remove the first instance first but you don't want Solcast access from both predbat and from an integration.
You need to look at: https://github.com/springfall2008/batpred/releases/tag/v7.21.0

Best of luck but think long and hard about best strategy to take and do check out all the details. The worst case scenario is getting locked out of HA on a restart.

Rob

B
#1167 Boffinboy

Rbor thanks Rob! Sorry for the stupid question but I have already added that repo as a custom repo under integrations in HACs as I saw the helpful comments by others. My worry is whether you have to do anything else after that with it, or is that enough?

Thank you for the YouTube link - didn’t realise Trevor had a channel

R
#1168 Rbor

Boffinboy I tweaked my apps.yaml file and disabled the Solcast integration that I had added. It is still there if I need it. I check the logs to see if it has all worked and I will keep a close eye on my predbat plan to make sure that I am still getting the solar forecast data. I haven't really done anything more than in my comments from last night.

I hope that what I have done is correct! If it isn't, I am sure that someone will put me on the right track. And predbat is an evolving beast, such a great piece of software.

Get reading the info in the links. I am only 4 months into my predbat journey and I didn't know anything when I started. I can now find my way around HA. There are so many helpful people, especially in this thread, which is a mine of information.
Oh and watch all of Trefor's videos and learn. I have watched some several times.

Rob

R
#1169 Rbor

I am now on v7.21.4.
Trefor has been on warp with responding to the Solcast integration problem.
For anyone interested, this is the info and chart that I have generated using solely predbat data on my best solar day in ages. The new chart data in the Templates folder at the end of example charts.yml. I just had to replace the dummy inverter code with mine to get this displayed.

Personally, I would like additional entities that pick up d3 to d7 in additions to today (d1) and tomorrow (d2), which would then reflect data available from the old Solcast integration and gives a view of likely longer term pv predictions. This is an issues request in predbat's Github.

Rob

#1170 PianSom

Rbor The new chart data in the Templates folder at the end of example charts.yml.

Please could you do me a favour and post the yaml for this? As a Docker user I don't believe this file is generated. Certainly can't find it, anyway. Cheers!

R
#1171 Rbor

PianSom Here you go.
It uses 2 new predbat entities from v7.21.x:
sensor.predbat_pv_today
sensor.predbat_pv_tomorrow.

I have never used Docker but would like to give it a try sometime just to see what it is!

Rob

###############################################

PV Forecast vs actual chart

###############################################
type: custom:apexcharts-card
header:
title: Solar forecast
show: true
show_states: true
colorize_states: true
apex_config:
chart:
height: 300px
tooltip:
enabled: true
shared: true
followCursor: true
graph_span: 24h
span:
start: day
yaxis:

  • id: capacity
    show: true
    opposite: true
    decimals: 0
    max: 100
    min: 0
    apex_config:
    tickAmount: 10
  • id: kWh
    show: true
    min: 0
    apex_config:
    tickAmount: 10
  • id: header_only
    show: false
    series:
  • entity: sensor.givtcp_sa2243g277_pv_power
    name: Solar Power
    type: line
    stroke_width: 2
    float_precision: 2
    color: Orange
    yaxis_id: kWh
    unit: kW
    transform: return x/1000;
    extend_to: now
    show:
    legend_value: true
    in_header: false
    group_by:
    func: avg
    duration: 5m
  • entity: sensor.predbat_pv_today
    name: Forecast
    color: grey
    opacity: 0.3
    stroke_width: 0
    type: area
    extend_to: false
    yaxis_id: kWh
    show:
    legend_value: false
    in_header: false
    data_generator: |
    return entity.attributes.detailedForecast.map((entry) => {
    return [new Date(entry.period_start), entry.pv_estimate];
    });
  • entity: sensor.predbat_pv_today
    name: Forecast 10%
    color: grey
    opacity: 0.3
    stroke_width: 0
    type: area
    extend_to: false
    yaxis_id: kWh
    show:
    legend_value: false
    in_header: false
    data_generator: |
    return entity.attributes.detailedForecast.map((entry) => {
    return [new Date(entry.period_start), entry.pv_estimate10];
    });
  • entity: sensor.givtcp_sa2243g277_pv_energy_today_kwh
    yaxis_id: header_only
    name: Today Actual
    stroke_width: 2
    color: Orange
    show:
    legend_value: true
    in_header: true
    in_chart: false
  • entity: sensor.predbat_pv_today
    yaxis_id: header_only
    name: Today Forecast
    color: Grey
    show:
    legend_value: true
    in_header: true
    in_chart: false
  • entity: sensor.predbat_pv_today
    yaxis_id: header_only
    attribute: remaining
    name: Remaining
    color: Grey
    show:
    legend_value: true
    in_header: true
    in_chart: false
#1172 PianSom

Rbor
Sorry to appear ungrateful, but please can you post as code (either use the "</>" symbol at the bottom, or prefix and suffix your paste by three back ticks - ```)

When you paste as plain text as you did then the board loses all the necessary indentation information.

Thanks!!

R
#1173 Rbor

PianSom Let's try again. Tell me if it works.
I know what you mean by these pesky indentations.

Rob

###############################################
# PV Forecast vs actual chart
###############################################
type: custom:apexcharts-card
header:
  title: Solar forecast
  show: true
  show_states: true
  colorize_states: true
apex_config:
  chart:
    height: 300px
  tooltip:
    enabled: true
    shared: true
    followCursor: true
graph_span: 24h
span:
  start: day
yaxis:
  - id: capacity
    show: true
    opposite: true
    decimals: 0
    max: 100
    min: 0
    apex_config:
      tickAmount: 10
  - id: kWh
    show: true
    min: 0
    apex_config:
      tickAmount: 10
  - id: header_only
    show: false
series:
  - entity: sensor.givtcp_sa2243g277_pv_power
    name: Solar Power
    type: line
    stroke_width: 2
    float_precision: 2
    color: Orange
    yaxis_id: kWh
    unit: kW
    transform: return x/1000;
    extend_to: now
    show:
      legend_value: true
      in_header: false
    group_by:
      func: avg
      duration: 5m
  - entity: sensor.predbat_pv_today
    name: Forecast
    color: grey
    opacity: 0.3
    stroke_width: 0
    type: area
    extend_to: false
    yaxis_id: kWh
    show:
      legend_value: false
      in_header: false
    data_generator: |
      return entity.attributes.detailedForecast.map((entry) => {
            return [new Date(entry.period_start), entry.pv_estimate];
          });
  - entity: sensor.predbat_pv_today
    name: Forecast 10%
    color: grey
    opacity: 0.3
    stroke_width: 0
    type: area
    extend_to: false
    yaxis_id: kWh
    show:
      legend_value: false
      in_header: false
    data_generator: |
      return entity.attributes.detailedForecast.map((entry) => {
            return [new Date(entry.period_start), entry.pv_estimate10];
          });
  - entity: sensor.givtcp_sa2243g277_pv_energy_today_kwh
    yaxis_id: header_only
    name: Today Actual
    stroke_width: 2
    color: Orange
    show:
      legend_value: true
      in_header: true
      in_chart: false
  - entity: sensor.predbat_pv_today
    yaxis_id: header_only
    name: Today Forecast
    color: Grey
    show:
      legend_value: true
      in_header: true
      in_chart: false
  - entity: sensor.predbat_pv_today
    yaxis_id: header_only
    attribute: remaining
    name: Remaining
    color: Grey
    show:
      legend_value: true
      in_header: true
      in_chart: false
#1174 PianSom

Rbor
Perfect!

👍️

B
#1175 browellm

Got on to Predbat a couple of weeks ago when I wanted to update my old IOG HA integration. It's mad how good this software is. Don't forget to drop Trefor a couple of beer tokens for coming up with this and thanks to everyone else who's contributed to the documentation and suggestions!

B
#1176 Boffinboy

I took the plunge and updated, removing the old solcast add on. So far seems to be working Ok!

G
#1177 geoffreycoan

Boffinboy I'm hoping to see a solution for feeding the energy dashboard with the solar prediction from predbat, for me that's the key bit that's missing at the moment.

I know Trefor has created a new chart which looks very good, I'd just like to see the existing one - especially as I can scroll back and see the forecast history

#1178 PianSom

geoffreycoan
Did you re-install your Solcast integration after changing repository? (And then restart to confirm?)

ATM I am parallel running, Predbat and Solcast, with each updating every 6 hours to manage API call limits.

W
#1179 Wavy Davy

Are you changing over to stand alone or just changing solcast?
Also how straight forward is it to change over to stand alone?

#1180 PianSom

Wavy Davy
Is that a question for me or Geoffrey??

If for me - I think I am probably going to continue to parallel run.

If the ability to feed the Energy dashboard from Predbat comes then it is tempting to drop the Solcast integration. But I think I'd prefer to keep use cases separate for a while. And a PV forecast every 6 hours is enough, given how unreliable the forecasts are.

It is very straightforward to include the Solcast cloud access in Predbat. Just don't make the stupid mistake I did - it needs the API key and NOT the Resource ID

W
#1181 Wavy Davy

Thanks, was just a general question. I am still running "normal" predbat and getting solcast readings as normal. Just dreading having to restart, although I do have a restart pending after installing remote access.

G
#1182 geoffreycoan

PianSom At the moment I'm still running the oziee solcast integration, I was waiting to see how things settle down before making any changes.

It looks like BJReplay is active in taking the solcast integration forward, getting it into HACS and starting to make enhancements https://community.home-assistant.io/t/solcast-global-solar-power-forecast-integration/334681/324

I've added this repository to hacs and it might be simplest to just stick with this.

But decluttering is attractive and if I can get equivalent functionality through predbat then thats attractive. But at the moment lack of feed into the energy dashboard is a key gap for me https://github.com/springfall2008/batpred/issues/1158
Been looking to see how the data structure needs to be formatted for the energy dashboard, and is often the way, can't immediately find instructions. I could use Forecast.solar which feeds the energy dashboard but the free account only gives 2 days future forecast, and adding an integration to remove one doesn't seem any benefit.

Oh, and if you think predbat is complex, take a look at https://github.com/davidusb-geek/emhass which is a generic energy optimisation app (with HA add on available as well)

G
#1183 geoffreycoan

PianSom If the ability to feed the Energy dashboard from Predbat comes then it is tempting to drop the Solcast integration. But I think I'd prefer to keep use cases separate for a while. And a PV forecast every 6 hours is enough, given how unreliable the forecasts are.

Think we've come to much the same conclusion

Wavy Davy I do have a restart pending after installing remote access.

I've been all the way one way and back again with remote access. Using the companion app for some time I installed duckdns to give https and a remote dns but then found I got certificate errors accessing with the local IP or homeassistant.local domain, and worse, that O2 blocks all access to duckdns domains.
I ended up with installing wire guard VPN to get round this and then in the end removing duckdns add on and just going to http connection with a port forward to HA on my router. I've got 2FA on my HA so I feel it's reasonably secure for remote access anyway, even if the traffic isn't encrypted in transit. Yes I could have gone with nginx but it all looked too much like hard work.

If I wanted to be more secure I'd remove the HA port 8192 forward and rely on the wire guard VPN.

And despite several attempts I couldn't get any ddns to work. I own my own domain for email so setup a sub domain but my provider 123-reg doesn't allow remote setting as far as I can tell which was my intended approach. Turns out though that Plusnet my broadband ISP has a ddns domain for my account anyway so that meets my needs until I change ISP...

All too hard..

#1184 PianSom

geoffreycoan Oh, and if you think predbat is complex, take a look at https://github.com/davidusb-geek/emhass which is a generic energy optimisation app (with HA add on available as well)

Oh wow. A global generalised version of Predbat. Which already has a machine learning module ...

What a beast. I think I'll stick with Trefor - EmHass looks far too scary.

Wavy Davy I do have a restart pending after installing remote access.

+1 for Wireguard access. Works a charm for me - fast and reliable. Though I am lucky enough to have it built in to my router.

R
#1185 Rbor

The removal of Oizee's integration shows the danger of having one critical piece of software feeding into several other pieces of software. Trefor has acted by taking the Solcast predictions needed for Predbat in-house. ..... but Oizee's entities were also used elsewhere in HA including the Energy dashboard.
And solar predictions depend on Solcast who are under pressure with demands for their predictions.
And Predbat is also relies on Bottle Cap Dave for linking into octopus API and the givenergy API.

Last night, I installed predbat v7.20.0. After Trevor's work today, I am now on v7.20.5 and predbat is running fine.

Between us, I sense that we are treading water, not really sure about the best course of action.
Let's hope that things do settle down.

Rob

R
#1186 Rbor

geoffreycoan
Before I could blink, Trefor has created v7.22.0 !!!
https://github.com/springfall2008/batpred/releases/tag/v7.22.0. There is some documentation.
Trefor has added d3-d6 which is good news but changes are more substantial.
Do take a look. I would welcome your views on v7.22.0.

I have had enough excitement with predbat over the last 2 days and I am not updating yet.

Rob

W
#1187 Wavy Davy

I'm still on 7.19.7. May update tomorrow when I have time, but very nervous about it. I suppose I will have to go for it some time, just not tonight.

G
#1188 geoffreycoan

Rbor looks from the code that there is logic to detect API failures included in this release. As ever lots of changes and not a lot of documentation!

I'm still on 7.19.7 which is working fine for me. I fixed the afternoon forced discharge issue by removing the peak period DFS export rate reduction and since then I've not had any pre peak unnecessary discharges.
Still got a nagging issue with the inverters cross charing which has got worse on the latest gen 1 firmware. The predbat function to balance the inverters and stop cross charging isn't working, I've raised a defect on it but it's not been prioritised so I'll try to work up an automation to fix it.

Other than that, all good. £7.70 in profit today and about £120 for the month of May.

I
#1189 Ivan

Just updated to 7.22.0 and appears to be working well.

I have modified my 'Solcast' dashboard to pull all data from Predbat and all looks good. So good that I decided to delete the Solcast integration. I have lost the forecast history for today - which is mentioned in the release notes for 7.22.0.

R
#1190 Rbor

Wavy Davy Just make sure that you download one of the forks from HACS/Integrations first, remove the old solcast integration from Devices and Services, and then add the forked integration.

I went the whole hog, upgraded to v7.21.0, added Trefor's 3 lines of code to my apps.yaml and disabled the forked solcast integration. I then restarted HA and felt a lot less vulnerable when it started successfully for me.
v7.21.x is now up to v7.21.5.
Latest is v7.22.0 but that has more extensive changes. I am hanging on that one. It is late .....

Rob

R
#1191 Rbor

geoffreycoan I may try v7.22.0 tomorrow but not this late at night.
I have my 2nd best solar day ever today with 54 kWh, beaten by 14th June last year with 54.1 kWh.
My Octopus winnings today stand at £6.20 and for May £90, not including standing charge.
And my May generation was 80% down on 2023. Too much North Sea murk up 800 feet up in the South Yorkshire foothills of the Pennines.

At least I feel more relaxed having got rid of Oizee's Solcast integration and restarted HA successfully, if a little nervously.

Rob

R
#1192 Rbor

Ivan Looking really good. How does Trefor do it?

Rob

I
#1193 Ivan

Rbor Agree - the recent Solcast 'incident' has highlighted how many of us are totally dependant upon Trefor - and how grateful we are!

As it's after midnight the rolling forecast data for today has reappeared - as Trefor advised it would - so looking good.

R
#1194 Rbor

Ivan I thought I would also upgrade to v7.22.0 just before midnight and I have predictions sowing up nicely in the chart. Went very smoothly.
Your screenshot looks like the old Solcast integration.
I have modifies the apex charts for the new predbat entities. I showed my screenshot back in #1155 and look a little different from yours.

Rob

W
#1195 Wavy Davy

Ok today's D day, so decided to bite the bullet and go for it. What integration are people using?

R
#1196 Rbor

Wavy Davy
Read everything, watch Trefors' Solcast video and make sure you have all options in your head.

I think I upgraded to v7.20.0 first but you can add a forked integration first.
All the links below are sourced from Predbat's GitHub pages.

Remove oizee's broken integration first as HA doesn't allow 2 concurrent solcast integrations.
Add one of the forked integrations to HA, e.g.
https://github.com/BJReplay/ha-solcast-solar

Go to the Solcast install section in here:
https://github.com/springfall2008/batpred/blob/v7.22.0/docs/install.md

Decide whether you want to use the predbat direct method or integration method.
And use only one. You can disable the integration in HA and always re-enable it if you change your mind.
I chose the direct method and hashed out the 3 lines from my apps.yaml file. You don't want direct and integration methods fighting over the Solcast API, each request adding another of your 'polls'. I have 50 per day but the default is now 10.

Check out the apex chart. If you have used the integration method, it may be unaffected. If you have used predbat direct, you need another apex chart. Get one from:
https://github.com/springfall2008/batpred/blob/v7.22.0/templates/example_chart.yml
It is the last example. Paste the yaml into the chart and change the dummy GE inverter code for yours.
I also show another card with predbat entities. They all start with 'pv' and there are 7 or 8 in 'entities'.

Finally, decide whether you want to test it all by restarting HA!
I was successful and I felt free again!

But the choice is yours. I won't accept any responsibility if your system breaks.
I just decided that I had to do this sometime.

Oh, and best of luck.

Rob

S
#1197 SteveCook

Rbor
Rob thanks for doing this description

W
#1198 Wavy Davy

Thanks for your efforts Rob, Had already started by installing BJReplay but for some reason it wouldn't start. So uninstalled and re-installed and all good. Have also updated predbat to 7.22.0. and that's seems to be working. Didn't have to do anything to the graph so a happy bunny now.
By the way what part of pennines you from? I used to live in Clayton West.

I
#1200 Ivan

Rbor
I use both the new chart from Trefor and an old chart updated with the new Predbat sensor - this is more smoothed than Trefor's.

type: custom:apexcharts-card
update_interval: 1min
apex_config:
  chart:
    foreColor: rgb(117, 117, 117)
  grid:
    borderColor: rgb(60, 60, 60)
graph_span: 16h
span:
  start: day
  offset: +5h
header:
  show: true
  title: Solar PV Power Vs Forecast
series:
  - entity: sensor.givtcp_xxxxxxxxx_pv_power
    color: var(--energy-solar-color)
    name: Solar PV
    type: area
    opacity: 0.4
    float_precision: 2
    stroke_width: 2
    group_by:
      func: avg
      duration: 30min
      fill: zero
    extend_to: false
  - entity: sensor.predbat_pv_today
    unit: W
    name: Solcast Forecast
    color: rgb(100, 100, 100)
    data_generator: |
      return entity.attributes.detailedForecast.map((entry) => {
        return [new Date(entry.period_start).getTime(), entry.pv_estimate*1000];
      });
    stroke_width: 3
    group_by:
      func: max
      duration: 30min
yaxis:
  - min: 0
    decimals: 0
S
#1201 SteveCook

Thanks all
Now on Predbat v7.22.0 and the BJReplay solcast.
I used to have an automation to poll(?) Solcast. In the kerfuffle of the last few days I deleted that. Do I need to put anything back, and if so how and what?
TIA steve

R
#1202 Rbor

Wavy Davy I'm west edge of Sheffield about 3 miles from Peak District boundary.
You were Huddersfield way from me, not far from Emley Moor.

Rob

R
#1203 Rbor

SteveCook I still have mine.
Here it is but others may have a better automation:

alias: Solcast update
description: ""
trigger:
  - platform: time_pattern
    hours: /8
condition: []
action:
  - service: solcast_solar.update_forecasts
    data: {}
mode: single

There is also an example automation in the solcast section of: https://github.com/springfall2008/batpred/blob/v7.22.0/docs/install.md

Rob

R
#1204 Rbor

Ivan Thanks I will give this chart a go.

Rob

W
#1205 Wavy Davy

I used this one from the examples Rbor pointed to

alias: Solcast update
description: ""
trigger:

  • platform: template
    value_template: >-
    {% set nr = as_datetime(state_attr('sun.sun','next_rising')) | as_local %}
    {% set ns = as_datetime(state_attr('sun.sun','next_setting')) | as_local
    %} {% set api_request_limit = 10 %} {% if nr > ns %}
    {% set nr = nr - timedelta(hours = 24) %}
    {% endif %} {% set hours_difference = (ns - nr) %} {% set interval_hours =
    hours_difference / api_request_limit %} {% set ns = namespace(match =
    false) %} {% for i in range(api_request_limit) %}
    {% set start_time = nr + (i * interval_hours) %}
    {% if ((start_time - timedelta(seconds=30)) <= now()) and (now() <= (start_time + timedelta(seconds=30))) %}
    {% set ns.match = true %}
    {% endif %}
    {% endfor %} {{ ns.match }}
    condition:
  • condition: sun
    before: sunset
    after: sunrise
    action:
  • delay:
    seconds: "{{ range(30, 360)|random|int }}"
  • service: solcast_solar.update_forecasts
    data: {}
    mode: single

Sorry for indents but you can get it https://github.com/BJReplay/ha-solcast-solar near bottom of page

R
#1206 Rbor

Ivan Here are the 2 charts and the entities from Trefor's

Looks like we are getting many ways of displaying our solar data.

Rob

R
#1207 Rbor

Wavy Davy Thanks but I can't find this in one of my links!
Can you send the link but also repost the code with 3 back ticks ``` before and after the code?
Then I can just past it win without going through yaml indent-hell.
Thanks to PianSom for teaching me this trick.

Rob

R
#1208 Rbor

Ivan Do you have the yaml for your centre chart?

And for these:

Thanks

Rob

I
#1209 Ivan

Rbor

This is the chart. Can't claim any credit for any of these as they are charts that I have found somewhere in the past - think I extended this from 2 days to 3.

type: custom:apexcharts-card
apex_config:
  chart:
    height: 350px
all_series_config:
  unit: ' kWh'
header:
  title: Solar forecast
  show: true
  standard_format: true
  show_states: true
  colorize_states: true
graph_span: 3d
span:
  start: day
  offset: '-0h'
now:
  show: true
  label: Now
yaxis:
  - id: kwh
    min: 0
    apex_config:
      tickAmount: 5
  - id: header_only
    show: false
series:
  - entity: sensor.predbat_pv_today
    yaxis_id: kwh
    type: area
    name: Today
    color: orange
    data_generator: |
      var today = entity.attributes.detailedForecast.map((start, index) => {
        return [new Date(start["period_start"]).getTime(), entity.attributes.detailedForecast[index]["pv_estimate"]];
      });
      var data = today
      return data;
    show:
      legend_value: false
      in_header: false
    stroke_width: 3
    float_precision: 2
    extend_to: false
  - entity: sensor.predbat_pv_tomorrow
    yaxis_id: kwh
    type: area
    name: Tomorrow
    color: grey
    data_generator: |
      var today = entity.attributes.detailedForecast.map((start, index) => {
        return [new Date(start["period_start"]).getTime(), entity.attributes.detailedForecast[index]["pv_estimate"]];
      });
      var data = today
      return data;
    show:
      legend_value: false
      in_header: false
    stroke_width: 3
    float_precision: 2
    extend_to: false
  - entity: sensor.predbat_pv_d2
    yaxis_id: kwh
    type: area
    name: Day 3
    color: blue
    data_generator: |
      var today = entity.attributes.detailedForecast.map((start, index) => {
        return [new Date(start["period_start"]).getTime(), entity.attributes.detailedForecast[index]["pv_estimate"]];
      });
      var data = today
      return data;
    show:
      legend_value: false
      in_header: false
    stroke_width: 3
    float_precision: 2
    extend_to: false
  - entity: sensor.predbat_pv_today
    yaxis_id: header_only
    name: Today
    color: orange
    show:
      legend_value: true
      in_header: true
      in_chart: false
  - entity: sensor.predbat_pv_tomorrow
    yaxis_id: header_only
    name: Tomorrow
    color: grey
    show:
      legend_value: true
      in_header: true
      in_chart: false
S
#1210 SteveCook

I set these Solcast update automations

I
#1211 Ivan

Rbor
These are just two sensors I created in my templates.yaml (or could go straight in the config.yaml. Both could be done with one line of code but I find yaml 'messy' so like to keep things simple.

  - sensor:
 
#Total PV Forecast next 7 days
      - name: "Week Solar Forecast kWh"
        unit_of_measurement: kWh
        state: >
          {% set var1 = states('sensor.predbat_pv_today') | float(0) %}
          {% set var2 = states('sensor.predbat_pv_tomorrow') | float(0) %} 
          {% set var3 = states('sensor.predbat_pv_d2') | float(0) %}
          {% set var4 = states('sensor.predbat_pv_d3') | float(0) %}
          {% set var5 = states('sensor.predbat_pv_d4') | float(0) %}
          {% set var6 = states('sensor.predbat_pv_d5') | float(0) %}
          {% set var7 = states('sensor.predbat_pv_d6') | float(0) %}
          {{ (var1 + var2 + var3 + var4 + var5 + var6 + var7)  | round(1) }}  
        icon: mdi:solar-power 

#Average Daily PV forecast over next 7 days
      - name: "Average Daily Solar Forecast kWh"
        unit_of_measurement: kWh
        state: >
          {% set var1 = states('sensor.predbat_pv_today') | float(0) %}
          {% set var2 = states('sensor.predbat_pv_tomorrow') | float(0) %} 
          {% set var3 = states('sensor.predbat_pv_d2') | float(0) %}
          {% set var4 = states('sensor.predbat_pv_d3') | float(0) %}
          {% set var5 = states('sensor.predbat_pv_d4') | float(0) %}
          {% set var6 = states('sensor.predbat_pv_d5') | float(0) %}
          {% set var7 = states('sensor.predbat_pv_d6') | float(0) %}
          {{ ((var1 + var2 + var3 + var4 + var5 + var6 + var7) / 7) | round(1) }}  
        icon: mdi:solar-power
W
#1212 Wavy Davy

here you go

alias: Solcast update
description: ""
trigger:
  - platform: template
    value_template: >-
      {% set nr = as_datetime(state_attr('sun.sun','next_rising')) | as_local %}
      {% set ns = as_datetime(state_attr('sun.sun','next_setting')) | as_local
      %} {% set api_request_limit = 9 %} {% if nr > ns %}
        {% set nr = nr - timedelta(hours = 24) %} 
      {% endif %} {% set hours_difference = (ns - nr) %} {% set interval_hours =
      hours_difference / api_request_limit %} {% set ns = namespace(match =
      false) %} {% for i in range(api_request_limit) %}
        {% set start_time = nr + (i * interval_hours) %}
        {% if ((start_time - timedelta(seconds=30)) <= now()) and (now() <= (start_time + timedelta(seconds=30))) %}
          {% set ns.match = true %}
        {% endif %}
      {% endfor %} {{ ns.match }}
condition:
  - condition: sun
    before: sunset
    after: sunrise
action:
  - delay:
      seconds: "{{ range(30, 360)|random|int }}"
  - service: solcast_solar.update_forecasts
    data: {}
mode: single
R
#1213 Rbor

Ivan Thanks.
I have got it working

Rob

G
#1214 geoffreycoan

All the folks using the solcast automations, you're probably going to get timeouts and API fails if you poll at 12:00:00 for example

Solcast have introduced rate limiting on the hobbyist account so if you poll at 'round number' times you are likely to have problems

Just change the automation to something like this:

alias: Solcast solar forecast update
description: Update solar generation forecast
trigger:
  - platform: time
    at:
      - "01:17:31"
      - "06:17:31"
      - "10:17:31"
      - "14:17:31"
      - "18:17:31"
condition: []
action:
  - service: solcast_solar.update_forecasts
    data: {}
mode: single
#1215 Hook

Rbor Haven't you used the integration method if you've hashed out the 3 lines for the direct method in apps.yaml?

I've gone indirect method as I want the entities in HA.

G
#1216 geoffreycoan

I've successfully swapped to the new BJReplay solcast integration and everything is working fine

Here's what I did:

  • add BJReplay github to the list of repositories in hacs
  • go into the oziee integration and copy the solcast api key
  • delete the oziee solcast integration
  • delete the oziee solcast integration in hacs (not sure this worked the first time)
  • install BJReplay solcast integration in hacs
  • restarted home assistant, worry that it won't restart but it does
  • check the logs and see errors about the oziee integration not existing
  • deleted oziee integration in hacs and restart HA again, no log errors this time
  • realised I should have taken a backup earlier and take one now😁
  • BJReplay integration not appearing in hacs (probably got deleted when I deleted the oziee version), install it again and restart HA
  • solcast entities all appear and are populated with the previous values, not lost any history or had to run the solcast automation
  • renamed all the solcast entities from solcast_forecast_forecast_* to just solcast_forecast which is how I had them before
  • add solcast integration to the list of integrations, configure it and paste in the copied API key
  • add solcast forecast to the energy dashboard, again no history has been lost👍
  • predbat is showing no solar prediction so restart appdaemon so predbat picks up the new solcast entities
  • all working perfectly as before

I probably mucked up the sequence of deleting the oziee solcast integration causing a few more restarts than necessary, but no major dramas

I'll probably upgrade predbat tomorrow

W
#1217 Wavy Davy

geoffreycoan I updated today, just switched auto update on and selected latest update. Went through with no issues.
Re solcast history, where do you find that?

G
#1218 geoffreycoan

Wavy Davy Re solcast history, where do you find that?

Just look at any of the entities in the History view in HA

Also appears in the Energy dashboard if you look at a previous time range, eg last month

W
#1219 Wavy Davy

Thanks Geoff, didn't know you could do that.

W
#1220 Wavy Davy

Rbor That's right but I was born in Sheffield (chapletown)

R
#1221 Rbor

geoffreycoan Not too dissimilar to my solcast journey over last few days – going round in circles installing, reinstalling, etc. I finally got rid of the last traces of the old oizee integration from HACS. I installed the BJReplay solcast integration and this allows me to update from oizee's remnants in HACS. I finished up restarting HA and appdaemon several times, each without incident. I am running with Trefor's in-house method and have the BJReplay solcast integration disabled so that I can use it if needs be.

Finally, I decided to update my HA software and this broke HA. I was getting Thread errors and web socket errors. The predbat plan was 'null' and no running entities were shown in my cards (although they were there in devices and settings).
Eventually, to my relief, predbat leapt into action but my predbat log shows repeated web socket errors.
I have posted an issue for Trefor to look at. From Github insights, his v7.20.4 mentioned web socket issues.

All our efforts have got diverted into trying to get a reliable solcast predictions into our respective predbats.

Rob

G
#1222 geoffreycoan

Rbor Finally, I decided to update my HA software and this broke HA. I was getting Thread errors and web socket errors. The predbat plan was 'null' and no running entities were shown in my cards (although they were there in devices and settings).
Eventually, to my relief, predbat leapt into action but my predbat log shows repeated web socket errors.

Yes I saw that github issue. Methinks I'll hold off upgrading predbat a bit longer. Just when I thought it had settled down

Was watching Trefor's video on the predbat addon earlier https://youtu.be/iDhYi00holk which gives good insight into why it's been created and the likely direction away from appdaemon.
Worth subscribing to Trefor's YouTube channel if you haven't already

A
#1223 Arg0t

geoffreycoan

Should be sufficient to:

  • In HACS remove the Ozzie integration
  • In HACS add BJreplay repository as a custom repository using the integration category.
  • In HACS download the Solcast Solar integration, this will update to 4.025
  • Restart HA.
    No changes required in HA integrations or to entities, under the hood the custom components folder remains the same and the integration in HA is unaware that the repository has changed.
#1224 Jase1703

Rbor yes also getting the same web socket errors. When and if PredBat eventually fails to find entities I just restart the add-on and it all comes back. @geoffreycoan thanks for the steps to remove the oozie integration, HACS was a bit sticky but a few restarts got it all back inline.

G
#1225 geoffreycoan

Arg0t ah well, solcast is sorted now. I was aware that the folder name was the same but t thought I had to remove the old solcast first

Thanks

R
#1226 Rbor

My problem was that my oozie integration was an old one, v1.16 I think.
HACS told me to update it but then would let me cos the integration wasn't there anymore.
I managed to remove it from devices and services but HACS wouldn't let it go.
And I installed the older forked integration which wasn't being taken forwards.
I then removed it as well and installed the BJreplay integration which is being developed further. HACS then offered to update my old version to v4.025. Then HACS removed the old v1.16 version for me.

What a lot of messing around and we are 'reasonably' knowledgable.

Sounds like there is an issue with web sockets.

Rob

A
#1227 Arg0t

geoffreycoan understand, comment was to help anyone who follows your steps.

G
#1228 geoffreycoan

Arg0t it was useful thanks. I had trouble removing the oziee solcast integration, I don't think hacs liked it as the repository was deleted, pretty sure the first time I tried, HACS hung.
Anyway between us it's proof that it's not a big scary thing and you can get solcast working again

#1229 PianSom

I finally bit the bullet and did the re-install/delete Solcast this morning too. It was a bit of a pain, and ended up needing quite a few restarts, but got there in the end. Though l lost my Solcast history, as a sensor re-name was required at one stage. At least it didn’t hang, and glad that chapter is closed.

(I am slightly unusual as a HA Container user.)

R
#1230 Rbor

For info, Predbat now up to v7.22.2 with web sockets addressed in v7.22.1
I have just upgraded to v7.22.2. Went smoothly with no errors in predbat log or appdaemon log.
Yesterday with web sockets, I think I exceeded 1000 errors in predbat.log

Rob

G
#1231 geoffreycoan

Rbor Very painless upgrade from 7.19.7 to 7.22.2 just now. Selected the latest version from the dropdown list of versions, predbat upgraded itself, it then crashed on first execution and restarted straight away (probably stale code loaded or something), subsequent run ran through clean, no errors in the appdaemon or add-on log.

I am getting a warning about not being able to find the discharge curve (charge curve found ok). Almost certainly due to the battery not being fully discharged for a while, with all the solar the battery is more than sufficient to last through the night. We’re getting solar generation from 4:30am to 8:30pm at the moment 👍

S
#1232 Sandy

I've gone through the steps you guys have outlined above thank you, very clear.

However, I can't get predbat to start, I have turned it on multiple times but it keeps reverting to off again.

Any ideas?

G
#1233 geoffreycoan

Sandy assume you are still using the solcast integration and not moved to predbat calling solcast directly
Have you added the solcast integration to HA and added your solcast API to the config?
Are the solcast entities populated? Might need to run the solcast update automation if its a brand new install
If the entities are OK then check the predbat appdaemon.log - it usually logs any problems its having, might be that it can’t find the solcast entities or the entities are not populated properly

There’s more details on checking solcast is working in the predbat faq’s https://springfall2008.github.io/batpred/faq/#warn-no-solar-data-has-been-configured

I
#1234 Ivan

Sandy What does the log say? Open the log (top right hand corner) on the Predbat Addon page.

I had this problem - showing some error message that there was no module called 'adbase'. I ended up deleting the addon, then deleting the created folder in addon_config and then reinstalling - all worked!

S
#1235 Sandy

geoffreycoan

geoffreycoan Have you added the solcast integration to HA and added your solcast API to the config?

Yes

geoffreycoan Are the solcast entities populated?

If you mean are they showing under entities, then yes

Log file is gibberish to me I'm afraid, perhaps it makes more sense to you?

6-rc: info: service legacy-services successfully stopped
s6-rc: info: service appdaemon: stopping
2024-06-04 21:14:19.916209 WARNING pred_bat: ------------------------------------------------------------
2024-06-04 21:14:19.917293 WARNING pred_bat: Unexpected error in worker for App pred_bat:
2024-06-04 21:14:19.917935 WARNING pred_bat: Worker Ags: {'id': 'aead9315f07c4f7c8d95a65aaa6ac852', 'name': 'pred_bat', 'objectid': 'a5863b78a0b44033b11d56d4e6cf0bd1', 'type': 'scheduler', 'function': <bound method PredBat.update_time_loop of <predbat.PredBat object at 0x7f8100a350>>, 'pin_app': True, 'pin_thread': 0, 'kwargs': {'interval': 15, 'random_start': 0, 'random_end': 0, '__thread_id': 'thread-0'}}
2024-06-04 21:14:19.918726 WARNING pred_bat: ------------------------------------------------------------
2024-06-04 21:14:19.922585 WARNING pred_bat: Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/appdaemon/threading.py", line 1022, in worker
funcref(self.AD.sched.sanitize_timer_kwargs(app, args["kwargs"]))
File "/config/apps/predbat.py", line 15404, in update_time_loop
raise e
File "/config/apps/predbat.py", line 15398, in update_time_loop
self.update_pred(scheduled=False)
File "/config/apps/predbat.py", line 14283, in update_pred
recompute = self.calculate_plan(recompute=recompute)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/apps/predbat.py", line 12553, in calculate_plan
self.optimise_all_windows(metric, metric_keep)
File "/config/apps/predbat.py", line 11238, in optimise_all_windows
) = self.optimise_charge_limit_price_threads(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/apps/predbat.py", line 9885, in optimise_charge_limit_price_threads
pred_handle = self.launch_run_prediction_single(try_charge_limit, charge_window, discharge_window, try_discharge, False, end_record=end_record, step=step)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/apps/predbat.py", line 9994, in launch_run_prediction_single
han = self.pool.apply_async(wrapped_run_prediction_single, (charge_limit, charge_window, discharge_window, discharge_limits, pv10, end_record, step))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/multiprocessing/pool.py", line 458, in apply_async
self._check_running()
File "/usr/lib/python3.11/multiprocessing/pool.py", line 353, in _check_running
raise ValueError("Pool not running")
ValueError: Pool not running

2024-06-04 21:14:19.925097 WARNING pred_bat: ------------------------------------------------------------
[21:14:20] INFO: Service AppDaemon exited with code 0 (by signal 0)
s6-rc: info: service appdaemon successfully stopped
s6-rc: info: service init-appdaemon: stopping
s6-rc: info: service init-appdaemon successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting


Add-on: appdaemon-predbat

Predbat pre-install in AppDaemon

Add-on version: 1.0.10
You are running the latest version of this add-on.
System: Home Assistant OS 12.1 (aarch64 / raspberrypi4-64)
Home Assistant Core: 2024.1.5

Home Assistant Supervisor: 2024.05.1

Please, share the above information when looking for help

or support in, e.g., GitHub, forums or the Discord chat.

s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-appdaemon: starting
s6-rc: info: service init-appdaemon successfully started
s6-rc: info: service appdaemon: starting
s6-rc: info: service appdaemon successfully started
s6-rc: info: service legacy-services: starting
[21:14:25] INFO: Starting AppDaemon...
s6-rc: info: service legacy-services successfully started
Task exception was never retrieved
future: <Task finished name='Task-93' coro=<HassPlugin.run_hass_service_check() done, defined at /usr/lib/python3.11/site-packages/appdaemon/plugins/hass/hassplugin.py:763> exception=ClientResponseError(RequestInfo(url=URL('http://supervisor/core/api/services'), method='GET', headers=<CIMultiDictProxy('Host': 'supervisor', 'x-ha-access': '98a6ae59e1a9fe6ec3e9b1408f05ae8854ecc261c9496ec7435f328f42fb5cd1f8aa971aff12d9c14b5aacbe7b8cec43c47aa57d32931fb4', 'Accept': '/', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Python/3.11 aiohttp/3.8.6')>, real_url=URL('http://supervisor/core/api/services')), (), status=502, message='Bad Gateway', headers=<CIMultiDictProxy('Content-Type': 'text/plain; charset=utf-8', 'Content-Length': '16', 'Date': 'Tue, 04 Jun 2024 20:17:32 GMT', 'Server': 'Python/3.12 aiohttp/3.9.5')>)>
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/appdaemon/plugins/hass/hassplugin.py", line 772, in run_hass_service_check
hass_services = await self.get_hass_services()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/appdaemon/plugins/hass/hassplugin.py", line 732, in get_hass_services
r.raise_for_status()
File "/usr/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1011, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 502, message='Bad Gateway', url=URL('http://supervisor/core/api/services')
Task exception was never retrieved
future: <Task finished name='Task-17069' coro=<HassPlugin.run_hass_service_check() done, defined at /usr/lib/python3.11/site-packages/appdaemon/plugins/hass/hassplugin.py:763> exception=ClientResponseError(RequestInfo(url=URL('http://supervisor/core/api/services'), method='GET', headers=<CIMultiDictProxy('Host': 'supervisor', 'x-ha-access': '98a6ae59e1a9fe6ec3e9b1408f05ae8854ecc261c9496ec7435f328f42fb5cd1f8aa971aff12d9c14b5aacbe7b8cec43c47aa57d32931fb4', 'Accept': '/', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Python/3.11 aiohttp/3.8.6')>, real_url=URL('http://supervisor/core/api/services')), (), status=502, message='Bad Gateway', headers=<CIMultiDictProxy('Content-Type': 'text/plain; charset=utf-8', 'Content-Length': '16', 'Date': 'Tue, 04 Jun 2024 20:27:46 GMT', 'Server': 'Python/3.12 aiohttp/3.9.5')>)>
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/appdaemon/plugins/hass/hassplugin.py", line 772, in run_hass_service_check
hass_services = await self.get_hass_services()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/appdaemon/plugins/hass/hassplugin.py", line 732, in get_hass_services
r.raise_for_status()
File "/usr/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1011, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 502, message='Bad Gateway', url=URL('http://supervisor/core/api/services')

S
#1236 Sandy

Ivan

That's a good idea. I've already completely restored to a week ago and then back to yesterday as part of this so what's one more uninstall and reinstall!

I've run out or API calls for today though so it won't work properly until after midnight now anyway. If I can just get predbat to stay turned on I'll be happy for tonight

G
#1237 geoffreycoan

Sandy are you running predbat via the predbat add-on (which Ivan suggested), or via appdaemon or appdaemon-predbat (which your logfile above suggests you are using). You need to choose one or the other add-on, not both.

Assuming appdaemon-predbat, the logfile above unfortunately just says that the add-on is reporting an error, but doesn’t give a lot of detail of the actual error. For that we need to look at the actual logfile that predbat is producing - details of how to find this logfile in the documentation https://springfall2008.github.io/batpred/output-data/#predbat-logfile
For appdaemon-predbat it should be /addon_configs/46f69597_appdaemon-predbat/predbat.log

This should show the detail of what the actual problem predbat is encountering.

I asked about whether the solcast entities are populated, you said that they are in the HA entity list, but do they have any values in them? Click on any of them in the entity list, e.g. sensor.solcast_pv_forecast_forecast_tomorrow should have a kWh value for tomorrow’s forecast. If this is unknown then that might be the issue and waiting until after midnight when you can re-run the solcast update may fix the issue

S
#1238 Sandy

geoffreycoan

Helpful as always :-)

I realised I was too tired to not be making mistakes last night so stopped. Had a quick look this morning and I now can't get the addon to start so there's definitely something up!

Yes I am running via appdaemon, the log file is huge so I won't paste the whole thing but I think the pertinent error is there is an error on a web socket?

             ^^^^^^^^^^^^^^^^

File "/usr/lib/python3.11/site-packages/aiohttp/client.py", line 821, in _ws_connect
raise WSServerHandshakeError(
aiohttp.client_exceptions.WSServerHandshakeError: 502, message='Invalid response status', url=URL('http://supervisor/core/api/websocket')

2024-06-04 21:27:17.843047 INFO pred_bat: Info: Start socket for url http://supervisor/core/api/websocket
2024-06-04 21:27:17.853468 INFO pred_bat: Error: Web Socket exception in startup: 502, message='Invalid response status', url=URL('http://supervisor/core/api/websocket')
2024-06-04 21:27:17.857673 INFO pred_bat: Error: Traceback (most recent call last):
File "/config/apps/predbat.py", line 15517, in socketLoop
async with session.ws_connect(url) as websocket:
File "/usr/lib/python3.11/site-packages/aiohttp/client.py", line 1167, in aenter
self.resp = await self.coro
^^^^^^^^^^^^^^^^

Also, having now checked, no the entities are not populating.

G
#1239 geoffreycoan

Sandy Yeah, probably not a good idea to be trying deep Home Assistant surgery when it’s late at night.

Do you know what version of predbat you are on, it should say in the log file.

There was an issue with 7.22.0 that it generated web socket errors, so your fix may be as simple as upgrading to the latest predbat version which is 7.22.2. I’m running that and it’s stable for me.

If you are running the appdaemon-predbat add-on and haven’t installed predbat through HACS then unfortunately you can’t use HACS to upgrade to the latest predbat. Normally you would use predbat to upgrade itself, but since you are getting the websocket error this may not be possible. Its worth a try though, so find the control select.predbat_update on the entities list in Predbat and see if you can change it to 7.22.2, and if you get an alert (or see it in the appdaemon log above) that predbat is updating.

If this doesn’t work then you’re going to have to manually install the latest predbat version from github.
In either file editor or studio server in Home Assistant, find the predbat.py file (should be same/similar directory to the logfile above) and rename it to something that doesn’t have a .py extension (so appdaemon doesn’t load it).
Then download the latest predbat software from https://github.com/springfall2008/batpred/blob/main/apps/predbat/predbat.py into the directory where your predbat.py file was originally.

Restart the appdaemon-predbat addon and hopefully this will resolve the web socket error.

If the solcast entities are not populated, just manually run the solcast update automation you created when you first setup solcast (per the installation instructions). Predbat will still run if then solcast forecast is empty but its better to have a forecast!

R
#1240 Rbor

Sandy
geoffreycoan
I am also running HAOS on a raspberry pi4
I upgraded to v7.22.0 and all was OK but I was on an old version of HA.
I decided to upgrade HA and I then got loads of web socket errors and also repeated Thread errors in my predbat.log.
I flagged an issue on predbat's Github presence: https://github.com/springfall2008/batpred/issues/1173

My predbat log contains this repeated error every few minutes:

File "/config/apps/predbat.py", line 15559, in socketLoop
if new_state.get("state", None) != old_state.get("state", None):
^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'

The code that you posted included a socketLook error at line 155517

Trefor identified this as a bug and has fixed it via v7.22.1 and v7.22.2 https://github.com/springfall2008/batpred/pulse

But the latest version of HA trashed my HA installation. I couldn't even log in to the local URL.
I then switched off my pi for a few minutes (panic mode for me!) and switch the pi back on again.
A few minutes later, I could get back on HA. I was still on 7.22.0 and my predbat.log had over 1000 errors.
I managed to upgrade to v7.22.2. Very smooth and got me back in action.

I don't know if this helps you. Geoffrey's suggestion about manually replacing predbat.py file with the latest version may do the trick.

All this was a harrowing experience for me and I can imagine how you feel.
Stick in with predbat – it is a great piece of software and we are helping to make it even greater with our exchanges on this thread and by informing Trefor when their are hiccups (or worse)

Rob

S
#1241 Sandy

geoffreycoan

Rbor

So after a loooong day I finally got a chance to look at this again. Thank you both for the input, again very helpful. I think I have a possible solution but I won't know for a while if I am right and I thought I would post my experiences here for others who might find themselves in the same situation.

TL;DR - My GivEnergy Battery has new firmware and needs to update. That is the working theory anyway.

I am and was running the latest version of Predbat - 7.2.22 but I hadn't updated HA for a while. after updating the core I was then seeing the Solcast forecast fine with entities populated. Predbat still wasn't running though so I updated to the latest HA version. Still no change but the predbat logs looked like they were running fine, I'm getting all the info on the decisions it's making and generally looking like it should be working.

Reading through the logs I find this line:

2024-06-05 20:43:55.742027 INFO pred bat: Warn: Inverter is in calibration mode 6, Predbat will not function correctly and will be disabled.

I have no idea what calibration mode 6 is but this definitely sounds like it's an inverter issue not a predbat issue. My GivEnergy App has been acting a bit weird for days with the battery showing as 0% until it updates then it would say 100%. The battery hasn't been charging my home for days though which I had assumed was related to me turning off predbat while things were looking quite sketchy.

I tried resetting things to their defaults through the app but it wouldn't let me and kept giving an error so I logged in online. Looking through the inverter options I have a firmware update pending (3005 to 3009) for the battery with the warning that once done it will calibrate by discharging and then charging completely.

I have just started the firmware update process which will take a while so lets see if that helps.

R
#1242 Rbor

Sandy Calibration is initiated by GE and not by Predbat.
Predbat will pick up if the battery is being calibrated and show this status within predbat.
Calibration will run its course, first completely discharging the battery, and then full charging. This is to set the SOC at the limits 0% and 100%.

If you have now just started the firmware update process, then your battery will be calibrating!
So I don't know whether you will get a double calibration.
You should get a GE notification informing you of the calibration process.
When my battery has been calibrated, I think I also received progress emails/text messages as well.
Predbat won't be able to do anything with your battery until calibration is complete.

From your description, it sound like your battery needs sorting.
You could try phoning GE support and they can check the status of your battery. I have found them very useful and knowledgable.

Best of luck.

Rob

S
#1243 Sandy

Rbor

That's the thing, I didn't get any notification from GE until I started this update so I'm really not sure why it should be calibrating before then. As you say though, this is looking a lot like it's the battery and not predbat that is the issue. I'll wait until the battery has updated and calibrated and see what happens

G
#1245 geoffreycoan

@Sandy glad you are on the road to resolution and predbat was working briefly. As Rbor says, if the inverter starts recalibrating the battery then there’s nothing predbat can do until the battery is back in normal operation.

One other thing to throw in to the ‘solcast working’ discussion, it’s been mentioned before but solcast has started rate limiting connections from hobbyist accounts. I had to restart Home Assistant earlier today and when I did, I noticed that the PV column in predbat was completely empty ! Looking at the solcast entities they had changed a minute ago to zero. Figuring a problem with solcast I looked in the HA system/log and saw an error 429 returned from the Solcast API calls at the same time that HA was restarted. I reloaded the solcast integration and this time it worked OK, the entities were all populated OK and predbat got all its solar prediction again.

I’ve raised a github issue for this with BJreplay, but if you see blank solcast entities and an error 429 in the HA log, this may be the cause
https://github.com/BJReplay/ha-solcast-solar/issues/12

B
#1246 Boffinboy

Had a bit of a shock last night - got woken by automation generating an urgent notification (cut through DND) on my phone that Predbat has lost connection to Givtcp. Have now made sure that the notifications are not set to urgent! Was a bit peculiar, seemed like Predbat was no longer running when I looked in appdaemon and then I had to restart twice before it came back. Not had a chance to look at logs properly, but hoping it doesn’t happen again. Had been stable for ages. Recently upgraded to 7.22.2. On a related note, I find it a bit confusing that I need to go to the appdaemon web interface and then view the Predbat log there. Is it shown anywhere else? I guess when I eventually switch to the standalone app it will be more straightforward.

G
#1247 geoffreycoan

Boffinboy Sorry that my automation woke you up. It was my fault, I set the automations to generate a critical alert if they identified a failure with GivTCP, Predbat, etc. As well as I felt it was an important issue that needed attention, it was also to distinguish the alerts from the normal clutter of predbat status change alerts.

You could turn the volume on the sound alert down if you didn’t want the audio alert, this would at least mean you’d still see the critical alerts.

r/e the logfile. It’s a bit confusing. Appdaemon add-on has a log file (in the log tab of the add-on) but hardly anything gets written to that, most of the appdaemon logging which predbat piggybacks on is written to a separate logfile that’s defined in the appdaemon.yaml
As you’ve found, viewing that file is a bit of a pain. You can use the appdaemon web interface as you’re already doing, or I just use a file editor to view the file - details in the documentation https://springfall2008.github.io/batpred/output-data/#predbat-logfile

#1248 PianSom

FWIW the only Critical alerts I have are for a Nest event (fire, smoke etc), and a total grid failure.

I’m not sure I’ve got the latter quite right yet. I’ve found it surprisingly hard to work out when the grid has failed.

V
#1249 Vestas

PianSom Something like Grid Frequency=0 for 60 seconds ought to do it.

#1250 PianSom

Vestas
Yeah. ATM I'm using

- binary_sensor:
  - name: Grid Status
    unique_id: grid_status
    state: "{{ states('sensor.givtcp_XXXXXXXXX_grid_frequency')|int < 49 }}"

with a carve-out for HA startup. But I've had a few false positives. Must get around to sorting it out.

G
#1251 geoffreycoan

PianSom I’ve got an automation that alerts that grid is out when frequency is below 49 for 10 seconds, and grid restored when frequency above 49 for 10 seconds.
I get a false positive that the grid is restored every time I restart HA. Must work out how to stop that at some time

#1252 PianSom

geoffreycoan Must work out how to stop that at some time

I use the Uptime integration and a condition like this in my notification automation

condition:
  - alias: Uptime is more than 1 min
    condition: template
    value_template: >-
      {{ as_timestamp(now()) - as_timestamp(states.sensor.uptime_174.state) >=
      60 }}

There may well be better/easier ways.

G
#1253 geoffreycoan

PianSom Thanks, there's always new things to learn in Home Assistant!

I was surprised by your states.sensor.uptime.state construct, have never seen this before, I would have used states('sensor.uptime') - which also works fine.
Doing a bit of research, seems the advice is to use states() to avoid errors when the entity isn't ready yet, maybe states.x.state is an older method ?
https://www.home-assistant.io/docs/configuration/templating/#states

Just spent over an hour getting HA to boot up. Whilst swapping the house supply (and Study ring main) over to the EPS on my inverter I took the opportunity to install a Windows upgrade and a Virtualbox upgrade. After powering up couldn't connect to HA, the homeassistant.local name just wasn't recognised.
Lots of f**ting about, HAOS was loading but I couldn't access it. Changed the VM config from Bridged Adapter to NAT and back again, tried several things but began to suspect the router was playing up as I couldn't access the inverters locally with the BBC app and couldn't administer the mesh wifi either.
Rebooted the mesh, rebooted the router and then HA sprung into life.

#1254 PianSom

geoffreycoan the advice is to use states() to avoid errors

Now you mention it, yes, that is absolutely correct. I guess I had a bit of old, rusty code hanging around that I re-used without engaging brain 🙂

geoffreycoan Rebooted the mesh

It's a huge pain, and the disruption is real, but going wired saves a LOT of pain for future you. Hiding cables is a real art form and finding someone willing to do a domestic job decently is very hard. It's one of the best things I ever did, though.

One of the jobs on my list is to move all my energy devices on to their own vlan (they're all on the IoT vlan atm, but they are too valuable to me to leave exposed in that way). Really the only thing stopping me doing it is that I'll have to set up an Energy vlan wifi for just one device - because there is no wired connection near the eddi. Sigh. Who'd've thought a hot water tank needed a network connection?

(Incidentally, today was the first day that I had an automation turn on the eddi, do a boost of the hot water and then turn off the eddi as a result of a Power-up. The automation trigger was Predbat's import rate falling to zero.)

R
#1255 Rbor

What good are low daytime rates when it is sunny?
Just got my Agile rates for tomorrow:

Aren't low daytime rates wasted on me when I really want to be exporting excess solar?
If clouds descend, it would be OK but predbat doesn't think so.
I have a GE 3.0 AC coupled inverter so I am limited on how much energy can go in.
Any charging of my battery will come first from solar, perhaps being topped up by the grid.
My logic says that I need low rates at night, not during the day in summer months.
Or should I be trying to use loads of electricity during these slots, especially 13:30 - 15:00 tomorrow?
.... Or is my logic flawed?

Rob

#1256 Hook

I was saying this to someone earlier this week, is the excess solar now making early afternoon price dips a reality?

Are Octopus obligated to follow wholesale prices on Agile?

S
#1257 SteveCook

Hook
I think I am coming to the conclusion that i need about 20KwHr of battery storage, so I do not ever need grid import in summer and can live on Eco7 off peak import in the winter months. Any excess I manage to sell at whatever price will just be a bonus

G
#1258 geoffreycoan

PianSom I think it was the router that was actually playing up not the mesh. I’ve been pretty happy with this Mercusys mesh network, I don’t get any issues with wifi dropping out when moving around the home and we get decent throughput on it. It’s far more reliable than the powerline extenders we used before that used to drop out every 6 weeks or so.
I don’t have a lot of stuff that’s hardwired. The HA PC is (to the router) and the Humax box is (to a mesh node), but the plethora of Shelly’s and MyLocalBytes smart plugs are all wifi. I could lay cables to wifi repeaters in different parts of the house as a commercial wifi would be, but TBH its a load of hassle and given the mesh works, I’m not inclined to do so. My inverters are gen 1’s so wifi only for them, and the ASHP is a future project to connect it up.

Rbor yes it’s awful, first world problems! I had a 2 hour Octopus Power up event today but only managed to import 0.7kWh, and some of that was recharging the batteries. Predbat started off ignoring the power up event, then nearer the time it decided it would discharge a bit beforehand and charge up again. You might find yours does the same.
I put the washing machine and tumble dryer on, but at times was still exporting. I’m trying to just leave predbat to do its thing and not worry too much about what it plans.

G
#1259 geoffreycoan

SteveCook I think I am coming to the conclusion that i need about 20KwHr of battery storage, so I do not ever need grid import in summer and can live on Eco7 off peak import in the winter months

It’s worth doing the maths of the benefits of upgrading battery storage, especially if you only really need it for part of the year. I’ve got a 5.2 and a 9.5 battery and have looked several times at adding another 9.5, but depending on what assumptions I make over how the battery is used, payback is between 6 and 22 years !

Economy 7 night time rates are circa 13p, day time 30p, so 17p saving https://www.moneysavingexpert.com/utilities/economy-7/.
Even with a 9.5 battery you are only saving ~ £1.60 a day (ignoring conversion losses), say 6 months use a year, that’s £292 saving. Will take 13 years to pay back the ~ £4k battery and installation cost 😡
Quite disillusioning really.

S
#1260 SteveCook

geoffreycoan
Thanks
Totally agree about payback but I need to do the math for whole year and see what it looks like.
I have a quote from my installer for £3k for 9.5bat plus £200 to commission

B
#1261 Boffinboy

geoffreycoan haha no problem, I have turned off the critical part now. I learnt something from it and am glad I have an automation that notifies!

On a different note, for some reason the GE app local connection to the inverter seems to have stopped. There was an issue with a new firmware for my Unifi APs that stopped a couple of IoT things connecting, but I removed that and it had been stable for months and I’ve not upgraded since. I can’t seem to access the web interface with the inverter IP either. Thankfully GivTCP seems to be working still after the HA reboots.

R
#1263 Rbor

geoffreycoan

yes it’s awful, first world problems! I had a 2 hour Octopus Power up event today but only managed to import 0.7kWh, and some of that was recharging the batteries. Predbat started off ignoring the power up event, then nearer the time it decided it would discharge a bit beforehand and charge up again. You might find yours does the same.
I put the washing machine and tumble dryer on, but at times was still exporting. I’m trying to just leave predbat to do its thing and not worry too much about what it plans.

The problem of living in a power up area!
I shouldn't really moan and part of the reason for low slots during afternoon is probably down to excess solar generation. It is a 'nice' problem to have,
I also just let predbat do its thing. Tomorrow, I will just use what electricity I can 13:30-15:00. I have a low mileage EV so will top it us.
On the plus side v7.22.2 of predbat looks pretty stable now that the web socket issues seem to have been resolved.

Rob

R
#1264 Rbor

Jase1703 Thanks for the link. An Interested site and I see what you mean for Fri/Sat night. Could we see a plunge on Agile?

Rob

W
#1265 Wavy Davy

anyone got a idea how I can get back into my HA?
was trying to sort out my config.yaml, checked with developer that HA would restart which it said it would, but now it won't. It is logged in to my router on the correct address, but no access.

R
#1266 Rbor

How are you running HA, an a computer or pi?
When my pi has played up, I switch it off and back on after a few minutes.

Also reboot router
See geoffreycoan message #1237 and his sorry tale which has similarities to your problem.

Rob

W
#1267 Wavy Davy

Thanks Rbor, Running it on a dell thin client. Have restarted both Dell and router, no luck.

W
#1268 Wavy Davy

also trying to ssh into it get connection refused.

K
#1269 KevinB

Wavy Davy Can you plugin a monitor? There may be errors on the console screen.

R
#1270 Rbor

Wavy Davy Worth checking to see if your HA IP address has been changed by router.
Router should show that HA is connected or not.

Rob

W
#1271 Wavy Davy

Router address unchanged and HA connected.

R
#1272 Rbor

Rbor Worth trying to access HA from another device. When I had issues, my computer wouldn't connect but I could from an iPad.

Rob

W
#1273 Wavy Davy

Tried that as well, no luck, I get This page isn't working [ip address} didn't send any data.
Also tried on my pc same as MacBook.

W
#1274 Wavy Davy

I think that HA and predbat is running because if I check on the givenergy app the battery is charging and then discharging as it was scheduled to do with predbat.
So I think something has changed to stop me acessing HA, possibly password or something else, but no idea what.

R
#1275 Rbor

Wavy Davy Can you ping the IP address successfully?
I have just tried my HA on my pi from my mac and I make contact OK.

Rob

W
#1276 Wavy Davy

Rbor yes it pings ok

G
#1277 geoffreycoan

Wavy Davy Running it on a dell thin client. Have restarted both Dell and router, no luck.

Is it running as a VM (e.g. under windows) on the thin client or running native? Either way as has been suggested, I would try plugging a monitor in so you can see what’s happening when it boots up, and whether that gives you a clue as to the problem. HAOS should boot with a command line that you can do basic commands on to check the integrity of the install, and there’s a ‘previous install’ as well that you can swap to - I saw when I was having problems yesterday that Slot A contained Supervisor 12.2 and Slot B version 12.1 so I think this is a recovery option but only if you can get to the console.

When you try to access, http://homeassistant.local:8123 or http://<ip address>:8123 what do you get? Could try with https as well if you’ve turned that on. There’s also http://homeassistant.local:4357 which gives a basic status of HA, worth seeing if that works.
Check the physical cable of HA to your router ?
I had problems yesterday with my router not working and recognising the HA IP, resolved by rebooting the router, but I see you have tried that.

It might be that doing a clean install of HAOS and restoring from a backup is your best route to recovery.

W
#1278 Wavy Davy

geoffreycoan I think it's running "native' in that its not running under windows.I have connected a monitor and now have the HA command line screen which looks ok.

Z
#1279 Zaz

If you can't move it close to a monitor could you try booting from a USB stick with Linux on and then login and mount the HAOS filesystems and check the logs?

W
#1280 Wavy Davy

using the http://homeassistant.local:8123 command I get failed to open page. same with http://<ip address>:8123.
http://homeassistant.local:4357 gives

Home Assistant observer

Supervisor: Connected
Supported: Supported
Healthy: Healthy

Router reports that its connected and has the correct ip address.

W
#1281 Wavy Davy

Looks to me like maybe a password error or something similar, which is stopping me from logging on.

W
#1282 Wavy Davy

Zaz I have it connected to a monitor, but i've no idea how to do that unfortunately

W
#1284 Wavy Davy

geoffreycoan I think its a restore then. Can this be done from the command line?

S
#1285 SteveCook

I have HA on my mobile with a remote connection via DuckDNS. This morning when I was out I tried a few times and could not connect. I gave it 30 mins and it then worked fine without me doing anything to it.
Never seen that behavior before and have no idea as I did not change anything beforehand or change anything to get it to work again

R
#1287 Rbor

When I had problems logging into HAOS (on pi4), I had just updated to
HA Core: 2024.5.5
HA Supervisor: 2024.05.1

I eventually got onto HA by logging on via iPad app.
And strangely, I could then also log onto HA through web browser on my iMac using IP address:8123.

You earlier said that you couldn't ssh in
I think you have to log in to an HA installation using root as user (with no password?). i.e. root@IP address
(But I may be wrong here.).

You may need to reinstall HA but password could be the problem.

Others on here are more knowledgable than me on this.

Rob

W
#1288 Wavy Davy

geoffreycoan I can get to the Home assistant command line screen. (for some reason cant post pic of it).

but the link refers to hassio command line.
I have a usb stick with the backup on but all the write-ups I've read are for a complete system restore from scratch which I was hoping to avoid.

W
#1289 Wavy Davy

Rbor I have managed to reset the password via ssh but still cant log in so its not a password problem.

W
#1290 Wavy Davy

there is a backups command on the Home assistant command line screen, but I cant seem to get the format correct.
Will have to have another look for how to do it.

R
#1291 Rbor

Is this what you see?

W
#1292 Wavy Davy

yes. I'm trying to do a restore using "backups restore Filename" but it keeps saying file does not exist.
If I try "ha backups list" it does list them but I cant scroll up the list to see the names.

#1293 Jase1703

Question relating to Saturdays negative pricing and car charging. Can you set the min price as a negative value. For example if I set the min price to -4p will it pick up slots that are greater than -4p ie in the -5’s and -6’s if you get my meaning?
I want the 5 lowest slots tomorrow

#1294 Jase1703

Jase1703 update. Minus 4p doesn’t work, the automation doesn’t recognise minus just reads it as 4p. I’m using the suggested PredBat car charging automation btw.

G
#1295 geoffreycoan

Wavy Davy I try "ha backups list" it does list them but I cant scroll up the list to see the names

Try videoing the list of backups on your phone when they scroll past, you can then pause and rewind the phone video.
Sounds like you are making progress 🤞

Jase1703 update. Minus 4p doesn’t work

I’m assuming you are using predbat led car charging and are trying to set input_number.predbat_car_charging_plan_max_price?
It should work with negative numbers or set to zero for all negative slots, I’m pretty sure this was raised as an issue before.

#1296 Jase1703

geoffreycoan yes trying to set minimum price in PredBat. I tried setting to 0p but that seemed not select any slots. If it’s not possible I’ll just plug in at 12:30 with the setting at 1p.

G
#1297 geoffreycoan

Jase1703 just looked in github and I remembered correctly, there was a bug related to negative pricing of car slots https://github.com/springfall2008/batpred/issues/918

The bug is closed following a code change in April. Trefor says that you can type in negative numbers, it’s just the dropdown doesn’t have them in the list. Anyway, have a look at this, and if there is still a bug can you raise it on github and reference this closed issue please?

W
#1298 Wavy Davy

geoffreycoan Thanks to all who helped.
"you can then pause and rewind the phone video.
Sounds like you are making progress 🤞"
I am, but i had to re-flash HA on to the ssd (which is a pain, as I have to dismantle the thin client, take the ssd out, re-flash the image, re assemble the thin client, re start and then restore a backup). But at least it's done, well it's restoring at the moment. So fingers crossed it works.

#1299 Jase1703

geoffreycoan done it now. Used the down arrows rather than typing in minus 4 on my iPad app. It has now picked up the highest magnitude negative slots tomorrow. Panic over, for a minute there I thought I might need to get off the sofa!

G
#1300 geoffreycoan

Jase1703 great, glad it’s working OK.

I’ve got so much forecasted solar tomorrow that predbat is planning on charging overnight in the cheaper period and then just holding the charge and exporting through the negative period. https://community.givenergy.cloud/d/3678-making-the-most-of-octopus-agile/170

Record solar generation for me today, best this year so far, 72.8kWh. And that’s despite the inverters repeatedly shutting themselves off due to high grid voltage. Will have to call the DNO out (again) to turn the tap down a bit.

I love the new label feature in Home Assistant, being able to set labels for entities like PV Power, SoC and Energy Today makes it so much easier to view common sets of entities

B
#1302 Boffinboy

Has anyone migrated from the original appdaemon based version to the newer add on? I am thinking about doing so next weekend, given that’s the direction of travel, but not entirely sure what’s required to ensure settings and configuration come over

R
#1303 Rbor

Boffinboy I am interested in Trevor's plans predbat development.
I upgraded to v7.22.5 yesterday without any issues. It looks like Trefor is intending to split the predbat code into smaller flies. There is limited info: [https://github.com/springfall2008/batpred/pulse]
Looking on Trefor's Facebook page, it looks as if he sees v7.22.5 as a stepping stone for the future.
Also look at info on the predbat add-on: [https://github.com/springfall2008]

For me, I am sticking on v7.22.x before taking the plunge. This looks like a substantial change and I do not want to take the risk. I can see v8 looming.

Of course, if you want to be the 'First night live on prebat' pioneer, tell me and others how it goes .....

Rob

Rob

G
#1304 geoffreycoan

Rbor The predbat discussion was (a few months ago) about moving predbat to a fully functioning Home Assistant integration https://github.com/springfall2008/batpred/discussions/326 but there doesn’t seem to have been much movement in that direction for a while. It was highlighted that there was quite a bit of technical complexity in doing so and the HA documentation wasn’t good, but others were helping with the dev and its never been said that it had been abandoned.

Having said that, I saw Trefor’s video on add-on’s and integrations recently and he mentioned the direction of the predbat add-on to overcome some of the limitations of appdaemon such as timeouts on loading history. This might explain why I often get warnings about gaps in my load history in predbat that it then has to fill. I don’t use the GivEnergy load sensor as I have two inverters and they share the load between them so neither gets the correct load figure and I have to calculate my house load using a template sensor that runs every 5 minutes. So in theory I should never ever get gaps in my history, and yet predbat frequently says I have - I’m guessing its appdaemon timeouts.

Having said that, apart from this niggle, appdaemon works fine for me and since I run another appdaemon job every 30 minutes I’m quite happy to continue with appdaemon and would prefer predbat moved to a HA integration. But that’s just me.

As for upgrading, I saw the release of 7.22.5 and decided not to upgrade. I had already upgraded to 7.22.4 and it’s working fine with no issues. My experience of big changes in predbat is that it often results in gremlins which Trefor is quick to fix, but I’m happy to not be the beta tester for them.

Had enough excitement with Solcast recently. Oh and somehow a recent predbat update zapped my apps.yaml file which took me a couple of hours to locate and restore from a HA backup. Top tip, copy apps.yaml to apps.yam (file name not important but mustn’t end in .yaml) to make it easier to recover in the future….

R
#1305 Rbor

geoffreycoan Trefor does have a band of brave trailers for his new predbat ideas. It is fair to say, that there have been quite a few gremlins. I like to keep abreast with what is going on but splitting predbat into smaller files and creating an appdaemon-free add on is a substantial change.
Trefor is amazing and I am sure that he will succeed but I will watch at this stage.

Rob

W
#1306 Wavy Davy

Rbor I feel the same. I'm working my way through some bits and pieces that are not quite working right, and having a new predbat wouldn't help just now.

R
#1307 Rbor

geoffreycoan good tip about adding a dummy apps.yaml file as a backup. That file is just a little bit important!

Rob

G
#1308 geoffreycoan

Wavy Davy Rbor I ended up upgrading predbat tonight, firstly to 7.22.5 and then to the release on main (which does indeed call itself 8.0.0). This was to fix a bug where the battery remains stuck with Pause Discharge on after a Hold Charge slot https://github.com/springfall2008/batpred/issues/1191

Both upgrades went flawlessly, no problems at all and predbat is running fine

R
#1309 Rbor

geoffreycoan Interesting.
I have looked at the comments in the link that you posted and Trefor seemed to have fixed the issue, although this involves splitting the predbat code (I think).

Showing my lack of knowledge, how could I upgrade to 'main'?
I have followed the link in the referenced issue to [https://github.com/springfall2008/batpred/tree/main/apps/predbat]

I am disappearing fast from my comfort zone, but all part of increasing my GitHub and HA nous.

And does moving to v8.0 still leave predbat in the hands of appdaemon?
I need to find out exactly what appdaemon does!

Yours naively

Rob

G
#1310 geoffreycoan

Rbor Trefor has fixed the bug reported in the latest code release, which is called main, effectively it’s a beta version of 8.0.0.
But he warns you have to move to 7.22.5 first as that does the work of splitting predbat into separate files, before upgrading to the main release. I guess if I upgraded straight to 8.0.0 (aka main) it wouldn’t work as that release expects predbat to be split up into different source code files, which upgrading to 7.22.5 does for you.
I would have thought that if there is a major architectural change then you should be able go to it and predbat works out that it needs to split itself up first, but I just followed Trefor’s instructions.

This is all still running under the appdaemon addon (or appdaemon-predbat). I am not using the new predbat add on.

appdaemon is just a pre-packaged run time for running python code. The predbat add on is very similar, it’s just an optimised environment for predbat rather than being generic.

To upgrade to any release just select the release you want from the select.predbat_update entity in Home Assistant and it will upgrade to the version you chose

I was just sharing that I had upgraded and experienced no issues. Unless you want to take this fix, I wouldn’t bother, and wait for Trefor to properly release v8 (and maybe for it to stabilise a bit!)

R
#1311 Rbor

geoffreycoan Thanks, as always.
I am on v7.22.5 so all set for v8.0 when it appears.
I am not experiencing the issues outlined in [https://github.com/springfall2008/batpred/issues/1191], so I intend to stick with v7.22.5 until Trefor releases v8.0.

But out of interest, in the link above, Trefor states:

If you want to try it out then please upgrade to v7.22.5 first, then update to 'main' afterwards (this is important).

But how would I update to 'main'? Where is 'main'?

Thanks

Rob

G
#1312 geoffreycoan

Rbor just choose main from select.predbat_update:

R
#1313 Rbor

geoffreycoan Thanks. Never noticed the 'main' label there before! I always just concentrated on the version numbers.
Another predbat/HA mystery solved. I thought main must be somewhere within the code on Github!

I will stick on v7.22.5 anyway for the moment. I think the original issue was with 'pause' and I don't think my GE AC coupled inverter has this option and there is no pause selector in my predbat.

Rob

G
#1314 geoffreycoan

Rbor I think the original issue was with 'pause' and I don't think my GE AC coupled inverter has this option and there is no pause selector in my predbat.

Battery pause mode is a feature of “new firmware” on the Gen 2, 3 and AIO. I didn’t have it in my Gen 1 hybrid until I was upgraded to the beta “fast firmware”. I don’t think the AC coupled inverters have the option, no as the firmware hasn’t been changed for a while. You could try turning the “old firmware” switch in givtcp off and see if the battery pause mode control appears, but I don’t think it exists.

R
#1315 Rbor

geoffreycoan Thanks, I thought as much. My GE AC inverter is on D0.535-A0.535 from mid 2022. My inverter is from autumn 2022 and could take more recent software.

I am generally happy with GE. The hardware seems to be reliable, although I do get some BMS over voltage notifications near to max and min SOCs, especially around 98% SOC at the end of a predbat refill from 4% SOC to 100% SOC. These are borderline and clear within a short time and I tend not to worry about them. I have phoned GE support several times in the past for other glitches and I usually get through quickly and speak to knowledgable staff. I have also had 2 unplanned calibrations thrust on me, the most recent being in mid-March 2024.

But GE do seem to have abandoned users of Gen 1 hardware with the main focus being on AIO. GE Knowledge base lists several updates to my software but none appear on the GE portal. They clearly do not operate at Trefor speed. I have asked about these but they told me that one might break things! I think they regard D0.535-A0.535 as the stable software for their Gen 1 AC coupled inverters. I am also on 3015 firmware for my batteries.
It would be good if GE could offer something for their Gen 1 users who are often pioneers in this game.

Unlike my Gen 1 AC coupled inverter, I will pause at this point.

Rob

W
#1316 Wavy Davy

Rbor I have Gen 1 inverter but I'm on D0.450-A0.451 updated 2023-11-23 20:39:23.
Is D0.535-A0.535 a improvement or is it not worth updating (not that I've had the option to do it)?

G
#1317 geoffreycoan

Wavy Davy I have Gen 1 inverter but I'm on D0.450-A0.451

I think you have a Gen 1 hybrid inverter which is what I have. 450/451 is the latest published inverter firmware for the Gen 1 hybrids. There is an “in test, coming soon” updated firmware which in beta is called 191/193; there’s a separate thread on this forum about this version but in short it adds ‘fast response’ functionality similar to the Gen 2’s and 3’s and battery pause features. It also suppresses the over voltage errors caused by BMS 3015. I have had this firmware on my inverters for a couple of months and it’s great, very stable.

@Rbor has an AC coupled Gen 1 inverter. I’m not familiar with the firmware versions for that inverter, but I agree, it does seem as if GivEnergy have abandoned further development of the AC coupled inverter in favour of the AIO and Gen 3 hybrids. I would have said the same about the Gen 1 hybrid, despite mine being only just over a year old, it wasn’t actively developed until this 191/193 firmware was offered.

R
#1318 Rbor

Wavy Davy Have a look at the Givenergy knowledge base: [https://kb.givenergy.cloud]
Burrow down to Firmware revisions.
Your firmware applies to a Gen 1 hybrid inverter, mine is AC coupled. Your software dates back to October 2021, even older than mine, Mine is May 2022.
According to the Knowledge Base, D0.450-A0.451 is also the most up-to-date software for your inverter!
So you have been abandoned for longer than me.
Others may know more information about the inverter software revisions and firmware for batteries.

Rob

S
#1319 SteveCook

I was getting BMS overvoltage warnings. I contacted GivEnergy support about 2 weeks ago. They obviously looked at what I have and replied. I am 3025 and D0.450-A0.451

"There is a new firmware coming out that will rectify this issue, we have been told its release will be very soon".

W
#1320 Wavy Davy

geoffreycoan Your right, I'd forgotten about the hybrid part. I have been getting over voltage errors every 2 or 3 days, so maybe that update will fix it.

V
#1321 Vestas

Wavy Davy When was the last time your battery went "flat" (4%) and remained that way for a couple of hours?

If its been a while then try doing that.

Let it discharge (just export it for convenience) so the battery power cuts off and leave it that way for at least two hours.

You'll probably find that the battery has a fair bit more power remaining than the SoC indicates. A couple of hours left without charge will allow some internal cell balancing which you'll see as an increase in SoC. Let that discharge to cutoff and at the end of a couple of hours the battery SoC will be fairly accurate. Charge to 100% at that point and that should get rid of overvoltages for a while.

B
#1322 Boffinboy

geoffreycoan goodness, it’s all so confusing! I thought the “app” version was an integration, but then I don’t really understand HA. I just use it for PredBat. The reason I was thinking about upgrading to that was so that I don’t get left in a situation where I am “forced” - though to be honest so long as it works I could stick with the appdaemon version even after support is stopped until there is a convenient moment to update

B
#1323 Boffinboy

Ps good tip about making a copy of apps.yaml

W
#1324 Wavy Davy

Vestas
thanks for that, but my batteries did a calibration cycle about 3 weeks ago, so should be ok.

V
#1325 Vestas

Wavy Davy That's PLENTY of time for the battery to lose the plot regarding SoC level. In fact IME about a week without a full discharge/idle is enough for the battery to be at least 10% off. YMMV of course....

W
#1326 Wavy Davy

Vestas What's the best way to do this and stop it charging?

#1327 PianSom

Very odd Predbat behaviour this morning.

I have a Power-up (free electricity) 12-2. The plan since yesterday had been to do a discharge from around 9.30 until 12 then a recharge. The dump duly started at 9.35.

But then at 9.50 the plan suddenly changed to a “Maintain SOC” at 100%, the export stopped and charge from solar started. Very odd.

V
#1328 Vestas

Wavy Davy Depends on your tarrif & PV setup really.

If the battery is at 50% or so then set export for 5 hours* which ought to be enough to discharge the battery to 4 or 5% and let the internal "calibration/balancing routines" run a couple of times. That ought to give you an accurate(ish) SoC. Obviously you can't have PV input during this time so best to do it once your PV stops generating.

Then run a charge cycle to 100% for 5 hours.

That ought to give you a fairly accurate SoC for at least a few days, which in turn should minimise overvoltage notifications.

*the times I've given here are based on a G1 inverter and 9.5kWh battery. Assuming 2.5kW charge and discharge rate (which is close enough) then the battery takes about 4.5 hours to charge from empty and takes about 4 hours to discharge from full. Adjust to suit your own inverter/battery specs - you want to give the battery a couple of hours idling on empty and each time it "finds" more charge the timed export will discharge until it cuts off again.

#1329 PianSom

PianSom But then at 9.50 the plan suddenly changed to a “Maintain SOC” at 100%, the export stopped and charge from solar started. Very odd.

Then at 10 it decided to dump. Then at 10.10 it decided not to dump.

The economics must be at an unstable decision point.

R
#1330 Rbor

Wavy Davy
Vestas I am on Agile and battery often spans the whole SOC range in a day from 4% to 100%. It is often on 100% for several hours and 4% for 1 or 2 hours. So Agile helps with cycling the battery.
I still get some BMS over voltage notifications that coincide with a full 4% - 100% cycle but only between 98-100%.
In my apps.yaml, I have my battery_charge_power_curve set at 0.24 from 98-100% SOC so slow charge. When I get the over voltage, I notice that the voltage can increase by 1 or 2 volts from 98-100%.
In Givtcp configuration, I have 'Self run' set at 30 s, a suggestion I have picked up from forums to prevent inverter from getting confused!
I had my last random calibration 3 months ago. Although I do get the BMS over voltages randomly, I do check them out, take note, and 'ignore' as it doesn't look as if the voltage is excessive. I have had GE support check out the health of my battery cells and they don't see any issue.
This is GE AC3.0 coupled inverter. Is this an inherent issue with Gen 1 inverters?

Rob

W
#1331 Wavy Davy

Mines a Gen 1 hybrid. I'm getting over voltages about every other day (5 so far this month).
Will do a calibration maybe tonight. Problem is rates not conducive to doing a full recharge when there's no solar for the next few days. Just checked and my self run was set at 20s. Have changed it to 30s to see how it goes.

V
#1332 Vestas

Rbor Is this an inherent issue with Gen 1 inverters?

It's a combination of BMS firmware v3015 and Gen1 inverters on "old firmware".

Edit - and yes predbat does seem to help some users in terms of cycling the battery. Bottom line is that if the SoC isn't right then neither is the charging/discharging behaviour; less accurate the SoC is then the more overvoltages (with v3015) you'll get. v3013 went the other way - undervolting, or discharging the battery well below 4%....

Edit2 - I'd expect you to get less problems with an AC coupled inverter as PV input is the cause of most of the overvoltage threads you see on here, seems like when you add PV to the mix then the SoC drifts a LOT faster.

R
#1333 Rbor

Vestas Yes, I have a large PV array but I can't see what else I can do here really.
I am on v3015 of firmware.
My inverter software is from 2022: D0.535-A0.535.
On the portal, I don't get an option to upgrade.
In givtcp configuration, I have to set the switch to 'old firmware'. It won't run with 'new firmware'.
There are more recent revisions but GE suggested that they might cause issues. I was probably better off staying on D0.535-A0.535 as that is 'stable'.
I have commented before that GE seem to have largely abandoned Gen 1.

Rob

W
#1334 Wavy Davy

Would I also need to change predbat's "best SOC keep"value. at the moment its set to 1.5. seem to think default is 0.95 but may be wrong about that.

V
#1336 Vestas

Rbor Yes but you have an AC3, not a hybrid, therefore its all "AC charge" as far as the inverter/BMS is concerned.

That (I reckon) makes it somewhat easier for the inverter to track the SoC as you only have one set of losses to deal with - AC to DC when charging.

Hybrids have different losses depending on whether its AC or DC (PV) charge as its different voltage multiplier/rectifier circuits for each. I suspect this is one of the areas which cause the SoC to become inaccurate in a shorter time frame, especially when you combine AC and DC charge at the same time. I may well be wrong 🙂

Gen1 is EOL so its pretty much on security updates only. Edit - that's probably what support have been briefed to say, things may change but I wouldn't bank on it.

Its unfortunate that a lot of us ended up with G1 kit installed in 2023 but that's mainly due to supply issues from the last covid-19 lockdown China had. It is what it is, our installer specced the G2 in the quote and dropped the final price because they couldn't get a G2 in time.

Well off-topic, apologies to the predbat people 🙂

G
#1337 geoffreycoan

PianSom For my power up event today predbat was planning on letting the battery discharge overnight (no charging at all due to high Agile rates), then recharge on solar this morning. The prediction would be that I’d be at 100% by 11:00 and predbat was going to just hold it there through the power up period.

Then at about 9:40am I was surprised to receive an alert saying that predbat had started discharging, I looked at the plan and it was now to discharge as much as it could and then recharge for free. This is what it then executed, it didn’t flip flop my plan like yours did. I assumed as you did that the profit must have been marginal either way.
We had the washing, hot tub, etc on so imported 8.3kWh in the period. Batteries are still filling up from solar.

Wavy Davy Rbor the best_soc_keep and best_soc_min work as follows:

best_soc_min is the minimum soc that predbat will keep in the battery. Unless you really want to keep something back (eg for EPS) then its best to set this to zero as if you set it higher and your battery falls below it then predbat will start charging regardless of the rate.

best_soc_keep is what’s termed a ‘soft’ minimum level. Think of it as being the minimum charge level that predbat wants to keep in the battery, but if it has to let the house use it, then it will.

I have mine set to 0 and 0.5 respectively. Basically aiming to use as much as the battery as possible.

W
#1338 Wavy Davy

OK, sorry to be a pain, but planning on doing the charge/discharge tonight.
If I set a timed discharge and timed charge using some HA automations I have, will predbat override them or should I set predbat mode to monitor. It will discharge at 18:00 to 23:30 and timed charge 23:00 to 04:00 so I want it to resume normal operation after that. Although even if it doesn't restart normal predbat running, with 100% charge it will easily see me through to 06:00 when solar starts.
With 7.5kWh of battery I think these times will be enough.

#1339 PianSom

geoffreycoan We had the washing, hot tub, etc on so imported 8.3kWh in the period.

You prompted me to check - 9.3kWh! Laundry day, got the eddi boosting and even put on the air-to-air to heat up the house on such a cold day.

Interestingly, my battery got down to 21% with all the shilly-shallying BUT was back up at 97% by 2pm. No need for any material solar charging. So maybe Predbat knew what it was doing after all?

R
#1340 Rbor

geoffreycoan Thanks.

best_soc_min is the minimum soc that predbat will keep in the battery. Unless you really want to keep something back (eg for EPS) then its best to set this to zero as if you set it higher and your battery falls below it then predbat will start charging regardless of the rate.

best_soc_keep is what’s termed a ‘soft’ minimum level. Think of it as being the minimum charge level that predbat wants to keep in the battery, but if it has to let the house use it, then it will.

I have mine set to 0 and 0.5 respectively. Basically aiming to use as much as the battery as possible.

For me, these 2 settings were also 0 and 0.5.
But when checking, I have discovered (and it isn't the first time) that predbat had decided to switch all my settings back to default. Perhaps this happened when I upgraded to v7.22.5 in preparation for Predbat's forthcoming split that Trefor has in mind.
I have been trying to get my settings back, firstly to get Expert mode and HTML debug switched on, hybrid inverter switched off and my battery cycle set back to 0 from 0.5. I think I have got there and I wonder how long things have been this way.

Rob

W
#1341 Wavy Davy

Rbor Rob, Just checked my settings and they haven't reset on update to 7.22.5 so I think you must have reset them accidentally or something.

G
#1342 geoffreycoan

Wavy Davy sorry to be a pain, but planning on doing the charge/discharge tonight.
If I set a timed discharge and timed charge using some HA automations I have, will predbat override them or should I set predbat mode to monitor.

If you have your own automations and leave Predbat running then yes, Predbat will realise that the inverter isn’t doing what the Predbat plan says it should, and will revert the inverter back to what the plan says.

One option is to instruct Predbat through using the select.predbat_manual_* controls the charge and discharge activity you want to do, so that way predbat will control the inverter activity not your automations.

Alternatively if you want to use your automations then you either need to set Predbat to read-only (switch.predbat_set_read_only) or set it to Monitor mode. Personally I use the read only switch but either will do.

W
#1343 Wavy Davy

geoffreycoan thanks, just found the force discharge/charge settings so will use those instead.

M
#1344 michaelhoskins

Hello. Wow this is a mammoth thread and I haven't read it all!

Managed to get predbat installed. Got a 9.5kwH battery, gen 2 5kw inverter and giv ev charger.

I'm on Eon Drive with 6.9p import over night and 16.5p export all the time. Seems like a no brainer to use something to try to maximise that difference.

No real question other than any top tips to someone who mostly understands the concepts but am no way confident in HA or Yaml. I watched Trefor's videos and figured I'd just give it a go and leave it for a few days and see what happens!

Actually. One question - we charge the car maybe once or twice a week overnight (probably 25-30kwH a time). What's the best way to deal with this?

Thanks.

G
#1345 geoffreycoan

michaelhoskins No real question other than any top tips to someone who mostly understands the concepts but am no way confident in HA or Yaml. I watched Trefor's videos and figured I'd just give it a go and leave it for a few days and see what happens!

Actually. One question - we charge the car maybe once or twice a week overnight (probably 25-30kwH a time). What's the best way to deal with this?

Welcome to the thread and predbat. We’ll all try to help you, do read the predbat documentation, there’s a lot in there to try to guide you through.

You will have to manually set your tariffs up for Eon Drive in the apps.yaml file, details in the ‘energy rates’ document. Should be straight forward though.

In terms of your car, if it’s not regular car charging you might just be easier doing the charging manually and not bothering with predbat automation. I suggest that you choose a decent number of days of history that predbat will average over, that way the days you charge vs the days you don’t won’t distort the predictions too much.

Do start off in Monitor mode to get the hang of the process, the plan, how to control predbat, etc.

M
#1346 michaelhoskins

Thanks. I've got the rates in thanks. (Well, the plan shows the right rates). I have it in read only mode at the moment rather than monitor. Is there any difference?

I left the history as default. Which I think was 7 days. Do you think this means leave it at least a week in read only / monitor so it can have enough data?

Thanks again.

G
#1347 geoffreycoan

michaelhoskins Monitor mode just monitors what the current battery charge/discharge is set up to do, so if you haven’t created say any overnight charging then it’ll be a very boring Eco plan of charging in the sun and discharging from your battery at night.

If you set Charge and Discharge mode but turn read only on then Predbat will plan the optimal activity using your battery and the tariffs you have setup, but it won’t actually make any changes. Read only is a better approach whilst you learn what Predbat does.

You don’t need a full week of history for the predbat plan, but the more history you have the more accurate the plan will be based on your historical load - which all depends on what you do in your family on a day to day basis. TBH with a simple overnight charging plan the accuracy won’t make a lot of difference, if its cheaper to charge overnight than to export, predbat should do just that regardless of what your house load is.

M
#1348 michaelhoskins

Great. That's what I'm seeing in the plan. A bit of discharge before midnight, then cycling charge and discharge during the night (but keeping relatively topped up until the cheap slot ends).

Hoping I won't need much tinkering...

Thanks

D
#1349 DD

michaelhoskins Actually. One question - we charge the car maybe once or twice a week overnight (probably 25-30kwH a time). What's the best way to deal with this?

(I don't use predbat, but do follow this with interest. Might consider predbat if/when it's split out of HA.)

The thing you want to avoid is having predbat exporting to the grid while the car is charging. I believe predbat can and will run charge/discharge cycles during the cheap rate if it believes it has time to do so and still charge battery sufficiently (since it's profitable to do so.)

You could almost certainly bodge it by telling predbat that overnight export rate is 1p, so inhibit that completlely. But if you do want to be able to profit from overnight exports, make it smarter by integrating a car charging sensor or something.

M
#1350 michaelhoskins

DD

Thanks. It's a Givenergy charger so presumably there's a way to tell it that when the car is plugged in (which the charger knows), not to try to export at night. I'm yet to get to the car charging bits on the predbat documentation.

G
#1351 geoffreycoan

michaelhoskins There’s two ways of fully managing car charging in predbat, either Intelligent Octopus Go which means Octopus directs the charging based on low price periods, or Predbat-led.

So for you it’s the latter. You setup in predbat what the target charge level for your car is, when you want it filled by, and predbat will select the cheapest slots and indicate when the car charging should start, and ensure the battery charges at the same time so your battery can’t discharge into the car at the same time as DD highlights.
This requires you to setup automations to start your car charging based on when predbat says it is needed. It’s not fully automated even with the GivEnergy charger (separate threads on this forum about other people’s experiences with the GE EV charger ….)

Predbat can detect that the car is plugged in (there’s config to do this in apps.yaml) as long as your car charger can report that to Home Assistant.

If you only charge your EV every few days it might be just as easy to start off not trying to integrate everything at the beginning. Control the car charging standalone using the GivEnergy app, and for the time slots you plan car charging in, manually set predbat to force charge the battery at the same time. That will achieve the same result but mean one less thing to get working !

M
#1352 michaelhoskins

geoffreycoan

Thanks. Good advice. I think I'll just do it normally for a while and then try to integrate.

Would an option be to put predbat into read only mode for a night when the car is plugged in (rather than trying to set predbat to manually charge when the car is charging)?

G
#1353 geoffreycoan

michaelhoskins Would an option be to put predbat into read only mode for a night when the car is plugged in (rather than trying to set predbat to manually charge when the car is charging)?

Yes you could certainly put predbat into read only mode, the issue with that is that when you turn read only on, Predbat stops any active charging or discharging that is going on at that moment and puts the battery into Eco mode.
With the battery in Eco mode there is a risk that your inverters will see the EV charging load as being house load and discharge your home battery into the car, which is probably not what you want.

It depends how your EV charger and the inverter have been wired up though, specifically whether the EV charger and its CT clamp is before the inverter and its CT clamp. Its possible to wire up theses so that the inverter doesn't know about the car charging and so this isn't an issue. Might be something to ask your installer or do a test yourself of charging the EV and see what the battery does.

D
#1354 DD

michaelhoskins we charge the car maybe once or twice a week overnight (probably 25-30kwH a time). What's the best way to deal with this?

That's presumably something like 3-4 hours. Do you have an option to charge it, say, 4 nights a week for 10kWh at a time? Which would probably be around 90 minutes?

What I'm thinking is perhaps you could bodge predbat settings to have lower import and export prices during the time you charge the car. Just a small perturbation may be enough to encourage it to make battery charging coincide with car charging, and discourage export then.

Could maybe even split the car charging, so that predbat has an opportunity to discharge in the gap.

Or if you charge the car at the end of the cheap window, predbat may be naturally charging then anyway. (Assuming predbat tends to charge then discharge then charge.)

D
#1355 DD

michaelhoskins Managed to get predbat installed. Got a 9.5kwH battery, gen 2 5kw inverter and giv ev charger.

I'm on Eon Drive with 6.9p import over night and 16.5p export all the time. Seems like a no brainer to use something to try to maximise that difference.

Actually, I'm going to come back on that no-brainer thing... I'm on IOG tariff, which is similar (possibly slightly inferior). And similar sort of kit. And don't feel the need to use predbat. (But then, I am able to write my own scripts to manage things.)

With fixed times, you don't really need dynamic prediction. Unless your daytime usage fluctuates enormously, perhaps. You don't really even need solar forecasting, since your best strategy is really to export all solar directly, without having it go through the battery.

What I currently do is charge up to about 70% overnight (could go higher), the export down to 30% in the morning. (Possibly could run a discharge/cycle overnight, but choose not to.) Then pause battery charging all day so that whatever solar excess I get is exported. (I don't need to worry about trying to forecast it.) Then in the evening, discharge down to empty. I don't really see how predbat could do better given that rates are fixed and usage is very predictable. It could charge more aggressively overnight, but I could just as easily configure that statically.

You don't say how much solar you have. My 6.4kWhp solar can exceed max AC output of inverter, so I take steps to avoid clipping by dynamically adjusting charging rate. I don't think this is something predbat can do? That took a little while to develop, but is all pretty stable now, and requires no intervention.

B
#1356 browellm

DD IOG isn't predictable as it may schedule off-peak charges outside of the fixed window, where you risk draining home batteries that are configured to discharge on a fixed schedule. This is assuming you are using the tariff correctly and not forcing car charging into the fixed off-peak window, which is against the tariff ToS anyway.

D
#1357 DD

browellm

browellm IOG isn't predictable as it may schedule off-peak charges outside of the fixed window

Yes, well aware of that. (One reason why eon is possibly superior. But then I choose not to exploit the additional cheap slots.)

I do allow octopus full control over the charging. It often charges as late as 0730 during the week, and even beyond 1000 at the weekend. I do account for this, but didn't mention it in my earlier reply since it's not something they'd have to worry about on eon.

(My panels are SW facing, so solar hasn't fully kicked in before 11.)

(I've just got my kraken script to interrogate the schedule working, but haven't fully integrated that into my scheduling schemes. That's probably the next bit to do. Morning discharge is currently a bit ad-hoc.)

G
#1358 geoffreycoan

DD I don't really see how predbat could do better given that rates are fixed and usage is very predictable.

It’s horses for courses of course. I started off with writing my own Home Assistant scripts to manage my batteries to best use Flux before looking around for alternative automation solutions (watched the Speak to the Geek video on solar forecasting), selected Predbat even though S2TG said it was a big learning curve, and been very happy with it ever since.

Predbat is certainly not perfect, it doesn’t account properly for my different inverter battery sizes, and very occasionally it throws in weird behaviour, but 99% of the time it optimises the battery more effectively than I could do myself so I’m happy to let it do its thing and I just keep an eye on what its doing.

Agree that with the differential between overnight import and day-time export on IOG, it doesn’t necessarily need such sophisticated management. Horses for courses.

J
#1359 Josephiah

DD My 6.4kWhp solar can exceed max AC output of inverter, so I take steps to avoid clipping by dynamically adjusting charging rate. I don't think this is something predbat can do? That took a little while to develop, but is all pretty stable now, and requires no intervention.

I'd be interested to hear how you went about that. I thought about it a while back, and didn't do anything about it, but today (sunny Highlands!) has been a perfect example of the generation chart getting brutally flat-topped. I did think about an approach using an automation to adjust the Best SOC Max parameter to limit pre-charging, which might help in the shoulder months, but wouldn't really help on days like today where the battery is filled from a standing start by 10am. I guess we need to tell Predbat to favour exporting until the last possible opportunity to top off the battery. (In fact, I had a succession of several days, a few versions ago, where it actually looked like it was doing this, and I assumed such a feature had been added, but sadly not!)

It seems to me that (for someone who knows what they are doing within Predbat's code) it shouldn't be too difficult an addition to add a rate limiter to the PV generation rate based on the battery SoC. (And then perhaps I'd need to adjust my Solcast setup to the full 6.5kW that my panels are capable of, rather than the 5kW inverter limit...? But maybe that's a separate issue...)

G
#1360 geoffreycoan

Josephiah There are a few bugs/feature requests on predbat to better deal with predicted clipping
https://github.com/springfall2008/batpred/issues/1206
https://github.com/springfall2008/batpred/issues/1152
and much older https://github.com/springfall2008/batpred/issues/886

So its on Trefor's radar. Alongwith lots of other things of course!

And Trefor welcomes others making improvements if they want to. I keep plugging away at the documentation but have made a few code changes as well which he has incorporated

D
#1361 DD

Josephiah I'd be interested to hear how you went about that. I thought about it a while back, and didn't do anything about it, but today (sunny Highlands!) has been a perfect example of the generation chart getting brutally flat-topped.

I've talked about it a little in https://community.givenergy.cloud/d/3960-does-grid-first-work-on-latest-gen-3-hybrid-firmware and I'll add some more details there - it's off-topic for this since it doesn't use predbat. And possibly not compatible since it keeps careful eye on AC generation, and adjusts max battery charging power if AC generation gets close to the 5kW max. ie it's responsive rather than predictive.

There was definitely a project to try to add clipping avoidance to predbat. @geoffreycoan pointed me at it, and might remember. Otherwise I'll try to dig out a reference. (I may have bookmarked it in github.)
ah - it's linked from 2nd-last post in that other thread.

G
#1362 geoffreycoan

DD There was definitely a project to try to add clipping avoidance to predbat. @geoffreycoan pointed me at it, and might remember. Otherwise I'll try to dig out a reference. (I may have bookmarked it in github.)
ah - it's linked from 2nd-last post in that other thread.

I just found it, it was pvcalc.py written by Ian Harris (slopemad) on Github and shared on https://github.com/springfall2008/batpred/issues/886
It seems to have gone into abeyance. I'll kick the tyres

J
#1363 Josephiah

geoffreycoan
DD
Thanks, I will have a peruse...

W
#1364 Wavy Davy

Anyone taken the plunge and done the latest update?
I've decided to take a watching brief for the time being, although if it just splits the files and is doesn't separate predbat from appdaemon it should be relatively trouble free.

G
#1365 geoffreycoan

Wavy Davy Anyone taken the plunge and done the latest update?

Yes I'm running v8.0.0. Its all working fine (unlike my inverters). I had already upgraded to a beta of v8 to try out a fix that Trefor had introduced.

Upgrade to 7.22.5 first which splits the predbat.py into separate files, then v8.0.0. I'm finding it a bit of a pain when I want to look at the source code as I now don't know where they are in the different files, but guess I will get used to it.

I've been working on the documentation tonight again. Trefor now has 3 different installation methods, the predbat add-on which he is promoting as the preferred, the AppDaemon-predbat or the 'classic' AppDaemon + predbat which is what I'm still using. This does make it a bit clunky in the docs as apps.yaml, the predbat dashboard and the predbat logfile can now be in one of 3 different places depending upon which install method was followed. In all the predbat code is the same. I suspect the AppDaemon-predbat install will get killed off first as the predbat add-on supersedes it.

B
#1366 browellm

Are there any parameters I can tweak to make predbat discharge a little more aggressively (start earlier) before the off-peak import phase? I regularly have about 1kW "spare" that could be discharged.
I have these set to zero

G
#1367 geoffreycoan

browellm you could try best soc keep set to 0.5 which is what I have, and mine uses the full battery range.
Have you configured a battery charge and discharge curve in apps.yaml?
Set reserve min is that set to the default 4%?

There will always be 4% that you can’t discharge, which depending on your battery will be accounting for some of this unused. My 9.5 its about 0.5kW for example, on an AIO it’ll be higher

R
#1368 Rbor

Wavy Davy I am also going to watch how this goes.
At some stage, I guess we will all upgrade to the free-standing predbat add-on.

geoffreycoan Before I upgrade, I am also to wait until your excellent documentation is available.
I will probably upgrade to v8.00 from v7.22.5 in the next few days.
Going to the freestanding predbat add on looks to be more complex.

Good to finally see some low Agile rates tonight, which I am making the best of.

Rob

B
#1369 browellm

geoffreycoan you could try best soc keep set to 0.5 which is what I have, and mine uses the full battery range.
I will give that a try thanks

geoffreycoan Have you configured a battery charge and discharge curve in apps.yaml?
I haven't because my observation has been my early gen1 hybrid inverter seems to have a flat charge curve regardless of SoC. However if you think it would encourage a deeper discharge I could configure it.

geoffreycoan Set reserve min is that set to the default 4%?

There will always be 4% that you can’t discharge, which depending on your battery will be accounting for some of this unused.
Yes that's set to 4%, and I'm accounting for that in my calc. On IOG, predbat discharges to around 16% (12% usable) of my gen1 8.2kWh (6.5kWh usuable), so probably around 800Wh still in the tank.

G
#1370 geoffreycoan

browellm I haven't because my observation has been my early gen1 hybrid inverter seems to have a flat charge curve regardless of SoC. However if you think it would encourage a deeper discharge I could configure it.

I’m not sure it will necessarily produce a deeper discharge but it will ensure that predbat has a more accurate idea of the charge and discharge activity that happens on the inverter.
You can just set the charge and discharge curve to auto in apps.yaml as long as you have the required sensors configured - https://springfall2008.github.io/batpred/apps-yaml/#battery-chargedischarge-curves

And then maybe share your predbat plan showing the period up to and through the IOG overnight period. It should be trying to use the whole battery if that’s the most profitable

B
#1371 Boffinboy

Wavy Davy moved this AM. So far so good.

Agree with Geoffrey that will be much simpler once moving to the app version. I am still on the original install method

S
#1372 SteveCook

Rbor
Just upgraded to v8.00 and a HA core update and then 2 HACS updates.
All running but no PV data
I think all the HA restarts have taken all my Solcast Polls for the day and so Predbat not showing any PV data.
I guess I will have to wait 24 hours now for it all to be running again

M
#1373 michaelhoskins

DD

It's a fair point and perhaps it isn't a no brainer really. I don't think I can do my own scripts and kind of like to see a plan.

My array is about 5.1kwp - all west facing.

I'm going to turn off read only today. Figured I'd give it a week (doubt I'll need to charge the car) and see what happens.

Thanks for all the tips.

M
#1374 michaelhoskins

Boffinboy

I recently installed the standalone version. Not through AppDaemon. Does the update make nay difference to me?

G
#1375 geoffreycoan

michaelhoskins I recently installed the standalone version. Not through AppDaemon. Does the update make nay difference to me?

The predbat code in all the different installation methods is the same. What’s different between the 3 is the ‘container’ that Predbat runs in.

So yes, even if on the predbat add on you’ll need to upgrade first, to 7.5.22 and then to 8.0.0. Its quite easy to update using the control select.predbat_update where you simply select the version you want to upgrade to and its all automatic after that

R
#1376 Rbor

geoffreycoan I have taken the plunge from v7.22.5 to v8.00.
Went smoothly without predbat missing a beat.
I have looked at the file structure and it looks as if I have a lot more files, all introduced today (16th June).
I wish I had taken a screenshot before the upgrade.
I will see how v8.00 runs before making the big transition to an appdaemonless predbat.

Geoffrey, can you alert us all when you have made the updated documentation available for us to see?
I do realise though that Rome wasn't built in a day and it sounds as if the updated info is a substantial task.

SteveCook After my upgrade to v8.00, all my PV info is still there. But I was already running on pretty recent HA updates.

Rob

S
#1377 SteveCook

Rbor
Rob
Thanks
I have restarted everything a couple of times but still no pv data.
I have logged into Solcast website and have only used 2 calls, so I am not sure what is going on.
Fathers Day today and 007 on the box in a min, so not really bothered today

#1378 PianSom

Another trouble-free v8.0 upgrade here

S
#1379 SteveCook

SteveCook
Couple of complete restarts and all running and PV data now present

R
#1380 Rbor

SteveCook That’s great. At this rate, folk will start thinking that they are missing out if not on v8.00.
Now, who will now take the big plunge to standalone predbat add-on?
Clue: not me.

Rob

P
#1381 Paul H

No PV data for me either on V8.0 despite the log saying there should be.

2024-06-16 14:20:05.437995 INFO pred_bat: Solcast API limit 10 used 1
2024-06-16 14:20:05.443360 INFO pred_bat: Return cached data for https://api.solcast.com.au//rooftop_sites age 390.0 minutes
2024-06-16 14:20:05.448243 INFO pred_bat: Fetch data for resource id
2024-06-16 14:20:05.459826 INFO pred_bat: Return cached data for https://api.solcast.com.au//rooftop_sites//forecasts age 380.0 minutes
2024-06-16 14:20:05.543502 INFO pred_bat: Solcast returned 352 data points
2024-06-16 14:20:05.572452 INFO pred_bat: PV Forecast for today is 25.56 (6.44 10% 38.16 90%) kWh and left today is 11.77 (1.99 10% 17.71 90%) kWh
2024-06-16 14:20:05.622195 INFO pred_bat: PV Forecast for day tomorrow is 25.12 (5.3 10% 38.5 90%) kWh
2024-06-16 14:20:05.666643 INFO pred_bat: PV Forecast for day d2 is 22.95 (3.35 10% 39.05 90%) kWh
2024-06-16 14:20:05.715651 INFO pred_bat: PV Forecast for day d3 is 29.09 (7.55 10% 37.95 90%) kWh
2024-06-16 14:20:05.764829 INFO pred_bat: PV Forecast for day d4 is 25.71 (6.31 10% 37.07 90%) kWh
2024-06-16 14:20:05.810436 INFO pred_bat: PV Forecast for day d5 is 14.84 (0.99 10% 37.83 90%) kWh
2024-06-16 14:20:05.859595 INFO pred_bat: PV Forecast for day d6 is 24.24 (3.61 10% 37.73 90%) kWh

S
#1382 SteveCook

Paul H
Took me a couple of full HA restarts for it all to start populating even though everything was saying it was all there

R
#1383 Rbor

Paul H
Paul, How are you accessing Solcast, via predbat or via home assistant via an integration?
I am accessing solcast directly via predbat and did not experienced an issue with PV on upgrading to v8.00.
See https://springfall2008.github.io/batpred/install/#solcast-install
But also see suggestion from SteveCook above about HA restarts.

Rob

P
#1384 Paul H

The small bump in my graph came from a re-start, but that's it, it's a flat line off into the future.
HA has been fully re-started 3 times now.
I configured predbat to fetch the Solcast data, all was good until v8.0 installed

R
#1385 Rbor

Paul H Does pv show up in your predbat plan?

Rob

G
#1386 geoffreycoan

Paul H No PV data for me either on V8.0 despite the log saying there should be.

2024-06-16 14:20:05.437995 INFO pred_bat: Solcast API limit 10 used 1
2024-06-16 14:20:05.443360 INFO pred_bat: Return cached data for https://api.solcast.com.au//rooftop_sites age 390.0 minutes

I notice both of the Solcast websites have an extra ‘/‘ between the solcast domain name and the pathname. Check the apps.yaml in case it has the domain name slightly wrong?

BTW I’ve been involved in some improvements to the Solcast integration over the last few days. It now seamlessly handles 429 errors from Solcast when the site is too busy, pausing and re-downloading again.

I’m still using the Solcast integration as I can see the forecast energy in the energy dashboard that I like to retain

P
#1387 Paul H

The plan shows PV data so I think it's just the energy dashboard that's got an issue.

The double slashes are because I removed some data before posting it, the URLs are correct.

I've installed the alternate Solcast integration now and edited the energy dashboard, I'm waiting for the data to pull through.

R
#1388 Rbor

Paul H That's good news in that your predbat plan will still work with PV.

Rob

J
#1389 Josephiah

Hi @geoffreycoan, @DD (and anyone else who wants to chip in),

I've had a bit of a read through the various discussion threads on clipping, but something I wanted to double-check first: I wonder if you can help clarify the Predbat inverter settings - I thought I had this all sorted, and it's been working more or less fine as far as I can tell, but a few of the forum posts, along with the documentation (which has been updated a lot since I first installed) are adding some doubt/ambiguity.

My setup:
6.56kWp PV array
9.5kWh battery
5kW Hybrid Inverter Gen3, capable of [nominal values] ([max reported values]):

  • Max DC input: 7.5kW (7847W)
  • Max battery charge rate: 3.3kW (3492W)
  • Max battery discharge rate: 3.6kW (4018W)
  • Max grid export rate: 5.0kW (4910W)
  • Clipping level (i.e. max input when battery is full) 5.0kW (5280W)

So, I'm looking for clarification on how these should map onto both the Predbat inverter settings in apps.yaml [nominal values following documentation]:

  • inverter_limit: 5000W
  • inverter_limit_charge: 3300W
  • inverter_limit_discharge: 3600W (is this new? Is in documentation, but not in my apps.yaml - have added it now...)
  • export_limit: 5000W

And the Solcast dashboard:

  • Capacity AC in kW: 5
  • Capacity DC (modules) in kW: 6.56

So:

  1. Does that all look correct to you?
  2. It seems to me that that key issue here is that the 5000W inverter limit is not an accurate representation of the real system. If we want Predbat to help reduce clipping, doesn't this simply reduce to adding a mechanism to taper down the upper limit from the upper 7500W DC limit (which may also be required as an input) to the 5000W inverter limit depending on the battery SoC? Couldn't this be implemented as a lookup table in exactly the same way as the battery charge rate curve (or even just a switch that triggers at the 5000W threshold)? With that implemented, I would just about expect the Predbat model pretty much sort itself out, as max yield ought to occur by waiting until the last forecast chance to get the battery filled up (i.e. by the 4pm price jump for Agile users).
  3. In this case, should the Solcast entries (AC capacity especially) be set higher, rather than applying the 5kW limit there?

I'm sure there could be very good reasons why this is not possible, or more complex than I'm making out, but intuitively it seems to me that this shouldn't be that difficult a nut to crack...

Look forward to hearing your thoughts...

G
#1390 geoffreycoan

Paul H The small bump in my graph came from a re-start, but that's it, it's a flat line off into the future.
HA has been fully re-started 3 times now.

Paul H I've installed the alternate Solcast integration now and edited the energy dashboard, I'm waiting for the data to pull through.

Slightly confused about where you say you are “not seeing PV forecast from Solcast”. In the screenshot below it’s showing the energy dashboard and the solar forecast within that. The solar forecast in the energy dashboard is ONLY fed by a Solar integration - Solcast or the Solar.forecast (I think) within HA. When predbat pulls down solar forecast information from Solcast it does not feed through to the energy dashboard, only to the Predbat plan.
It’s for this reason I have remained on the Solcast integration. Have put a feature request in for Predbat to feed the Energy dashboard but it’s not clear how this works.

I thought your issue was with no PV data within the Predbat plan from the Predbat sourced Solcast pull. If that’s the problem can you share the Predbat plan? From the logfile earlier it looks like Predbat was getting the solar data OK.

Rbor Geoffrey, can you alert us all when you have made the updated documentation available for us to see?
I do realise though that Rome wasn't built in a day and it sounds as if the updated info is a substantial task.

You can look at my fork of the predbat docs here https://github.com/gcoan/batpred/tree/main/docs
The main changes are to ensuring that the install, apps.yaml, logfile and predbat dashboard instructions all refer explicitly to the right paths depending on which installation method. Especially the new predbat add-on method.

Then changes to apps.yaml to cover multiple Solcast API keys and much more detail in the Output data for how to create a default predbat dashboard (using predbat_dashboard.yaml). To-do is expanding the instructions for the collapsable dashboard.
Its only if you are moving to the Predbat add-on or are a new predbat user are these changes really significant.

G
#1391 geoffreycoan

Josephiah answering your questions:

  1. Yes this looks correct
  2. Unfortunately at present predbat models inverter clipping (solar generation in excess of inverter throughput) it doesn’t at present have the sophistication to deal with max DC throughput vs max AC output, and neither does it the logic to moderate charge rate to minimise clipping. There are a couple of discussions/feature requests about requesting clipping logic be added, but currently you’ll have to roll your own clipping solution like @DD has done
  3. Yes but not point at present.

In practical terms you will get a bit of inverter clipping when your panels are producing full output and the battery is full. But only when its full output and a relatively cool day (panels are less efficient when its hot)

S
#1392 SJB

Rbor Now, who will now take the big plunge to standalone predbat add-on?

I did last Sunday with no problems. A couple of caveats I run HAOS on a Dell thin client and Predbat in Monitor mode (I use the predicted usage, SoC and PV in automations to maximise discharge in Flux peak slot and to reduce clipping). I was on Predbat v7.22.5.

I suggest reading Trefor's notes on the addon install (https://github.com/springfall2008/predbat_addon/blob/main/predbat/DOCS.md) as well as the Predbat install notes whilst planning your changeover.

What I planned to do was:

  1. Backup HA
  2. Copy apps.yaml to safe place.
  3. Save Predbat settings and copy to safe place.
  4. Remove Predbat from HACS (as I couldn't find a way to stop it auto starting).
  5. Restart HA
  6. Install Predbat Addon
  7. Copy apps.yaml to new location
  8. Load Predbat settings
  9. Backup HA.

What I did was:

  1. Backup HA
  2. Copy apps.yaml to safe place.
  3. Save Predbat settings and copy to safe place.
  4. Remove Predbat from HACS.
  5. Reboot HA server (only way I found with my limited HA knowledge to stop the HACS version of Predbat from running - I probably only needed to restart AppDaemon)
  6. Install Predbat Addon
  7. Copy apps.yaml to new location
  8. I didn't need to Load Predbat settings as they were still present.
  9. Backup HA.

You should copy apps.yaml and the saved settings out of the appdaemon/apps/predbat directory as uninstalling Predbat will delete the directory.

P
#1393 Paul H

geoffreycoan Slightly confused about where you say you are “not seeing PV forecast from Solcast”. In the screenshot below it’s showing the energy dashboard and the solar forecast within that. The solar forecast in the energy dashboard is ONLY fed by a Solar integration - Solcast or the Solar.forecast (I think) within HA. When predbat pulls down solar forecast information from Solcast it does not feed through to the energy dashboard, only to the Predbat plan.
It’s for this reason I have remained on the Solcast integration. Have put a feature request in for Predbat to feed the Energy dashboard but it’s not clear how this works.

Agreed, the issue is only the energy dashboard, predbat is fine.

I think the energy dashboard just got to the point where it ran out of future data having moved predbat to Solcast direct.

J
#1394 Josephiah

geoffreycoan thanks, much appreciated.
From a look at past power charts, I reckon I could be missing 4-5kWh (or about 10% or so) on a sunny day, so would be nice to claw back if possible.

I guess my point is that that logic should, I think, be fairly straightforward to implement (most basic version: if SoC > 90%, inverter limit = 5kW; else 7.5kW, or something like that), and then the optimisation algorithms ought to do most of the heavy lifting. I'll add the suggestion to one of the GitHub discussions if there seems an appropriate spot for it.

R
#1395 Rbor

SJB Thanks for this. It is really good.

Right on cue, Trefor has just added a short video about installing the predbat add-on from scratch: https://www.youtube.com/watch?v=QMvRIbAcpk8
I do plan to move to the standalone predbat this week.

geoffreycoan Thanks for your documentation showing the different ways of installing predbat: https://github.com/gcoan/batpred/tree/main/docs.
Would it be worth adding a section on updating to the predbat add-on from appdaemon-predbat? This is what a lot of us will be doing. The important 'extra steps' are to ensure that the old appdaemon-predbat add-on is not running when the new add-on is started, and to copy the old apps.yaml file into the new installation.
I presume that the splitting of predbat code into smaller files from v8.00 stays intact and is just moved to the new folder structure.

G
#1396 geoffreycoan

Rbor Yes I can add something about the upgrade process, no problem. @SJB has a good set of steps above, the only thing I’d do differently is that you don’t need to uninstall predbat, simply shutdown the AppDaemon or AppDaemon-predbat add-on, and ensure the ‘start on boot’ option is unticked.

That way it’s easy to revert back to an AppDaemon version of Predbat if you want to, simply by stopping the Predbat addon and starting the AppDaemon one.

I’ll also add something about Solcast forecast (not) in the Energy dashboard as per @Paul H as its worth making this distinction to people

I’m personally going to stick to the Appdaemon add-on for the immediate future as I run another appdaemon app, Octoblock, that works out the cheapest 90 minute Agile slot to run the dishwasher etc at

D
#1397 DD

Josephiah I'd be interested to hear how you went about that. I thought about it a while back, and didn't do anything about it, but today (sunny Highlands!) has been a perfect example of the generation chart getting brutally flat-topped.

Good news - it's much easier to avoid clipping (on gen-3 inverters at least) than I was making it. On firmware 307 and 309, simply turning off the eco flag will put it into a mode where it prioritises grid export, but sends any excess to the battery. I think I tested that on 305 and it didn't work, but I can't go back and re-test that now.

Of course, my priority may differ from yours - I want to export everything, and only put into the battery anything that exceeds AC generation capability, whereas perhaps you want to focus on charging the battery, and merely have to ensure there's always room for the battery to accept at least some power throughout the day.

R
#1398 Rbor

SJB
geoffreycoan
Hi, Great set of instructions, augmented with Geoffrey's suggestions.
Wisely, or otherwise, I decided to take the plunge and install the standalone predbat add-on.
I followed the instructions, without removing appdaemon-predbat from HACS, just stopped and 'start on boot' unenabled. So I still have the old installation sat there dormant in case it needs to be resuscitated at some stage. It can be removed at a later stage.
It all seems to have worked like clockwork and I am now running the new add-on.
Logs look clean. The new predbat has updated my historical data to remove the gaps left over from HA. I have also lost my solar prediction for today up to the time that I enabled the new predbat.
Perhaps it just looks more scary than it is.

When I look at 'Status', predbat is still showing v8.00 and I was expecting new entries.
SJB What can you see?
See below.

So let's see how it runs .....

Rob

S
#1399 SJB

Rbor I see the same thing Rob. What new entries were you expecting to see?

R
#1400 Rbor

SJB
I was expecting perhaps v1.xxx
But I guess that no files have actually changed from v8.00.
I don't really understand how all this works but the code and files appear to have just been shuffled around into a new folder structure to remove any dependency on appdaemon.

I am on Agile and the current slots leave the battery on close to 100% right through the day.
So today seemed a good time to made the upgrade as I could always drop back to GE software if I broke things.

Rob

S
#1401 SJB

Rbor The version reported by Predbat (v8.0.0) should be the same no matter which way Predbat has been installed. The HA Predbat addon itself is on v1.1.7 which you can see on the add-on page (I think I had an update for it last week).
There are some additional files to the normal Predbat files in the new folder structure in order to run Predbat.

R
#1402 Rbor

SJB I have checked and I get the same versions as you:
v8.00 in status and v1.1.7 in add-ons.

I decided to uninstall the old appdaemon-predbat add and it is now gone.
I then restarted HA to make sure that I had got rid of it.
I then restarted the new predbat add on.

Logs look OK but I am still getting a relic of appdaemon time every 5 minutes in my predbat.log,
e.g.
2024-06-17 21:05:10.165423: Invertor time 2024-06-17 21:04:01+01:00 AppDaemon time 2024-06-17 21:05:10.164281+01:00 difference -1.17 minutes

I do still have the folder structure for appdaemon-predbat intact so the uninstall hasn't deleted the folders.
Have you left yours intact?
As the appdaemon.yaml file is still within the structure, do you think HA will take notice of it, possibly being responsible for the appdaemon time line in my predbat.log?
And do you know whether I should I delete the folders?

Apart from all that, predbat is looking good so far.

Rob

J
#1403 Josephiah

DD Interesting. I'm not sure I ever really got to the bottom of what Eco mode actually does (in either on or off states), given that it appears to affect multiple settings...
Would that be just for if I was using the GE app rather than Predbat? (I'm sort of assuming Predbat just overrides everything to achieve what it wants to...?)

But yes, as you suggest, I generally want to prioritise charging. I think the ideal behaviour for our use case would be:

  1. for most of the generating period, export at 5kW when available, once house demand is taken care of, with any excess being stored in the battery;
  2. then, at the last possible opportunity (bearing in mind the inherent forecasting and demand variability, of course) solar charge the battery at full rate to reach 100% at 4pm.
S
#1404 SJB

Rbor I had AppDaemon installed before I installed Predbat so I didn't use the combined AppDaemon-Predbat install. I haven't uninstalled AppDaemon - I don't know enough about it to advise about deleting the folders

I've seen the mention of AppDaemon in the Predbat log as well - nothing to worry about it's just hard coded text in inverter.py, it is really just part of a series of warnings of time differences between the inverter and the server Predbat is running on (there is a more dire warning if the difference is >10 minutes). I don't think the message is anything to do with appdaemon.yaml.
I expect that Trefor will change the text to something more appropriate when he has time make cosmetic changes.

R
#1405 Rbor

Josephiah Yes, predbat will instruct the GE inverter rather than the GE app. Predbat takes over. This will largely be determined by your tariff.
I am on Agile and predbat comes into its own when there are large fluctuations in rates during day and especially night. Others have cheaper set slots for tariffs such as IOG. With the current Agile slots and sun (at long last), predbat is doing little for me, keeping the battery close to 100% and sending all excess solar back to the grid.
You can tweak the behaviour using the controls and switches but I mainly let predbat do its thing as I think it has better judgement and is more intelligent in these matters than me.
I have little idea about how to limit clipping – there are others on here more knowledgable than me.

Rob

R
#1406 Rbor

SJB
After uninstalling the combined appdaemon-predbat add on, I was surprised to still see entries linked to appdaemon. And appdaemon isn't listed in my remaining add ons. I also have no idea how to uninstall Appdaemon itself.
Before I got into predbat, I had real problems negotiating HA. Predbat has taught me a lot about HA but it is so complex!
Trefor never fails to amaze me. HA and coding seems to be hardwired into his brain.

Rob

W
#1407 Wavy Davy

SJB I have saved the predbat settings, but cant find the file. Can someone take tell me where it is saved to?
I have some old saves in Homeassistant/predbat_saves but not today's one.

G
#1409 geoffreycoan

Wavy Davy have saved the predbat settings, but cant find the file. Can someone take tell me where it is saved to?

The predbat configuration saves are in /config/predbat_save/

Rbor ogs look OK but I am still getting a relic of appdaemon time every 5 minutes in my predbat.log,
e.g.
2024-06-17 21:05:10.165423: Invertor time 2024-06-17 21:04:01+01:00 AppDaemon time 2024-06-17 21:05:10.164281+01:00 difference -1.17 minutes

As SJB explains, this is just poor wording in the message, its really saying that the 'time in the container that the predbat code is running in is XXX vs the inverter time'.

Originally predbat was running in the AppDaemon python container, then Trefor created AppDaemon-predbat which was a pre-canned copy of AppDaemon with predbat running inside it. This had the advantage that you didn't need to install HACS or AppDaemon, and it meant that future changes to AppDaemon didn't cause problems for predbat (there was an AppDaemon upgrade that moved directories around that caused predbat to break).
Now Trefor has created his own container (add-on) to run Predbat in.

In all cases its just the container that predbat is running in that is different, the Predbat code is the same, so hence why you see version 8.0.0 everywhere.

DD Good news - it's much easier to avoid clipping (on gen-3 inverters at least) than I was making it. On firmware 307 and 309, simply turning off the eco flag will put it into a mode where it prioritises grid export,

I have to admit I am confused by this. I can understand the desire to prioritise grid export in these sunny days we are having, but if you turn Eco off then surely when the sun goes down you'll start grid importing so this isn't something you can just leave, you'll need to turn it on and off when the sun goes down and up, and you'll need to ensure enough in the battery to take you through the night?

Since I had a weekend with Eco not working properly and the Agile rates were rubbish overnight on Sunday and again tonight Monday I ended up turning Predbat into read-only. On the weekend it was so I could do a trickle Forced Export to ensure the house demand was met from the batteries rather than grid, but today its been so I could set Eco mode but reduce the inverter charge rate to 900W.

I'd prefer to be able to do it in Predbat but there isn't a way of setting a custom charge rate at present. So this means the battery supports house load overnight but it takes most of the day to charge the battery up - reducing clipping because I'm splitting DC current into the battery and AC output.

On the solar front, am waiting to breach the magic 100kW forecast or generated figure. Had a forecast 100kW a day or so ago but it turned out not to be that good.

And here's something I didn't know, Solcast have a set of satellites they use to measure actual cloud cover and update the forecast every 5-15 minutes https://solcast.com/forecast-accuracy

G
#1410 geoffreycoan

geoffreycoan Rbor Yes I can add something about the upgrade process, no problem.
I’ll also add something about Solcast forecast (not) in the Energy dashboard as per @Paul H

Both of these have been added to the documentation which you can read my fork here: https://github.com/gcoan/batpred/blob/main/docs/install.md

Still to-do:

  • expanding the collapsible cards in output-data
  • expanding Apex charts
  • restructuring apps.yaml template to follow the documentation
  • start merging the different apps.yaml templates into a single 'master'
  • Specific settings for AIO, 5.2 batteries, etc
  • Add default settings if not already in the documentation

I had a list of what I promised to add to the documentation but can't find it now. Anyone recall or find it?

D
#1411 DD

geoffreycoan if you turn Eco off then surely when the sun goes down you'll start grid importing so this isn't something you can just leave, you'll need to turn it on and off when the sun goes down and up, and you'll need to ensure enough in the battery to take you through the night?

Yes, I'll need to monitor the inverter, adjusting modes as required. Most of the time, it will be eco on/charging paused, so that it can still discharge. But then when AC limit is approached, I'll turn eco off and unpaused charging.
Just a relatively small change to the script I have.

At the moment, I don't need much to get through the evening - 30% is plenty. So I don't need to aim for a full battery by the end of the day.

R
#1412 Rbor

geoffreycoan A big thank you for producing such marvellous documentation for Trefor's brilliant software. What other Github resource is developed so rapidly and has such comprehensive support?
I feel guilty providing you with a shopping lists of extras to add to the documentation.

..... But together we are all trying to improve the software more, discussing potential issues, helping each other out, and passing on glitches to Trefor via Github.
I joined Predbat at the end of January when this thread had just reached 100 posts. Look at it now!

Rob

W
#1413 Wavy Davy

Updated to stand alone app and all went well except now have this message

Disappeared after a couple of mins, but is it temporary or something I need to sort?

R
#1414 Rbor

Wavy Davy I have had days/weeks with no adverse status comments using appdaemon-predbat add on up to v8.00. Upgraded to standalone yesterday pm (17th June) and I have had 5 status comments. Here is a snapshot from yesterday evening:

This also picks up my comments that appdaemon is being referred to despite having uninstalled the appdaemon-predbat add on.

geoffreycoan You you think this is one to flag as an issue on Github for Trefor to look at.

SJB quoted the following In an earlier post replying to me:

I've seen the mention of AppDaemon in the Predbat log as well - nothing to worry about it's just hard coded text in inverter.py, it is really just part of a series of warnings of time differences between the inverter and the server Predbat is running on (there is a more dire warning if the difference is >10 minutes). I don't think the message is anything to do with appdaemon.yaml.
I expect that Trefor will change the text to something more appropriate when he has time make cosmetic changes.

Rob

G
#1415 geoffreycoan

Wavy Davy Its a temporary message saying that predbat was unable to set a value in your inverter, it was trying to set the reserve to 4%, but the response back was 50 (which means 100%). Next time predbat runs it will try again and usually sort itself out.

Only if this keeps happening do you need to worry, it would indicate an underlying network issue usually with wifi to the inverter, but transient errors are nothing to worry about

G
#1416 geoffreycoan

Rbor geoffreycoan You you think this is one to flag as an issue on Github for Trefor to look at.

The (comms related errors) were all in a batch over a span of just a minute. If it keeps happening then it’s worth logging, but Predbat is still using GivTCP just the same so I find it doubtful that the change to the predbat add-on is the cause. A one-off even though several issues flagged in quick succession I wouldn’t worry about.

Worth highlighting the Appdaemon message though so Trefor can fix it (low priority)

G
#1418 geoffreycoan

Rbor I saw the bug thanks Rob.

One question I had (for the github issue mainly) is whether this was a one-off set of messages which is what I took from the above, or its happening regularly which I think is what the github issue says. If regularly then definitely needs investigating by Trefor

J
#1419 Josephiah

Rbor thanks, yes, fits with my experience. Though being fairly heavy users (household of 7, heat pump, unavoidable cooking use at peak times), I'm still getting decent benefit from it most days.

R
#1420 Rbor

geoffreycoan I will be monitoring.
Also with the historical data warnings, I need to see whether these start to disappear as the standalone predbat add on may be correcting the historical inconsistencies from the adddaemon-predbat add on.

Rob

R
#1421 Rbor

geoffreycoan I have been checking through the documentation files and I have spotted a minor glitch in the install.md file (in your fork), which I have copied below.

These are located under the Home Assistant directory /addon_configs/6adb4f0d_predbat which contains:

predbat.log - Predbat's active logfile that reports detail of what Predbat is doing, and details of any errors
apps/apps.yaml - Predbat's configuration file which will need to be customised to your system and requirements.

There is no longer an apps folder for holding apps.yaml. It is in the addon_configs/6adb4f0d_predbat folder
All the files that were in the appdaemon apps folder seem to have been moved into this folder.
See my screenshot below for some of my installation files.

Hope this is useful.

Rob

G
#1422 geoffreycoan

Rbor Thanks Rob, I've not even installed the predbat add-on so hadn't picked this up.

My excuse is that it was Trefor's cut and paste error from the AppDaemon-predbat add-on section that I perpetuated elsewhere in the docs.

Corrected now in install.md, installation-summary.md, apps-yaml.md and energy-rates.md

Spent the evening trying to figure out why the auto-generated dashboard isn't created at the right time according to the docs. Tracing the code to work it out, ended up raising a github issue with proposed change for Trefor

B
#1423 Boffinboy

geoffreycoan I just wanted to say a big thank you for all of your work on the documentation - it is incredible valuable

R
#1424 Rbor

geoffreycoan To help you, here is a screenshot of the predbat add-on config folder:

You can see that all the files that were in the appdaemon apps folder have been moved here.
The cache folder contains solcast info and is same as in appdaemon-predbat installation.
But there is no appdaemon.yaml file now so I guess that predbat now gets this info from HA?
In install.md, you advise increasing the number of predbat.log files to 9 in appdaemon.yaml for appdaemon-predbat installations.
Is there a way of instructing the predbat add on to save 9 copies of predbat.log as I now just have predbat.log and 1 previous version. So history doesn't go back far. Is this something for me to request from Trefor as a predbat feature request?

I don't think there are any other differences but tell me is you want me to look for anything in the files.

Rob

#1425 Jase1703

My raspberry pi4 bricked yesterday, barely a year old, so no home automations and PredBat for me for a while. Just when you think this is easy, typical.

G
#1426 geoffreycoan

Jase1703 Sorry to hear that. So frustrating, hope you have a backup (I use the Google drive add-on for backups).

Is it the Pi or the SD/SSD ?

#1427 Jase1703

geoffreycoan seems to be the pi, it has power but does not boot from the ssd. Probably going to get a HA green.

#1428 PianSom

Jase1703
Very unusual. Try booting off an sd card to confirm?

W
#1429 Wavy Davy

If it is the Pi and it's just for HA I would buy a dell thin client instead. You can get them on fleabay for between £30 to £70. and with a ssd included. Mine was £45 with 8gb ram and a 120Gb ssd. Even included a copy a windows which I didn't use.

R
#1430 Rbor

I am a pi-guy.
I got a pi4 when it first appeared 5 years ago and it has been running non-stop ever since.
I have been running predbat on my pi4 since January.
I like the small footprint of the pi and especially its minimal power consumption of 3 to 4 W.
I initially used SD card but after a couple crashed out on me, I installed on an SSD drive. Much faster and certainly more reliable.
I have recently purchased a pi5 with the intention of getting predbat running on it but I have yet to make the transition from my pi4.

I tried to use HA without great success for years but predbat, and the folk in this thread, have taught me where things are in HA.

Back to your dead pi. I hope you get sorted out quickly and that you had a backup outside of your pi, such as Geoffrey's Google drive add-on.

Best of luck getting predbat back.

Rob

#1431 Jase1703

PianSom I will try this, thanks

R
#1432 Rbor

Jase1703 It would also be worth connecting the SSD to a computer to see if it is recognised.
You would then know whether it is the pi or the SSD.
If you get a replacement pi, you might then be able to use the SSD with your predbat intact.

Rob

#1433 PianSom

I had a Power-up today 12-2.30. From a full battery, Predbat discharged to 4% by 11.59, then charged up to 98% by 2.30.

I need to do the sums properly, but looking at the graphs I wonder whether it was really worthwhile? I missed out on 2 1/2 hours of solid sunny export time (as I was importing) and it looks like the pre-dump didn't make much, if any, more than I missed out on.

I have an automation which ran the eddi, but that only managed to soak up 1.9kWh into the hot water tank (which I didn't actually need today anyway).

I have this horrible feeling that if I calculate the losses properly (and even if I ignore battery wear and tear) that it won't have been worth it.

Too much free electricity - I guess it's a nice problem to have. Do you have the same dilemma @geoffreycoan ?

G
#1434 geoffreycoan

I have a Lenovo M710Q tiny PC running HA as a VM.

What I like about it is the small size and it gives me a Windows PC that I use on my bit monitor to run lots of browser tabs on Home Assistant, GitHub and the predbat code!

What I don’t like is the power consumption, about 0.8kW a day. A pi is much better in that respect.

I have what I have and so I’ll just live with it. On balance I do like having the PC available.

G
#1435 geoffreycoan

PianSom I had a Power-up today 12-2.30. From a full battery, Predbat discharged to 4% by 11.59, then charged up to 98% by 2.30.

I need to do the sums properly, but looking at the graphs I wonder whether it was really worthwhile?

Too much free electricity - I guess it's a nice problem to have. Do you have the same dilemma @geoffreycoan ?

Yes I had the power up today and I let predbat manage it, discharging the battery beforehand (got down to 40%) and back to 100% in the free period. I had the dishwasher on and a few other things but in the 2.5 hours of free electricity we only imported 0.2kWh and exported 5.5kWh! And that’s despite charging the batteries as well in that period.
I suppose it helps the grid by soaking up free electricity or exporting less in that period, but financially I’m pretty positive it wasn’t worth it.

I thought this on the last one as well. I will probably keep signing up for them in case there are any dips in solar but leave predbat in read only instead of discharging and recharging.

The agile rates have been so flat overnight that it’s not even been worth letting predbat do anything overnight. Been better on the weekends but the week has been awful.

#1436 Jase1703

Rbor thanks all for the advice on my dead pi4. Looks like it’s the SSD or SSD cable. I revised the boot
Loader to boot sd card first, re imaged HA onto SD card and bingo back in business, unfortunately my last saved backup was 6 months old. Laptop does not see the SSD so will replace cable tomorrow to rule out the SSD failure or not… if I can resurrect my SSD all is well . Lesson to everyone, regular back ups to another drive. Thanks again all. I won’t disrupt this fine mega thread with my trivial hardware issues again, back talking PredBat soon.

T
#1437 TX200

Jase1703 there's an integration that does regular Google backups. Might be worth a look, even though "horse bolted"!

G
#1439 geoffreycoan

TX200 This is the one I use, it takes backups and copies them to Google drive.

I created a free Google account specifically to hold HA backups, so I have 15Gb of cloud storage.

As @ProximusAl shares, there are other solutions if you have a NAS drive or similar.

BTW @Jase1703 if you are at least able to mount the SSD then you may be able to retrieve a backup from out of the HA file system - there’s a post on the forum where I had to do just that a few months ago that covers the steps

#1440 PianSom

Somewhat to my surprise (I have no recollection of asking for one!) I had an Octopus Home Pro delivered this morning. Any of the techie sorts around these parts got one, and can point me in the right direction for the forums where they are discussed?

EDIT - no, a senior moment. I did this a week or two ago - https://forms.gle/775tE8c5F3PAuz5h9

R
#1441 Rbor

PianSom
Home Pro info
I received the Home Pro in January 2024 and progress has been slow.
You need the Octopus R&D app and log in credentials. You also need access to R&D forum, which I think you have to request. Best views are using a computer via a web portal. This is the Home pro thread with many links shown.
https://forum.octopus.energy/t/for-the-pro-user/8453
Many of us had issues just getting the device to access our smart meter via the HAN. The onboarding, carried out via the Octopus R&D app, was very hit and miss, recognising wi-fi credentials but then dropping them.
Octopus are able to upgrade firmware/software themselves and, after a week, the Pro found my HAN and I was able to display live data and some limited longer data.
I can display charts on the phone R&D app but it is much better using the R&D portal on a computer.
Octopus upgraded us all again about a month ago and I lost all connectivity to the HAN. After a couple of weeks, the Agile team got me up and running. The issue was with onboarding but I am told that this has now been resolved.
However over the 6 months since I have had the Pro, nothing has really moved forwards.
One really nice feature is the ability to download daily half-hourly stats showing usage and costs.
On checking, these closely mirror what I get on my Octopus ‘bills’. I am on Agile, so I get a lot of data.

I have attached a screenshot on my computer so that you can see my live usage on the Pro for some of this morning. I can easily tweak the range shown.

From the points, you can see just how often I am receiving info. So this is a big step up from what the mini is capable of producing.
There are options for deploying data half-hourly, hourly, daily, weekly and monthly. But I did not find these very useful.
Only imported power is shown and we are waiting for live exporting data to be shown. The Pro doesn’t yet show export data at all (although the Mini can from ‘yesterday’.)
On the Pro, some triallers are coding, some using MQTT. This is out of my knowledge base at the moment – a future project for me. It seems to be working in a Docker container.
The pro is clearly capable of doing a lot – it is essential like the raspberry pi.

Get onboarded and you will be able to see what it is capable of. I hope this process goes smoothly – you may experience some glitches. It is an interesting project with a limited number of trailers, which you have enow joined by receiving a Home Pro.

Rob

W
#1442 Wavy Davy

Anyone else had problems with th upgrade to V8.1.0?
Since the upgrade I've lost the predbat plan. I've tried restarting HA, reloading the predbat table card but no luck.
It normally takes a little while to load after a HA restart, but this happened yesterday.

R
#1444 Rbor

Wavy Davy
geoffreycoan
I saw the update yesterday but went no further. Good decision!
I will sit out of the update until it gets sorted this time.

Rob

W
#1445 Wavy Davy

Ive downgraded and its re appeared, but now cant switch auto updates off. When I do it switches back on straight away. Just hope it doesn't update back.

W
#1446 Wavy Davy

It did re update back to 8.1.0. and auto update wouldn't stay switched off. I managed to stop that by re-installing a predbat settings backup from 4 days ago. Fingers crossed it stays like that.

#1447 PianSom

Rbor
Many thanks, Rob - nice pointers.

Seeing as I already have an OHM and a Hildebrand Glow CAD (feeding MQTT) I can’t imagine why I thought I might need more data! Must’ve seemed like a good idea at the time …

R
#1448 Rbor

PianSom looking on the R&D forum, there is a fair tranche of folk who have just received the Home Pro. Worth looking at.

Rob

#1449 PianSom

All - there were still some available to all-comers a couple of hours ago.

R
#1450 Rbor

geoffreycoan
Wavy Davy
Looks like there is a fix now which you can update to from HACS/Frontend
Its up to v1.5.5.2

Rob

M
#1451 michaelhoskins

Hi. Very happy with predbat after a week.

I was wondering if anyone had any "reporting" methods using this (or similar in HA). I used to be on Octopus and it's data was great, allowing me to produce a monthly spreadsheet of import/usage/export etc (essential to prove to myself and family that it was all a good investment!)

Now I'm on Eon, with great rates but awful data from it's app, I was thinking there must be a better way of getting monthly data. The Giv Data isn't quite enough as it doesn't (as far as I can see) record the cost properly or, for example, monthly export in a certain slot (midnight to 7am).

Had a feeling those on this topic might have some good data recording functions...?

G
#1452 geoffreycoan

michaelhoskins Now I'm on Eon, with great rates but awful data from it's app, I was thinking there must be a better way of getting monthly data. The Giv Data isn't quite enough as it doesn't (as far as I can see) record the cost properly or, for example, monthly export in a certain slot (midnight to 7am).

Home Assistant and the energy dashboard should give you most of what you want. Have a look at this article https://www.speaktothegeek.co.uk/2024/03/octopus-smart-tariffs-and-home-assistants-energy-dashboard/ and this older one https://www.speaktothegeek.co.uk/2023/02/off-peak-tariffs-in-home-assistants-energy-dashboard/ by speaktothegeek - he covers how to setup a multi-tariff energy utility meter and have it displaying with the right price in the energy dashboard. Then an automation to swap between the tariffs at the appropriate times.
The import and export usage readings can come from any suitable source, I used the import and export sensors from givtcp. I used this very successfully with Octopus Flux, but any other tariff it’d be the same.

R
#1453 Rbor

Does anyone know what Trefor's new addition of metric_self_sufficiency in v8.1.0 does?
Can I switch it off if I am happy with what predbat is deciding for me (although it doesn't look like a switch)?
What are the settings?
I am reluctant to upgrade to v8.1.0 until I am sure what I am signing up to.

Thanks

Rob

S
#1454 SJB

Rbor
It seems to work as I'd expect, although I have not tested how the plan would work if little solar is predicted.

Does anyone know what Trefor's new addition of metric_self_sufficiency in v8.1.0 does?

What it says on the tin. It allows you to avoid charging the battery at cheap rates for later export if you would prefer to only use solar. From the documentation:
input_number.metric_self_sufficiency (export mode) A price in pence per kWh used to skew the calculations towards self sufficiency. Effectively saying to Predbat to account for imports at a higher price than reality in the calculation and thus selecting plans with less import. If you want to be as self sufficient as possible then set this to the difference between your lowest import rate and the highest export rate to take exports that require additional import appear unprofitable. This setting will not impact the real calculated costs and is only used for plan selection. Values of 5-10p maybe worth trying if you prefer to avoid importing even if it saves you money.

Can I switch it off if I am happy with what predbat is deciding for me (although it doesn't look like a switch)?

Just set it to 0. On Flux this gave a plan that grid charged in the cheap slot, where as setting it to 10p meant that no grid charging took place.

What are the settings?

R
#1455 Rbor

SJB Thanks for an informative reply.
I have updated now to v8.1.0 which went smoothly.
I notice that the default setting for metric_self_sufficiency is 0p anyway.

It will be interesting to see how different people use the feature.
0p is OK for me at the moment.

Rob

G
#1456 geoffreycoan

Rbor Have a look at the original github issue that caused the addition of this new Predbat metric https://github.com/springfall2008/batpred/issues/1216

As SJB highlights, there is documentation on it.

Also worth noting that in 8.1.0 Trefor has changed the default for input_number.predbat_metric_battery_cycle to zero

S
#1457 SteveCook

Rbor
Update to v8.1.0 not gone well.
Predbat still says update available even though I installed it and have done 3 or 4 restarts.
Predbat data missing for apex chartcard and predbat plan.
Guess I will need to go back a week

S
#1458 SteveCook

I hit the Predbat Core Update "install" button nothing now happens

K
#1459 KevinB

Is there a way to get the predbat plan out via an API or event or something? Like the HTML output, but in JSON, and with a signal whenever it gets updated? For clarity, I mean the forwards plan in the various time slots, rather than just the current state.

N
#1460 neomancer

SteveCook there is an update for predbat card which fixes that card issue.

S
#1461 SteveCook

neomancer
Thanks. i had installed that but every time I did a restart it kept saying I was on predbat v8.0 and offering update to v8.1.0, yet when I updated to that it never seemed to think I had not updated. I have gone back to v.8.0

R
#1462 Rbor

geoffreycoan Thanks for the GitHub link. The metric self sufficiency entity does seem to be a useful addition to predbat which can be used, or not used, to different degrees, as seen fit. It is interesting to see how the Github thread has influenced Trefor in developing the entity.

Rob

G
#1463 geoffreycoan

Firstly I haven’t upgraded Predbat, I am still on v8.0.0. I did update the Predbat table card to the latest version, and it appeared to be working fine, but last night I kept on getting a blank table card so I downgraded to the prior version.
Not sure why this might be.

Others have reported problems with the install button: https://github.com/springfall2008/batpred/issues/1232
Do add to it if you are experiencing the same

KevinB Is there a way to get the predbat plan out via an API or event or something? Like the HTML output, but in JSON, and with a signal whenever it gets updated? For clarity, I mean the forwards plan in the various time slots, rather than just the current state.

At the moment, yes-ish, but it’s not in a single place. The Predbat plan is sprayed across multiple entities that were designed to produce the Apex charts. You could use those if you wanted the raw data but you’d have to stitch multiple entities together e.g. predbat.load_power_best is the predicted house load, best_pv_energy is PV, predbat_best_import_energy, etc.
The problem is the charge and discharge where I think there are only sensors for the next scheduled event predbat.best_charge_start etc

I think we need a proper JSON structure to output the plan, have recently raised this as a discussion item https://github.com/pacemaker82/PredBat-Table-Card/discussions/3#discussioncomment-9838972

R
#1464 Rbor

geoffreycoan I would like to help out but I wouldn't know where to start and would be a hindrance.

My upgrade to v8.1.0 was smooth with no issues. I am currently using Trefor's original HTML predbat plan card.
I am also now using the standalone predbat add on and have removed the old appdaemon-predbat add on from my HA, including the files. I doubt whether there would be any difference in behaviour between standalone and appdaemon predbat as the files used seem to be the same, just in different folders.

Rob

R
#1465 Rbor

Does anyone have continual warnings for their 'historical day' data.
I get warnings every 5 minutes as predbat updates its plan. They are nearly all the same with minor changes in minutes of number of kWh. See below as an example from my predbat.log.

2024-06-22 14:40:07.790819: Warn: Historical day 3 has 225 minutes of gap in the data, filled from 6.6 kWh to make new average 7.82 kWh (percent 84%)
2024-06-22 14:40:07.819039: Warn: Historical day 4 has 90 minutes of gap in the data, filled from 8.5 kWh to make new average 9.07 kWh (percent 94%)
2024-06-22 14:40:07.837831: Warn: Historical day 5 has 165 minutes of gap in the data, filled from 7.45 kWh to make new average 8.41 kWh (percent 89%)
2024-06-22 14:40:07.889600: Warn: Historical day 6 has 190 minutes of gap in the data, filled from 7.55 kWh to make new average 8.7 kWh (percent 87%)
2024-06-22 14:40:07.940530: Warn: Historical day 7 has 40 minutes of gap in the data, filled from 11.6 kWh to make new average 11.93 kWh (percent 97%)
2024-06-22 14:40:07.979016: Warn: Historical day 8 has 70 minutes of gap in the data, filled from 9.5 kWh to make new average 9.99 kWh (percent 95%)

My current predbat log spans 10 hours and has 577 of these warnings.

Is this something to post as an issue for Trefor on Github. I am on the new standalone predbat and I thought this was supposed to work better with historical day data.

Rob

G
#1466 geoffreycoan

Rbor my understanding from what Trefor said on one of his videos was part of the rationale for moving away from AppDaemon was that it was supposed to be better at loading history data, so its strange.

I get apparent gaps in my own data, but interestingly they seem to differ slightly from run to run, days 6 and 7 are different on two successive runs:

2024-06-22 14:15:02.154974 INFO pred_bat: Warn: Historical day 2 has 50 minutes of gap in the data, filled from 42.38 kWh to make new average 43.91 kWh (percent 97%)
2024-06-22 14:15:02.158520 INFO pred_bat: Warn: Historical day 3 has 20 minutes of gap in the data, filled from 46.67 kWh to make new average 47.33 kWh (percent 99%)
2024-06-22 14:15:02.162142 INFO pred_bat: Warn: Historical day 5 has 30 minutes of gap in the data, filled from 20.59 kWh to make new average 21.02 kWh (percent 98%)
2024-06-22 14:15:02.169258 INFO pred_bat: Warn: Historical day 6 has 10 minutes of gap in the data, filled from 61.82 kWh to make new average 62.26 kWh (percent 99%)
2024-06-22 14:15:02.177131 INFO pred_bat: Warn: Historical day 7 has 210 minutes of gap in the data, filled from 66.63 kWh to make new average 78.01 kWh (percent 85%)
2024-06-22 14:15:02.192433 INFO pred_bat: Warn: Historical day 8 has 390 minutes of gap in the data, filled from 51.2 kWh to make new average 70.21 kWh (percent 73%)
2024-06-22 14:55:02.434339 INFO pred_bat: Warn: Historical day 2 has 50 minutes of gap in the data, filled from 38.16 kWh to make new average 39.53 kWh (percent 97%)
2024-06-22 14:55:02.438524 INFO pred_bat: Warn: Historical day 3 has 20 minutes of gap in the data, filled from 53.22 kWh to make new average 53.97 kWh (percent 99%)
2024-06-22 14:55:02.442326 INFO pred_bat: Warn: Historical day 5 has 20 minutes of gap in the data, filled from 21.0 kWh to make new average 21.29 kWh (percent 99%)
2024-06-22 14:55:02.448271 INFO pred_bat: Warn: Historical day 6 has 20 minutes of gap in the data, filled from 59.52 kWh to make new average 60.36 kWh (percent 99%)
2024-06-22 14:55:02.451969 INFO pred_bat: Warn: Historical day 7 has 210 minutes of gap in the data, filled from 68.7 kWh to make new average 80.43 kWh (percent 85%)
2024-06-22 14:55:02.468404 INFO pred_bat: Warn: Historical day 8 has 390 minutes of gap in the data, filled from 50.07 kWh to make new average 68.67 kWh (percent 73%)

Probably worth logging, and the logfile generations issue you mentioned before. Trefor seems to have plenty of other issues on his plate at the moment though

K
#1467 KevinB

geoffreycoan Great info, thanks! I'll have a look at that issue.

S
#1468 SteveCook

Updated to v8.1.0 but HA keeps saying there is an update to v8.1.0 in settings and I get this error

R
#1470 Rbor

Jase1703 Any more news on your predbat and pi woes?

Rob

B
#1471 Boffinboy

SteveCook I had this same issue. I tried re-updating via HACS rather than a Predbat. In the end I think restarting app daemon fixed it

#1472 Jase1703

Rbor yes, it was the SSD, tried new cable but still unreachable. So I’ve rebuilt PredBat and saving my HA backups to google drive. Back in the game now, on SD card until I decide HA Green or a new SSD.

W
#1474 Wavy Davy

Can someone explain what's happening with my system.
Predbat says freeze charging yet my load is being supplied by the battery.
Surely that's freeze discharge?

G
#1475 geoffreycoan

Wavy Davy It does rather look that way, in Freeze charging and no solar late at night the soc should be frozen and the inverter pulling from the grid to meet house load. https://springfall2008.github.io/batpred/what-does-predbat-do/#predbat-status
In that particular example its pretty much marginal either way as the import rate is close to the solar export rate you’ll get tomorrow, so discharging the battery costs about the same as doing the grid import the status implies it should have done.

It would be worth seeing what then underlying inverter controls were set to (battery reserve, charge and discharge rate). It may be that one of the underlying commands predbat sent failed to go through to the inverter (should appear in the predbat log or givtcp log).
If it keeps doing it then worth logging it with Trefor.

W
#1476 Wavy Davy

Thanks for the reply. Both logs must reset at midnight, so missed any errors before then, but here's the givtcp log.

givtcp-log.txt
12kB

there are a few errors like this one.
2024-06-25 00:00:12,571 - Inv1 - mqtt - [ERROR ] - MQTT error trying to send a <class 'list'> to the MQTT broker for: givenergy/SA2244G426/Energy/Today/Export_Energy_Today_kWh - ['Export_Energy_Today_kWh', 8.5]

But no idea if that's the problem.
Looking at tonights plan, its scheduled at the moment to be freeze charging again at midnight, so will check logs tomorrow.

G
#1477 geoffreycoan

Wavy Davy Thanks for the reply. Both logs must reset at midnight, so missed any errors before then, but here's the givtcp log.

The givtcp log does reset at midnight but there are old generations of it in the givtcp folder. The predbat log depends on how you installed predbat, if its using appdaemon or appdaemon-predbat, a new logfile is created when the existing one reaches a certain size, again there should be old generations available. Think the predbat add-on only keeps 1 old generation at the moment.

The error isn’t the issue, it’s a data conversion problem and that’s an output sensor in HA - probably complaining because the inverter reset the data at midnight. The sort of errors to look for are write commands like this except that report a failure rather than success:

2024-06-25 05:15:52,114 - Inv2 - write       -  [INFO    ] - Setting battery charge rate to: 0 (0)
2024-06-25 05:15:53,954 - Inv2 - write       -  [INFO    ] - Setting battery charge rate 0 was a success
2024-06-25 05:19:45,493 - Inv2 - write       -  [INFO    ] - Setting battery charge rate to: 2600 (50)
2024-06-25 05:19:49,641 - Inv2 - write       -  [INFO    ] - Setting battery charge rate 50 was a success

But yes, have a look tonight at what is planning. Mine at the moment plans to let the battery discharge most of the night as the import rate is > 16p (which seems to be the threshold compared to export rate once losses are included)

W
#1478 Wavy Davy

Geoff,
Just rechecked and there are 2 predbat logs both todays and givetcp logs show no errors.

#1479 PianSom

@geoffreycoan
I just entered the dets for tomorrow's Power-up. 2 1/2 hours of free elec, and the net increase in Predbat savings is ... 59p with a Metric Battery Cycle Cost of 1p/kWh.

What are you going to do?

G
#1480 geoffreycoan

PianSom thanks, I hadn’t seen that yet. Have set it up and Predbat plans to discharge and then recharge the battery in the power up event. Compared to just holding the charge, total extra income = 60p, so very similar result to you.

I will sign up for the event but won’t let Predbat discharge and recharge the battery. The 12pm slot for example is predicting 4.37kWh of generation, my two inverters can at best charge 2.6kWh in the half hour, so net I won’t save anything.
Will probably try to shift some load into that period so if we do end up importing then at least it’ll be free, but the solar generation is so high at the moment that these events are just not worthwhile. I’m not convinced I would get 60p profit anyway.

Wavy Davy Looking at tonights plan, its scheduled at the moment to be freeze charging again at midnight, so will check logs tomorrow

It is looking like a bug in Predbat then. If you can see tonight what actually happens, the above power flow is useful because it shows what is actually happening to the battery and grid, and if you are able to capture something like the below that In have to see what all the individual inverter controls are set to. I have two sets of these (two inverters) in my dashboard and there’s a collapsable section just to reduce the screen real estate, but I find it useful to see the underlying inverter controls, and if I want to, to change them. Can share the yaml if you would like it:

W
#1481 Wavy Davy

geoffreycoan Yes please, that would be great.
You're lucky with the power ups. Where are they announced? I have automatically been in the ones in my area, but don't remember seeing them announced.

W
#1482 Wavy Davy

Sorry that wasn't power ups but saving sessions.

G
#1483 geoffreycoan

Wavy Davy Here you are. Just replace the g_xx’s with givtcp_inverter serial number and indent appropriately for your own dashboard.

I’m using the HACS front end component https://github.com/thomasloven/lovelace-fold-entity-row for the collapsable part of the dashboard. Just remove and include the list of entities if you don’t want this.

              - type: entities
                entities:
                  - entity: sensor.g_xx_soc
                  - entity: select.g_xx_mode
                  - entity: number.g_xx_target_soc
                  - entity: number.g_xx_battery_power_reserve
                  - type: custom:fold-entity-row
                    head:
                      type: section
                      label: Charge/Discharge Settings
                    entities:
                      - entity: select.g_xx_battery_pause_mode
                      - entity: select.g_xx_force_charge
                      - entity: number.g_xx_battery_charge_rate
                      - entity: switch.g_xx_enable_charge_schedule
                      - entity: select.g_xx_charge_start_time_slot_1
                      - entity: select.g_xx_charge_end_time_slot_1
                      - entity: select.g_xx_temp_pause_charge
                      - entity: number.g_xx_battery_discharge_rate
                      - entity: switch.g_xx_enable_discharge_schedule
                      - entity: select.g_xx_discharge_start_time_slot_1
                      - entity: select.g_xx_discharge_end_time_slot_1
                title: G182 Inv1 Control

The Octopus Power up’s are free electricity at periods of excess energy for certain postcodes in East Anglia. Octopus are partnering with UK Power Networks, our DNO, and have said they plan to expand it wider.

W
#1484 Wavy Davy

geoffreycoan Thanks for that, but when I toggle the entities nothing is there. Any ideas why that would be?
Looking at the docs it says
"Why isn't the card header toggle working with all the entities in my fold?
This is a limitation in Home Assistant. The header toggle will look at each entry in the entities card, and if it has an entity option, it will toggle that. Nothing more."
If I try the examples he has on GitHub, it works, but not with your code.
The top part displays ok.

By the way my predbat plan has decided not to freeze charge/discharge at all until Thursday.

G
#1485 geoffreycoan

Wavy Davy but when I toggle the entities nothing is there. Any ideas why that would be?

I can only guess that you have a misalignment in the indenting of the YAML somehow.

The fragment above was cut out of a much more complex dashboard so there were several vertical and horizontal controls above which is why it was indented so much. Can you share your YAML, or just check the indentation, the 'type', 'head' and 'entities' should all be aligned with the word 'entity' of the prior list of entities.
Then its two spaces, dash, space, 'entity:'

You could just get rid of the folding stuff and have a single long list of entities on one card. I just had the fold to hide away the controls I didn't change/want to see as much.

W
#1486 Wavy Davy

``
type: entities
entities:

  • entity: sensor.givtcp_xxxxxx_soc
  • entity: select.givtcp_xxxxxx_mode
  • entity: number.givtcp_xxxxxx_target_soc
  • entity: number.givtcp_xxxxxx_battery_power_reserve
  • type: custom:fold-entity-row
    head:
    type: section
    label: Charge/Discharge Settings
    entities:
    - entity: select.ge_inverter_xxxxxx_pause_battery
    - entity: select.givtcp_xxxxxx_force_charge
    - entity: number.givtcp_xxxxxx_battery_charge_rate
    - entity: switch.givtcp_xxxxxx_enable_charge_schedule
    - entity: select.givtcp_xxxxxx_charge_start_time_slot_1
    - entity: select.givtcp_xxxxxx_charge_end_time_slot_1
    - entity: select.givtcp_xxxxxx_temp_pause_charge
    - entity: number.givtcp_xxxxxx_battery_discharge_rate
    - entity: switch.givtcp_xxxxxx_enable_discharge_schedule
    - entity: select.givtcp_xxxxxx_discharge_start_time_slot_1
    - entity: select.givtcp_xxxxxx_discharge_end_time_slot_1
    title: xxxxxx Inv Control
    ``
G
#1487 geoffreycoan

Wavy Davy can you repaste it as formatted yaml, its unfortunately lost the indentation as it is pasted in.

type the little backwards grave symbol ` three times then the word yaml. i.e. ```yaml
then paste in your code
then another three `
[you can edit the comment above and add the three ` and yaml before and three ` after]

update: the pause battery is written as ge_inverter_xxx - should be givtcp_xxx_ - this may be the problem?

W
#1488 Wavy Davy

geoffreycoan

type: entities
entities:
  - entity: sensor.givtcp_sa2244g426_soc
  - entity: select.givtcp_sa2244g426_mode
  - entity: number.givtcp_sa2244g426_target_soc
  - entity: number.givtcp_sa2244g426_battery_power_reserve
  - type: custom:fold-entity-row
    head:
      type: section
      label: Charge/Discharge Settings
      entities:
        - entity: select.ge_inverter_sa2244g426_pause_battery
        - entity: select.givtcp_sa2244g426_force_charge
        - entity: number.givtcp_sa2244g426_battery_charge_rate
        - entity: switch.givtcp_SA2244G426_enable_charge_schedule
        - entity: select.givtcp_sa2244g426_charge_start_time_slot_1
        - entity: select.givtcp_sa2244g426_charge_end_time_slot_1
        - entity: select.givtcp_SA2244G426_temp_pause_charge
        - entity: number.givtcp_SA2244G426_battery_discharge_rate
        - entity: switch.givtcp_SA2244G426_enable_discharge_schedule
        - entity: select.givtcp_SA2244G426_discharge_start_time_slot_1
        - entity: select.givtcp_SA2244G426_discharge_end_time_slot_1
title: SA2244G426 Inv Control
G
#1489 geoffreycoan

Wavy Davy the 'entities' list is embedded two spaces too far to the right, it should be aligned vertically under the 'head'. The "- entities" beneath then should be two spaces to the left.

Plus the first select is probably the wrong entity name?

W
#1490 Wavy Davy

geoffreycoan

type: entities
entities:
  - entity: sensor.givtcp_sxxxx_soc
  - entity: select.givtcp_xxxx_mode
  - entity: number.givtcp_xxxx_target_soc
  - entity: number.givtcp_xxxx_battery_power_reserve
  - type: custom:fold-entity-row
    head:
      type: section
      label: Charge/Discharge Settings
      entities:
        - entity: select.ge_inverter_sxxxx_pause_battery
        - entity: select.givtcp_xxxx_force_charge
        - entity: number.givtcp_xxxx_battery_charge_rate
        - entity: switch.givtcp_xxxx_enable_charge_schedule
        - entity: select.givtcp_xxxx_charge_start_time_slot_1
        - entity: select.givtcp_xxxx_charge_end_time_slot_1
        - entity: select.givtcp_xxxx_temp_pause_charge
        - entity: number.givtcp_xxxx_battery_discharge_rate
        - entity: switch.givtcp_xxxx_enable_discharge_schedule
        - entity: select.givtcp_xxxx_discharge_start_time_slot_1
        - entity: select.givtcp_xxxx_discharge_end_time_slot_1
title: xxxx Inv Control
G
#1491 geoffreycoan

Wavy Davy the 'entities' list is embedded two spaces too far to the right, it should be aligned vertically under the 'head'. The "- entities" beneath then should be two spaces to the left.

Plus the first select is probably the wrong entity name? should be givtcp_xxx_battery_pause_mode
The ge_inverter entity looks like its been picked up from the GE cloud add-on not givtcp

If you don't have the fast change gen 1 firmware 191/193 or have a gen 2 or 3 inverter, the pause battery control won't exist so ignore this line

W
#1492 Wavy Davy

Thanks Geoff, Getting there. I have a general 1 and have now got pause battery showing.
I do have about 5 entries saying not available, but will check the entity names.

W
#1493 Wavy Davy

All up and showing. Thank you for your patience.

#1494 PianSom

geoffreycoan Will probably try to shift some load into that period so if we do end up importing then at least it’ll be free, but the solar generation is so high at the moment that these events are just not worthwhile. I’m not convinced I would get 60p profit anyway.

I have learned my lesson. Having dumped a full battery, I am now recharging from solar (6kW PV inverter to 6kW AIO inverter) while the grid import covers house load. This is not sensible. No more Predbat managed Power-ups for me while the sun shines.

The only time it might be worthwhile is either if I had a big house load to cope with (oven cleaning, say) or it was a real heatwave and I wanted to get the A2A units running at max for a few hours.

G
#1495 geoffreycoan

PianSom Yeah, I’ve got predbat in read only mode and have left the battery fully charged.

The heat pump is on (must be topping up the hot water) for 0.9kW, washing machine is on for another kW, but we’re still exporting 6.4kW. If both batteries were charging and the hot tub then I could be importing at maybe 2kW, but it’s hardly worthwhile. If it’s a windy but not sunny day then it’s worth charging up the batteries, but not with this much sun.

Yesterday was my best solar generation day of the year so far, 82.5kWh 😀

On the subject of solar generation, there are several tickets on github about clipping in predbat https://github.com/springfall2008/batpred/issues/1250 and apparently there’s some discussions with Trefor about it on Facebook. This ticket suggests that the latest Predbat version is doing forced discharges to reduce the impact of clipping; I’ve not seen it myself, have others?

At the moment I’m leaving predbat in read only mode so I can reduce the inverter charge rate during the day so I trickle feed the battery. My array on the front of the house is 6.3kW so can exceed my 5kW inverter capacity. By charging at 1.2kW it fills the 9.5 battery slower so I get the 5kW of AC generation plus 1.2kW into the battery.

G
#1496 geoffreycoan

geoffreycoan OK so today another power up event and cheap rates afterwards so I thought I'd put the hot tub on and let predbat do its thing of discharging and recharging the battery afterwards.

I don't think it was worthwhile. Between 12:00 and 14;30 I imported 3.8kWh but also exported 1.2kWh - so most of my consumption was being met from solar and at times I was having to export the solar excess. Whereas if I'd kept the battery full I wouldn't have incurred the conversion losses and would have exported throughout.

Tomorrow is a similar story, the rates are cheap overnight so Predbat is charging on cheap rate so I start exporting sooner (which is good), but then plans to discharge in the morning and recharge in the afternoon:

I have two gen 1 hybrid inverters so can charge both batteries at a total of about 2,4kWh every half hour block. For this entire block of charging the solar prediction is greater than 2.4 so I'll be charging and exporting the excess. So no benefit from the cheap rates at all.

I have manually set the period to force Idle and the predbat prediction is just 7p worse off at 4pm.

#1497 PianSom

geoffreycoan
Same story here, except I turned on the Eddi rather than the hot tub!

And same conclusion - the game is not worth the candle. Goes against the grain to turn away free power, but just doesn't seem worth using most of the time.

P
#1498 Phil_H

geoffreycoan Do you have the cloud model enabled? This would modulate the expected solar (the amount depends on PV10) so maybe this is thinking for some bits of that period, while the overall generation is kept the same, there might be periods of lower solar (clouds) where some importing would occur?

#1499 PianSom

Phil_H
Well, that’s news to me. I’d always assumed that “cloud” refers to the internet, rather than the white, fluffy things. Doh!

G
#1500 geoffreycoan

Phil_H Hi Phil, yes I do have the cloud model enabled, and that does indeed appear to explain it.

If I look at the Predbat plan (rather than the Predbat table card) it shows the PV10% and I can see that the 10% figure is quite a bit lower than my max inverter throughput:

I tend to just look at the PV forecast figure which is the weighted average of PV50 and PV10 over the 30 minute time period. Of course clouds mean it could be up and down and not constant.

I still think the benefit of the discharge and recharge is marginal. Looking just now the forecast PV is 3.56kWh, the PV10% is 1.99kWh, and I’m actually achieving 4.2kWh

W
#1501 Wavy Davy

What's the best way to "persuade" predbat to temp. stop charge/Discharging. I have a Gen 1 hybrid so don't have pause battery option. I thought setting a charge schedule might work, but then realised if the battery wasn't fully charged it would just import from the grid. Also where is the cloud model switch? Think i must have it enable as I get the PV kWh 10% column on the chart, but cant find a setting switch anywhere.

G
#1502 geoffreycoan

Wavy Davy What's the best way to "persuade" predbat to temp. stop charge/Discharging. I have a Gen 1 hybrid so don't have pause battery option. I thought setting a charge schedule might work, but then realised if the battery wasn't fully charged it would just import from the grid.

Depends what you mean by ‘stop charging/discharging’ ….

The select.predbat_manual_xxxxx controls are by far the easiest way of instructing Predbat that you want it to do something different from what’s in the plan. You simply select the 30 minute time period from the appropriate control, and Predbat will recalculate the plan. If you want to do something for more than 1 30 minute slot, you can select one slot, then a second, etc. If you want to select a long period of time then its a bit laborious doing this one slot at a time so writing an automation might be easier - but don’t make lots of selections one after another in the automation, you have to give Predbat the chance to respond to each, I put a delay 60 between each one in my automation.

Which of the select.predbat_manual_xxx controls you want to use depends on what you mean by ‘stop charging/discharging’.

predbat_manual_idle puts the battery into Eco mode, charge off solar, discharge to meet house load

predbat_manual_freeze_charge holds the battery at the current level (stops it discharging) but allows solar charging

predbat_manual_freeze_discharge holds the battery at the current level, any solar charging is exported, but allows the battery to discharge to meet house load

Have a look at the modes in the documentation https://springfall2008.github.io/batpred/what-does-predbat-do/

Also where is the cloud model switch? Think i must have it enable as I get the PV kWh 10% column on the chart, but cant find a setting switch anywhere.

The control switch is switch.predbat_metric_cloud_enable, which is only visible if you have expert mode turned on
See the documentation https://springfall2008.github.io/batpred/customisation/#cloud-coverage-and-load-variance

However, you will always see the PV10% column. Solcast generates three forecasts, the ‘50% likely’, ‘10% likely’ and ‘90% likely’. By default Predbat uses a weighting of the 50% and 10% forecasts and what you will see in the PV column is that weighted figure. Think of it as being the ‘anticipated PV’ and the 10% as being the ‘worst case PV’.

Weighting of Solar predictions and House load is as ever covered in the documentation https://springfall2008.github.io/batpred/customisation/#scaling-and-weight-options

The reference to the ‘cloud model’ is how Predbat works out the PV across the 30 minute period. If the cloud model is turned off it assumes the blended PV figure will be constant for the entire 30 minutes. If cloud model is turned on it still assumes that the 30 minute solar prediction is the same, but it modulates the anticipated solar every 5 minutes up and down to simulate clouds passing overhead. Think of it as a more accurate way of working out the best and worst case solar and whether Predbat should plan to grid or solar charge the battery or not.

#1503 PianSom

Is anyone here trying out predai? I’m interested in getting involved, but sadly it’s not suitable for my setup. Still like to hear what early adopter’s thoughts are

B
#1504 browellm

Looking for a bit of configuration advice on how to correctly model my early gen1 hybrid's forced export behaviour in predbat that I outlined in this thread.

The % efficiency roundtrip switches work fine for calculating efficiency for house demand, but when it comes to forced exporting out of the battery there seems to be a flat 400W(ish) overhead in inverter output.

For example, if my evening house load is 600W and I export to the grid, around 1000W is consumed with the excess 1500W going to the grid.
But this doesn't scale as a % of house load, so if my house load is 300W and I export, I see 700W consumed by the inverter and 1800W goes to to export.

R
#1505 Rbor

PianSom I'm going to look at it once I have some time!
I have installed predai but haven't done anything with it yet.

Rob

G
#1506 geoffreycoan

browellm Looking for a bit of configuration advice on how to correctly model my early gen1 hybrid's forced export behaviour in predbat that I outlined in this thread.

I've had a look at the apps.yaml and customisation options for Predbat and it doesn't look like there is the ability to set something that applies an 'export overhead', sorry.
So at the moment you'll have to put up with Predbat's estimation of money and power is incorrect. I would expect the actual export figures and export income will be correct as these are measured based on what the inverter sees goes to/from the grid, but the prediction will be wrong.

P
#1507 Phil_H

browellm Surely the 400W when exporting isn't a flat overhead, it's just the % efficiency when working with bigger numbers? The inverter doesn't care whether your house load is 300W and you are exporting the rest up to the 2600W limit or the house is consuming all of the 2600W itself. To the inverter it is just turning DC into 2600W of AC and chucking it out.

S
#1508 SJB

browellm I have a Gen 1 hybrid as well and I did some experimentation to work out what my efficiencies were.
When charging the battery from the grid (max charge rate) the losses were about 3%.
When discharging the battery to meet house load (400W) the losses were about 17%.
When discharging the battery to export (max discharge rate) the losses were about 15%.
Of course these figures use the inverter readings and the margin of error means they have to be taken with a generous pinch of salt. However, 20% efficiency round trip efficiency is often quoted on this forum and the results are inline with that.

Do you have any observations showing that Predbat isn't modeling the export correctly? As @Phil_H says your 400W overhead directly related to the efficiency (it's roughly 15% of your max discharge rate). If you have the efficiency levels set right for house demand then the modeling should still work although it may be a few percent out as discharging at the maximum rate is more efficient.
What are your settings for:
input_number.predbat_battery_loss
input_number.predbat_battery_loss_discharge
input_number.predbat_inverter_loss

B
#1509 browellm

Phil_H It's not borne out though. If the inverter is supplying large house loads, that overhead simply doesn't exist.

I will check again though and post some numbers.

G
#1510 geoffreycoan

SJB When charging the battery from the grid (max charge rate) the losses were about 3%.
When discharging the battery to meet house load (400W) the losses were about 17%.
When discharging the battery to export (max discharge rate) the losses were about 15%.
Of course these figures use the inverter readings

I’ve personally never measured my losses although others on the forum have and come up with results in the 10-20% range. I’m surprised that your testing results are so imbalanced, the 3% charging loss in particular is very low as its incurring AC to DC losses in the inverter and battery DC charging losses - I’d expect something nearer 10% overall.

Part of the challenge may be how and WHERE the power is measured in the inverter/battery. I think there’s been previous explanations of where precisely the inverter can measure things in the multi-step process that goes on inside the box, and of course stored kWh in the battery isn’t actually measured at all, but inferred from voltage and SoC calibration results.

TBH whilst the predbat prediction of end of day profit is interesting there’s lots of variables at play like house load and solar generation. So whether there are overheads that the prediction doesn’t precisely model isn’t all that essential to have perfect. What for me is more important is that ‘appropriate’ decisions are taken over whether to charge or discharge the battery based on import and export rates.

I have my charging loss set to 5.5%, discharge to 5% and inverter to 4%. Quite why these values, no particular logic that I can remember other than I have tweaked them a bit to try to get a plan that I was happy with!

#1511 Hook

Anyone gone above version 8?

Tried going to 8.1 and 8.2 but it didn’t like it so reverted back.

G
#1512 geoffreycoan

Hook I’m running on 8.1.2 and haven’t upgraded further as I am fiddling around trying to write python code to interrogate the HA supervisor to find out where the /config files are really being held. Stupid defect I raised myself about log messages being misleading has led me down this rabbit hole…

But I had problems upgrading beyond v8, finding that Predbat crashed on a later version. Others have had the same issue, but it was fixed by just restarting AppDaemon/Predbat addon as appropriate

R
#1513 Rbor

Hook I upgraded from v8.1 to v8.2.2 without any issue.
But I am now running the standalone appdaemon-free predbat add-on. I wonder whether this is causing the difference?
Looking at comments, quite a few are commenting on glitches when upgrading v8 variants.
As Geoffrey has stated, restarting the appdaemon-predbat add-on seems to sort out any glitchy upgrade.

Rob

#1514 PianSom

I'm now on 8.2.3, but the upgrade pathway does indeed suck. Restarting (docker container in my case) appdaemon ftw

R
#1515 Rbor

PianSom I have just upgraded smoothly from v8.22 to v8.23 without my status hiccuping at all. See screenshots. And the upgrade seems to have stuck.

I am on standalone predbat running on HAOS (latest version) on a pi4.
So no appdaemon or docker to get in the way and we have different environments.
Is it worth adding your problem here to your issue on Github?

Rob

P
#1516 Phil_H

I went from 8 to 8.1.x and required an app daemon restart to fix a crash. I then went up to 8.2.x and required another app daemon restart to make it all realise that it was up-to-date (was still telling me an update was available). Is all running fine after this though. RPI4 with separate predbat and app daemon add on.

W
#1517 Wavy Davy

I ditched appdaemon and I'm on the stand alone version with no problems. Just updated to 8.2.3 seems ok but only just done it so will keep an eye on it. I also uninstalled appdaemon as I didn't use it for anything else.

S
#1518 SteveCook

Wavy Davy
How does one go about "ditching " app daemon.
I have just updated to v8.2.3 but lots of restarts etc

S
#1520 SteveCook

geoffreycoan
Geoffrey. Thanks
looks scary to me. I will have a think for a few days

#1521 Hook

Just updated from v8.0 to v8.2.3.

Rebooted predbat and all ok.

W
#1522 Wavy Davy

SteveCook Steve,
Sorry only just seen this. I used the instructions Geoff pointed to, and had no problems at all (for a change!).
Also now when I do updates I don't get appdaemon update messages in settings and as far as I remember I haven't had to do a restart. I have disabled auto updates for a while and do them manually. So far no problems.

G
#1523 geoffreycoan

Wavy Davy I used the instructions Geoff pointed to, and had no problems at all (for a change!).

Ha, so my documentation updates are usually more rubbish than this one then ? 😢

W
#1524 Wavy Davy

geoffreycoan I couldn't presume to say that......

I think it's more my ability to follow any instructions that's the problem. Also I usually have different kit to most people.

W
#1525 Wavy Davy

You'd think that as someone that's worked for ICL, IBM and Honeywell I'd have a better grasp of HA and predbat but I just get baffled by the terminology.. 🥸

G
#1526 geoffreycoan

Wavy Davy snap, snap, and that’s a name from the past!

R
#1527 Rbor

So I moved from appdaemon-predbat to standalone predbat a few weeks ago.
I also deleted the old appdaemon-predbat files.

Does appdaemon itself still linger on my HA setup anywhere?
I can't see it but predbat still refers back to appdaemon in some of its logs.

If I do find appdaemon itself, it is sensible to delete it?

Thanks

Rob

G
#1528 geoffreycoan

Rbor If there’s nothing in the add-on list then Appdaemon should gave gone

I think some of the logging refers incorrectly to appdaemon because that was how it always used to run. I’ve got it on my list to take a look

R
#1529 Rbor

geoffreycoan For the standalone predbat, I think that Trefor used the same code as the appdaemon-Predbat, but moved the code into different folders.

I have looked in my predbat log and there are 35 references to appdaemon, all to appdaemon time.
See screenshot.

Rob

G
#1530 geoffreycoan

Rbor For the standalone predbat, I think that Trefor used the same code as the appdaemon-Predbat, but moved the code into different folders

To clarify, there is only 1 set of Predbat code, the python module predbat.py and its configuration file apps.yaml
(and yes I know, predbat.py has now been split from version 7.22.5 into about 6 different modules, but the principle is the same)

Predbat is exactly the same regardless of whether it is the AppDaemon install, the AppDaemon + Predbat install or the Predbat add-on install.

What differs is the add-on “container” that has been installed for Predbat to run in.

The Predbat code still errantly refers to things like ‘AppDaemon time’ whereas in reality it means ‘the clock time of the computer container that Predbat is running in’. If you are running Predbat from within Home Assistant then it’s the Home Assistant computer’s time. If you are running Predbat in your own docker farm like some people with time on their hands like @PianSom then its the clock time of the server that docker si running on.

It’s just the log message that is misleading and needs updating.

Needless to say I won’t be writing all of this in the logfile message!

PS: What do you think I should change the message to. I’ve changed it to “Predbat computer time” but welcome other suggestions

R
#1531 Rbor

geoffreycoan After all the work you have put in to predbat, perhaps it should be an Easter egg: ‘geoffrey time'.

Rob

#1532 PianSom

geoffreycoan If you are running Predbat in your own docker farm like some people with time on their hands like @PianSom

lol at “farm” - more like a pot plant!

I have a little pandemic-era i3 NUC running docker. It replaced all my previous Pi’s. As well as HA/AppDaemon it is used as a media hub (Plex, the various Arr packages) and a general useful dumping ground (OwnCloud, inverter monitor, weather station monitor). Stable as a table, and nice low running costs.

That said, I’ve been wondering about getting a new server running Proxmox, so I can move to a modern HA like all you cool kids. If only I had the time.

R
#1533 Rbor

PianSom I swear by my pi4 for HA, but running from an SSD rather than one of those little SD cards which are prone to wear out in a couple of months for me. I have a pi case that works as a heat sink and power consumption is minimal, just a few watts. I run it headless from various macs.
I recently bought a pi5 with a pihat and quick NMVE SSD but I have never got around to transferring HA from my trusty pi4.
I am very busy at the moment but am thinking of setting up my Pi5 as my project toy, perhaps installing Docker, which I know precious little about. Perhaps even a Docker Farm!

Rob

R
#1534 RobH

Hi all,
Just starting to try predbat in anger. Today with all the low and negative pricing on Agile it seems to be cycling like mad, is this a normal way for it to respond?

(AIO with 6kW inverter)

#1535 PianSom

Rbor
Can't go wrong with Pi's! Most of mine have PoE hats so they can be run headless, hung off a switch in a cupboard somewhere. Or just sit in a pile, unused these days.

Actually, the top priority I have for my HA is to do something about getting my data history more robustly managed. I am finding that I am actually getting quite addicted to historic energy analysis (a subject, oddly, that seems not to appeal to my immediate family). I really need to move long term data from HA to a proper standalone database like InfluxDB. It's only since I started with Predbat in January that I have begun to care about losing the history.

R
#1536 Rbor

PianSom yes I would like to look at my historical data. I will be interested to hear about any solutions. Not heard of InfluxDB but will investigate.
Looks like we both embarked on our predbat journeys in January when this thread with about 100 deep. And looking back, we have asked many of the same questions as we have learnt more about predbat ....... from each other. It has, sort of, changed my life!

Rob

G
#1537 geoffreycoan

RobH Just starting to try predbat in anger. Today with all the low and negative pricing on Agile it seems to be cycling like mad, is this a normal way for it to respond?

Welcome to the Predbat gang Rob

Predbat tries to do a least cost optimisation for you, charging and discharging the battery to give the lowest electricity bill for you.
If you look at the two kWh columns, they are PV generation and house load, I can see that they are fairly matched through the day, and in many slots the house load is higher than your solar.

So Predbat is taking the best advantage of the pricing, charging up when its negative prices so you get paid for the import and then exporting at your 15p export rate. This is quite normal, but everyone’s plans are different.

My own for last night/today was a big discharge and then recharge overnight but keeping the battery full all day - my solar generation is much higher than my house load so I won’t be able to take the advantage of the negative import prices, so Predbat fills the battery on negative electricity and I’ll just gain the export revenue

Have a look at the Predbat FAQ’s, they better explain how Predbat optimises the battery and what levers of control you have if you don’t like the plan it produces

R
#1538 Rbor

RobH First of all, welcome to predbat. You are in for quite a journey. The folk in this thread are incredibly helpful.
On your setup is your predbat mode: 'Control charge & discharge', which is really needed to allow predbat to do its thing. Predbat's policy is to get hold of electricity at low cost (from solar or low grid rates) and to sell excess back to grid. With the wild rates at the moment, I find that predbat grabs low night-time rates to fill my batteries, having offloaded back to the grid the previous evening. But my daytime plan is very different from yours

But this evening (and predbat hopes pattern will be same as last night), predbat, for me, has:

But we are all different and have different use patterns.
Can you share some of your settings so that we can help you on your predbat journey.
Oh and make use of the great documentation:
https://springfall2008.github.io/batpred/
and Trefor's videos:
https://www.youtube.com/playlist?list=PLTjtFJ0drtomKJzT7oZ3pCa0kzvFzUA_u
....... and dare I say, learn!

Rob

G
#1539 geoffreycoan

Rbor But my daytime plan is very different from yours

Your pattern Rob is similar to mine, your solar generation exceeds your house load by a significant margin - most of your slots are 2kW of generation vs 0.2kW of consumption. In order to be taking advantage of the negative import rates you’d need to be consuming the 2kW generation first. So predbat decides to hold the battery level full for the day and just take the export income.

BTW, don’t get too excited about the plan for tonight yet, remember that Predbat is just rolling forward yesterday’s rates into the plan as being the same tonight as they are tomorrow. At about 10am the Norddata prices should come through so we’ll have a better idea what the prices are going to be and the plan will be more accurate.
(Norddata prices with the little scales symbol next to them)

I think I am on track to be more than £10 in profit for today for the first time.

R
#1540 Rbor

geoffreycoan Yes, Norddata prices have appeared, and predict a few pence overnight. Octopus Watch shows the same, and based on different databases. Of course, we won't know the true pattern until 4 pm this afternoon when Octopus release agile rates.

Last night, I had the dishwasher going and washing machine going.
I always stay up for election results and I may go for an early hours baking session for some loaves is the low rates materialise. As others have said, we need these low rates at night. Negative daytime rates are wasted on us with generation from our solar panels which is used before the grid.

Much more interesting than the placid days that we have had recently where predbat has largely had a holiday.

Rob

T
#1541 The Black Cat

geoffreycoan The upgrade instructions to the Predbat add-on are earlier in this thread, and are in my fork of the documentation https://github.com/gcoan/batpred/blob/main/docs/install.md#upgrading-from-appdaemon-to-predbat-add-on awaiting me finishing some other bugs & doc changes

I'm currently running Predbat using the "HACS, Appdaemon add-on then Predbat installation method" and trying to install the Predbat Addon following the above instructions. After installing the addon, the /addon_configs/6adb4f0d_predbat directory does not exist. I've uninstalled and re-installed but it still does not exist. The system log files do not show anything.
So I followed the instructions as far as:-

Add the Predbat add-on to the list of Repositories in the add-on store
Install the Predbat add-on
But do not start it - yet

Any suggestions?

Z
#1542 Zaz

The Black Cat I found the directory and files only appeared after I started the add-on so just start it and stop it immediately and you will see the directory.

T
#1543 The Black Cat

Zaz I found the directory and files only appeared after I started the add-on so just start it and stop it immediately and you will see the directory.

Thanks, that sorted the problem out and it's now up and running.

G
#1544 geoffreycoan

Zaz The Black Cat I found the directory and files only appeared after I started the add-on so just start it and stop it immediately and you will see the directory.

thanks, I have amended the Predbat add-on upgrade instructions to cover this

R
#1545 RobH

Rbor
Thanks all. I get everyone is different. I guess my concern is more that it seems to like charging and discharging whenever price is low, even in same 1/2 hour slot. So overnight when no solar but a predicted low rate it is constantly cycling rather than nice chunks of up and down as other ones posted appear to be. Feels like it can’t be good for the battery long term?

What particular settings would be of interest? I had tried playing around with most looking at the documentation but never seemed to produce drastically different results.

G
#1546 geoffreycoan

RobH If the prices are low then mine sometimes does a charge and discharge in the same slot, you can see that in the screenshot from last night.
Its logic is pretty clever and if you turn on expert mode you can see the effective import and export prices which go some way to understanding why it makes some of the choices it does.

If you want to stop forced discharging entirely, just change the predbat mode to Charging. But in terms of impact on the battery, they have unlimited charge/discharge warranty cycles so I take the view that you’ve spend the money you might as well use it rather than have it sitting there idle.

If you want to dissuade against cycling the battery you can increase the metric cycle cost which puts a ‘value’ on the cost of charging and discharging the battery. Have a look at this FAQ for a longer explanation https://springfall2008.github.io/batpred/faq/#the-plan-doesnt-charge-or-discharge-when-i-expect-it-to

G
#1547 geoffreycoan

One of the annoying niggles with Predbat (well annoying for me) is that the pathnames for things like where the template dashboard, the config files, the predbat save file, etc all refer to /config which isn't actually where these files are stored any more. There is also references in the logfile to AppDaemon that if you're running the Predbat add-on now are no longer accurate.

I've fixed both of these, the first one was a right rabbit hole of having to work out where /config is mounted, and then a day of working out how I had broken the bits of predbat that respond to you changing controls and predbat responding to them.

I have tested this on my HA under both the AppDaemon and Predbat add-on's and it all appears to work OK.
Would anyone else be able to test it as well, particularly anyone running with a docker install?
You just need to download all the .py files from my fork https://github.com/gcoan/batpred/tree/main/apps/predbat and copy these in place of your existing .py files.

Note this is predbat v8.0.0 so make sure you don't have auto-update turned on. The logfile should now no longer refer to /config or AppDaemon (well there is one message if running under predbat add-on that I can't really supress).

The Github issue is https://github.com/springfall2008/batpred/issues/1229 - if you can feedback on there please

S
#1548 SteveCook

Geoffrey. You need to post a link to your "buy me a coffee.com"
Regards
Steve

R
#1549 Rbor

geoffreycoan I am very busy at the moment but can trial this as soon as my workload relents.
I am up to v8.2.4 and I resume that I would be able to upgrade back again after trying your tweaks to v8.0.0?
Or if they work, will they be incorporated into v8.2.x by Trefor?

For me, predbat is running very smoothly.

My niggles are more cosmetic as you will have seen, hinging around time:

  • appdaemon time still being shown within a warning despite being on the standalone predbat, and
  • my 5 or 6 historical time warnings in logs every 5 minutes, which would swamp out any other warnings that might occur.

Rob

G
#1550 geoffreycoan

Rbor No worries.

Yes if you turn off auto update, manually copy all my .py files over into /addon_config/XXXXX_predbat and restart the predbat addon it should resolve your issue #1, doesn’t refer to appdaemon any more.

When you’ve tested just turn auto update back on or manually upgrade back to the latest version, restart the add-on and all will be back to normal.

Issue #2 is on the list to look at later on. I am also getting periodic errors about running off the end of an array in predbat that I need to look at. May only be an issue for me as I have two inverters.

Buy me a coffee, I like the idea of that. I’m putting effort into predbat and solcast (and have made a few other tweaks on other integrations) as a way of giving back to the community. Others like Trefor have put a lot of effort in and I feel it’s reasonable to put effort back since I have the time (ish) and skills (ish)

BTW new features in Solcast integration (currently in beta test): site level forecasts (useful if multiple arrays or array orientations), auto retries if 429 error from solcast website, estimate10/90 attributes now easily available in the sensor entities (for display of the possible range of solar prediction)

R
#1551 Rbor

Strange predbat tactics?
See my plan for today below.
'Normal' predbat tactics are to charge overnight during low slots and then to use solar for day-load, exporting excess.
As far as I can see (and I may be wrong), predbat seems to be exporting overnight and then using solar daytime, perhaps topping up with the negative daytime grid rates. But my Gen 1 AC3 inverter can only charge at about 3 kWh. Solar predictions via Solcast not brilliant pm.
Or do I need to tweak my apps.yaml or predbat settings? Or is it just OK? (I usually just let predbat, with its superior knowledge, get on with it).

Thanks

Rob

R
#1552 Rbor

geoffreycoan Interesting that you are working on Solcast as well.

My 25 panels are scattered over 3 orientations on main roof and extensions, close to E(11), S(5) and W(9). I have used a 'Rob-adjustment' to try to fit my setup with the max 2 orientations that I can get out of Solcast and it works pretty well. I can't squeeze any more panels on! I think more Solcast orientations takes me out of 'Hobbyist' status and starts to demand a fee.
Although I don't have as many S facing panels as I would like, E and W are really good outside of the deep winter months. For most of the year, I easily outperform a friend who has 14 S facing panels but he beats me in Dec-Jan.

You clearly deserve some ☕️.

Rob

W
#1553 Wavy Davy

geoffreycoan Geoff,
I don't mind trying this for you, my system is stand alone not docker, but if it helps I'll give it a go.

W
#1554 Wavy Davy

Have copied the py files over, but it doesn't want to downgrade to v8.0.0.
If I set predbat update to V8.0.0 it doesn't say updating (core update still shows up to date) and if I reload safari, version goes back to v8.2.4.
Auto update is set to off.

W
#1555 Wavy Davy

Also 15 minuits after restart entities not populating as below.

May have to reload backup.

R
#1556 Rbor

To trial this, I wonder whether we need to downgrade to v8.0.0 before copying across Geoffrey's files.
Geoffrey?

Rob

W
#1557 Wavy Davy

Oops Seems I've broken it.
Still the same after backup restore.
Will have a better look after the GP qualifying.

W
#1558 Wavy Davy

Think I've REALLY broken it.
No predbat entities available at all.
Tried another restore, just the same.
When I go to add-ons predbat isn't running and start on boot and watchdog are off. If I press restart it starts, but when I update the browser it's not running again, or at least it's not showing any cpu usage.
No errors showing in predbat log file.

W
#1559 Wavy Davy

Just predbat log checked again and there are some errors like this one

SyntaxError: invalid character '·' (U+00B7)
Shutdown, sleeping 30 seconds before restarting
[17:01:55] INFO: Predbat init script running
Running Predbat inside Add-on
Your API key is: XXXXXXX
Bootstrap Predbat
Startup
Traceback (most recent call last):
File "/config/hass.py", line 5, in <module>
import predbat
File "/config/predbat.py", line 112
<title>batpred/apps/predbat/predbat.py at main · gcoan/batpred</title>
^
SyntaxError: invalid character '·' (U+00B7)
Shutdown, sleeping 30 seconds before restarting

this same message appears 7 times.

W
#1560 Wavy Davy

Looking at predbat.py line 112 is
<title>batpred/apps/predbat/predbat.py at main · gcoan/batpred</title>

Looks like the "." in "main · gcoan" is causing the error.

What i don't understand is would this file (and the other py's I changed) not be restored on a full restore?

G
#1561 geoffreycoan

Wavy Davy I think the problem may be the way you downloaded it because if i look at the source of predbat.py it doesn’t have anything about gcoan in it, and at line 112 its just normal python code.

The way I manually installed it was:

  • follow the github link
  • click on each .py file in turn in github
  • click the download file link (top right corner)
  • back, then repeat for all the rest of the .py files
  • then copy all the .py files you have downloaded into the appropriate folder where predbat is installed
  • restart predbat addon/docker container

Its a bit of a hassle as I have it in a different github fork

Reverting is just a matter of using the inbuilt select.predbat_update to download the real predbat version you want then restart predbat addon/docker

@Rbor no you don’t need to revert back to v8.0.0, just copy all the files over the top as above. I have moved from 8.1.0 to my version then back to 8.2.4 no problems but it does need a restart of the predbat addon each time I upgrade/downgrade

Rbor My 25 panels are scattered over 3 orientations on main roof and extensions, close to E(11), S(5) and W(9). I have used a 'Rob-adjustment' to try to fit my setup with the max 2 orientations that I can get out of Solcast and it works pretty well. I can't squeeze any more panels on! I think more Solcast orientations takes me out of 'Hobbyist' status and starts to demand a fee.

Yes Solcast only allows two sets of panel orientations (sites). Either fudge it as you have done or you have to create two separate solcast accounts (which is against the solcast T’s & C’s) for the extra site. Both Predbat calling Solcast and Solcast integration allow multiple account id’s to be specified.

My own 44 panels are 22 on the West and 22 on the East. When I expanded from the original 16 panel FIT array on the West I aimed to fill the roof up completely whilst the scaffolding is up. Worked out afterwards I probably could get another 2-6 panels on the East and maybe one or two more on the West if I moved the existing FIT array panels along a bit. But I probably ought to stop now! Agree with the benefits of E-W, I get very long solar days, from about 5:00am to 9:00pm.

r/e your ‘strange predbat tactics’ above. I have had similar experiences with the day-time cheap rates, finding Predbat often wanted to discharge the battery down to recharge it in the free/negative periods, but on days when the forecast solar is considerably higher than my inverter max throughput so I wasn’t seeing why it was doing this.
There is a github issue on these sorts of behaviours https://github.com/springfall2008/batpred/issues/1235 which I eventually tracked down to switch.predbat_metric_cloud_enable - turning this off dramatically reduced the number of ‘discharge then recharge’ type of scenarios.

What I think is happening (and it could apply to your example as well) is the way predbat is modulating between the PV and PV10 forecasts. If the forecast is at the PV10 end then you’d be able to import loads at the negative rate, but if its at the PV end then the benefits of the negative rate probably won’t outweigh the battery/inverter losses from discharging and recharging.
Turning the cloud model off means Predbat assumes a weighted average PV value over the entire 30 minute period. Having cloud model on means Predbat assumes that the PV oscillates between PV and PV10 over the time period which can result in more chopping and changing behaviour.
For me PV10 was very low today compared to PV. Predbat initially decided to discharge the battery and recharge it and since it was very grey and showery all morning and into most of the afternoon I let it do that. Of course by about 3pm in the negative period the front had passed and it was nice and sunny so we were exporting not importing. Can’t win!

D
#1562 DD

Wavy Davy Looks like the "." in "main · gcoan" is causing the error.

Except it's not a proper "." but a unicode variant B7. Deleting it and substituting an ordinary full stop character may help.

W
#1563 Wavy Davy

geoffreycoan I think your right Geoff, I am using file editor and uploading the files. This changes them and adds the line 112 error.
What's the best way to add them?

G
#1564 geoffreycoan

Wavy Davy I downloaded them from github onto my windows PC as above, then to copy them to HA I have the Samba share add-on installed so I can just access homeassistant.local as a network share on my PC and I simply copied the files across into the right folder.

I am confused about the line 112 and reference to gcoan, it sounds more like a download error to me. As I said I manually downloaded each file from github to my PC and copied them from there. May be possible to select all, copy paste them in with the file editor but that may have messed up the file?

W
#1565 Wavy Davy

I have samba share on mine but it won't let me connect. Will check the add on config.
I have copied and pasted the content and it seems to have copied ok, but still not running correctly.

R
#1566 Rbor

geoffreycoan This is my pattern today:

When generation dropped mid pm, my batteries were being charged 50:50 from panels/grid so I was getting little benefit from the negative rates. I guess that the overall effect is minimal though.
My overall generation for the day so far is 36.6 kWh which I am happy with for such an up and down day.

On my set up, switch.predbat_metric_cloud_enable is on.
I will take a look at [(https://github.com/springfall2008/batpred/issues/1235)] .
One of my challenges, once I get out of my current workload of marking loads of Chemistry A level papers, is to get on top of how predbat works. A true challenge! It would be nice to contribute ......

Rob

R
#1567 Rbor

If anyone is interested, this is my heat pump setup:
[https://arstechnica.com/science/2024/07/the-hunt-for-the-most-efficient-heat-pump-in-the-world/]
It has features on Wired.com and Granddesigns online magazine.
My setup is currently 2nd on the Open Energy Monitor 'leaderboard': https://heatpumpmonitor.org
And of course my panels, GE batteries and predbat are helping behind the scenes but not in an immediate way. Optimising all our energy generation must be the way of the future ...... – not there yet .......

Rob

W
#1569 Wavy Davy

Finally got it back and running ok.
I am running your .py files Geoff, will keep an eye on them and let you know if any more problems

G
#1570 geoffreycoan

Rbor I wish i could get that Apex chart working, I like the way it graphs the PV and Pv10 areas as well as the actual PV generation. My problem is I have 3 inverters so would like to have all 3 inverters shown as well as the sum of all 3.
I spent ages on trying to get it to work in Apex. I can get it to work for 1 inverter, or 3 inverters and the PV forecast, but not all 3 the PV forecast and the PV10. Happy to share the yaml if anyone is more of an apex genius than me.

So I tend to just use the energy dashboard. 41.7kWh generated today vs 49.2 PV and 19.9 PV10. So actually a reasonable generation in the end, but only about £6 of export. Don’t think the negative rates really helped me all that much either.

Wavy Davy glad you got it sorted in the end, do you know what the final problem was? Sorry to have caused you so much angst with Predbat. Assume the logfile messages all look OK?

W
#1571 Wavy Davy

geoffreycoan Geoff, Was my fault not yours. It was a download error. They got changed by my MacBook when I downloaded them which caused the problem, and I didn't realise it. In the end I opened them from your GitHub, copied and pasted them into visual studio (to make sure they were ok) and saved them into HA. to be extra sure I then checked them using file editor. I could maybe have pasted them straight into file editor, but anyway it worked. And no errors that I can see in the logs.

B
#1572 Boffinboy

Braving the upgrade to standalone add on and not having much luck… following the instructions Geoffreycoan has kindly prepared

First I was getting this in the log
Startup
Traceback (most recent call last):
File "/config/hass.py", line 5, in <module>
import predbat
ModuleNotFoundError: No module named 'predbat'

Now, I tried to rebuild and any time I try to start or uninstall I get the message “Another job is running for job group addon_6adb4f0d_predbat” which has been going for 15 min or more…

I also noticed the addon seemed to update to v 1.1.8 but there is no changelog or release notes. Any advice anyone?

R
#1573 Rbor

Wavy Davy
geoffreycoan
I have uploaded Geoffrey's files from Github. I stopped the standalone predbat add-on before doing so.
Once uploaded, I started predbat and all is fine with predbat plan running now on Geoffrey's v8.0.0.

My rogue appdaemon time line has gone.
The only remnant of appdaemon is this line in predbat.log:

2024-07-07 10:20:59.207762: Warn: unable to find /addon_configs/6adb4f0d_predbat/appdaemon.yaml skipping checks as Predbat maybe running outside of AppDaemon`

My historical time lines are still there in logs but I know this is on Geoffrey's 'to-investigate' long list.

I am posting a copies of my predbat.log and predbat add-on log onto Geoffrey's Github issues page.

I will leave predbat running in this configuration for a few hours before upgrading back to v8.2.4, or wherever I was!

Rob

G
#1574 geoffreycoan

Boffinboy hmm, sounds like something has gone wrong in the install process and it’s not downloaded properly.

I think the easiest may be to just reboot HA entirely (including the add-ons, so choose the ‘advance options’ on the reboot dropdown). This may cure the ‘another job is running’ error.

Then delete the predbat add-on, reboot entirely, and try the install again.

I found when it installed on my machine it took absolutely ages to install, maybe 5 minutes or so. Much longer than I was expecting, but no errors.

If it still fails then can you have a look at what’s in the /addon_configs/6adb4f0d_predbat folder and I can help guide you from there. Basically it needs all the *.py files for predbat plus an extra one called hass.py which is the boot loader. What’s happening isn that hass.py is saying it can’t find predbat.py or it can’t find apps.yaml

Boffinboy I also noticed the addon seemed to update to v 1.1.8 but there is no changelog or release notes. Any advice anyone?

Yea it’s weird. I have the same prompt to upgrade to 1.1.8, no release notes, and in github the only release for the add-on is 1.1.7 https://github.com/springfall2008/predbat_addon/releases

Which makes me think there’s something broken with this release and a clean install direct from github might be the answer

G
#1575 geoffreycoan

Rbor 2024-07-07 10:20:59.207762: Warn: unable to find /addon_configs/6adb4f0d_predbat/appdaemon.yaml skipping checks as Predbat maybe running outside of AppDaemon`

This is the one line referring to Appdaemon I left in the code.

When Predbat starts up it does a series of sanity checks (you can see these in the logfile). It does things like check it can find apps.yaml, that apps.yaml points to a predbat install, that the install has a valid version number, that it can find the config directory etc
Part of this is to check the appdaemon.yaml file that’s used by the AppDaemon or AppDaemon-predbat install methods to define the AppDaemon config folder, the time zone, etc. In the case of the predbat install method that file won’t exist, but if you are running either of the AppDaemon install methods it should, and it should be valid.
So I left the message in that it can’t find that file as it is an issue or not an issue depending on which install method you are using.

Oh and BTW, I found where the predbat add-on manages the logfile and creates the .1 backup so I can change this to keep more than one backup. How many do you think would be useful to be able to go back a bit, half?
I’m also thinking of changing the file extension from predbat.log.1 to predbat.1.log to make it easier to view them in a text editor and upload to github if you need to.

R
#1576 Rbor

geoffreycoan
Boffinboy
Following my 'successful' downgrade, I see this in my predbat add-on page:

  • Should I update the add-on above after leaving your predbat v8.0.0 running for a few hours?

  • Or just update back to v8.2.4 via Predbat Core Update?

  • Or both?

Thanks

Rob

R
#1577 Rbor

geoffreycoan Boffinboy Wavy Davy
I guess that the one appdaemon line is still in the code to check for either appdaemon or standalone installations.
For standalone, it is just ignored. That seems fine for now. In time, I think Trefor wants to go 100% standalone.

The appdaemon.yaml could generate up to 9 logs.
Would 4 or 5 be a good number for the standalone predbat?
Certainly needs more that just .1

If your tweaks to the code work, would Trefor then incorporate them within a future version of predbat?

Hopefully my trailing is helping you, although I seem to be the only trouble-free downgrade far!
........ but I have yet to upgraded back to v8.2.4 in a few hours time. Predbat is having a rest for me for a few hours also so this seems like a good time to experiment.

Rob

G
#1579 geoffreycoan

KevinB excellent, I replied to the comment. This could be really useful and give a way to make the Predbat table card (and others if people want) to be much more robust and not dependent upon reinterpreting the Predbat HTML

R
#1580 Rbor

geoffreycoan For info, I have just successfully upgraded back to where I was.

  1. I first upgraded the predbat add-on from v1.1.7 to v1.1.8.
    It took some time but got there with a clean log and no adverse status report.

  2. Then updated predbat from v8.0.0 to v8.2.4.
    This upgrade was very quick but I got a status error, one of our old 'friends':
    Changed to Error: Exception raised Pool not running
    This exception also appeared in predbat.log.
    I restarted the predbat add-on and the exception went away.

My old appdaemon time warning is back.

So a successful and smooth round trip for my predbat.

Rob

#1581 Hook

Rbor great article.

I suspect utilising a Heat Geek installer wasn’t cheap. My boiler is 21 years old and I’d love go down the route of a heat pump, but electricity prices need to come down a lot first.

We’re in a weird position where the UK has some of the highest electricity costs aligned with the lowest gas prices.

https://www.nesta.org.uk/blog/uk-household-electricity-prices-rose-to-levels-higher-than-those-in-any-eu-country/

Be interesting to see what happens with the change of government.

B
#1582 Boffinboy

geoffreycoan

Not sure what’s happening, did a full restart after instilling the add on and now I can’t actually install the add on at all. See below errors.

G
#1583 geoffreycoan

Boffinboy I saw your github issue, hopefully Trefor can diagnose it better than I can.

The ‘No predbat addon Docker image’ isn’t an error, its just saying it can’t find the image so it then goes on to build it, but then it looks like the image is built and predbat starts but it fails to communicate with Home Assistant, gets a timeout.

What’s in the /addon_config/6adb45f0d_predbat directory? Should be a template apps.yaml and a set of .py files?

My guess is an error with the IP address of the Home Assistant server, maybe the template apps.yaml has Trefor’s IP address in it? Suggest(a) having a look at it [especially the ha_url setting] and (b) copying your own apps.yaml into its place and see if that works?

B
#1584 Boffinboy

geoffreycoan thank you for taking a look! I had tried to copy in my own apps.yaml - maybe that was this issue. I will try again a bit later, but am meant to head off on holiday tomorrow so might not fiddle for now….

B
#1585 Boffinboy

Just looked in the directory - only hass.py and the apps.yaml I put in there. Have removed that for now and will try again

G
#1586 geoffreycoan

Boffinboy there should be a zip file containing all the predbat .py files, and then on initial startup the addon should unzip those so alongside the hass.py there should be all the other .py files you currently have in /config/appdaemon/apps/batpred/

Something is I think weird with this build. You can try copying the .py files across and restart the predbat add-on, see if that then starts OK. It’s very strange. See what Trefor responds to on github. At least your original install is working OK.

B
#1587 Boffinboy

geoffreycoan think I’ll wait to hear from Trefor and not touch it until after holidays! Thanks for all your help

R
#1588 Rbor

Hook Thanks for the article. Very interesting:

We’re in a weird position where the UK has some of the highest electricity costs aligned with the lowest gas prices.

https://www.nesta.org.uk/blog/uk-household-electricity-prices-rose-to-levels-higher-than-those-in-any-eu-country/

Be interesting to see what happens with the change of government.

The other niggle is the very high standing charges, again electricity being far higher than gas.

I have a large solar array and batteries and the bulk of my electricity (I now have no gas) comes from my solar generation. Agile rates have reduced my costs for any electricity from the grid, with being paid for my excess electricity providing another source of income.
This year so far (Jan - early July), my total energy cost, including heat and hot water, is –£79.30 (including standing charge). I have been on Agile and 15p outgoing since mid-Jan and predbat since the end of Jan. My heat pump has been brilliant.

Heat geeks are more expensive than many installers but, I'm my opinion, you get what you pay for. The most important thing to look for is an installer who knows what they are doing, whether heat geek or not.
For my installation, as well as the heat pump, I needed a water cylinder and half my radiators upgrading. I also has underfloor insulation added. Luckily my piping was good and didn't need replacing. My installer was brilliant.
I hope I have set myself up energy-wise to have no costs in coming years. Over the last year, I have saved £2700 compared to pre-solar and heat pump days.

I knew nothing when I embarked on all this and have taught myself from loads of youtube videos.
Large providers such as Octopus are cheaper than heat geeks but they are picky, cherry picking the easier instals. They have just set up a partnership with heat geeks: [https://twitter.com/_heatgeek?lang=en]

Rob

#1589 Hook

Rbor

Yeah they partnered with OVO previously. They’ve also announced a partnership with Vaillant as well.

Need more resources to have their training and expertise, but ideally for costs to come down.

R
#1590 Rbor

geoffreycoan Can you explain the significance of PV 10%.
If I look at the forecast data, what does it mean?
I have attached my Solar forecast for last weekend. Very different patterns for PV 10% with very similar Solar Forecast.
What should be able to learn from the predictions? And where does PV 50% fit in (mentioned on Solcast web pages).

Thanks

Rob

G
#1591 geoffreycoan

Rbor No problem Rob

Think of forecasting as being a guessing game. Obviously lots of skill and powerful computers (and apparently Solcast have a network of satellites that look at cloud coverage), but it’s still an educated guess.

Solcast actually produces 3 forecasts (and you can choose which of these Predbat uses its calculations), they are PV10, PV50 and PV90 which are variations of the forecast model with different percentile probabilities of cloudiness.

Starting with PV50, this is the “default” Forecast you see on the graph above. Think of it as being 50% likely to happen.
PV10 is the same forecast but with the 10th percentile clearness (i.e. more cloudy than expected). Think of this as the 1 in 10 worst cast scenario.
PV90 is the forecast with the 90th percentile clearness (i.e. less cloudy than expected). Think of this as the 1 in 10 best case scenario.

Predbat blends together the PV10 and PV50 forecasts (see the doc entries on PV weighting & scaling) to come up with the PV forecast it uses in the battery plan. For me personally I usually achieve around 30% of the generation between the PV10 and PV50.

By the way I submitted a pull request for the predbat addon last night to increase the number of log files from 1 to 9 and to automatically rename them when the logfile reaches the max size.

S
#1592 SJB

geoffreycoan By the way I submitted a pull request for the predbat addon last night to increase the number of log files from 1 to 9 and to automatically rename them when the logfile reaches the max size.

That's good, saves me having to figure out how to do it next time I have a problem 🙂

R
#1593 Rbor

geoffreycoan Thanks for clarifying my PV query. I have been looking at the Solcast info and this fits with the 10/90 shading areas shown on Solcast predictions.

In the 2 Forecast charts that I showed in 1572, the chart on the left has PV 10% just below 'Forecast'.
The chart on the right has the PV 10% much lower that 'Forecast'.
Does this mean that the chart on the left would be much more likely to match forecast and there would be more uncertainty on the day giving the chart on the right?
You can see that the actual PV exceeded forecast in the right-hand chart but was below in the right-hand chart.
The chart on the left was last Saturday when we had all those negative daytime slots.
The chart on the right was Sunday when most slots were close to 15p.

I have another question (please don't cringe!).
In the predbat entities, there is PV best 10% and PV base 10%
What is the difference?

Thanks

Rob

G
#1594 geoffreycoan

Rbor In the 2 Forecast charts that I showed in 1572, the chart on the left has PV 10% just below 'Forecast'.
The chart on the right has the PV 10% much lower that 'Forecast'.
Does this mean that the chart on the left would be much more likely to match forecast and there would be more uncertainty on the day giving the chart on the right?

Correct, when there is a small variance between PV and PV10 then there’s a high degree of confidence in the forecast, and when there is a bigger gap then there is much more chance of variability. This is something to think about when considering whether it’s worth discharging and recharging the batteries on negative rate slots. We get negative slots when there is an excess of electricity, so usually lots of sun or wind. The gap between PV and PV10 can give you an idea of the risk that it’ll be very sunny on your panels and so unlikely you’ll be able to import as much.

You can see that the actual PV exceeded forecast in the right-hand chart but was below in the right-hand chart

All down to the variability of the predictions. Personally I almost never hit my Solcast PV50 prediction but I think that’s due to voltage clipping occurring on my 16 panel East facing array, when its sunny I overload the grid and that inverter keeps throttling the power back and forth.

Rbor In the predbat entities, there is PV best 10% and PV base 10%

RTFM! https://springfall2008.github.io/batpred/output-data/#best-pv-10

The base figures are if Predbat makes no changes to the inverter/battery activity. The best are Predbat’s optimised plan (with PV50). The best/base PV10 are the same but with the PV10 solar prediction.

If you find you are generally getting your PV generation then you can set the pv10 weighting input_number.predbat_pv_metric10_weight to a low value (default is 10%). I’m taking a more pessimistic view so have set it to 0.4 (40%)

R
#1595 Rbor

geoffreycoan If you find you are generally getting your PV generation then you can set the pv10 weighting input_number.predbat_pv_metric10_weight to a low value (default is 10%). I’m taking a more pessimistic view so have set it to 0.4 (40%)

My actual is usually slightly down on forecast.
My pv10 weighting input_number.predbat_pv_metric10_weight was set at 0.15% and I have tweaked it up to 0.2%
Sorry I didn't dive into the documentation for 'best'/'base'. I am now better seeing the link between Solcast and predbat.

There is so much to learn about predbat and HA and I am now at the point where I am investigating some of finer points in predbat that I have largely ignored in the past. I started on my predbat journey in Jan 2024 and I hope that I am 'getting there', although 'there' sometimes seems a long way away.

Thanks as always for your help,

Rob

Z
#1596 Zakalwe

Sigh, I've kinda gotten lost with the Predbat updates since the split from Appdaemon. However, it still seems to work OK until I try updating to 8.2.3 or 8.2.4. If I go to those then I get this error "Error: Exception raised unsupported operand type(s) for *: 'float' and 'NoneType'"
The Predbat plan disappears and just display "null".
I'm also getting an error saying that the entities
"predbat.savings_total_predbat" and "Entity not available: predbat.savings_total_pvbat" are not available.

8.2.1 seems to work fine.
Any ideas?

R
#1597 Rbor

Zakalwe Always worth restarting predbat. Often does the trick.

rob

Z
#1598 Zakalwe

Rbor

Yep, did that multiple times.
8.2.1 seems to work fine. Anything later than that is throwing up errors and the Predbat Plan is null.

W
#1599 Wavy Davy

Zakalwe I would uninstall pedbat and re install.

R
#1600 Rbor

But first try downgrading to the previous version that worked. It sounds like this was v8.2.3

Z
#1601 Zakalwe

I've taken it back to 8.2.1

Z
#1603 Zakalwe

Rbor

Thanks Rob,
I get that there have been a lot of changes. What I don't understand is what is borking it and how to fix it. I don't really have the skill to diagnose it and I don't really want to have to take the nuclear option of deleting Predbat and having to reinstall the whole blooming lot from scratch.

J
#1604 Josephiah

Hook We’re in a weird position where the UK has some of the highest electricity costs aligned with the lowest gas prices.

This is partly because the "environmental taxes" are largely applied to exactly the wrong part of our energy supply, i.e. they are lumped onto the potentially clean part (elec) instead of the definitely-carbon-based part they claim to be wanting to phase out (gas). Absolutely bonkers. Put the disincentive on the thing you (claim you) want to discourage!
I had a look at the proportions a few months ago:
https://x.com/Buhjuhwuh/status/1718183391042863235
https://x.com/Buhjuhwuh/status/1718234951026463109

J
#1605 Josephiah

geoffreycoan Personally I almost never hit my Solcast PV50 prediction but I think that’s due to voltage clipping occurring on my 16 panel East facing array, when its sunny I overload the grid and that inverter keeps throttling the power back and forth.

I fine my Solcast estimates to be wildly variable, but especially underestimates on cloudy days, when I'll typically be below the PV10 estimate. Could be a combination of poor panel performance in low light, and (I guess) the difficulty of estimating how thick a bank of cloud is (vs just "is there cloud or not").

Just in case it's of interest, I'm fairly pleased with how I've my got my forecast chart working (after a fair bit of wrestling, it has to be said!). I've got the 90/50/10 estimates overlaid for the next few days, with today's performance superimposed. Happy to share the yaml if helpful.

G
#1606 geoffreycoan

Zakalwe there’s been a few people with this float conversion/divide by zero error when upgrading beyond v8.0.0. I had it as well.

The fix was just to restart AppDaemon or the Predbat add-on and Predbat worked fine after that. I don’t know why its happening, I think Trevor has made a change in 8.2.4 so it doesn’t happen on future versions, but don’t hold me to that. If after restarting the add-on or maybe even a full complete shutdown and restart of HA and all the add-ons,if its still not working then do raise a github issue and include the predbat logfile.

Predbat (8.2.4) has been working very well for me of late, but today, two sets of strange behaviours that I can’t wrap my head round.

We had an Octopus Power up event today from 3-5:30 and Predbat initially decided that it wasn’t worth discharging the battery, but then at 11:20 (maybe updated solar forecast) it decided to fully discharge and then recharge the battery in the free period:

I’ve got two Gen 1 hybrid inverters, so max charge capacity per half hour slot is about 2.4kWh. So the way I figure it, if the predicted solar less house load is above 2.4kWh then I’m not going to be able to import and the batteries will be filling off solar and I’ll be exporting. This applied for the first two free slots, with marginal benefit on the 16:00 and 16:30 slots and maybe 1kW of import on the 17:00.
I didn’t think it was worth churning the battery and incurring conversion losses in the discharge and charge for such minimal potential free import so I set Predbat to read only so it wouldn’t discharge and left the battery full.

Note the predicted cost today at 18:00 was -£5.83

After the end of the free period, here’s the updated plan:

Actual cost at 18:00 was -£3.59

But yet solar this afternoon was close enough to the Solcast prediction

Don’t understand how I can be £2 down. I get it that Predbat thought the discharge and charge was more profitable, but as I said the actual zero cost import benefit would be limited, certainly not £2.

And then this plan at 18:00 was weird as well, hold charge all evening and night despite the rates being above 20p at times.

19:22 the plan has changed to charge all night. Same effect, keep the batteries full regardless of the rates

And at about 17:45 the plan then changed to something sensible, Idle for most of the night through the higher rates, then charge when its a bit cheaper.

Can only think the plan got distorted by the peak rate period up to 7pm, but very strange, not seen it behave like this before.

#1607 PianSom

geoffreycoan
At least yours started with a sensible plan. Mine decided that discharging for the first hour of the Power-up (as well as before it started) was the right thing to do.

But then it had a momentary panic and did a 5 min import in the middle of the export at 3pm, before reverting to export.

This behaviour is sort-of analogous to what happens to me every day at 11.30pm (which is when my IOG cheap rate starts). You'd think it would discharge ready to start charging at 11.30pm, but no. Every day it decides (normally after some random changes of mind) that it would really rather prefer to start charging at midnight.

I have (or had, haven't checked it for a while) an open GitHub issue about the midnight thing. But I think that the optimisation algorithm still needs some tweakment.

R
#1608 Rbor

Josephiah I'm just getting the the point where I am starting to understand PV90/50/10.
Can you share your yaml please?

Rob

R
#1609 Rbor

geoffreycoan I cannot believe your solar generation today. This is solar in Yorkshire after days of drizzle and rain with max temperature reaching the dizzy heights of 13-14C, with heat pump on.

... and I have a 9.5 kWh E/S/W array that can generate up to 56 kWh in a day.
........ and the forecast is for more of the same.
My Predbat plan is predicting –£0.10 for me for today.

Where is the sun and summer?

Rob

W
#1610 Wavy Davy

Zakalwe when I uninstalled predbat to fix an issue recently, on re install it picked up the previous data and carried on without my having to configure anything. So pretty much painless. I wouldn't wipe the disc, just use the predbat uninstall option. I did do a full backup before the uninstall as a safety net, but didn't need it. Maybe someone more knowledgeable can comment, but in my experience sometimes a re-install is the only way to solve a software issue.

W
#1611 Wavy Davy

Rbor it does seem very low. I managed to generate 17 kWh with 10 west facing panels rated at 3.9kWh. Ok I'm a ex-pat Yorkshireman living in the south, but still good compared to your figures.

R
#1612 Rbor

Wavy Davy This week, my generation has barely got into double figures, the same as my average last February. In June, hardly a dazzling month, I had just one day (30th) below 30 kWh and a total of over 1100 kWh. This last week has been dreadful up here.

Rob

N
#1613 Northwarks

Josephiah Yes please do share .. I love a good chart !

P
#1614 Phil_H

geoffreycoan I guess compare your actual solar and usage for 11:30 till 18:00 and see if you're down on the excess by around 14kWh, certainly on the solar forecast graph 11-1 looks like you're quite a lot behind forecast.

G
#1615 geoffreycoan

Phil_H yeah that could be it Phil. I tend to achieve somewhere between the PV10 and PV50 figures so have my pv10 weighting set to 40% to be more pessimistic on the solar forecast. I was looking at the afternoon power and it looked to be close to forecast, but you're right, the morning and mid-day was down quite a bit.
At the end of the day its just a forecast.

Rbor Although I do have some problems with too much generation pushing the grid voltage up and inverters shutting off as a result, I have to say I'm pretty happy with the solar generation. We generated a minimum of 30-40kWh through pretty much all of June and July and looking at the Energy dashboard we've generated more in July so far than we did in February. I had a desire to get to a net zero bill for the year and it looks pretty solid that we will do so. Considering we spend £250 a month in the winter with the heat pumps on, I'm happy with that.
Couldn't have done it without Predbat; when I look at the difference in export % from when I started just in Eco mode to now, its a noticeable step-up.

J
#1617 Josephiah

Rbor

Northwarks

Edit: argh, will do once I find a sensible way of posting it - 300 lines of unformatted yaml does not a helpful post make! Any suggestions, anyone? Maybe just have to host it externally somewhere.

G
#1618 geoffreycoan

Josephiah if you type three backwards quote then paste the yaml then three backwards quotes (the ` symbol) it will keep the formatting

or create it on github and post the link

T
#1620 TX200

geoffreycoan guessing a typo? Trefor not Trevor?

W
#1621 Wavy Davy

TX200 No Trefor is his name.

T
#1622 TX200

Wavy Davy yes, that's what I said!

G
#1623 geoffreycoan

TX200 auto correct strikes again, sorry

N
#1624 Northwarks

Josephiah Thanks … looks like i need to reinstall Solcast, I removed it after all the shenanigans last (?) month and used Predbat instead - But thanks !

R
#1625 Rbor

Josephiah I have tried this but the card shows this error (no idea why!):

I have experimented myself and have got a chart so far with 3 days.
Just need to extend it now .....

Rob

G
#1626 geoffreycoan

Northwarks I have stuck to using the Solcast integration throughout. The BJreplay fork has had a number of enhancements in the last month,auto retries for the 429 errror, much more accurate ‘solar remaining’ calculations, and it has dampening config still, but for me the killer is it shows the solar forecast in the Energy dashboard.

@Rbor FYI, I’ve added an explanation of the core solcast concepts to the Solcast integration and to Predbat documentation

R
#1627 Rbor

geoffreycoan I have noticed on your Github fork that you have many enhancements and improvements in documentation sitting there waiting ......

You have been hard at work, which is much appreciated.

Rob

G
#1628 geoffreycoan

Rbor Trefor’s approved the PR but left me the job of resolving the merge conflicts ☹️

Got to work out how to use git command line now ….

BTW as well as the documentation updates, probably biggest changes are to the car charging and output data sections, there is code changes to remove the Appdaemon references, put the correct /addon_configs pathname, create the auto-generated dashboard earlier on the startup (needed for new users who still have a template apps.yaml). My python coding skills are still poor, but getting more adventurous !

J
#1629 Josephiah

Rbor hmm, not sure. The only obvious thing I can think of to check: did you substitute your inverter ID in for the xxxxx in the givtcp entities? (2 places towards the end)

R
#1630 Rbor

Josephiah Yes, added them.
I a very busy now and will investigate what is going wrong when I re-emerge.

Rob

R
#1632 Rbor

geoffreycoan My big question is how Trefor and you manage on no sleep?

Just watched Trefor's Youtube discussion with Gary Does Solar.
Really interesting.

I remember back to last January when I first embarked on my predbat journey.
One of my best decisions and the support from you all has been brilliant.
I am getting so much more out of my system enhanced with predbat.
An added bonus is that predbat has taught me how to find my way around HA, for the first time.

I don't think I am in the predbat 'rabbit class' any more ...but.... I have a very long way to go to match your expertise.
I like a challenge ......

Rob

J
#1633 Josephiah

Rbor hmm, apologies, not sure then. You're on the same version of apexcharts-card as me, so it's not that. I tried creating a new card from scratch, and didn't get that error (just a more sensible one about the givtcp entities, which disappeared as expected when I put in the correct inverter ID).

W
#1634 Wavy Davy

Rbor Rob, I've used this and it's working ok, so the code is ok. Maybe something in the way you copied it into the chart?
My first attempt gave errors, so I opened the file and copied all/pasted it into the apex chart , changed the inverter number and it worked.

G
#1635 geoffreycoan

Rbor There were a couple of releases of the Apex charts integration in the last week. The first upgrade broke the Predbat solar prediction/generation chart, but curiously all the other charts seemed to be ok.
Might be that or cut/paste error as others have suggested ?

I was going to report it as a bug but then found there was a further Apex charts update - go into HACS, Front end, Apex charts, click the three dots, Update information, and then see if there is an upgrade release you need to install

R
#1636 Rbor

geoffreycoan Wavy Davy Northwarks Josephiah
Got there with the apex solar production charts!
Here's my charts which I am still working on.
I have taken out the lines bordering the top of each area using stroke_ width: 0.

  • LH chart showing 50% and 10% is today only with my actual.
  • RH chart shows 50%, 10% and 90%. I don't know how much the 90% adds really especially as predbat concentrates on 10% and 50%. But it is there if needed.

You can see the dreadful solar prediction for me today in gloomy Yorkshire.
On the right are predictions from today up to day 3. I can extend further right up to day 6 – just needs copying day code for next code and increasing day span.

My main hiccup was that I am running on predcast pv directly and not via the solcast add-on.
So the solcast entity lines were not recognised.
As an example, the difference is:
Solcast: - entity: sensor.solcast_pv_forecast_forecast_today
Predbat: - entity: sensor.predbat_pv_today

I can post the yaml, either as a txt file or it could be added to https://github.com/BuhJuhWuh/home-assistant-gubbins/ if I knew how to do this!

6 months ago when I started on predbat, I wouldn't have known where to start with doing this. So I think I have processed to 'rabbit-plus' level. I much prefer using yaml to the visual interfaces.

Now to get back to the work I should be doing ..... but this is more interesting.

Rob

G
#1637 geoffreycoan

Rbor Good work Rob, you are turning into a Home Assistant Ninja!
The sensor names will be different between the Solcast integration and Predbat calling the Solcast API.

Just to rub it in, here's my graph for today:

And for the next few days:

For me the PV90 is of little use as I don't even achieve the PV50 on sunny days. With 3 inverters generating in parallel the grid voltage gets pushed above 230V+10% (253V) and you can see the inverters shutting down and back on again as a result.
Don't know why the FIT array sensor records negative, probably something to do with using a Shelly CT clamp rather than reading the inverter directly?

R
#1638 Rbor

geoffreycoan On the plus side my Solar actual against forecast for today is a good fit.

Temperature up here today reached a tropical 14C. Heat pump has been ticking over.
From my predbat plan, it looks as if this is the first day for months where I have failed to make a profit.
But looking up for predictions for next few days.
From Octopus Watch, at this rate, July may generate less than April.

Rob

G
#1639 geoffreycoan

Rbor It really is grim up North! Its been around 20-22 degrees all day today here in Bedfordshire.
I turned the heat pump off on 5th April when it was quite mild and its only been on a couple of times since then.

Today reinforced the need to get better clipping mitigation in my plan. The generation tracks the forecast quite well until I get to about 8kW when the inverters start shutting of and on repeatedly. My Solcast forecast was 84kW PV50 and 55kW PV10. I achieved 53kW today.

Been digging into the Predbat code to work out how to limit the battery charging overnight so as I leave space for solar trickle charging next day.

Trefor released a new Predbat release tonight. Changes mainly for iboost with more controllability.

Z
#1640 Zakalwe

Rbor
Good work Sir! I like the multi-day forecast bit.

Any chance of a copy of the code for it? Many thanks in advance.

P
#1641 Paul H

I'm on Agile with fixed 15p export, so do I use metric min improvement with -3 to prevent grid import where Agile is greater than 12p?

I'm currently seeing grid imports when I don't think it's favourable to do so.

I've set metric min improvement to a negative number now which has removed the grid imports but I won't be able to see if it's had the desired impact until we get some lower Agile prices.

#1642 PianSom

geoffreycoan
I rather fancied putting the 10% forecast for today in the header, but on a quick scan could not see a sensor which holds this. Have you come across such a thing?

R
#1643 Rbor

Zakalwe See if this works. I am attaching the code as a txt file.

multiday-chart2.txt
7kB

I am using the predbat standalone add-on without appdaemon and predbat's direct link to solcast.
https://springfall2008.github.io/batpred/install/#solcast-install

In my multiday chart, the only code difference is the entity link to solcast. As no actual generation line is being shown, inverter details are not needed.
I adapted the code from that used at https://github.com/BuhJuhWuh/home-assistant-gubbins/, which includes the actual today generation.
For example, with predbat direct method first:
- entity: sensor.predbat_pv_today
- entity: sensor.solcast_pv_forecast_forecast_today
For later entities,
- entity: sensor.predbat_pv_tomorrow
- entity: sensor.solcast_pv_forecast_forecast_tomorrow
Then:
- entity: sensor.predbat_pv_d2
- entity: sensor.solcast_pv_forecast_forecast_day_2
etc.....

You can add as many days as there are entities and the code is just a repeat each time.
You also need to increase the graph_span: 4d (line 13 in my code)
I have included 10%, 50% (normal) and 90% but I am not convinced how much 90% adds. Easy to leave in or delete that section. The only difference each time is in the attributes at the end of the data–generator statement.
It would be neat to do this as a function (if you can do this in yaml) which would save all the repeated code lines.

I like this apex charts and am just getting into them. So much scope.

I also use the solar forecast chart from the main predbat github: https://raw.githubusercontent.com/springfall2008/batpred/main/templates/example_chart.yml
You need to add your inverter details to pick up actual generation.

I hope I have got all that right.
Tell me if it works. I must learn how to add code to GitHub.

Rob

G
#1644 geoffreycoan

Paul H I'm on Agile with fixed 15p export, so do I use metric min improvement with -3 to prevent grid import where Agile is greater than 12p?

I'm currently seeing grid imports when I don't think it's favourable to do so.

Unfortunately it is not as simple as that. I wish it were. In the documentation https://springfall2008.github.io/batpred/customisation/#battery-margins-and-metrics-options it recommends not using this if you are on agile or are using PV10 weighting.

Predbat is trying to optimise the cost whilst ensuring you have enough battery for the plan duration. So the comparison is not just on cost, its on cost (taking into account metric min improvement) but comparing that to the cost of letting the battery discharge and then having to recharge later on (incurring a new set of conversion losses) and forgo the solar export you would otherwise have got.

Mine does the same, my export is 15p but I see the battery charging when the import rate gets up to about 16.6p. When I’ve worked it out before (there is a worked example somewhere in this long forum thread!), it all comes down to the losses.

PianSom geoffreycoan
I rather fancied putting the 10% forecast for today in the header, but on a quick scan could not see a sensor which holds this. Have you come across such a thing?

If you are using the Solcast integration its the ‘estimate10’ attribute of sensor.solcast_pv_forecast_today and if you are using Predbat to call Solcast then its sensor.predbat_pv_today and I think the same attribute name

P
#1645 Paul H

geoffreycoan Mine does the same, my export is 15p but I see the battery charging when the import rate gets up to about 16.6p. When I’ve worked it out before (there is a worked example somewhere in this long forum thread!), it all comes down to the losses.

Thanks for the explanation, I'll put the parameters back to the recommended values and trust it to do what it does.

P
#1646 Phil_H

geoffreycoan If you are using the Solcast integration its the ‘estimate10’ attribute of sensor.solcast_pv_forecast_today and if you are using Predbat to call Solcast then its sensor.predbat_pv_today and I think the same attribute name

This may only be true if using the most recent pre-release version (.37 I think), If you are on the 'Latest' which is .31 then it's not there and you have to calculate it using a template sensor

R
#1647 Rbor

geoffreycoan PianSom If you are using the Solcast integration its the ‘estimate10’ attribute of sensor.solcast_pv_forecast_today and if you are using Predbat to call Solcast then its sensor.predbat_pv_today and I think the same attribute name

In the direct method, the attribute is 'pv_estimate10'.

Rob

G
#1648 geoffreycoan

Phil_H This may only be true if using the most recent pre-release version (.37 I think), If you are on the 'Latest' which is .31 then it's not there and you have to calculate it using a template sensor

Thanks Phil, you’re quite correct, the estimate attribute figures were added to one of the beta versions, replacing the need to use template sensors, and haven’t yet been formally rolled back into main.

A new beta 4.0.38 was released last night, some documentation updates from yours truly and a new interpolated ‘remaining today’ calculation. The beta versions include auto retries, etc. Not sure why they haven’t been rolled back into main yet

P
#1649 Phil_H

geoffreycoan Not sure why they haven’t been rolled back into main yet

It's to do with the HACS PR I believe, if they change the 'Latest' then it delays all of that, so it's all in 'pre-release' until the HACS stuff is sorted then it will all get updated

Z
#1650 Zakalwe

Rbor

Superstar! Thank you.

I'll have a play with this later!

Z
#1651 Zakalwe

Rbor Tell me if it works

It sure did! Thanks again.

R
#1652 Rbor

Zakalwe Good to see.
Are you running the predbat direct method of via the solcast add on?

Rob

#1653 PianSom

Rbor In the direct method, the attribute is 'pv_estimate10'.

And - for posterity - with the predbat method the attribute seems to be total10 of sensor.predbat_pv_today

S
#1654 Sandy

Some of you may remember I was having some issues back in early June which were looking like these were GE issues. I had to get an engineer out from the installers which took a while but that has now happened and the battery is working as expected again. Unfortunately I am still having issues with predbat which is annoying.

I have updated everything - Predbat, appdaemon, HA and HA core are all on the latest releases as of this afternoon. The predbat logs seem to be doing everything they should, the plan looks fine and solcast is all showing, I just can't get it to stay on. I can toggle predbat to be active which shows in the logs and then reading through them they look ok but then when I go back to the dashboard the switch has toggled back to off.

Any ideas?

P
#1655 Phil_H

Sandy the predbat active flag gets turned on when predbat is calculating, it's not a switch to say 'is predbat controlling my inverter' If the mode is control charge and discharge and you are seeing the entities update and the plan/prediction update and no errors in the logs then it will be running

S
#1656 Sandy

Phil_H Ah ok thank you :-)

#1657 Hook

Is there anyway to control when predbat discharges the battery?

Mine likes to do it approximately between 5.30pm and 7.30pm usually, but I'd like to push that later, as I ran out of battery last week which was annoying.

P
#1658 Phil_H

Hook I think the calculate secondary order slots flag has something to do with timing of discharge within a window (before the iog charge window for example), so maybe try changing that and see what it does to the plan?

G
#1659 geoffreycoan

Hook i have calculate secondary order slots OFF, calculate tweak second pass OFF, combine discharge slots OFF, best soc keep 0.5

Predbat is pretty good at not doing discharges too early for me. If its becoming a problem you can always do a relative rate export rate override (instructions in the apps.yaml docs) to dissuade it from exporting at certain times, or you can create an automation to force idle at certain times, but I don’t have either of these set.

Z
#1660 Zakalwe

Rbor
Direct.
I changed it when the integration went Pete Tong after the developer took his bat and ball home.

#1661 Hook

Phil_H thanks! That sorted it.

I must have turned it on when I had a month on agile.

J
#1662 Josephiah

Rbor good work reverse engineering.
I kinda like having all 3 estimates, as it gives a little hint towards the confidence of the forecast (close fit between all three: good confidence; wide spread: they have no idea!). But agree PV90 is of limited use, and mainly comes across as a "look what you could have had" taunt!

R
#1663 Rbor

Josephiah The good thing about these Apex charts is that, once you see the patterns, they are very flexible and customisable. It is easy to delete or comment out the PV90 estimates if you want to.

I am sure that this chart can be enhanced. Just need to ensure that it doesn't get too messy.

I like having a separate chart for today with the actual trace on. The code for the 'today' chart needs the inverter ID adding in places. But the multiday forecast data is free-standing and comes from solcast and doesn't need any inverter info adding. The only tweaks needed are the entity labels, dependent on the direct or indirect method used to access the solcast data.

Rob

#1664 Hook

I noticed this morning that predbat hadn't switched my gen 1 back to Eco after it finished charging.

It was effectively paused at 100% and my house was using the grid. I toggled eco off and back on in the giv app and that sorted it, but thought it a bit weird. Only thing I've changed was updating predbat to version 8.3.0 yesterday.

G
#1665 geoffreycoan

Hook I noticed this morning that predbat hadn't switched my gen 1 back to Eco after it finished charging.

It was effectively paused at 100% and my house was using the grid. I toggled eco off and back on in the giv app and that sorted it, but thought it a bit weird. Only thing I've changed was updating predbat to version 8.3.0 yesterday.

I upgraded to 8.3.0 yesterday using the HA upgrade option. Wasn’t a good experience, the “upgrade” in fact completely overwrote my predbat directory, zapping my apps.yaml back to the template version and removing the backup apps.yaml copy I had just in case.
Raised it as a github bug and restored apps.yaml back from the previous night’s backup.

Strange that Predbat left it stuck with Eco off. I’ve had no such issue with mine, its back in Eco after the overnight charging. Might be worth looking in the Predbat status and the givtcp log to see if the command failed to be sent to the inverter?

Z
#1666 Zakalwe

I finally got mine to upgrade by doing single incremental upgrades with lots of reboots in between. Now on 8.3.0 with no issues.

Strange that it worked this time, but not previously. Glitch in The Matrix!

#1667 PianSom

A few days as ago, in the midst of a Power-up, I noticed my Predbat status turned to a “Warn:” message. I’ve been keeping an eye on it since, and it seems to be a regular occurrence - several times a day.

Looking at the history of my Predbat status in HA I see that 2-3 times a day I get a “Changed to Warn: Inverter 0 REST failed to setBatteryMode”. This is generally followed exactly 5 minutes later by a successful state change.

Anyone got any suggestions? I vaguely remember someone else reporting this effect.

S
#1668 Sandy

geoffreycoan
I thought I had everything working again after the engineer sorted the battery issues but it seems solcast is still giving me issues. If I reload Solcast then everything is fine but leave it alone for a bit and it loses the forecast again. I'm still getting the 429 error despite having set the automation to call solcast to 7.13 past the 8 hour repeat.

Looking at the logs, These errors occur at 04:00:35 which makes me wonder what is calling solcast at this time. The automation I have triggered when it was meant to at 08:07:13 but I didn't get any data until I manually reloaded the integration.

This error originated from a custom integration.

Logger: custom_components.solcast_solar.solcastapi
Source: custom_components/solcast_solar/solcastapi.py:141
integration: Solcast PV Forecast (documentation, issues)
First occurred: 04:00:35 (1 occurrences)
Last logged: 04:00:35

SOLCAST - sites_data Solcast.com http status Error 429 - Gathering rooftop sites data.

But also the following Errors:

This error originated from a custom integration.

Logger: custom_components.solcast_solar.solcastapi
Source: custom_components/solcast_solar/solcastapi.py:154
integration: Solcast PV Forecast (documentation, issues)
First occurred: 04:00:35 (1 occurrences)
Last logged: 04:00:35

SOLCAST - sites_data Exception error: Traceback (most recent call last): File "/config/custom_components/solcast_solar/solcastapi.py", line 144, in sites_data raise Exception(f"SOLCAST - HTTP sites_data error: Solcast Error gathering rooftop sites data.") Exception: SOLCAST - HTTP sites_data error: Solcast Error gathering rooftop sites data.

This error originated from a custom integration.

Logger: custom_components.solcast_solar.solcastapi
Source: custom_components/solcast_solar/solcastapi.py:188
integration: Solcast PV Forecast (documentation, issues)
First occurred: 04:00:35 (1 occurrences)
Last logged: 04:00:35

SOLCAST - sites_usage error: Traceback (most recent call last): File "/config/custom_components/solcast_solar/solcastapi.py", line 177, in sites_usage raise Exception(f"SOLCAST - sites_usage: gathering site data failed. request returned Status code: {status} - Responce: {resp_json}.") Exception: SOLCAST - sites_usage: gathering site data failed. request returned Status code: 429 - Responce: None.

Logger: homeassistant.util.loop
Source: util/loop.py:136
First occurred: 08:07:13 (1 occurrences)
Last logged: 08:07:13

Detected blocking call to open with args ('/config/solcast.json', 'w') inside the event loop by custom integration 'solcast_solar' at custom_components/solcast_solar/solcastapi.py, line 97: with open(self.filename, "w") as f: (offender: /config/custom_components/solcast_solar/solcastapi.py, line 97: with open(self.filename, "w") as f🙂, please create a bug report at https://github.com/BJReplay/ha-solcast-solar/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self.run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in run_once handle.run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in run self.context.run(self.callback, self.args) File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1495, in call self.hass.async_run_hass_job(self.job, self.utc_point_in_time) File "/usr/src/homeassistant/homeassistant/core.py", line 938, in async_run_hass_job hassjob.target(args) File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1808, in pattern_time_change_listener hass.async_run_hass_job(self.job, localized_now, background=True) File "/usr/src/homeassistant/homeassistant/core.py", line 938, in async_run_hass_job hassjob.target(*args) File "/usr/src/homeassistant/homeassistant/components/homeassistant/triggers/time_pattern.py", line 86, in time_automation_listener hass.async_run_hass_job( File "/usr/src/homeassistant/homeassistant/core.py", line 941, in async_run_hass_job return self.async_add_hass_job(hassjob, *args, background=background) File "/usr/src/homeassistant/homeassistant/core.py", line 756, in async_add_hass_job task = create_eager_task( File "/usr/src/homeassistant/homeassistant/util/async.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/components/automation/init.py", line 858, in async_trigger_if_enabled return await self.async_trigger(run_variables, context, skip_condition) File "/usr/src/homeassistant/homeassistant/components/automation/init.py", line 755, in async_trigger return await self.action_script.async_run( File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1770, in async_run return await asyncio.shield(create_eager_task(run.async_run())) File "/usr/src/homeassistant/homeassistant/util/async.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 465, in async_run await self._async_step(log_exceptions=False) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 527, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 765, in async_call_service_step self.hass.async_create_task_internal( File "/usr/src/homeassistant/homeassistant/core.py", line 830, in async_create_task_internal task = create_eager_task(target, name=name, loop=self.loop) File "/usr/src/homeassistant/homeassistant/util/async_.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/core.py", line 2731, in async_call response_data = await coro File "/usr/src/homeassistant/homeassistant/core.py", line 2774, in execute_service return await target(service_call) File "/config/custom_components/solcast_solar/init.py", line 139, in handle_service_update_forecast await coordinator.service_event_update() File "/config/custom_components/solcast_solar/coordinator.py", line 67, in service_event_update await self.solcast.http_data(dopast=False) File "/config/custom_components/solcast_solar/solcastapi.py", line 543, in http_data await self.serialize_data() File "/config/custom_components/solcast_solar/solcastapi.py", line 97, in serialize_data with open(self.filename, "w") as f:

G
#1669 geoffreycoan

PianSom Looking at the history of my Predbat status in HA I see that 2-3 times a day I get a “Changed to Warn: Inverter 0 REST failed to setBatteryMode”. This is generally followed exactly 5 minutes later by a successful state change.

Yeah I get the same, it can sometimes happen that I get a whole series of these when the inverter decides it doesn’t want to talk to GivTCP any more, but usually I get a random one and then next predbat run it works fine.
The message is a bit wrong really, Predbat doesn’t give up on REST API calls (well maybe it does for that specific 5 minute run ?), its a transient error. Maybe there’s a way of suppressing it unless it happens frequently, dunno. I ignore it TBH,

The power up yesterday was a bit of a non event. Predbat first decided to discharge and recharge the batteries, then in the morning it decided to hold the charge, then by the time of the event it decided to do the discharge and recharge again. Whilst I was playing around with the config in the morning I found that it was highly sensitive to my metric 19 weighting. If I left it on the default 0.10 or 0.15 then would tend to hold the SoC, if I had it on 0.4 which is my usual setting it would do the discharge/recharge. Since it was turning into a grey day I decided to let Predbat do what it wanted.
Might need to look how I have configured my charging and discharging rates though. Since upgrading to firmware 191/193 my main battery can discharge at 2.9kW but only charges at 2.4kW. End result was the battery didn’t charge back up to full in the free period and the prediction was that it would run out overnight.

Sandy I'm still getting the 429 error despite having set the automation to call solcast to 7.13 past the 8 hour repeat.

What version of solcast are you running? When HA first starts up or you reload the Solcast integration it connects to Solcast and gets the sites data. If you are on the original (Oziee type version) and this fails then the integration dies.
There have been changes made to now cache this as solcast-sites.json so if the sites call gets a 429 then it can read the cached version. Then on the main polling if it gets a 429 it will back off, wait a random time period and retry.

All of these changes to the retries and extra cache are in the beta version of the BJreplay integration. Turn beta version on in HACS and download one of the newer beta’s and it should be much more reliable for you.

BTW, channel announcement, I am away from Saturday for 2 weeks, helping to Marshall the World Microlight Champiopnships which is at Deenethorpe near Corby https://www.wmc2024.com/
I’ll have my iPad but TBH won’t be online as much. I’m sure you will all find life is quieter without me 😉

#1670 PianSom

geoffreycoan The message is a bit wrong really, Predbat doesn’t give up on REST API calls (well maybe it does for that specific 5 minute run ?), its a transient error.

Just to save me going and doing some log-diving, do you know if the warning means that the inverter doesn't change state until Predbat tries again 5 mins after the fail? Could be a (slightly) expensive delay if eg it's at the end of a Power-up charging slot.

Have a fun time microlighting. Hope the sun shines and the wind is ... steady?

S
#1671 Sandy

geoffreycoan

Thanks, I was running the BJreplay version but it was an older one. I have updated to the latest version of Solcast so let's see if that fixes things when the call automation fires again

G
#1672 geoffreycoan

PianSom I'm pretty sure that predbat just gives up with that REST request and falls back to using the HA entities if it can do (part of which is why I leave them all configured in apps.yaml). Haven't actually checked the code though.

I'm flying to Corby and will have my plane there but not expecting to be flying much, I'm not competing, but 50+ other planes are so plenty to do with marshaling them lot

R
#1673 Rbor

geoffreycoan Best of luck with your Corby adventure.
You can look forwards to flying back with all of the predbat problems sorted 🤞.

Rob

#1674 PianSom

geoffreycoan
Soon be time (for us both) to dust off the Predbat holiday mode. Still annoys me to lose the benefit of the usage data I have built up and have to start again when I get back!

J
#1675 Josephiah

Rbor
Yes, likewise, I've got one chart for today, showing the detail and actual vs forecast, plus a separate one showing a few days ahead.

W
#1676 Wavy Davy

Well it was good while it lasted, but looks as though my thin client has given up the ghost.
Got up this morning and my HA and predbat was frozen. tried rebooting the Dell and nothing, power light on but no led's at the back, which normally show activity. Looks like back to eBay for another.
At least may be able to salvage the internal ssd, unless that's what's failed. If so will have to figure out how to test it.

R
#1677 Rbor

Wavy Davy What a disaster. Hope you get it sorted quickly.
Do you have an old pi lying around which could at least get you back up again while you get a replacement sorted.

Rob

W
#1678 Wavy Davy

Unfortunately not. Can get another dell fairly quickly and at least I have a backup from last night.

R
#1679 Rbor

Wavy Davy I bet you’re relieved about the backup.

Rob

W
#1680 Wavy Davy

Panic over. Took it apart, tested ssd, put it back together and threatened it with the bin!.
Don't know which worked but it's back up and running.

W
#1681 Wavy Davy

Rbor yes, I have a auto backup every 2 days to HA and to google, keep last 5. Better safe than sorry.

W
#1682 Wavy Davy

Turns out it wasn't the Dell or HA. It was MacBook safari stopped updating the HA screen. Other windows were working ok just the one with HA on.
Odd...
Restarted it and will keep an eye on it.

G
#1683 geoffreycoan

Wavy Davy I use the Google drive backup addon, takes automation backups and copies them to a google account. I created a new google account so have 15gb of cloud backups of my HA.
Good backup addon, it works well

R
#1684 Rbor

geoffreycoan Wavy Davy
This reminded me of Geoffrey's day of woe, summarised nicely in:
https://community.givenergy.cloud/d/4276-recovering-home-assistant-without-a-backup
It's a short thread and contains some good comments.

I copied and saved Geoffrey's recipe for recovery from the thread and also installed the Google backup up add-on.
It is all very well having HA backup but if a SSD or SD card fails, the backup goes with it.

geoffreycoan Is it worth getting something added to the documentation about backups, possibly in the FAQs? I have searched documentation for Backup and nothing came up (for me).

Rob

G
#1685 geoffreycoan

Rbor geoffreycoan Is it worth getting something added to the documentation about backups, possibly in the FAQs? I have searched documentation for Backup and nothing came up (for me).

I’ll put it on my list. Trefor is still to finish merging my last set of documentation updates, github complained it couldn’t merge some of them automatically. Think I will need to do more frequent doc update pushes

Have had to dig into those backups a couple of times now, to recover apps.yaml when a predbat install zapped the entire directory and to recover old solar forecast data in the energy dashboard. As Rob says, having an “offsite” backup is invaluable

B
#1686 Boffinboy

Managed successfully to update to the add on today. Glad it went smoothly despite some initial problems! On a different note, I’ve just seen Octopus have changed the cosy tariff to have three off-peak periods, nicely spread throughout the day, and lowered the cost in them. For various reasons I am a high user, so don’t get much excess export except in August (and July…. But not really this year!), and the rates look pretty attractive (11ish p) even vs agile which is what I am currently on. Definitely attractive for winter, but may even be useful now given how inconsistent the weather has been. Certainly the import rate is lower than my current average on Agile.

G
#1687 geoffreycoan

Boffinboy I hadn’t really considered Cosy as a summer tariff, but it is an option certainly.
There’s a recent Gary does solar video on it, highlighting the 3 period benefit. If your battery can see you through the non cosy periods and you have fast enough charging in the cosy periods, it could work out.

I just looked and the cosy rate is 11.46p for me. Although Agile is hovering around 15p most nights, my June bill had an average rate paid of 9.05p so Agile would still be cheaper.
I need to do the maths but suspect Cosy wouldn’t be best for the winter for me as I’ll still be drawing in the daytime, but worth evaluating again

P
#1688 Phil_H

geoffreycoan I just looked and the cosy rate is 11.46p for me. Although Agile is hovering around 15p most nights, my June bill had an average rate paid of 9.05p so Agile would still be cheaper.

The slight snag in that assertion is that due to predbat with 15p agile prices you don't do any charging, so need solar to fill the batteries before exporting. Whereas cosy would presumably constantly fill up in the 11p sections to allow more solar export at 15p, so while the per kWh average import rate would be higher on cosy, it would allow that to be offset by earlier (and therefore more) exporting at 15p.

Whether it's enough to make it worthwhile is another point but it makes the 'is it better to switch?' question somewhat more complicated!

G
#1689 geoffreycoan

Phil_H due to predbat with 15p agile prices you don't do any charging, so need solar to fill the batteries before exporting. Whereas cosy would presumably constantly fill up in the 11p sections to allow more solar export at 15p

Yes true, but, it’s not even as simple as that.

I have been trialling generally not filling my batteries overnight even when the agile import rate is 13p so on paper it would be better to fill and export earlier. I’m leaving the batteries to drain down overnight and only partially filling overnight when the rate is around 11p or less. Starting each day with the batteries about half full, leaving the batteries then on pause charge so all the solar is exported, then mid morning set the batteries to start charging but at 900-1000W charge rate.
This way I can maximise DC charging into the battery from solar. If I fill the batteries overnight or early in the morning then I start getting solar clipping, but more I am exporting so much that I drive the grid voltage up and this keeps on shutting the inverter off.
(at the moment I am having to schedule this outside of predbat but have some ideas of how to fold variable rate charging & battery pausing into predbat)

No single answer to any of this.

P
#1690 Phil_H

geoffreycoan Oh yea, you have bonkers quantities of solar panels, I, at least, only have to consider clipping due to temporary boosts from clouds.

R
#1691 Rbor

Phil_H geoffreycoan Boffinboy
Switching to Cosy in the Summer is an interesting idea but it depends very much on individual circumstances.
I had a heat pump installed at the end of July 2023. I was then on Flux and octopus 15p outgoing, after a very profitably Summer 2023 when tariff rates were much higher.
Flux still worked well for me until mid October when I found that my night-time fill from Flux wasn't getting me through the day as Solar generation had fallen (mid October seems to be the crunch time). My house use and heat pump was soaking up the diminishing solar that I was generating and I had very little excess solar to export.
I then switched to Cosy and this worked better as I could top up my batteries 1 pm-4 pm.
But I have a single AC3.0 inverter. In 3 hours, I can only import about 8.4 kWh from the grid despite have two 8.2 kWh batteries.
I have attached a screenshot of my 3 month Cosy experience mid-Oct 2023 to mid-Jan 2024, courtesy of Octopus Watch.

In late Nov and Dec, I found that my batteries needed to be fed again. The new extra 2 hour slot would have been useful. Over the 3 months, my average import rate was 18.56 p/kWh and my import was £4.60 per day. But the new Cosy slots are cheaper.
I switched to Agile on 17th January and my costs went down drastically. Agile works best when the wind blows.
I have been on Agile ever since mid January and my average import rate Jan 17th to Now is 9.50 p/kWh and I am £217 in profit. I want to see how Agile performs in deep winter and it may well be that the new Cosy is then better.
I suspect for me Agile be the best fit.

For my use case, in Summer, I average over 30 kWh solar per day and I wouldn't be able to make any use of the Cosy afternoon slot. So for me, Agile would finish much cheaper for me than Cosy in Summer, but worth a look in winter. I think my cheapest option this summer would have actually been IOF just beating Agile and 15p outgoing.

Do the maths. If you have Octopus Watch, generate some reports.
We are all chasing the same goal but may have to do this in different ways. What fits for me may not fit for you, and vice versa.

Rob


G
#1692 geoffreycoan

Rbor I’ve not looked into the new Cosy tariff in detail yet (October job), but I do recall from the Gary does Solar video that the new tariff is still the same number of Cosy cheaper rate hours, just split into 3 slots not 2.
The rates have come down but the number of hours of cheap charging is the same.

When I did the math last year I thought Cosy wouldn’t work for me because my average daily consumption in winter was about 20-25kWh, on top of a base house load of about 15kWh, which is why I went for Agile as an overall lower price for high consumption. At least I have real world winter consumption now to compare against.

You’re doing well this year Rob, I’m only £145 in profit for 2024 (so that’s all of Jan to now). Still on track for net zero in the entire year

R
#1693 Rbor

geoffreycoan I have checked Cosy tariff from Octopus site and it does indeed have two 3 hour slots (4am-7am and 1pm-4pm) followed by an additional 2 hour slot (10pm-12pm). The rates seem to have dropped by about 2p/kWh. In my region (Yorkshire), low rate is 10.5 p/kWh compared to 12.6p/kWh for Flux.

Predbat tactics in summer could be to discharge prior to each slot and then charge during each slot although, with excess solar export, 1pm-4pm could be ignored except for really murky summer days. And for 2-3 months, 4am-7am will encroach on start of solar day. This harms the case for Cosy in summer.
Agile rates have not been sparkling recently compared to Cosy but it only takes one night with big Agile drops to more than catch up again, especially as the low slots would likely last for >3 hours.
My 3 month stint on Cosy last winter was pre-predbat days for me.

My conclusion is that Agile is better for me than Cosy in Summer. But perhaps not so in Winter with the extra 2 hour slot and lower rates. My typical winter (Nov-Jan) import is 20-25 kWh for house, heat pump, ... all energy, supplemented by 5-10 kWh of solar.
I will definitely look at tariffs again prior to mid October.

Rob

B
#1694 Boffinboy

@Rbor @geoffreycoan great discussion, it’s always a bit of a guessing game. I was on Cosy through part of winter, it was much better than SVR, but I switched to Agile at Christmas when rates were low. It has been VASTLY better on Agile if I use octopuswatch or similar to compare (including load shifting). I am a relatively high user in both summer and winter as I have A2A which means heating and cooling options, and I have a an “OK” PV array but it doesn’t keep up, which is why Cosy might be attractive with the extra hours. The new Cosy has two extra hours - 8 total - the old had only 6, and as Rbor noted the price is lower over the past couple of weeks than Agile. At the moment Agile rates haven’t been great, but they could get better again. Given how variable tariffs and cap works (by looking at past months to set the price for the next 3), I guess in general Agile is always going to be the best rate wise when costs are falling as you benefit right away from lower prices. When wholesale prices start rising though, they feed through immediately to Agile, vs being delayed for standard tariffs. I might see how the rates look for a week or two more, and whether the weather improves!

B
#1695 browellm

I would be interested in Cosy for the winter due to my relatively high use and smallish usable battery of 6.5kWh. The 10.9p rate in my region would be below my winter average of around 14p -topping up three times a day would be significant for my use case. Alas, I don't have a heat pump so it's unlikely they would let me on the tariff 😃

#1696 Jase1703

Love these 1st world tariff problems, great discussion. I will definitely give new cosy tariff consideration, currently doing well on agile, with single AIO & 8g’s of PV. When winter arrives and ASHP fires up in anger I will have options, not least a second AIO or a new EV charger to tap into my bi-directional 100kwh battery on wheels. If I can unlock that much storage potential I could live on Cosy 3 cheap rates. Going bi-directional on a compatible EV will be much cheaper than an additional AIO, need to find someone who can make it happen with Quasar wallbox or Solaredge wallbox. Should be easy for PredBat to manage.

R
#1697 Rbor

Been very quiet on here over the last 2 weeks, rather like predbat during the non-windy days.
Now that the wind has returned, predbat has leapt back into action, back from its holidays.
Wind is good for predbat and I have enjoyed the negative slots.
I have had no issues with predbat and, from the lack of contributions on here, neither has anyone else.
I am now on v8.3.2, with no issues on my upgrade from v8.3.1.
I look forwards to seeing what Trefor has up his sleeve for the next evolution of predbat.

Rob

G
#1698 geoffreycoan

Rbor I’m on 8.3.2 as well, Predbat is working well.

My Home Assistant however hasn’t been well. I was away for 2 weeks, for half of the first week everything was fine but then I lost remote connectivity to HA and VPN into my HA server. Limited debugging available from my wife on the phone so had to just leave it until I got back. Fortunately the inverter was left in Eco mode.
Found HA had got itself completely lost when I was away. It was still running (I suspected it wasn’t, but it was still up), but whilst I had local access to it, it wasn’t talking to anything else on the network or internet so no givtcp or solcast data and predbat was sulking with a thread starvation error.
Restarted the HA server and GivTCP add-on and it all burst into life but I’ve lost a week and a half of data in my history which I’d like to restore from the GE portal data.

Since then I’ve had three further misbehaves, two where the CPU went to 100% and HA completely stopped dead in its tracks, restarting as if nothing had happened when I got the CPU load down, and then this morning the HA supervisor gave a load of errors and HA stopped running.
I might just rebuild the HAOS VM and restore a HA backup into it to see if that stops it happening.

At least as a result of this I’ve now installed teamviewer so I have another option to remote into the server and I’ve created a test HA instance that I can play around with. Certainly one of the HA misbehaves was caused by running the test HA alongside the prod but with too high memory and CPU limits.

Am thinking about installing the GivTCP beta as well to see if that improves reliability. Still get occasions where GivTCP loses connection to one inverter, a restart cures this but I’d hope the newer GivTCP will be more resilient.

And today, 10th August is my 1 year anniversary of having an export tariff, so once the data gets in my Octopus account I’ll see what the annual £ consumption bill is; I’m pretty confident its going to be negative.

W
#1699 Wavy Davy

Mine's been behaving itself swell, until this morning.
Woke up and have this warning.

and then this one just happened.

W
#1700 Wavy Davy

Just checked invertor data on the portal and there's only 3 entries, all with wrong time stamps.

Looks like it was a invertor problem not predbat.
I have been getting over voltage warnings about every 2 or 3 days but not under voltage.
Maybe have to talk to givenergy about it.

#1701 PianSom

geoffreycoan
I have been using the GivTCP beta on my AIO for a fair number of weeks now. (The big advantage for me is that it gives me far more information that the released version.) It has been as stable as a table.

I'm still on 2.4.265, though I see they are up to 2.4.614 now - oops!

R
#1702 Rbor

Wavy Davy Can you 'see' your inverter on the GE portal and battery details on app.
If you can, worth looking at inverter stats for battery, etc to see if you are making contact.

And there is the usual 'inverter reset' to try on portal.

I have a green breaker between my AC inverter and batteries and this has tripped 3 times now. The first time, the breaker had burnt out. I spoke to GE and they asked me to contact my installer who replaced it. Then it tripped a couple of weeks ago. GE again asked me to go through installer and they should be checking it out in the next week. If the breaker trips, GE won't be able to see the inverter.

Also look at Givtcp log from HACS to get any clues.

Definitely phone GE. I have found them helpful. But sods law dictates that inverter issues happen at a weekend.

Rob

G
#1703 geoffreycoan

Wavy Davy Mine's been behaving itself swell, until this morning.
Woke up and have this warning.

That points to a problem communicating to the inverter, either the inverter itself has dropped off the network, or GivTCP has decided to stop talking to it. Restarting the wifi node or rebooting givtcp usually cures this.

I have added the predbat settings to apps.yaml to restart givtcp if it detects a comms failure. Never had this in before, preferring for my own error detection automation to pick up the issue, but that’s not been triggered on recent issues so will try the predbat approach.

PianSom I have been using the GivTCP beta on my AIO for a fair number of weeks now.

From what I’ve seen, the beta has definite improvements for AIO and 3 phase inverters. Not sure whether there are specific changes for the older kit, but worth a try.
Out of interest is there any specific instructions for upgrading/swapping over? I saw from one person’s github issue and a reply from brikkat that there is a new config setup process that you have to follow for the beta and I don’t think I saw any documentation for this?

W
#1704 Wavy Davy

Rbor Can see the invertor and battery on the portal and have restarted it.
Looking at the Givtcp logs this is what is there.

seemed to start at 10:37 today but I posted about 9 ish.
Have rebooted both HA and then the Dell PC.

geoffreycoan
Am I correct in assuming restarting the invertor will reset the WiFi?
If so its not cured it.

W
#1705 Wavy Davy

Correction to above, restarting GivTcp and mosquito seems to have sorted it.
Something else to keep an eye on.

May still contact Givenergy on Monday (probably not open on the weekend) as I believe there is a beta update to help with over voltage problems, which I get regularly.

B
#1706 Boffinboy

Nice to have the wind back and some lower rates. I was about to switch to Cosy to take advantage before a likely rate rise in October, but have held off for now.

I periodically have network issues where GivTCP seems to be unable to communicate to the inverter, and for a long time I have had problems where the GivEnergy iOS app can’t connect locally. Thankfully the GivTCP issue is usually fixed by restarting HomeAssistant or forcing a reconnect of the inverter on WiFi. There was a specific issue with the current UniFi AP firmware that stopped many IOT things from connecting properly, but I rolled back to and older one and all was fine. Then problems still occur periodically. The interaction between so many different pieces of the puzzle is some complicated that it’s really hard to troubleshoot when you do have problems, which inevitably happen when away from home etc!

G
#1707 geoffreycoan

Wavy Davy I get those time out errors as well from time to time, and when I look in the HA logbook I see that I am getting invertor time entity updates every 20 seconds from one inverter, but not the other. All pointing to a comms issue between HA and the inverter.

For me it’s usually sufficient to just restart the givtcp add-on. Remember that a default ‘restart HA’ doesn’t restart any of the add-on’s, only the core HA system, so this isn’t sufficient.
I have occasionally seen the inverter drop off the network, evidenced by no longer seeing data updates in the portal. Rebooting the inverter (or indeed the inverter wifi dongle) should fix this.

It does strike me as still being all a bit fragile, when it works it works great, but there are several bits that can just stop working and you need to be able to diagnose and fix those. sigh.

R
#1708 Rbor

geoffreycoan
Wavy Davy
I have added the predbat settings to apps.yaml to restart givtcp if it detects a comms failure. Never had this in before, preferring for my own error detection automation to pick up the issue, but that’s not been triggered on recent issues so will try the predbat approach.

Is this the section in apps.yaml to comment out (from #auto_restart)?

  # When enabled automatic restart will restart the add-on if communication fails
  # Example below is auto-restart for GivTCP add-on itself
  #auto_restart:
  #  - shell: 'rm -rf /homeassistant/GivTCP/*.pkl'
  #  - service: hassio/addon_restart
  #    addon: a6a2857d_givtcp

I do have the relevant automation (Givtcp monitor from output data doc) running but it has never triggered for me.

Rob

G
#1709 geoffreycoan

Rbor Is this the section in apps.yaml to comment out (from #auto_restart)?

I do have the relevant automation (Givtcp monitor from output data doc) running but it has never triggered for me.

Yes that's the correct bit to add in to apps.yaml.

The auto-detect givtcp failure isn't working reliably for me either. It used to do but now it isn't. I'll have to take a look at it, but adding this in is hopefully another way of getting the system to self-cure itself.

Went to look at HA after my last message, and found it had crashed again with this on the VM console:

Installed the latest patch upgrade to virtualbox to see if it fixes anything, but if it keeps happening I'll have to try rebuilding the HASS VM and restoring from backup. Never used to do this, its a new behaviour...

#1710 PianSom

geoffreycoan Out of interest is there any specific instructions for upgrading/swapping over? I saw from one person’s github issue and a reply from brikkat that there is a new config setup process that you have to follow for the beta and I don’t think I saw any documentation for this?

I'm one of those odd people who uses Docker containers for most things. So, in my case, it was just a case of amending my docker-compose file to define a new container running the beta and spin up the new one. When testing I ran them both for a bit, but that was a pain because of port conflicts, so I soon stopped the old one and just used the beta.

You have shamed me into updating. I am now on 2.4.640

Wavy Davy Mine's been behaving itself swell, until this morning.
Woke up and have this warning.

Yeah, I have seen that appear out of nowhere. IIRC a Predbat/appdaemon restart was what sorted it for me.

W
#1711 Wavy Davy

Just Looked and don't have that in my apps.yaml.
Will add it in.

R
#1712 Rbor

Wavy Davy As another check, can you ping your inverter successfully?

Rob

R
#1713 Rbor

geoffreycoan
In the givtcp apps.yaml template, there is another section which I don't have at all in my apps.yaml. See below.

  #  Example on how to restart the inverter via GivTCP
  #  - service: switch.turn_on
  #    entity_id: switch.givtcp_{geserial}_reboot_invertor

Is this something to uncomment? It seems a bit more drastic than just a comms issue.

Rob

W
#1714 Wavy Davy

Rbor yes pings ok.
Have added the restart lines into the apps.yaml and see how that goes.
How do I check if its working/triggered, GivTCP logs?

R
#1715 Rbor

geoffreycoan Wavy Davy

This is the sync error message that I sometimes see in givtcp log:

[ERROR - Connection to (192.168.1.XXX, 8899) failed: timed out]

It happens after a period of inactivity, perhaps predbat in idle mode.
But as soon as predbat sends instructions to the inverter again, the timed out errors stop.

I also see errors just after midnight when these settle down quickly. These seem to be between MQT and givtcp.
I can't see these now as predbat seems to be on warp this morning and any errors will have been over-written.

Rob

R
#1716 Rbor

Wavy Davy I don't know yet. I have just uncommented the lines myself.
I have also deactivated the automation I had running.

Let's see what happens..........

Rob

W
#1717 Wavy Davy

Rbor Were the lines already in your apps.yaml file?
Mine weren't in there.
I assume its "/addon_configs/6adb4f0d_predbat/apps.yaml" file

W
#1719 Wavy Davy

Is Predai working ok? Fancy giving it a go, but not sure if my computer skills can trouble shoot it if it goes awry.

R
#1720 Rbor

Wavy Davy I keep meaning to try predai but have yet to take the plunge.
We must share our experiences if either of us goes for predai.

Rob

W
#1721 Wavy Davy

Go on then... 😆

W
#1722 Wavy Davy

Think I'll try installing it but not initially enabling it.

R
#1723 Rbor

Wavy Davy I installed it a long time ago and have the latest version (v1.1.14)
I have the yaml set up for my inverter from the configuration page of the predai add-on but I have everything commented out!
I have also added 'load_forecast' lines to my predbat yaml file but again all commented out.

I do actually have predai running but with no yaml or inverter to look at, it won't know what to do.
There is an entity related to external_temperature but not on my HA setup
Worth looking at:
https://github.com/springfall2008/predai

There is code for an apex-chart.
I may look at all this later on.

Rob

R
#1724 Rbor

Wavy Davy Trefor has some on his facebook page trying out predai.
Looking at the comments, I think I may be out of my depth here.
Trefor does have a predai video which I will watch before deciding whether to give it a try.

I don't want to mess up my predbat setup which seems to be going smoothly, 🤞

Rob

G
#1725 geoffreycoan

Rbor I added the restart lines to my apps.yaml today and today saw that predbat detected an issue and restarted GivTCP:

14:31:09 - 2 hours ago - Supervisor
  Changed to Read-Only
14:30:15 - 6 hours ago - Supervisor
  Changed to Error: Exception raised Auto-restart triggered
14:26:09 - 6 hours ago - Supervisor 
  Changed to Inverter 0 unable to read REST data from http://192.168.1.86:6345/readData - REST will be disabled

So looks like Predbat got a REST retrieve error from inverter 1 and restarted GivTCP to cure it. I can see the error and restart in the GivTCP log:

2024-08-11 14:25:51,971 - app - [ERROR] - Exception on /readData [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2529, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.10/site-packages/flask_cors/extension.py", line 176, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/app/GivTCP_1/REST.py", line 51, in rdData
    return rd.pubFromPickle()
  File "/app/GivTCP_1/read.py", line 768, in pubFromPickle
    regCacheStack = pickle.load(inp)
EOFError: Ran out of input
2024-08-11 14:26:09,119 - mqtt_client - [CRITICAL] - Connecting to MQTT broker for control- core-mosquitto
2024-08-11 14:26:15,385 - read - [CRITICAL] - First time running so saving AC Charge status
2024-08-11 14:26:15,393 - read - [CRITICAL] - Publishing Home Assistant Discovery messages
2024-08-11 14:30:02,831 - read - [CRITICAL] - Publishing Home Assistant Discovery messages
2024-08-11 14:35:03,947 - read - [CRITICAL] - Publishing Home Assistant Discovery messages
2024-08-11 14:40:02,627 - read - [CRITICAL] - Publishing Home Assistant Discovery messages
2024-08-11 18:15:49,204 - write - [INFO] - Setting battery charge rate to: 2600 (50)

TBH this was probably a little over-zealous of Predbat, a single REST error doesn’t usually cause a problem as the next time predbat runs it then works OK, but anyway, it seems that Predbat detected the error and restarted GivTCP which then worked fine afterwards.

I’ll keep an eye on it to see if it auto-recovers more subtle issues like givtcp losing connection to the inverter which results in stale data in HA (noticeable that the inverter time doesn’t increase)

R
#1726 Rbor

Wavy Davy I have now got predai running!
I followed the instructions in the predai add-on documentation.
I added lines to my predbat apps.yaml file and uncommented them. I have also set up an apex chart. See below. It looks very much like what should be produced from the documentation.
The large increase 09 Aug - 10 Aug matched the negative agile slots. I did charge my ev then and didn't compensate for this in predai yaml (I wasn't sure what to write down for my charger).

The predai log was a lot of warnings and comments about thing being deprecated. I don't understand what is going on here but I have got a lot of data populated.
My predbat plan looks very much like what was there before (I took screenshots) but I want to see if anything drastic happens when the next predai data comes through after 30 minutes.

I am tempted though to stop predai overnight and re-comment the predai lines in predbat apps.yaml.

So predai does work but it looks very 'new off the block'.

Rob

R
#1727 Rbor

geoffreycoan I also uncommented the lines from my apps.yaml.
I haven't experienced any restarts (as far as I know). I know that you have 2 inverters and I have one.
On comms, I am still experiencing the periodic timed out warnings which seem to clear just fine.

I can't pretend to understand the code in your comment! All rather a pickle for me.

Rob

R
#1728 Rbor

Wavy Davy I've commented out the predai code lines from my predbat apps.yaml.
I have kept predai running though.

This is what happened to my load predictions – scary.

Still an interesting experiment and good to see that is seems to be quite easy to step back.

Rob

#1729 PianSom

Rbor
Hi Rob - I saw that you tacked your questions to Trefor about predai on GitHub on to my thread about getting it to work with HA Core (which I failed to do 🙁 ). You may get more traction from him if you start a new Issue or Discussion.

R
#1730 Rbor

PianSom Thanks for the advice. I have started a new issue on Github predai and I have added some of the screenshots from my discussion here with Wavy Davy.

Rob

R
#1731 Rbor

How useful is historical data for Agile?
Throughout much of July, we experienced docile weather with little wind and little variation in Agile rates daily. Predbat didn't seem to do much more than GE eco mode achieves.
But with the return of wind, Agile rates have responded and we have seen many low slots, some plunges.
Predbat seems to use historical data drawn from last 10 days max, limited by HA.
I set up my apps.yaml historical data using https://springfall2008.github.io/batpred/apps-yaml/#historical-data, especially the section right at the end of the documentation.
Consequently, my historical apps.yaml is:

  days_previous:
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
  days_previous_weight:
    - 1

My imports for the week 5th Aug–11th Aug in kWh have been: 19.98, 35.20, 11.71, 19.48, 12.50, 10.87, 4.88.
The 35.20 was the first super-plunge day when I switched on loads overnight.
Next week, the pattern is likely to be very different.

My predbat add-on log always contains warnings about my historical data. e.g. I get similar to this every 5 minutes:

So, is historical data really useful to predbat when used with a 'random' tariff such as Agile (or used with UK's random weather patterns) for making future predictions?

Rob

#1732 PianSom

Rbor
My understanding is that days_previous is used only for usage patterns, not for import pricing.

So, for example, if you do the laundry on a Friday and therefore have more consumption then compared to other days then Predbat will adjust charging behaviour to reflect that. I'm not an Agile user, but I believe that it just looks at the current pricing and takes that as a given to produce the immediate plan, rather than attempting to look further out based on historic pricing patterns.

In HA you can increase the 10 day limit if you want to. In my HA configuration.yaml I use

recorder:
  purge_keep_days: 22

and have in my predbat apps.yaml

  days_previous:
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 14
    - 21

  days_previous_weight:
    - 0.25
    - 0.25
    - 0.25
    - 0.25
    - 0.25
    - 1.0
    - 0.25
    - 0.9
    - 0.8

Not sure why you have gaps in your historic usage data. Can't think of any reason why that might be.

G
#1733 geoffreycoan

PianSom My understanding is that days_previous is used only for usage patterns, not for import pricing.

Correct, days_previous is to determine what days of prior history predbat takes into account to work out today’s predicted house load in kWh. days_previous_weighting allows you to weight previous days rather than take a simple average (discarding the lowest if you have this turned on).

The gaps in data I don’t know why Predbat says this happens, it’s on my list to look at, at some point.

Daily house load goes up and down for us depending on washing, cooking and in the winter, the ASHP. pred_ai might give a better forecast as it can take outside temperature into account, but I’ve not looked into it.

A simple daily average of days 2-8 is good enough for me, it predicts the peaks of load like the hot water coming on and evening cooking and aligns that to have sufficient SoC in the battery, and in the winter its all a bit moot as the ASHP exceeds my battery capacity anyway.

R
#1734 Rbor

PianSom geoffreycoan
I have tried to increase the HA limit for historical days from 10 to 14 by adding to HA configuration.yaml (as in the documentation https://springfall2008.github.io/batpred/apps-yaml/#days_previous:

  recorder:
    purge_keep_days: 14

But when I try restarting HA, I get this error message (and HA won't restart). I have now commented out the lines.

Do I have recorder installed? It is not picked up as an integration. No idea what 'logger' is!
HA is impenetrable at times ☹️.

Rob

#1735 PianSom

Rbor
My first suspicion is that you've made an indentation mistake (all too easy to do in yaml - hate it!).

Both logger and recorder are built in to HA. The first is used to manage log file entries, the second to manage the database that data is stored in.

In Predbat usage the first is often used to suppress redundant warning messages (see https://springfall2008.github.io/batpred/faq/#predbat-is-causing-warning-messages-about-exceed-maximum-size-in-the-home-assistant-core-log).

My guess is that you have accidentally added in the recorder INSIDE the logger area. The indentation of logger: and recorder: should be the same in your configuration.yaml

#1736 PianSom

PS After writing your configuration.yaml but before restarting it is good practice to hit the blue "Check Configuration" button/text next to the red Restart

R
#1737 Rbor

PianSom Thanks. That has fixed it.

I know the importance of indentation in yaml files but the starting indentation isn't always obvious.
I used the documentation which refers to various entries for apps.yaml, which start after 2 spaces, presumably as subsets to the initial predbat entry?
The recorder entry in documentation looks as if it has the same indentation so I started also in configuration.yaml with 2 spaces.

Strangely, I do have the logger entry already in configuration.yaml, starting with no indentation, as in https://springfall2008.github.io/batpred/faq/

Thanks for bailing me out here. I feel such a numpty.
Mind it would help if HA could provide error messages that refer to what is wrong, rather than that configuration warning in code.

Another lesson learnt.

Rob

R
#1738 Rbor

geoffreycoan

The gaps in data I don’t know why Predbat says this happens, it’s on my list to look at, at some point.

I am trying predai for a few days or until I get crazy load data returned. I am also monitoring temperature from my weather compensation heat pump sensor.
Either way, I can continue to run predai and switch predbat in or out by commenting or commenting out of the relevant three apps.yaml lines.

With predai, my gaps in historical day data have disappeared!

But, I am seeing this error in predbat add-on log and in my predbat.log.

I get this whether running load via predbat or via predai.

I have emailed Solcast support with an error report. Nothing back yet.

Rob

W
#1739 Wavy Davy

Is a outside temp sensor Required for Predai to work properly?
Don't have one, so can I just not specify one in the predation.yaml or will it not predict correctly.
Have Installed but not enabled in the apps.yaml.
Also since installing it had a message running out of disc space so may have to add some external memory.

G
#1740 geoffreycoan

Wavy Davy Is a outside temp sensor Required for Predai to work properly?

I think it does, part of the logic is that energy use is related to outside temperature, especially heating and hot water.

If you don't have an outside temperature sensor then you could use the nearest met office weather station as a reasonable proxy. Or weather underground has lots of weather stations across the country.

I have bought a number of Govee Temperature and Humidity (H5075) sensors, neat little units with an LCD display. Outside I have a Govee H5074 which is the same except without the display. They all stream live T&H data via Bluetooth Low Energy (BLE). To get the bluetooth data into Home Assistant you can use an ESP32 CPU (powered by a USB phone charger) and install ESPHome on it, one of the functions you can install in ESPHome is bluetooth proxy.

ESP32's are about £5 (or £1-2 if you can wait for them to come from China via aliexpress), the H5075 are around £10-20 each but currently £8.99 after a £3 voucher on Amazon. Plenty of videos on ESP Home on YouTube. I'm only using them as bluetooth proxies and on one I have wired my own T&H sensor. Lots more smart home projects you can build on them.

B
#1741 Boffinboy

On predai - when I asked Trefor in an issue he said it takes the historic data from a sensor to predict the future data of that sensor. If did not sound like it takes multiple sensors to predict load (which is what I had hoped). So my understanding was if you configure a temperature sensor it will create a new prediction for future temperature based on that data, but not use it to inform anything else. It will predict load based solely on the historic load readings. See here https://github.com/springfall2008/predai/issues/4

Tell me if you are seeing something different!

I have a weekly pattern with washing etc so set Predbat to look at days 7, 14 and 21, but I’d love an AI driven approach if it could take into account multiple sensors / inputs eg temperature, occupancy, and other things that might correlate with energy use

R
#1742 Rbor

Wavy Davy geoffreycoan
I have predai running and serving predbat now.
These are the screenshots of my apex-charts for load and temperature:

I have a good-looking predbat plan now but I think it needs data in – hence leaving predai running. The plan should improve.
Also take a look at the comments I have added to GitHub:
https://github.com/springfall2008/predai/issues/13
Also, there is Trefor's video on predai:
https://www.youtube.com/watch?v=QkHKCRcimKA
I think he mentions weather sites.

I hope you can sort your memory issues. I run HA from a spare 500Gb SSD so I am unlikely to run out of space!

Rob

R
#1743 Rbor

I have experienced this error today in predbat add-on log and in my predbat.log.

2024-08-13 21:50:07.578000: Warn: Error downloading data from url https://api.solcast.com.au//json/reply/GetUserUsageAllowance, code 405

I get this whether running load via predbat or via predai.

I have emailed Solcast support with an error report. Nothing back yet.
Looking at my predbat/log, the pv data is still getting through.
Is anyone else getting this error?

Rob

R
#1744 Rbor

Boffinboy Interesting. Your issue, #4 was marked as closed and I will look at the other closed issues. Mine is #13. Interesting that historical load readings are taken by predai.

Wavy Davy On temperature, I think that these lines could just be commented out for the time being until you have a temperature sensor of some type to use.

Rob

J
#1745 Josephiah

Hi @geoffreycoan,

I've been having a play with manual freeze periods to see if I can reduce clipping on sunny days, and am getting rather confused by the settings. A couple of the descriptions in the documentation in particular look to me like they are the wrong way round (at least to my own logic!). Are these descriptions correct, as far as you are aware? Or should they be the opposite way round?

https://springfall2008.github.io/batpred/customisation/#manual-control

The select.predbat_manual_freeze_charge selector is used to force Predbat to freeze charge during a 30 minute slot, this implies the battery will not discharge and hold at the current level. The grid maybe used if solar is not enough to cover the load.

The select.predbat_manual_freeze_discharge selector is used to force Predbat to freeze discharge during a 30 minute slot, this implies the battery will not charge but will still discharge for the house load. Any solar will be exported to the grid.

As written, manual_freeze_charge apparently freezes discharging and vice versa. Is this just a nomenclature/logic issue?

Ideally I'm looking for a setting which, when there's excess solar coming in, has priority order: house load > grid export > battery charge. I know there is a mode which does this, as described here, but I'm struggling to pin down which option I should be using. (If the descriptions are correct as written, then it looks like manual_freeze_discharge is what I want...)

Thanks,
Jo

R
#1746 Rbor

Rbor

I have experienced this error today in predbat add-on log and in my predbat.log.

2024-08-13 21:50:07.578000: Warn: Error downloading data from url https://api.solcast.com.au//json/reply/GetUserUsageAllowance, code 405

Replying to myself!
This is the reply I have received from Solcast. I don't really understand what it means and I have replied to Solcast asking for more details. I am accessing Solcast directly from the predbat apps.yaml and am not using the integration. That would explain why this message is coming from Solcast every 5 minutes.

Hi Rob,

The endpoint has been deprecated for quite some time now. However I can see from our logs it looks users were still able to make successful API calls till yesterday for some reason. We will need to look at why that is the case, as they shouldn't have been able to.

If you have any further questions, please let me know.

Kind Regards,
Billy

A
#1747 arczi19

Rbor

This means that Predbat will need to update its code, as its making calls to an endpoint that no longer exist.
In other words, nothing to worry about on your side (I think for now the only side effect will be Predbat not knowing how many of 10 free calls per day you have left).

D
#1748 danerf

Before raising a github issue/help does anybody know how I can force predbat to update the hourly prices? I can see octopus addon working showing all the prices for the upcoming day. Overnight my Docker predbat had a funny so and rebooting the PI fixed it.

G
#1749 geoffreycoan

Rbor Thanks for the info on predai, sounds like it is a more intelligent forecasting of load than the logic currently built in to predbat but doesn't (yet) have correlation between sensors such as temperature to load. Not something I have looked at yet, but it seems to have decent load correlation for you.
I think Predbat is generally being too pessimistic about my load predictions, every night it predicts I will run out of battery about 3-4am and start importing, but in reality every night I only get down to about 30-40% SoC and am not running out. Maybe predai will improve on this, but at the 'cost' of another thing to load and get my head around !

Josephiah Are these descriptions correct, as far as you are aware? Or should they be the opposite way round?

https://springfall2008.github.io/batpred/customisation/#manual-control

As written, manual_freeze_charge apparently freezes discharging and vice versa. Is this just a nomenclature/logic issue?

The descriptions are the right way round, I know I wrote them, after other people struggled to understand how they worked and I double checked several times with Trefor. In hindsight they are (IMHO) not well named, but they are what they are so the description tries to make clear how they operate.

freeze_charge - think of it as "freeze the current SoC level" (don't let it decrease) but allow charging if there is excess solar
freeze_discharge - think of it as "freeze the current SoC level" (don't let it increase) but allow discharging if house load requires it

There is a load priority mode selector in givtcp but I've heard it doesn't make any difference. Not something I have ever used. The predbat manual selectors do work though even if the names are confusing.

Rbor This is the reply I have received from Solcast. I don't really understand what it means and I have replied to Solcast asking for more details. I am accessing Solcast directly from the predbat apps.yaml and am not using the integration

Both Predbat and the Solcast integration (BJreplay version) use this API call to determine how many API calls the user can still make in the day, which for hobbyist users is a limit of 10 per day.
In the Solcast integration it gets the same error but has a cache of the API call details so uses that when Solcast doesn't want to respond, so is only appearing as a warning in the Solcast integration logs.
The Solcast integration only makes this API call when it (a) loads the integration and (b) needs to get a periodic retrieval. Seems that Predbat calls the API every 5 minutes which may be why Solcast have finally turned it off.
If you can, could you send the following reply back to Solcast please:

"Thanks for your reply, I am quite surprised to hear that the API call had been deprecated for some time as I use this call to check that I still have unused daily API calls before requesting an updated solar forecast so that I don't make API calls that will fail. How can I achieve this in future if this API is withdrawn?"

May need predbat to keep track of daily API calls consumed if they don't relent. Not good.

danerf Before raising a github issue/help does anybody know how I can force predbat to update the hourly prices?

Predbat automatically picks up the latest prices every time it runs (by default every 5 minutes) so there's mechanism that forces an update. If your docker went funny, restarting the container would have fixed it.
If there were failure messages in the log that Predbat didn't pickup and error on, then raise this as a github issue

M
#1750 matttheotter

geoffreycoan I have a dumb question, I have intermittantly copied across the updated Predbat yaml changes, mainly the REST / Solcast Prediction configs.

How often should I be refreshing my Predbat config with a full update?

J
#1751 Josephiah

geoffreycoan The descriptions are the right way round, I know I wrote them, after other people struggled to understand how they worked and I double checked several times with Trefor. In hindsight they are (IMHO) not well named, but they are what they are so the description tries to make clear how they operate.

Thank you, that's helpful, and fits with my experiments this morning. It's a complex picture as for each of those possible manual modes, we have to account for/describe the behaviour in multiple scenarios, i.e. when solar > load and vice versa. If/when I find the time I might try and knock up a table of behaviours for each mode.

G
#1752 geoffreycoan

Josephiah If/when I find the time I might try and knock up a table of behaviours for each mode.

It is complex. If you do find a better way of explaining it, I'm happy to add it to the docs. Looks like Trefor has merged my last set of updates in so I can resume again!

matttheotter geoffreycoan I have a dumb question, I have intermittantly copied across the updated Predbat yaml changes, mainly the REST / Solcast Prediction configs.

Yeah, the whole apps.yaml thing not getting updated with new features is a pain. At the moment the only way round it is to periodically do the copy/re-edit for your config as you have been doing.

What I do is look at the changelog https://github.com/springfall2008/batpred/releases and in particular for each new release I look at the detailed changelog eg https://github.com/springfall2008/batpred/compare/v8.3.1...v8.3.2 to see if they apply to apps.yaml

Need to find a better solution for this at some point

M
#1753 matttheotter

I had not realised at the start that it didn't update (lazy user) but as bits have been updated between releases I have been copying across bits.

What I will do is backup my current config and then do a refresh this week, need to spend more time tweaking predbat but it has been so good for me this year, have exported 4MWh to grid 😃

B
#1754 browellm

Looks like Octopus Power Ups are going nationwide as I've just had an invite for one tomorrow in the East Midlands. Will Predbat just automagically handle these?

#1755 PianSom

browellm Will Predbat just automagically handle these?

Sadly, no. Because Octopus does not expose them through their API there is no way for Predbat to "know" about them.

The workaround is to have a section in your apps.yaml which looks like this:

  rates_import_override:
    - start : "12:00:00"
      end : "16:00:00"
      rate : 0
      date : "2023-12-23"
    - start : "12:00:00"
      end : "16:00:00"
      rate : 0
      date : "2023-12-24"

So you manually specify that your import cost for the date/time specified is zero.

See https://springfall2008.github.io/batpred/energy-rates/#manually-over-riding-energy-rates

R
#1756 Rbor

geoffreycoan

The Solcast integration only makes this API call when it (a) loads the integration and (b) needs to get a periodic retrieval. Seems that Predbat calls the API every 5 minutes which may be why Solcast have finally turned it off.
I have sent your comments to Solcast. Will likely get a reply in the early hours of Thursday (for us).
If you can, could you send the following reply back to Solcast please:

I have sent your comments to Solcast. Will likely get a reply in the early hours of Thursday (for us).

"Thanks for your reply, I am quite surprised to hear that the API call had been deprecated for some time as I use this call to check that I still have unused daily API calls before requesting an updated solar forecast so that I don't make API calls that will fail. How can I achieve this in future if this API is withdrawn?"

Take a look at the top of your Solcast page. There used to be a banner at the top showing your daily tally of API requests:

For me (and others), the top light blue banner with its info has gone. Remember that I am accessing Solcast from apps.yaml and you are using the integration. It would be good to know whether we get the same.

With the collapse of the original Solcast integration (oizee?), Solcast is rattling its joints. I hope the hobbyist idea will be maintained and that they are not having a rethink. I have an old 50 request a day' account but typically use just 2 of 3 of these.

Rob

B
#1757 browellm

PianSom that is terrific, tyvm.

R
#1758 Rbor

geoffreycoan

Thanks for the info on predai, sounds like it is a more intelligent forecasting of load than the logic currently built in to predbat but doesn't (yet) have correlation between sensors such as temperature to load. Not something I have looked at yet, but it seems to have decent load correlation for you.

It was comparatively easy to set up predai. Do look at the comments I have added to predai issues (#13).
Since running predai with predbat, I think I am getting smaller adjustments within my in-day adjustment chart:

Predai seems to be attracting some current interest and it would be good if it reawakens from its largely dormant state.

Rob

J
#1759 JasonF

Hey I just had my first notification from octopus saying electricity between 1-2 tomorrow will be free, anything above my normal use. I’m normally running on battery so my normal use is 0. If I discharge the battery before and then recharge in that hour can predbat take care of it? Or do I need to do it myself?

#1760 Cdent

JasonF Predbat won't recognise it unless you specifically add in those times, check the post from PianSom for how to do that

J
#1761 JasonF

Ah great, thanks!

G
#1762 geoffreycoan

As PianSom says, if you set a rates_import_override for the period (I’ve got a script much earlier in this thread that automatically does it for you) then Predbat will take account of it.

I’ve just done so for my own, and Predbat is planning at the moment on ignoring it:

My predicted solar generation per half hour slot is 3.5 & 3.3kW, my max battery charging rate is 2.6kW per half hour, so ergo I’m going to be exporting regardless of whether I’m charging the battery or not.
If it turns out to be significantly less sunny or I can find enough to turn on for the hour, they maybe it’ll be worth it

J
#1763 JasonF

Yeah I barely have solar, I’ve put it in and it’s planning on doing a short discharge and then recharging in that slot.

J
#1764 JasonF

geoffreycoan can you post the script again?

R
#1767 Rbor

Rbor geoffreycoan
For info, this is the reply that I received from Solcast overnight:

Hi Rob,
Thanks for forwarding that through.
As mentioned on the github page, we're looking into alternative (more efficient) solutions at providing this information.
If you have any further questions, please let me know.
Kind Regards,
Billy
Product Operation Specialist, Solcast

The GitHub page that Billy refers to is the Solcast integration: https://github.com/BJReplay/ha-solcast-solar
that I had referred to this in my previous reply to Solcast. This is affecting both Predbat's direct method and the integration.
For me, I am still receiving the solar predictions in my predbat plan and future days and, looking at my predbat.log, they are coming through every 8 hours as in my yaml code.

So the ball is in Solcast's court. They seem to be trying to come up with a solution.

Do tell me of any points that you might want me to include in a reply to Solcast.
I will also add this comment to the Predbat GitHub issue #1362: https://github.com/springfall2008/batpred/issues/1362

Rob

G
#1768 geoffreycoan

Rbor I saw the reply from ‘billy-solcast’ on the BJreplay Solcast integration https://github.com/BJReplay/ha-solcast-solar/discussions/128#discussioncomment-10343035

Great that they’re monitoring integrations that talk to Solcast and have engaged. As you say, ball is in their court at the moment. There seemed to be a glitch with Solcast last night and lots of people (myself included) didn’t get a solar update (my 1am didn’t work), but this is resolved and now downloading again OK.

#1769 Hook

@geoffreycoan Can I just check that Battery rate max scaling charge/discharge is the way for you to let Predbat know how quickly your battery charges/discharges?

#1770 PianSom

geoffreycoan If it turns out to be significantly less sunny or I can find enough to turn on for the hour, they maybe it’ll be worth it

Results came in for my last three Power-ups. More free electricity than I can do anything with 🙁

G
#1771 geoffreycoan

Hook Can I just check that Battery rate max scaling charge/discharge is the way for you to let Predbat know how quickly your battery charges/discharges?

Depends on what you are trying to do ….

inverter_limit_charge / _discharge in apps.yaml https://springfall2008.github.io/batpred/apps-yaml/#inverter-control-configurations that controls how quick the battery charges/discharges if you want to override the max that the inverter tells Predbat it can operate at. This is useful if you want to charge the battery at a lower rate eg overnight.

input_number.battery_max_rate_scaling https://springfall2008.github.io/batpred/customisation/#scaling-and-weight-options is used in the predbat plan to scale how the inverter charges/discharges, but it doesn’t actually change the real-world charging rate.

As an aside, I want to be able to change the charge rate dynamically so that in the morning I hold off charging my batteries from solar, and then start charging at say 1.1kW from 10am to stop solar clipping. inverter_limit_charge would be the way to do this but at the moment predbat expects only a number in apps.yaml, not a HA helper.
So to achieve what I want on hot summer days I have to put predbat in read only mode and change the charge rate myself.
This is one of the priority things on my predbat to-do list….

#1772 Hook

geoffreycoan

Thanks.

I've adjusted the battery scaling figures as I now have a higher discharge rate. Last night my battery only charged up to 93% because the discharge had taken too much at it's higher rate.

My discharge is 2.7kwh and my charge is 2.5kwh, so I've gone with 1.04 and 0.96

I'll see how the power up session goes today.

G
#1773 geoffreycoan

PianSom Results came in for my last three Power-ups. More free electricity than I can do anything with 🙁

I think I missed the power up on 31st July as I was away, but it was a similar story for me, a massive 56p of free electricity. The 8th August wasn’t that sunny so I let Predbat discharge and recharge the battery, for 3.2kWh of free electricity and that’s probably where I made the 56p from.

V
#1774 Vestas

geoffreycoan First power-up in East Mids and Agile import is at 3.05p/kWh. Figures as yesterday (and many other this summer) was at 15p for the same time period....

Edit - I'm almost looking forward to autumn/winter and windier weather 😉

W
#1775 Wavy Davy

geoffreycoan
re the power up add-ons, Can I ask where the code
"- title: Powerup
path: powerup
icon: mdi:arrow-collapse-up
etc" goes? Does it go in the configuration.yaml
Have got the helpers done, but not sure how to proceed from there.
Other option would be to set a manual 1 hour discharge before the times and a 1 hour manual charge during the time.

G
#1776 geoffreycoan

Wavy Davy re the power up add-ons, Can I ask where the code
"- title: Powerup
path: powerup
icon: mdi:arrow-collapse-up
etc" goes? Does it go in the configuration.yaml

You’re getting there. Step 2, the code above goes into a dashboard page, not configuration.yaml (that’s step 3, the predbat shell command).

So create a new dashboard, go to settings/dashboard

Add dashboard / New dashboard from scratch

Give it a title and save the (blank) dashboard

Select the dashboard and click OPen, then the pencil icon top right corner

Three dots, raw configuration editor and paste the dashboard code from point 2 of my instructions and that will create the dashboard page you can use to add the power up event to apps.yaml

In point 3 when you add the entry to configuration.yaml you might need to edit the path to apps.yaml to point to where your apps.yaml is stored. If you are using the Predbat addon or the Appdaemon predbat addon the paths will be different (see https://springfall2008.github.io/batpred/apps-yaml/ for details)

M
#1777 matttheotter

Note to self: Do not do Predbat updates past 9pm.

G
#1778 geoffreycoan

matttheotter Just updated to Predbat 8.3.3 and got the following error and now can't downgrade to 8.3.2:

I haven't upgraded myself yet, sounds like I'd better take a backup in case the same happens to me.

Assume the select.predbat_update control isn't working?

If you are using the original HACS and Appdaemon install method you can use HACS to install an old version. If using Appdaemon-predbat or predbat add-on's, its a bit more tricky.
Two options:

G
#1779 geoffreycoan

matttheotter Hello again Matt, I just updated predbat myself to 8.3.3 and it worked fine. A few errors in the logfile whilst it was aborting the old version and starting the new, but its running clean for me.

Looking at the logfile some of my code changes haven't made it through the manual code merge Trefor had to do, but I can re-create them so not the end of the world.

If Predbat isn't working try restarting the add-on?

M
#1780 matttheotter

geoffreycoan I read the logfile in AppDaemon and it pointed me to a configuration error I had where I had configured a long life token for PB before I really understood yaml config.

You were right the predbat update control had stopped working, updating after 9pm didn't let me think clearly enough to read the logs.

I need to spend sometime updating my config file with your latest changes, I also need to ask about how to make predbat optimal as I feel like I am not making the most of it. Particularly car charging on Agile, I have had to put in a car charging plan max rate (15p) but I am not sure why...if I don't it seems to just start charging 🤷

That is a problem for next week when hopefully the Renault APIs start working again, had to flip everything to manual charging tonight on the car.

R
#1781 Rbor

Just updated to Predbat v8.3.3.
I am accessing Solcast via apps.yaml and the Solcast API limit error (405) has disappeared. Trefor's handiwork again.
Moves seem to be afoot for a fix for the Solcast integration.

Rob

W
#1782 Wavy Davy

Thanks Geoff.

J
#1783 JasonF

geoffreycoan when you do this can we have a chat about multiple AIO’s?

Basically to get predbat working for multiple aio’s I had to create a fake input helper for the charge and discharge rate because the gateway reports them as 0. Each AIO separately has a charge and discharge rate but the gateway doesn’t report or combine them, in the gateway you control the % charge rate and the AIO’s adjust.

So right now predbat thinks it’s can control my charge rate but it can’t because the input helpers are “fake”

So being able to specify the charge and discharge rates manually and then point predbat at the %invertor rate controls would be super helpful.

Also as an aside, for multiple AIO I had to disable rest because it couldn’t find all the stuff it needed (I don’t know wether it’s actually not available, or wether the modbus changes for multiple AIO just aren’t being picked up). I had to create a bunch of combined sensors, with multiple aios you control the gateway and the gateway controls the aios so it has to be setup as a single invertor. I need to try and speak to the givtcp dev to see if there’s anything he can help with.

G
#1784 geoffreycoan

JasonF geoffreycoan when you do this can we have a chat about multiple AIO’s?

Basically to get predbat working for multiple aio’s I had to create a fake input helper for the charge and discharge rate because the gateway reports them as 0. Each AIO separately has a charge and discharge rate but the gateway doesn’t report or combine them, in the gateway you control the % charge rate and the AIO’s adjust.

Yes happy to chat here, or github, and assuming a solution doesn't make it into givtcp, to add whatever you get it working into the predbat docs.
Thinking about the charge & discharge rate, predbat has some very simplistic ideas on controlling the charge rate, it basically sets it to maximum for your inverter or zero. So I'm wondering, with your fake charge and discharge helpers, would an automation that changes the AIO gateway % charge rate when predbat changes the input helper charge rate? It'd only need to detect changing to max and to minimum and mirror that in the gateway control

#1785 Hook

8.3.4 is out, but update fails for me.

8.3.3 is fine.

#1786 PianSom

Moved from 8.3.2 to 8.3.5

Did the now obligatory AppDaemon restart. Got some kind of "HA slug" error, which resolved itself. Seems to be working ok.

R
#1787 Rbor

Upgraded to v8.3.5 smoothly from v8.3.4 on standalone predbat add on. I looked at code changes and noticed a slug in there (whatever that does!) No error.

With another free electricity hour tomorrow 1pm-2pm, more usage would be from my solar first for which I would be getting 15p export anyway. Agile rates will be really low anyway. Is there any merit in discharging battery for an hour prior to 1-2pm? Or do I need to just use as much electricity as I can? Daytime power ups appear to be of little use to me with Agile import and 15p fixed export.

Rob

#1788 PianSom

Rbor
I've found (and I think @geoffreycoan agrees) that on sunny days there is little/no benefit in exporting before a free leccy window. Giving up that 15p export tariff while you are exporting just makes it uneconomic

It's a bit sad, but I guess it's a nice problem to have - too much free, green electricity.

R
#1789 Rbor

PianSom I remember the comments by geoffreycoan and you on the merits, or otherwise, of power ups.
My Octopus Agile kWh slots for 1-2pm tomorrow are 2.10p and 2.32p. I think I am better off exporting from my panels and then using night-time Agile slots (before sun rises) to refill my battery from its usage this evening. My lowest 2 slots overnight are 8.40p and 10.00p.
On Thursday's power up, I used all the electricity that I could possibly use and I have run out of needing large amounts of electricity tomorrow. As you say, we shouldn't really be moaning about free green electricity.

Rob


D
#1790 danerf

I'm baffled by the multicar setup on predbat.

I've added both my EV cars (they both charge at different rates, but predbat at the moment cannot support that)

As stated, I have Car 0 Battery SOC + Best and Car 1 Battery SOC + Best entities. Both have the same number.

If I modify the limit of Car 1, nothing changes. If I change the limit for Car 0, Predbat will do its thing and create a slot.

Do you think I should report this as a bug?

G
#1791 geoffreycoan

Been away in the Isle of Wight for the weekend, got back earlier today. I'll post a couple of cool (I think) photos

Rbor Upgraded to v8.3.5 smoothly from v8.3.4 on standalone predbat add on. I looked at code changes and noticed a slug in there (whatever that does!) No error.

The reference to slug name is part of the code changes that I introduced to work out what add-on Predbat is running under, so that entries in the logfile look like this:

2024-08-16 12:01:04.761413 INFO pred_bat: Saved current settings to /addon_configs/a0d7b954_appdaemon/predbat_config.json

rather than

2024-08-16 12:01:04.761413 INFO pred_bat: Saved current settings to /config/predbat_config.json

Which doesn't exist.

Unfortunately the changes Trefor introduced in 8.3.5 to get predbat working for docker have broken my code, see https://github.com/springfall2008/batpred/issues/1373

PianSom I've found (and I think @geoffreycoan agrees) that on sunny days there is little/no benefit in exporting before a free leccy window. Giving up that 15p export tariff while you are exporting just makes it uneconomic

Correct. Strangely I didn't get any notification of free electricity on Sunday. I had power up events on Thursday and Friday and the first free electricity on Thursday, but no other free 1 hour sessions. Weird.

danerf If I modify the limit of Car 1, nothing changes. If I change the limit for Car 0, Predbat will do its thing and create a slot.

Do you think I should report this as a bug?

Yes I think you should. I don't have an EV so have limited experience of how it works in practice, but it does sound like a bug from what you are saying

G
#1792 geoffreycoan

Crossing the Solent past Ryde

Needles lighthouse

R
#1793 Rbor

geoffreycoan

Unfortunately the changes Trefor introduced in 8.3.5 to get predbat working for docker have broken my code, see https://github.com/springfall2008/batpred/issues/1373

I have added a comment to your latest predbat issue #1373, confirming this broken behaviour in the predbat standalone add-on.

Rob

R
#1794 Rbor

geoffreycoan Brilliant pictures. A lot sunnier than up here in cloudy Yorkshire.
Is your microlight named 'predbat'?

Rob

W
#1795 Wavy Davy

Well, I'm temporarily HA less for the time being. Tried upgrading the ssd in my dell thin client and now it won't do anything, not even boot !! tried another ssd no luck, so have had to buy another one. Managed to find one with 256Gb ssd in it and 8 Gb ram so now have to wait until it arrives. 😢
May have a rummage through the" bits box" see if there's anything in there that could work.

M
#1796 matttheotter

Wavy Davy WonderWatt as a temporary solution?

V
#1797 Vestas

Wavy Davy You did format the new one as gpt? If not then I'd suggest having a search online as your Dell probably won't boot MBR by default.

W
#1798 Wavy Davy

matttheotter Thanks but problem is nothing to run in on.

Vestas Will try that. I formatted it as NTFS and then used Balena-Etcher to burn the image. I thought that Balena would format it the same as the image, but maybe not. Would have thought that the dell would run MBT as it came with Win 10 on it. Also cant seem to get into the bios. It just does nothing, so if the reformat doesn't work will try reflashing the bios see if that helps. New Dell won't arrive until probably next week, so as I have nothing to loose will keep playing with it.

#1799 Hook

Wavy Davy Doesn't it run off the cloud?

you can run it off a phone I'd presume?

W
#1801 Wavy Davy

Hook If you're referring to wonderwatt I don't know as I've never used it. But for the sake of a few days I'll continue using Octopus R & D and if I have no luck with the old Dell will wait for the new one to arrive probably next week. The new one is a better spec anyway and has a 256Gb ssd in it.

W
#1802 Wavy Davy

Vestas Have reformatted it on my mac to GUID as I think that's the same and burned HA image onto it. Will try that this afternoon.

W
#1803 Wavy Davy

Nope, think it's dead. Have tried reformatting the drive, but nothing. No output to monitor, no dell logo, no response to esc. or F2 to get into Bios settings. all I get is the orange led under the on/off switch slowly flashing. Even if the Dell doesn't recognise the SSD I should still be able to access the bios, Which I cant. So unless I have a brainwave Its pretty much salvage parts time.

W
#1804 Wavy Davy

Turns out it was a cmos problem. Took it apart again!. Took a couple of boards out and found the Backup battery. Took that out, checked it (OK) and re-installed it. Put everything back and it's working. Just waiting to see if the backup will install, but looking good so far.

W
#1806 Wavy Davy

Finally got it back and running. Restore took a lot longer than I expected, but eventually worked.

M
#1807 matttheotter

Hook Yep, this is another Cloud job, I have it running my folks AIO.

G
#1809 geoffreycoan

Anyone tried HACS v2 yet?

Latest Predbat 8.3.6 fixes the code that writes the correct /addons_config pathname to the logfile that I introduced in 8.3.3, but got broken in 8.3.5.

#1810 PianSom

geoffreycoan
HACS 2 here, with no issues at all. (Remember to do a full backup tho!)

Have updated a few things with it, including Solcast. But not going to risk Predbat just yet.

G
#1811 geoffreycoan

PianSom That’s good to hear, thanks. I tend to update Predbat using the predbat update control which means HACS gets confused as to what version I’m on. Last time I tried updating via HACS it zapped my entire predbat directory including the apps.yaml which was annoying.

I’ve not bothered with joining yesterday and today’s Octopus power up events. Agile rates were negative during the power up so I’d be worse off if I did.

W
#1812 Wavy Davy

I seems to have updated to V2 when I did the reload of my system. It may work better but don't like the look of it. It is a list rather than icons, and it seems you cant get the old look back without uninstalling and re-installing it, butI couldn't find a version 1 to re-install.

G
#1813 geoffreycoan

Wavy Davy I saw that table view when I accidentally turned on experimental mode in the old HACS version. I didn’t like it either, finding what was due to be updated for example didn’t jump out like it used to do,

You can always download the old version from github https://github.com/hacs/integration/releases and replace the files in /config/custom_components/hacs

W
#1814 Wavy Davy

geoffreycoan Thanks Geoff. Is there an easier way to replace them other than one by one?

#1815 PianSom

geoffreycoan I’ve not bothered with joining yesterday and today’s Octopus power up events. Agile rates were negative during the power up so I’d be worse off if I did.

I have been faithfully signing up, and Predbat has been efficiently ignoring them. My Power-up payment emails are now sad - no thrill from seeing a 2p refund!

As the season’s change starts and thoughts turn to shorter days, I’ve been starting to wonder whether IOG will remain the best choice for me this Autumn/Winter. I suspect it will.

When it gets to the end of the year it will mark 12m on Predbat for me - it will be interesting to do some analysis.

R
#1816 Rbor

geoffreycoan correct /addons_config pathname showing up in logs within v8.3.6 on HAOS standalone predbat.
The pitfalls of running predbat, or indeed HA, on different systems!

Thanks for your persistence in getting the slug working correctly.

Rob

R
#1817 Rbor

PianSom Found out that my first Octoplus free hour has earn't me 18p. I will spend it wisely.
As you and geoffreycoan have commented, daytime free/cheap slots do little for if you are exporting solar. Nighttime is different.

I have been with Predbat since 30th Jan (all on Agile). The biggest plus is the predbat's control of my inverter/battery/imports/exports. When I joined, I was still struggling with navigating my way through HA. I now know my way around HA and also predbat, supported by Trefor's constant software improvements and Geoffrey's documentation. I like to think that I have come a long way and am (starting) to contribute constructively on this (and other) forums.
I couldn't imagine life now without Predbat!

Rob

R
#1818 Rbor

Wavy Davy You should get a prize for your persistence.
Well done!

Rob

S
#1819 SteveCook

I just installed predbat 8.3.6 and it did not work, even after numerous HA restarts.
I tried restarting appdaemon but it said it could not find predbat.
I reinstalled a backup from 2 days ago and everything is running, but I have the update notification showing

W
#1820 Wavy Davy

Rbor Thanks. Not sure if it's pigheadness or stupidity, but like you I am learning, honestly!!

W
#1821 Wavy Davy

Wavy Davy forget that, just realised I can do that using finder on my MacBook. Didn't think I could navigate to HA file system but I can.

W
#1822 Wavy Davy

Rbor Thanks. Not sure if it's pigheadness or stupidity, but like you I am learning, honestly!!
All thanks to you guys and especially Geoff.

G
#1823 geoffreycoan

SteveCook I just installed predbat 8.3.6 and it did not work, even after numerous HA restarts.
I tried restarting appdaemon but it said it could not find predbat.
I reinstalled a backup from 2 days ago and everything is running, but I have the update notification showing

Hard to know what the problem was, maybe the install failed for some reason? If you have the logfile can you share it, either here or on a new github issue, and maybe try the install again and see what the logfile says.

Be aware that the default ‘restart HA’ option ONLY restarts HA, not any addons that are running alongside. You have to choose the ‘more options’ or whatever it is, and then ‘restart HA and all running addons’ to restart everything.
You will probably need to restart the appdaemon addon, but you said you tried that.

Would need to see the logs to advise further what is broken. I’m running 8.3.6 with Appdaemon and its working absolutely fine for me

M
#1824 matttheotter

geoffreycoan same for me, did it earlier, manual restart of AD as it seems to get stuck but its ticking along.

I’m now on vacation for a week so will be doing the yaml update.

S
#1825 SteveCook

Gents thanks for advice. Away for the weekend now, so will try again Mon/Tues

W
#1826 Wavy Davy

Had a interesting predbat plan last night.

Not seen it plan to charge/discharge like that before.
Looking at Givenergy dashboard it pretty much did that as well, apart from 04:30 when it charged for the full half hour.
I think having lots of blue slots helped. Lots today as well.

G
#1827 geoffreycoan

Wavy Davy wow that really is maximising the cheap rate and getting the benefit of negative import and fixed export. I see such behaviour occasionally for a slot or two but never for such an extended period.

My own plan charged in the negative slots, discharged in the zero/positive slots and would have left the battery full for all the day. My predicted solar generation is much higher than yours so no point in trying to take advantage of it as I’m generating more than I can charge/discharge the batteries at.

I actually over-rode the plan, set the last couple of morning slots to force discharge to empty the battery a bit and now have predbat in read only so I can trickle charge the battery through the day to reduce clipping. Even with the slot 1.1kWh charging I am exporting 5.2kWh.

Summer solar clipping is something Predbat doesn’t manage as well as I’d like it to. Others have asked for some enhancements as well https://github.com/springfall2008/batpred/issues/1206

R
#1828 Rbor

Wavy Davy
I had similar last night and today. My plan below copies my plan from last night.

The forecast for me today (Yorkshire) is for cloud to spread during afternoon with rain later, after great morning. So good for mopping up some cheap pm slots. Predbat is certainly going for the best slots with a lot of hybrid Charge/Discharge during some slots. I am running out of things to use electricity for to grab those nice night time rates.
Comparing my rates with Wavy Davy, it is interesting to see the different regional rates.

geoffreycoan Summer solar clipping is something Predbat doesn’t manage as well as I’d like it to. Others have asked for some enhancements as well https://github.com/springfall2008/batpred/issues/1206

I don't think I can do anything about clipping. I have a GE AC3.0 battery inverter and a SolarEdge 5kW PV inverter. I do get some clipping on the pV inverter and I think my max solar generation would be about 6 kW from my array. Predbat isn't going to help me with clipping as I think it is something for Hybrid inverters.

W
#1829 Wavy Davy

Can someone explain (Simply) what clipping is and how I can tell if my system is doing it?
I thought it was when you generate more than your inverter can cope with, but not sure.
My system is fairly basic compared to others, especially Geoffs. It's 4kw of panels and a gen 1, 3.6kW inverter.

G
#1830 geoffreycoan

Wavy Davy Clipping is as you say, your panels are generating more than your inverter can cope with and as a result the power generation gets clipped. You can see this in Home Assistant and the Portal as a ‘flattening off’ of the generation line.

Some over specification of the panels vs the inverter is fine as panels rarely generate their full output, but if the imbalance is too much the inverter just has to throw away the extra power as heat energy.

One way to tackle this with a hybrid inverter is to leave some space in the battery for DC charging. Taking yours as an example Wavy Davy, your Gen 1 hybrid can convert up to 3.6kWh of DC to AC but your panels can generate 4kWh. That 4kWh is measured under certain conditions so it’s not an absolute if the conditions are better (e.g. it’s colder than the lab test), you may actually get say 4.2kWh.
If there is space in the battery then you can charge the battery in DC at 0.6kWh and generate the 3.6kWh of AC current still. If the battery is full you’ll only get 3.6kWh of AC current generated.

The biggest array is 6.2kW on a 5kWh gen 1 inverter so I can exceed my inverter AC limit by some way but
my problem is more caused by the number of panels and inverters I have. I have 3 inverters with a total of 14kWh of generation capacity but I can never get there as that amount of generation will push the grid voltage up above the maximum permissible limit and the inverter shuts off briefly to stop this happening.

This morning’s generation:

The blue line is generation from my largest (East facing) inverter/array, the purple line is the Solcast 50% forecast for that array and the pale blue line the Solcast 10% forecast for that array. You can see between 8 and 8:30 and a couple of times after 9 the inverter power shutting off, but at 9:30 I started charging the battery and the power shut-off’s reduced noticeably.

For completeness the orange and greeny coloured lines are the PV generation from my second GivEnergy and FIT arrays. The second GivEnergy is split half on the East, half on the West, the FIT is entirely on the West so I get more generation on those arrays/inverters in the afternoon.

Below is the grid voltage which you can see drops after 9:30 when I start charging the battery as less is being exported

P
#1831 Phil_H

I have a run of 5/6/7p slots overnight (agile) and decent solar tomorrow, clearly the best plan should be fill the battery when cheap and let solar export. It's not even a close call, it's 15-25p better on the cost calculation to fill from grid vs not.

I'm confused however because running with the settings I've had for a while seems not to want to fill the battery, the key settings seem to be metric min improvement and metric self sufficiency. I used to run min improvement at -0.1 as per the documentation and self sufficiency at 2 (which I believe should make the import rates actlike 7/8/9p instead). Currently though, unless both are 0 it doesn't want to fill the battery, am I missing something in understanding what should be happening here?

G
#1832 geoffreycoan

Phil_H I have metric min improvement set to 0 and metric self sufficiency set to the default value of 0 (I don't use it) and this gives a plan like you are expecting.

The documentation does warn about using metric min improvement if you have multiple charge windows in a period (e.g. agile). It could well be the multiple charge windows that are causing it not to work as you expect. Could try min improvement of 0 and self sufficiency of 2 if you want to dissuade charging from grid.
Another thing to check is metric battery cycle cost (mine is 0p), if this is non-zero it will also weight against charging the battery

P
#1833 Phil_H

Battery cycle cost is 0. Setting self sufficiency up to 2 stops it charging to full which doesn't make sense because the 'modified' rates are still below 10p even with the 2p extra applied so it should still want to charge to full (unless it's not working), I guess I'll leave it all at 0 for now but keep an eye on it because these values have previously had it using the grid at 18p+ which is nuts.

G
#1834 geoffreycoan

Phil_H sounds like the self sufficiency might not be entirely working right. Log it as a github issue?

S
#1835 SteveCook

geoffreycoan
I went back to a backup of a couple of days ago with predbat 8.3.5 running OK.
Today i installed predbat 8.3.7 and restarted HA twice and tried to restart appdeamon, but I get this message.

I have copied the most recent log from app daemon
File "/usr/lib/python3.11/site-packages/appdaemon/threading.py", line 1022, in worker
funcref(self.AD.sched.sanitize_timer_kwargs(app, args["kwargs"]))
File "/config/apps/predbat.py", line 11012, in run_time_loop
raise e
File "/config/apps/predbat.py", line 11007, in run_time_loop
self.update_pred(scheduled=True)
File "/config/apps/predbat.py", line 9812, in update_pred
recompute = self.calculate_plan(recompute=recompute)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/apps/predbat.py", line 8198, in calculate_plan
self.publish_html_plan(pv_forecast_minute_step, pv_forecast_minute10_step, load_minutes_step, load_minutes_step10, self.end_record)
File "/config/apps/predbat.py", line 4476, in publish_html_plan
(iboost_amount_prev - iboost_amount)
ZeroDivisionError: float division by zero

2024-08-25 23:55:11.424581 WARNING pred_bat: ------------------------------------------------------------
Predbat files are installed correctly for version v8.3.5
Downloading https://raw.githubusercontent.com/springfall2008/batpred/v8.3.7/apps/predbat/predbat.py
Got data, writing to /config/apps/predbat.py.v8.3.7
Downloading https://raw.githubusercontent.com/springfall2008/batpred/v8.3.7/apps/predbat/config.py
Got data, writing to /config/apps/config.py.v8.3.7
Downloading https://raw.githubusercontent.com/springfall2008/batpred/v8.3.7/apps/predbat/prediction.py
Got data, writing to /config/apps/prediction.py.v8.3.7
Downloading https://raw.githubusercontent.com/springfall2008/batpred/v8.3.7/apps/predbat/utils.py
Got data, writing to /config/apps/utils.py.v8.3.7
Downloading https://raw.githubusercontent.com/springfall2008/batpred/v8.3.7/apps/predbat/inverter.py
Got data, writing to /config/apps/inverter.py.v8.3.7
Downloading https://raw.githubusercontent.com/springfall2008/batpred/v8.3.7/apps/predbat/ha.py
Got data, writing to /config/apps/ha.py.v8.3.7
Downloading https://raw.githubusercontent.com/springfall2008/batpred/v8.3.7/apps/predbat/download.py
Got data, writing to /config/apps/download.py.v8.3.7
Downloading https://raw.githubusercontent.com/springfall2008/batpred/v8.3.7/apps/predbat/unit_test.py
Got data, writing to /config/apps/unit_test.py.v8.3.7
Update complete
Predbat files are installed correctly for version v8.3.7
Predbat files are installed correctly for version v8.3.7
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service appdaemon: stopping
[10:41:52] INFO: Service AppDaemon exited with code 0 (by signal 0)

G
#1836 geoffreycoan

SteveCook Today i installed predbat 8.3.7 and restarted HA twice and tried to restart appdeamon, but I get this message.

Strange error message, it suggests that the add-on doesn’t exist, but yet the error you copied is of a divide by zero error in the iboost logic (which Trefor has been fixing bugs in).

First thing I’d check is to restart appdaemon-predbat addon. The default restart option when you restart HA is to only restart the core HA code, it doesn’t restart any running addon’s that run alongside HA. Click the ‘more options’ and choose ‘restart HA and all running addons’ or ‘shutdown HA’ and restart it.
I will add something to the docs because several people have been caught by this.

If it’s still failing, can you look at the actual predbat log (the appdaemon log you copied above doesn’t include the full debug). Details of where the logfile is is in the install docs https://springfall2008.github.io/batpred/install/#appdaemon-predbat-combined-install

If its still failing then its a bug in 8.3.7 and you’ll need to restore back to 8.3.5 and raise it on github. Sorry

S
#1837 SteveCook

Geoffrey thanks and dont say sorry. You are helping me
Gone to a backup and now on predbat 8.3.3.
8.3.7 showing as available, but I dont want to do that only to have same problem.

#1838 PianSom

Looks like it's finally time to abandon the appdaemon version of Predbat. Can't get left behind without web access.

Any other Docker Compose users here have any tips/warnings?

B
#1839 BenS

Wavy Davy

Not sure if this also helps.

The gen 1 inverter supports up to 11amps per string.
My particular solar panels are 410W when operating at 31.81V. This implies a current of 12.88amps (P=IR) is needed to achieve the 410W

What this means in practice is I get clipping whenever it is sunny because the inverter cannot support the current. I can never use the top 12.5% of the panel capacity. This is regardless of the number of panels I have installed (actually I have 8 so theoretically 3.2kW but in practice never more than about 2.8kW)

I have since looked at panel specs and some achieve their max power with higher voltage/lower current. These would have been better for my system.

Oh well you live and learn....

#1840 Hook

PianSom

What’s the benefit of not using appdaemon?

Why do you need to leave it?

#1841 PianSom

Hook

R
#1842 Rbor

PianSom I have been running standalone predbat for a while now.
I bravely updated v8.3.7 to v1.8.4 from predbat.
When I tried to launch the web ui from settings/add ons, I got an error message.
I then spotted that there was an update for predbat on the settings/add ons page, I think from v1.1.8 to v1.1.23.
I was unsure why there was a further update but I tried it anyway.
I don't know what change this made but I could then access the web ui.

........ Pretty nifty with so much information on one screen.

These two update routes for prebat are confusing!

So if you are brave like I am (sometimes) give it a try.

Rob

#1843 Hook

PianSom

But nothing breaks if we stay on appdaemon does it?

#1844 PianSom

Hook But nothing breaks if we stay on appdaemon does it?

True.

But I am a rider at the gates of dawn, me. YOLO

#1845 Hook

If it ain’t broke…

R
#1846 Rbor

I lurk on Trevor’s Facebook site and it looks like Trefor sees Predbat as a standalone without appdaemon. We haven’t got there yet but ……..

I would like to see more from predai. I have been running it for some time but I have no real idea whether it is offering better predictions than the current method.

Rob

M
#1847 matttheotter

Still running appdaemon here, would be nice to run it without it in the future... @geoffreycoan any idea when Trefor might flip the switch 😃

B
#1848 browellm

I swapped over yesterday. It's dead easy.

M
#1849 matttheotter

browellm assuming I uninstall the Predbat/Appdaemon install first and then the standalone?

B
#1850 browellm

matttheotter I followed this https://community.givenergy.cloud/d/3696-first-night-live-on-predbat/1392
but take into account @geoffreycoan's follow up post you do not need to blap Appdaemon before installing - just stop the add-in and set to not start on boot (then you can recover it if something goes wrong.)

I have subsequently removed Appdaemon now I've confirmed everything is working.

Basically just copy your apps.yaml and copy over to the direct predbat install. Settings seem to get carried over without doing anything.

M
#1851 matttheotter

@browellm this is why I love this community, someone else always has the answer.

This is a later today job along with updating my config yaml, currently have the car charging so don't want to mess around with it.

M
#1852 matttheotter

Flipped the switch, over on standalone now.

M
#1854 matttheotter

browellm @geoffreycoan

Any ideas what this error means in the Predbat Log:
2024-08-29 17:26:25.616002: Warn: Inverter 0: inverter definition is not a dictionary
2024-08-29 17:27:06.306750: Warn: Inverter 0: inverter definition is not a dictionary

A
#1855 arczi19

I've just noticed that the Load kWh values on my plan are all showing 0, I dont think I've changed the config myself recently and it was working all fine until today. I'm on the latest versions of predbat. Can't see anything obviously wrong in the logs. Any idea what might have happened?

#1856 PianSom

I moved over to standalone (Docker based in my case) Predbat.
tl;dr - it is worth doing

The crossover process was not without its challenges. Given that I am a HA Core user I was using Predbat under appdaemon (and inside Docker). I stopped appdaemon and spun up a Predbat container as per the manual (having copied across my apps.yaml). Couldn't get it to recognise my apps.yaml, it complained that it contained "template: True". Turns out that even having it in there and commented out (which it has been for months) is a problem. Deleted the line and all fired up beautifully.

I really like the new web access. Seeing in one place the logs, the plan and - perhaps best of all - all the options WITH their defaults highlighted if set to a non-default value is really useful. I especially like the latter, worth the update just for that.

UPDATE - this version showed up that my apps.yaml had errors in it. Three number. items had changed in HA to sensor.. Nice to have that spotted

M
#1857 matttheotter

matttheotter @geoffreycoan

Okay so this is odd, my old apps.yaml never had the line:
inverter: "GE"

Commented out this line and the Warn: Inverter 0: inverter definition is not a dictionary went away and Predbat listed it correctly as a GivEnergy inverter, however, I can see the inverter def listed in config.py on line 1009.

Bug?


Update:

Looking at the other apps.yaml it should the line be:
inverter_type:
- 'GE'

Tested, yep its an error in the current template, proposed a change to the config.

R
#1858 Rbor

PianSom In v8.4.0, I have checked the three 'number.' items.
In my apps.yaml, these are:

 battery_power:
    - number.givtcp_{geserial}_battery_power
#    - number.givtcp2_{geserial2}_battery_power
  pv_power:
    - number.givtcp_{geserial}_pv_power
#    - number.givtcp2_{geserial2}_pv_power
  load_power:
    - number.givtcp_{geserial}_load_power
#    - number.givtcp2_{geserial2}_load_power

In 'Devices & Services/entities, I do have three entities but with 'number.' instead of 'sensor.'

If I look in the GE apps.yaml template (https://github.com/springfall2008/batpred/tree/v8.4.1/templates), these three entries have 'sensor.' rather than 'number.'

I am wondering whether this is from an update that I have never picked up. We have to make changes to apps.yaml manually by comparing before and after following each update (which I don't do!)
As these are all 'non-REST' lines, they are ideally never called (I think).

In the v8.4.0 web GUI, I have these 3 'number' entries shaded in red and showing 'sensor' as the default.
I also have ? for any value:

battery_power
- number.givtcp_XXXXXXXX_battery_power ?
pv_power	
- number.givtcp_XXXXXXXX_pv_power ?
load_power	
- number.givtcp_XXXXXXXX_load_power ?

So I am wondering whether I should change my apps.yaml which hopefully will replace the ? with a value.
The v8.4.0 web UI should make tweaks to apps.yaml a lot easier to find.

Rob
UPDATE – Now v8.4.1 which I have just updated to !

R
#1859 Rbor

PianSom UPDATE from my previous post #1838.
I have changed my three red apps.yaml entries using 'sensor.' instead of 'number.'
The red highlighting is now gone and I get 3 values instead of three ?s:

battery_power	
- sensor.givtcp_XXXXXXXX_battery_power = 290
pv_power	
- sensor.givtcp_XXXXXXXX_pv_power = 8
load_power	
- sensor.givtcp_XXXXXXXX_load_power = 292

Looking at the documentation for v8.4.0, 'number.' to 'sensor.' looks like it was a bug fix:
https://github.com/springfall2008/batpred/releases/tag/v8.4.0

Rob

#1860 PianSom

Rbor
I just painlessly updated to 8.4.1 also

My guess is that the three HA entities moved from number. to sensor. at some point (a GivTCP integration change?). In any case, as you say they are unlikely to be used.

R
#1861 Rbor

PianSom With the web UI, it is great seeing so much information on one screen.

Highlighting potential issues in apps.yaml is very useful, allowing us to easily see inconsistencies such as the number./sensor issue for 3 of the power entities.
It is reassuring seeing my apps.yaml with no red highlighting.

The config screen is really useful, showing the defaults and highlighting any entries that I have tweaked.
Before, I had to comb through many documentation pages to find the defaults.

So the web UI receives a big plus for me
....... but to compliment the dashboard views which give us the ability to customise all the information as we please.

Rob

W
#1862 Wavy Davy

Wish mine didn't have any red.
Got loads of them.


Will have to have a look at them, but not sure what half of them are.
Looks like Geoffs Documentation will be getting a serious look at.

R
#1863 Rbor

Wavy Davy Have a look back at my two posts #1838 and #1839.
..... and compare with the GE apps.yaml template (https://github.com/springfall2008/batpred/tree/v8.4.1/templates).
That should mend your three 'power' entries with 'sensor.' rather than 'number.'
I bet that most of use have number. instead of sensor for these 3 power lines in our apps.yaml

If you have one inverter, you don't need the 2nd inverter line for {geserial2}.
I just comment this line (many times).

That should sort loads of your red highlighted lines.
Not sure about the others but will take a look. The octopus lines are all linked to car charging via octopus intelligent.

Rob

W
#1864 Wavy Davy

Rbor Thanks Rob, got rid of quite a few but I've noticed that I have a "Migration error" on my ge cloud integration and none of the entities (88 of them) are available. Cant see a config page so may have to uninstall and re-install it.

R
#1865 Rbor

Wavy Davy I have my ge_cloud_data set to FALSE, so I am not using it.
I can't find this anywhere on my system so perhaps I don't have it installed.
I don't think I can help here – I haven't looked too deeply into this.
I think that Trefor has a video on this.

Rob

W
#1866 Wavy Davy

Rbor Just deleted the hub and recently dated a new one.
Most of the entities are there and ok but quite a few are labeled unavailable.
Interesting you don't have it. Think I will look for the youtube and if not sorted raise a issue on the GitHub.

W
#1867 Wavy Davy

Actually forget that, just looked back at it and all but 2 entities are now ok, just needed more time.
they are the inverter upper and lower SOC limits

W
#1870 Wavy Davy

That's sorted it out, no red lines now...
Only think I want to sort out now is my predbat plan chart takes ages to load and I get this

L
#1871 Leeshore

I seem to have an issue atm. I'm on Octopus Flux (not intelligent). Predbat seems to work fine except during the peak period of 4 to 7pm my inverter is importing from the grid rather than using the battery (which is at 100%). The predbat plan does suggest it should be discharging during this period but it doesn't seem to be happening. I have my settings as per the info in the documentation. At 7pm it uses the battery as it should.

predbat-web-interface.pdf
119kB

#1872 PianSom

Leeshore
Are the Flux import rates showing correctly on the Predbat plan?

(The obvious thing is that maybe Predbat is not picking up on your import cost tariff correctly, and thinks it is cheaper to import than use the battery until 7pm.)

L
#1873 Leeshore

PianSom Yes the plan is showing the correct rates for import and export. They are coming via the Octopus Energy Integration from BottlecapDave. See tomorrow in plan (The same as it was today):

#1874 PianSom

Leeshore
Hmm. That plan shows - not unreasonably - an active discharge during the peak slot. You can export, right? And do you recall what the plan showed today for the peak slot?

L
#1875 Leeshore

PianSom it showed exactly the same. PS thanks for the prompt reply

#1876 PianSom

Leeshore
I'm not really being much help here, and can't see what might be going wrong, sorry.

In your shoes I would be looking at log entries and notifications which happen at 4pm. For example, when my system goes into a discharge mode (as it did earlier today, for example, before a Power-up discharge) then I get a notification saying "Predbat status change to: Discharging target 97%-4%". I would expect you to get the same, and to see more detailed info in the logs. Anything there?

I haven't seen @geoffreycoan around for a few days (hope he is ok!) but maybe he has some ideas.

L
#1877 Leeshore

PianSom I’ll have a look. Thanks for your advice once again

K
#1878 KevinB

Any advice about how to configure predbat for export? I can't seem to get it to ever want to schedule any export slots, even though I've set the export rate to be massive. Is there a switch or something I'm missing?

B
#1879 Boffinboy

Just updated and used the web dashboard. What a fantastic update!

B
#1880 Boffinboy

KevinB have you set it to control charge and discharge? This is one of the options

W
#1881 Wavy Davy

We've got a free electricity session today between 13:00 and 14:00.
Apart from running as many devices as possible, what's the best way to set predbat to take advantage of it?
I was thinking maybe a forced charge. Fortunately my predicted battery soc will be 10% so plenty of space.

S
#1882 SJB

Wavy Davy You can set the Manual Force Charge slots or put the following in Predbat's apps.yaml:
rates_import_override:

  • date: '2024-08-31'
    start: '13:00:00'
    end: '14:00:00'
    rate: 0
K
#1885 KevinB

Boffinboy That was it! (kinda). In my apps.yaml I have it set to Control charge & discharge, however when I look at the predbat controls in HomeAssistant then it was only set to Control charge. Thanks for the prompt to check it!

#1886 PianSom

@Leeshore
Might this be your issue also?

L
#1887 Leeshore

PianSom Unfortunately not. Mine is set to ‘Control charge and discharge’

B
#1888 Boffinboy

Having a really frustrating issue - I can’t get oredbat add on to reinstall after having to uninstall per latest guidance if web interface not working ☹️

D
#1889 DD

Boffinboy you could try
apt update
In case your local cache of versions is out of date.

B
#1890 Boffinboy

DD sorry to be obtuse…. But how do it do that?

R
#1891 Rbor

Boffinboy Looking at the errors, it suggests that you are running predbat in a docker container under an ubuntu installation.
I would completely restart ubuntu to see if that clears things.
It looks as if calls to ubuntu security are failing because ubuntu IP is failing.

How are you running HA?

Rob

D
#1892 DD

Rbor I don't use docker, so wasn't sure if these installs were happening inside a container, or at the os level

I think it's finding the server, but not the packages. 404 is usually file not found, rather than server unavailable?

As it says at the bottom of the first box, an apt-get update would update cache of latest available packages.

R
#1893 Rbor

DD MORE:
I have looked on Trefor's Facebook page and there are several having problems with the upgrade.
One error message posted is the same as yours:

The problem seems to arise after upgrading the add-on to v1.2.0, then uninstalling.
You should see predbat in the sidebar and it should work if you click on it.
I presume that you have separately upgraded Predbat to v8.4.4? It seem we have to do a double update if we want to use the web ui.

Can you downgrade the add-on back to v1.1.23 ?

I would try restarting HA but I don't think this restarts add-ons.

Have you tried restoring from backup?

It looks as if the update to v8.4.4 works for some but not for others.
I am going to keep away from it for now and see if Trefor gets it to run more reliably.

Sorry for not being more definite but I hope there is something here to help you.

Rob

B
#1894 Boffinboy

I have ended up rolling back to an older version

B
#1895 Boffinboy

DD thanks. This is running in Home assistant proper - running in a VM on synology, so no docker. It must be how it builds the add on

R
#1896 Rbor

Boffinboy Well done! It is great that you are back in action. I was reassured (?) when I found the screenshot with similar errors to yours following your attempted update to v8.4.4, which suggested that the glitch wasn't 'just you'.

My installation is on a pi dedicated to run just HA via an ssd, so it couldn't be 'cleaner' with no VM or containers to worry about.
Not one to be safe, I decided to try v8.4.4 and I am successfully onboard.
The installation wasn't without worries though:

  1. The Web UI wasn't working after I updated the add-on from v1.1.23 to v1.2.0.
  2. I then uninstalled and I worrying saw predbat disappear from the add-ons. I reinstalled the predbat add-on, which seem to take an age.
  3. I was then rewarded with a predbat icon in the sidebar, which eventually worked after predbat had completely installed.

So success for me but I feel that the installation needs to be smoother. I was happy before though on v8.4.2 and the move to v8.4.4 does carry with it some risks.

I watched Trefor's new video on the web UI and it sounds as if he has some great plans for the Web UI. Recommended watching.

Rob

R
#1897 Rbor

Rbor More v8.4.4 comments
Great update from Trefor.
Here are some other points. Any more to add?

  1. Since installing v8.4.4 with ingress the immediate web link below no longer works: http://homeassistant.local:5052/. Is it broken?
  2. Could the web interface open to the last open screen. For me, I am most likely to want to see the plan. From the sidebar, it now always opens to the dash screen, presumable because it is 1st in the list.
  3. v8.4.0 is intended for appdaemon version so why do I still see a warning about Predbat maybe running outside of AppDaemon? I have flagged this one as an issue through Github. I can flag others similarly.
  4. Confusing to update twice, through predbat to v8.4.4 and then add on to 1.2.0.
    Could this be streamlined. For me, the add-on is the outlier.

From Trefor's Web interface video, I look forwards to further enhancements to the web interface, especially to Force charging, etc.

Rob

W
#1898 Wavy Davy

similar to RBOR's experience, I have a dell thin client which only runs HA, I updated to v8.4.4 accidentally as I had auto updates selected by mistake, but it seems to have gone ok. Don't know how long it took as it did it when I wasn't around. Will have to watch Trefor's video, sounds interesting.

W
#1899 Wavy Davy

Rbor re your points
1 I cant connect either.
2 Mine has opened to the first dashboard for a while, so I put my predbat screen first, because I also want to see the plan.
3 I don't run appdaemon, and don't remember seeing his warning.

B
#1900 browellm

Using Ingress the 1.2 + 8.4.4 update goes back to using HA's default port of 8123 (but with a unique file path). Upgrade both and open the web UI from the 1.2 addon. Then bookmark.

R
#1901 Rbor

Wavy Davy In the Web UI, how do you put the plan first. The order seems to be fixed (or perhaps I haven't discovered yet how to change it).

Rob

W
#1902 Wavy Davy

Rbor click the edit dashboard icon (pencil) and arrows will appear either side of the active dashboard to move it.

R
#1903 Rbor

Wavy Davy Thanks. I meant ordering the options at the top of Predbat Web UI:

'Dash' is always opened as the default (for me)

Rob

R
#1904 Rbor

browellm Thanks.
Just done this and is a great idea.

Rob

S
#1905 shawry

things have gone a bit wrong for me (below are screenshots) I cant install an update, predbat core says I need to update, but I thought I had, and a couple of the savings charts dont seem to work now. Im currently now thinking I'll need to completely reinstall my HA unless someone can help an idiot out 🙁




R
#1906 Rbor

shawry I don't think that updating HA is going to help.

I think the problem is that you are trying to update from a very old version of predbat (7.16.15?) directly to v8.4.4. Have a look at the dropdown to see the upgradable possibilities. I don't know the exact version you are on.
A lot has happened between these 2 releases, including splitting of predbat into several 'subfiles'.
I think that you will need to first get to the split version first.

It is worth looking at the issue below which has similarities with your problem.
https://github.com/springfall2008/batpred/issues/1322

Also look at https://springfall2008.github.io/batpred/install/#updating-predbat
This seems to mirror your scenario.

You need to get the core predbat update done and then go on to the addon update (you were trying to go from 1.1.8 to 1.1.11.)
You might also consider at this stage to move from the appdaemon version to standalone predbat.
https://springfall2008.github.io/batpred/install/#predbat-add-on-install

Another option is to uninstall predbat and reinstall it (see link above)

If you do try any of these options, make sure you have a backup and download your apps.yaml file. It can disappear!

I am not confident enough with these upgrades to recommend that you follow my guidance! Look at the links which should help to set the scene.
There are others on here who may be able to offer more definite advice, such as
geoffreycoan and PianSom and others.

Hope this helps and gives you a starter.

Rob

#1907 PianSom

shawry
Yes, it looks like your issues are to do with lots of big updates being required. The good news is that a HA reinstall is very likely not necessary!

In your shoes this is what I would do:
1 - make a full HA backup (which hopefully you did already!), and in particular make sure you have your apps.yaml saved somewhere safe
2 - update Home Assistant Core and HACS (and HAOS if needed)
3 - move to standalone Predbat, by following the link already given above by Rbor https://springfall2008.github.io/batpred/install/#updating-predbat (in particular the "Upgrading from AppDaemon to Predbat add-on" section - 10 steps).

I just moved one of my HA instances to standalone Predbat and although there were a few slightly squeaky bottom moments it all went fine in the end. Looks scary, but isn't as bad as it looks.

S
#1908 shawry

Hi guys, Ive just followed the steps to move to the stand alone, that seems to have fixed it for me 🙂 Thanks both

R
#1909 Rbor

shawry 😄😄

L
#1910 Leeshore

PianSom Found out what the issue was: looking on the remote control settings the DC Discharge 1 Lower SOC % was set at 100%. i put it back to 4% and it has solved the problem

#1911 PianSom

Leeshore
Oh wow. How/why did you manage to set that?

Nice to remember for the future - eyeball the settings using the BBC Basic app, make sure nothing looks screwy.

#1912 ProximusAl

Hey All,

I've just started using PredBat today thanks to @PianSom helping me out, but I have a question.

I have 2 cars, one is a PHEV which charges at 3.7kW on a 12kWh battery, and the other is a Tesla which charges at 7.4kW on an 80kWh battery.

I set up Octopus Intelligent to control my Zappi, but put the Tesla as the vehicle.

Now, about 95% of the time, the PHEV is the car plugged in overnight, not the Tesla, so to get OI to work, I've set it to 30% by 05:30. This gives over the 3 hours needed to fully charge the PHEV.

I do sometimes charge the Tesla on it, but perhaps just once every 2 weeks.

With PredBat, is it advisable to change the input_number.predbat_car_charging_rate to 3.7 or leave it at 7.4, given that it's mainly the PHEV that is being charged by it?

Thanks...

L
#1913 Leeshore

PianSom I have no idea how that has happened. Could be that I was playing with it when I first had my installation in January.....

#1914 Jase1703

Anyone integrated Polestar EV sensors into PredBat car charging? Found one custom repository on GitHub that provides access to SOC sensors via online vehicle login profile but it’s not official Polestar intergration.

#1915 ProximusAl

Discovered my first issue with PredBat.

Car plugged in to Zappi at 5PM on Intelligent Octopus, which means the charger is on ECO+.

Got the slots from 11PM onwards….but…PredBat does a discharge at the end of the night to sell at 15p….but the car is eating it. So now 21:35, PredBat is discharging and expecting 15p per kW, but my car is sucking it all up.

Any ideas on how I resolve that? Can I set a massive export margin or something to stop it eating the battery?

D
#1916 DD

ProximusAl Can I set a massive export margin or something to stop it eating the battery?

Yes, that's what I do - export margin is 5500W which exceeds generation power of my inverter.

#1918 ProximusAl

PianSom I did, but it didn’t cover PredBat discharging into the car when it’s on IO automation. I’ll set my ExportPower really high like DD said above, that should resolve my issue.

I appreciate the help, just doing little tweaks now to PredBat to get it perfect.

#1919 Hook

ProximusAl

Have you setup the Octopus integration as well?

Predbat automatically knows when I get slots and will automatically charge/stop the battery at the same time.

#1920 ProximusAl

Hook Yes. IO is configured and PredBat does indeed charge the inverter batteries during the slot.

My issue was when the car is plugged in, and PredBat exports in the evening, because my Zappi is in ECO+, the car took the export rather than the grid.

I think this is now resolved by me setting the Zappi export Margin to 5500W, as my export is 4kW max. Will find out tonight.

As a bonus, we just got back from a hotel stay, so I plugged my Tesla in, and IO kindly gave me a cheap slot 11:00-12:00 so PredBat is currently charging the inverter batteries, and the washing machine is on 😀

#1921 PianSom

ProximusAl I appreciate the help, just doing little tweaks now to PredBat to get it perfect.

😂
After 9 months of using it, I am still at the “little tweaks” stage

#1922 PianSom

ProximusAl My issue was when the car is plugged in, and PredBat exports in the evening, because my Zappi is in ECO+, the car took the export rather than the grid.

I think this is now resolved by me setting the Zappi export Margin to 5500W, as my export is 4kW max. Will find out tonight.

Or by doing the “Predbat-led charging” thing of turning off Eco+ when exporting.

#1923 Jase1703

ProximusAl I thought it was supposed to be left in fast mode so PredBat deals with solar exports, basically turning off the smart features in Zappi because PredBat and IO are running the show, in a similar way Eddi is now redundant.

D
#1924 DD

Jase1703 IOG keeps zappi in eco+ mode (solar charging). If you attempt to put it in another mode, Octopus will put it back. But you can use stop mode.

#1925 ProximusAl

Does anyone have any concerns about battery health/cycles using PredBat? For a year I’ve just charged to 100% during the cheap slot, but now PredBat has a preference to sell battery electrons at 15p which I understand, but wondered about the detrimental effect on the Giv batts….if any?

If I set PredBat to charge control only, the discharge slots do go away, but then I notice the plan doesn’t always charge the batteries to 100% in the cheap slots. I’m sure it has its reasons, but I wonder if there was a setting to say always go to 100%.

D
#1926 DD

ProximusAl there was a recent study which found that LFP batteries are happiest cycling between 0 and 25%. Cycling between 75 and 100% is worst.
Though you do need to visit 100% regularly to reset SoC tracking.

#1927 PianSom

ProximusAl
I do have some concerns about this (battery health).

Three thoughts give me some reassurance:
1 - I looked at the GE warranty policy here and decided that - for my current behaviour - I was unlikely to hit the limit given in (ii) of "Maximum Consumption Usage" for battery warranty limit.
2 - I have now bought and paid for the batteries, so feel that I may as well use them fully rather than keep them pristine for some unknowable future. Getting a return on capital earlier is generally better than getting it later.
3 - for most of the time I have used Predbat (with my AIO and IOG) I have turned on "Combine charge slots" and "Combine discharge slots". These have the effect of reducing the number of switches of import/export each night. I have an on-going conversation with Trefor (the Predbat dev), who has recommended turning these off. You may want to follow the chat here (which I will be adding to later today).

#1928 PianSom

DD
I'd love to read that. Do you have a link?

D
#1929 DD

PianSom unfortunately I've not found an original publication. It was done by Jeff Dahn, a well respected li-ion battery chap. I came across it via YouTube "engineering explained" - something like "how to ruin your car battery (LFP edition)".

R
#1930 Rbor

PianSom DD ProximusAl
See https://www.youtube.com/watch?v=sWyORTmxodc
LFP starts at 16:22

and:

https://www.youtube.com/watch?v=w1zKfIQUQ-s
I think that ProximusAl picked up this one. It looks an outlier to me.

See also latest from GE:
https://www.youtube.com/watch?v=s7lAUEvJpwU

There is a lot of conflicting advice out there.
And in 10 years time, we may be doing things in a very different way anyway.

I use Agile and I let predbat do it's thing, I set "Combine charge slots" and "Combine discharge slots" both to 'off', the defaults, which is Trefor's advice. But we can all judge from our own usage and plans. That is what the switches are for.
With Agile, my battery is 'emptied' to the grid @15p when windy. And then recharged using the windy low tariff slots, gaining me money overall. In 'summer' unwindy days, my battery largely takes a rest! Other tariffs may operate differently.

See also attached document from GE in 2022. We should have moved on from the sharp SOC drops

givenergy-soc-statement.pdf
106kB

Interesting stats on voltages.

For home batteries, LFP batteries (GE and others) looks better than NMC Li batteries (eg Tesla Powerwall 2).
Mobile phones and laptops now often limit batteries to 80% but these are not LFP.

Lot's of food for thought.

Rob

R
#1931 Rbor

After being on Predbat for 8 months, I am still utterly confused by Freeze discharging and Freeze charging.
I read the documentation repeatedly, a useful snapshot is in 'What does Predbat do?'/Predbat Status:
https://springfall2008.github.io/batpred/what-does-predbat-do/#predbat-status

Then I look at my plan .........

This is Freeze discharge but the plan seems to want to charge.

And this is Freeze charge but the plan seems to want to discharge.

Aren't these the wrong way round?
Looking back at other forum comments, I am not the only one confused by these terms.

Help!

Rob

K
#1932 KevinB

Rbor I think you posted the same image in both examples there...? On the freeze discharge one, though, my understanding (guess?) is that discharge is frozen (i.e. not allowed) but charge is allowed (up to 99% in this case) - and since your image is showing more solar than load, the extra is going into your battery (hence the SOC going up). I'm puzzled about why it thinks you'll be making money from export though 🤔

R
#1933 Rbor

KevinB
Sorry. Try this:

Rob

R
#1934 Rbor

KevinB The documentation for Freeze discharging states:

So if the battery is in 'discharge mode' with 'charging disabled' and 'excess solar exported', why is charging planned to increase SOC?

Rob

R
#1935 Rbor

KevinB On making money, I was really referring to a time with low Agile import rates and overnight, usually caused by a lot of wind.

For average import rate of 5 p,

  • Battery first discharges by 6 kWh to grid over say 3 hours. I then 'make' 15 x 6 = 90 p (minus losses)
  • Battery then charges by 6kWh from grid. This costs me 3 x 5 p = 15 p (minus losses).
  • So I am now +60p (minus losses)
    Any home load also comes from grid which is cheap.
    And when daylight comes, excess solar gets me more 15p export.

I hope that makes sense and that my logic is sound.

Rob

K
#1936 KevinB

Hmm that is confusing 😆 I'll un-guess my understanding of things...

When I said I'm not sure why it thinks you'll be making money, I was referring to the "Cost" column (up to -6p) as I thought all the excess should be going into your battery rather than get exported at 15p/kWh. But now I read the snippet you posted, I understand the "Cost" column but not the "SOC" column 🙈

#1937 PianSom

Rbor See https://www.youtube.com/watch?v=sWyORTmxodc
LFP starts at 16:22

and:

https://www.youtube.com/watch?v=w1zKfIQUQ-s
I think that ProximusAl picked up this one. It looks an outlier to me.

See also latest from GE:
https://www.youtube.com/watch?v=s7lAUEvJpwU

There is a lot of conflicting advice out there.
And in 10 years time, we may be doing things in a very different way anyway.

Many thanks for posting these, Rob. It's complicated, battery chemistry!

My main takeaway is that these things are heavily engineered to have a very long expected lifetime so I am unlikely to have long term issues, but that I should probably/possibly avoid the regular high SoC cycling that Predbat does for my AIO/IOG combo with "Combine charge/discharge slots" both turned off.

Notwithstanding Trefor's advice, I may get less battery degradation at the cost of having a mildly suboptimal charging schedule.

(Though I won't know for sure until a decade or two has passed. And probably not even then!)

R
#1938 Rbor

KevinB Thanks. I will look again at the cost and SOC columns.
I am 8 months into Predbat and there is so much to understand. I suppose that our understanding is improving because we are questioning the plan and entities rather than just accepting them.

Rob

R
#1939 Rbor

PianSom In the future, I wonder whether the grid (and cars) will be our battery storage.
Development of sodium based batteries will be interesting. I think China are now using these in some of their cars and they solve one of the big issues – availability of Li. And what about solid-state batteries?

On a different note, I have upgraded to v8.4.6. Trevor step-by-step populating his charts tab with .... charts.
They are pretty nifty and very clear, I think more so than the dashboard generated charts.

Rob

R
#1940 Rbor

PianSom I have looked at stats for my 2 batteries on HA. There are both 8.2 kWh.
I believe that the actual capacity is 10.25 kWh and the batteries are sold at 100% DOD as 80% of 10.25 kWh. A novel marketing strategy.
Battery 1 installed end of August 2022. 2 years old. In the diagram below, on the left.
Battery 2 installed end of April 2023. 1 year 5 months old. in the diagram below, on the right.

Slightly different stats between batteries. Battery 1 is the primary battery and is always ahead of battery 2. Seems to work harder.
I am averaging well less than 1 cycle a day. For me, I am not worried about degradation. I have bought the batteries and aim to use them fully. In due course, I will find out whether this decision has been sensible.

Rob

W
#1942 Wavy Davy

I'm also on v8.4.6 and have a lot of warning messages saying
6090 2024-09-10 08:55:04.491652: Warn: Inverter 0: inverter definition is not a dictionary.
This is happening a lot., like twice every 5 min. It seems that every update period it tries twice ad gives this warning.
Anyone else getting this?

R
#1943 Rbor

Wavy Davy which version did you upgrade from?

W
#1944 Wavy Davy

Rbor
v8.4.5.
I had auto update on, although I had switched that off a while ago, it seems to have got changed back to on.
Not had any update probs for a while though, well since changing away from appdeamon version.

R
#1945 Rbor

Wavy Davy
I would first go to add-ons, where I would stop and then restart predbat. This often clears things.

Check the web UI pages for any 'red' entries. I am on v8.4.6 and I have no warnings or errors, and my apps.yaml looks clean to me. My only red entries under 'config' relate to tweaks that I have made.

This one is really beyond me and it may be best to post as an issue on Github:
https://github.com/springfall2008/batpred/issues
Include downloads of your predbat.log and apps.yaml files.

Rob

W
#1946 Wavy Davy

Rbor Thanks Rob, Tried a restart, no different. also like you only "red" entries are my tweaks.
Have posted an issue.

S
#1947 shawry

Hi everyone, so I have moved to IOG from Agile, not sure if this was the right thing to do but I think it provides me with a more consistent approach, though will keep an eye on Agile and see.

However the last few weeks I’ve been getting the free electric above your normal usage email, I’ve left it to its own devices but figured I’m missing a trick but not sure how to make use of it.

Would I need to force a discharge the hour before then force a change during the time slot?

B
#1948 browellm

shawry in your apps.yaml un-comment out this section:

For example this is for tomorrow's free hour. Predbat will do the rest. For future events you just need to update the date (and time if they ever change from 1-2pm).

S
#1949 shawry

browellm thanks for that, that’s worked a treat 😁

Ok possibly not, it now appears that my discharge has disappeared, since moving to IOG I’ve consistently had discharge slots prior to 23:30 to discharge down to 4%. They’ve now disappeared. Will check and see if they come back tomorrow

S
#1951 SamM

PianSom

I think we have very similar setups (AIO, Zappi car charger, IOG tariff) and, like you, I'd prefer that Predbat would schedule fewer charge/discharge cycles during off-peak periods.

Until Predbat is updated to behave like this (if it ever is), I've automated it somewhat within HA, by toggling "Combine discharge slots" based on whether an Octopus Intelligent dispatch is active or not. It also considers whether the car is plugged in, if it is then having "Combine discharge slots" enabled can lead to suboptimal behaviour (such as not scheduling discharges inbetween car charging slots).

This reduces the number of charges/discharges during the overnight off-peak period but avoids some of the unwanted behaviour this creates during peak periods (though doesn't remove that 23:30-00:00 charge/discharge wobble...though that could be automated out by adding a force charge for this half hour).

I've combined this with my automation that sets the right tariff price in HA's energy tracking, as this is also linked to whether Octopus Intelligent dispatch is active or not.

alias: Set the Grid Utility Meter tariff rate
trigger:
  - platform: state
    entity_id:
      - binary_sensor.octopus_energy_{{your_account_id}}_intelligent_dispatching
    from: null
    to: "off"
    variables:
      tariff: Peak
    alias: When Octopus Energy switches to peak rate
    id: peak
  - platform: state
    entity_id:
      - binary_sensor.octopus_energy_{{your_account_id}}_intelligent_dispatching
    from: null
    to: "on"
    variables:
      tariff: Off-Peak
    alias: When Octopus Energy switches to off-peak rate
    id: off-peak
action:
  - target:
      entity_id: select.grid_import
    data:
      option: "{{ tariff }}"
    alias: Set the correct tariff for the Grid Utility Meter
    action: select.select_option
  - if:
      - condition: trigger
        id:
          - peak
    then:
      - action: switch.turn_off
        target:
          entity_id: switch.predbat_combine_discharge_slots
        alias: Disable Predbat Combine Discharge Slots
    alias: "Peak: Disable Predbat Combine Discharge Slots"
  - alias: "Off-peak: Enable Predbat Combine Discharge Slots"
    if:
      - condition: trigger
        id:
          - off-peak
      - alias: And if the car is not plugged in
        condition: state
        entity_id: sensor.myenergi_zappi_plug_status
        state: EV Disconnected
    then:
      - alias: Enable Predbat Combine Discharge Slots
        action: switch.turn_on
        target:
          entity_id:
            - switch.predbat_combine_discharge_slots
#1952 PianSom

SamM
Thanks.

I am especially pleased to hear that it’s not just me with the irrational “23:30-00:00 charge/discharge wobble”. I was starting to think it was a personal rather than an algorithmic problem! You may have seen that I got nowhere with trying to engage with Trefor about it.

Nice automation. I may steal/adapt that so that my Energy dashboard correctly reflects Power-ups also.

R
#1953 Rbor

Is anyone running Givtcp v3.0?
I upgraded from 2.3.4 to v2.3.9 today and I have followed the Change log message:

Future updates from v3 will be pushed to https://github.com/britkat1980/ha-addons. Please add this to your Home Assistant Addon Store to get the upcoming v3 release

I have downloaded v3.0 and now see 3 new add-ons added to my GivTCP add-on:

I have looked on givTCP GitHub https://github.com/britkat1980/giv_tcp/issues
There are some issues posted by upgraders.
v3.0 is being pushed as complete re-write.
I would welcome any advice!
I do like being a pioneer but not if it is going to break Predbat until v3.0 is better established.
I am on Predbat standalone on raspberry pi HAOS

Thanks

Rob

R
#1954 Rbor

PianSom Rbor I haven't experienced any issues with 23:30-00:00 charge/discharge wobble
https://github.com/springfall2008/batpred/issues/1429
But I am on Agile/Outgoing running on HAOS. I know you are on Docker and IOG so I wonder whether it may be linked to IOG's and the start of the regular cheap slots.
If there are any glitches with Agile, I probably wouldn't spot them as Agile is seeking out 'random' cheaper slots.

Rob

#1955 PianSom

I bow to no-one in my admiration of Trefor and the huge amount of work he has put in to the magnificent behemoth which is Predbat. A giant.

But, boy, his chart skills suck so hard. The hours I have spent and continue to spend trying to work out what I am looking at. Even the nice simple PV chart from HA has been adulterated in the latest release. What on earth is "Forecast History"? And why are the charts sized not to fit on screen?

Rbor Yep - it's an artefact associated with IOG (and maybe other tariffs with step changes in cost?) for sure

#1956 PianSom

SamM (though doesn't remove that 23:30-00:00 charge/discharge wobble...though that could be automated out by adding a force charge for this half hour).

The last couple of days I have manually added a charge slot 23:30-00:00. Not only does this remove the wobble, but the Predbat plan appears to be more rational (I am in recovering from holiday mode atm, and it seems to insist on doing a discharge at around 18:30 for some reason).

Have you had experience of manually setting that slot?

EDIT.- spoke too soon; a 7pm discharge slot has re-appeared. sigh.

R
#1957 Rbor

PianSom

But, boy, his chart skills suck so hard. The hours I have spent and continue to spend trying to work out what I am looking at. Even the nice simple PV chart from HA has been adulterated in the latest release. What on earth is "Forecast History"? And why are the charts sized not to fit on screen?

I have just upgraded to v8.4.8 which is supposed to fix x axis issue with charts.
For me, the problem is y axis which means that the charts do not fit vertically on a computer.
Looks fine on IoS on iPad and iPhone though for me. Don't know about android.

Rob

#1958 Hook

PianSom I asked this question a while back as to why it wants to discharge so early.

I tend to toggle off the calculate secondary slots when I get home, then re-enable it around 9pm.

J
#1960 JasonF

I’m pretty happy with predbat, but there’s one thing I’m struggling with. When I have capacity in the battery left, it plans to discharge it in the 6pm-8pm window which I assume is coded somewhere for peak grid use. However my evening use is fairly variable - if I turn on my pc for some gaming or turn on the washing machine the battery has already emptied too much to cover that load. Ideally I want it to hang onto the battery capacity until the end of the day and discharge before the next cheap slot kicks in. At the moment I’m switching it to charge only until after 8pm then switching back to charge and discharge which after the 8pm window plans the discharge at the end of the night. Is there more elegant way to do what I want?

I
#1961 Ivan

JasonF Likewise I have variable evening usage. I delay the discharging period suggested by predbat by overriding the export price by adding the following lines to the apps.yaml.

rates_export_override:
- start: '16:00:00'
end: '18:00:00'
rate_increment: -10

J
#1962 JasonF

Ivan yeah I thought about doing this, but if I had enough battery left and it was a low use night it might not leave a big enough window to discharge.

I’ll give it a go and see how it performs.

R
#1963 Rbor

Paul H Thanks.
I followed the instructions on the two linked sites that you quoted and have managed to generate a similar apex chart:

Rob

R
#1964 Rbor

JasonF Can you post your Predbat plan for tomorrow afternoon to evening?
Also, can you provide details of your system: inverter and battery?

Rob

J
#1965 JasonF

Rbor here’s my plan, pretty much what it plans every day. You can see it emptying to 20% which would carry me through to the end of the night on predicted load.

My system is parallel AIO, so 27kwh capacity.

J
#1966 JasonF

Also can anyone explain this on this graph, why is it flat until 3am. It’s done it since I installed predbat. At midnight when it updates it’s not flat, but as it progresses it’s flat. I definitely have usage!

#1967 PianSom

JasonF
A reasonable question! Mine flatlines until 2am

But I don't fully understand any of the charts, except the new Rates one.

#1968 PianSom

I expect to have higher than usual consumption this evening. Predbat is planning a discharge at 6.30pm.

What would people do to prevent this from happening?

I could do a manual idle for every half hour all evening, but that is rather clunky. There must be an easier way to do a temporary override ... no?

R
#1969 Rbor

JasonF Looking at your import and export rates, you appear to be on Flexible import and 15p fixed export.
Predbat seems have decided to set a limit of 14% so the battery will try to eventually reduce SOC to 14%.
You appear to have solar.

It is worth looking at other import tariffs.

I run on Agile import and 15p Export. Except for 4pm-7pm, my import rates are much lower than yours. Others have low EV tariffs overnight. See my plan below for tonight


But of course, everyone with have different house setups so what suits me might not suit you. But I think that Flexible import will always be more expensive unless energy rates really do go through the roof.

Also can anyone explain this on this graph, why is it flat until 3am. It’s done it since I installed predbat. At midnight when it updates it’s not flat, but as it progresses it’s flat. I definitely have usage!
Predbat usually discharges in evening and then charges overnight. If Agile rates are really low overnight, my battery may discharge right down to 4%.

Like "PianSom"#p63994 , I don't really understand what many of the charts are telling me!
But my day adjustment chart does start at 00:00 and I have just copied the chart yaml code to set up this Apex chart.

Rob

J
#1970 JasonF

Rbor I’m on IOG I get 7p import overnight and 15p export all day. I only import into the battery overnight.

J
#1971 JasonF

PianSom this is my exact question above. How do you move export so its planned as late as possible after your evening consumption.

S
#1972 SamM

PianSom

Again looks like suboptimal behaviour with IOG. I'd expect Predbat to hold on to charge as late as possible and then discharge as close as possible to the end of peak rates, to empty the battery ready for an off-peak charge.

Again I'm seeing the same behaviour as you, with Predbat deciding it's going to discharge the battery at ~ 7pm most days.

I've adjusted predbat_load_scaling to 1.2 and that seems to have improved things. Sometimes I still see the planned discharge a few hours ahead, but it usually disappears or only lasts 5-10mins with this increased load scale.

Alternatively you could set a higher 'Best SOC Keep', which encourages Predbat to keep more in reserve of the battery, wihtout setting a hard constraint. I find with this approach though, that Predbat won't fully discharge the battery by the end of the peak rate (we're talking a couple of percent, so in the scheme of things a few pence per day).

R
#1973 Rbor

SamM I will leave this discussion now and hand over advice to those with experience of IOG. Just to say that I would expect similar behaviour with Agile, discharging all evening and charging as soon as low rates kick in. But Agile is 'random' compared with definite low slots at night in IOG.

We are all looking for the holy grail of a perfect predbat plan .....
I have finished up with an opinion that 'Predbat knows best'.

Rob

J
#1974 JasonF

SamM there must be something in predbat telling it to favour those slots though? With a flat export rate, it could literally pick any slots during the day and it always picks the same ones. Which happen to coincide with when grid use would be highest. There has to be some “if all being equal do x” logic which is kicking in.

J
#1975 JasonF

Rbor do you not find if you inflate your load scale that the in day sjustment just end up taking it back out?

I tried that and that’s what I found. And then when I set the in day adjustment to 0 it didn't plan to discharge enough because it thought I was going to use it.

Just seems everything seems to counteract each other.

The best suggestion I’ve seen so far is to set the 4-8 discharge period to have an export rate of 0, which again isn’t optimal.

W
#1976 Wavy Davy

I'm on agile and previously my plan would also discharge the batteries early evening when I didn't want it to.
I then had an error message which turned out to be a apps.yaml problem. I amended it and cleared the error, but as it seemed my apps file was out of date I bit the bullet and updated it. Now it may be coincidence but...my predbat seems a lot better in keeping my batteries charged during the late afternoon/evening. Not saying that this will solve all cases but it seems to me that certain important files get updated without people knowing. I don't know how far mine was out of date but probably quite a while.

S
#1977 SamM

JasonF

I hadn't thought about how increasing load scaling versus the impact of in-day adjustment might play out, and I'm experimenting now to see if i can strike the right balance to not have "excess" battery discharged early in the evening.

After reading your post yesterday evening, then reading through the docs, I adjusted load scaling to 1.1 and in-day adjustment damping to 0.75 and the plan is looking good currently, with no early evening discharge planned:

I'm going to keep my eye on this and perhaps tweak the numbers further if required.

#1978 Hook

As I've mentioned further up toggling "Calculate secondary order slots" seems to remove the large export during peak hours. But it does also result in less export for the day.

I toggle it off until about 9pm, then switch it back on, when I know the random energy gremlins I live with have not decided to wash and blow dry their hair or suddenly make brownies.

J
#1979 JasonF

Hook I have that on already.

J
#1980 JasonF

SamM keep us updated, I might give it a try!

#1981 Hook

JasonF toggle it off!

J
#1982 JasonF

Hook oof that fixed it! I owe you a pint! Thanks!

#1983 Hook

JasonF glad it worked.

For me this is it on:

And this is off:

S
#1984 SamM

Hook

With secondary order slots disabled your plan is expecting to discharge between 23:30 and 00:00 even though that's an off-peak period.

Making the same change to my setup and Predbat doesn't plan to discharge the battery fully, going in to 23:30 with 25% of battery left and then beginning a charge.

Does this improve closer to the time?

#1985 PianSom

SamM
Not for me. I have taken this week to doing a manual charge in that slot. Seems to generally improve the mid-evening discharge as a side effect.

I raised this as an issue on GitHub, but didn’t get traction sadly

#1986 Hook

SamM no it doesn’t.

That’s why I usually toggle it back on about 9pm.

M
#1987 matttheotter

Agile has not been my friend this weekend and today the battery has been running low.

Between 14:00 and 16:00 the battery charged with 2kWh of energy but the battery is saying its charge went from 2.4kWh to 9.52kWh, I am assuming the battery is having issues reporting its correct SoC?

I'm running the latest 3017 firmware, dropped GE an email to see if they have any ideas what is going on.....Predbat has been working fine 😃

#1988 PianSom

Looks like a nice big bug-fixy update this evening!

I'm very happy to see that Trefor's going the internal database route - that should make life much easier.

Who is going to be first?

M
#1989 matttheotter

PianSom maybe a job for tomorrow

R
#1990 Rbor

PianSom I have successfully upgraded to v8.4.9.
I will see how it runs overnight.

When Trefor goes 'quiet', I wonder what joys he is cooking up for us. Looking at the changelog, he has not disappointed.
I would be happy to help out with beta looking at the sqlLite db. Trefor seems to have done a lot of work on this.
But I don't think I know enough about sqlLite (nothing!).

with v8.4.9 my Predbat plan has completely change. It was very close to SOC 80-100 overnight but it is now using much more of my battery range, dropping me down to high 30s. It is also using a lot of Freezing but this fits with his 'Planning improvements listed for v8.4.9.

After the last 2 days, I just hope that I get more than 2 kWh of solar tomorrow and emerge out of my hill fog and drizzle.

Rob

R
#1991 Rbor

matttheotter It would be worth checking your configuration settings against the defaults.
Easy to do if you are able to use the Web UI.
And check your apps.yaml.

The evidence from your graph certainly doesn't match charging by 2 kWh.
I would phone GE rather than wait for email reply.

Rob

M
#1992 matttheotter

Rbor I’ve emailed them, not too worried as it all seems to be okay.

What’s somewhat of a relief is the same record is showing on the GivEnergy system so I’m wondering if the battery has been reporting an incorrect SoC that was corrected when it charged.

Was just looking at your plan and how it calculates charges with loss (haha just realised its debug)

M
#1994 matttheotter

Rbor after shifting to the addon I realised I had not put in the charge / discharge curves, just updated the charge curve as I had the data, there was some variance from default (gen 3 HY / gen 2 batt).

Should I just go with default discharge value as I don't seem to have one as I don't usually do much discharging.

M
#1996 matttheotter

Rbor I have already read this and followed the guidance, and there is no discharge calc in the logfile unfortunately.

I'll probably have to set it to auto.

R
#1997 Rbor

matttheotter
I think that auto is a good decision.
Hope it works for you.
I don't think that any curves are generated if there is any active data in the apps.yaml.

My predbat log did manage to generate charging and discharging curves but I am not too convinced by them.
We have had discussions on the curves way back in this thread. I have only found 1 comment #263.
For the record, these are my curves in my apps.yaml (I have two GE 8.2 kWh batteries) that were generated by mt predbat.log. The charge curve look sound as it is tailing charging towards 100%

    battery_charge_power_curve:
    91 : 0.91
    92 : 0.81
    93 : 0.71
    94 : 0.62
    95 : 0.52
    96 : 0.43
    97 : 0.33
    98 : 0.24
    99 : 0.24
    100 : 0.24

After seeing your comment, I read the documentation myself agin.
I decided to try setting a discharge curve again – mine just gave me one value of 1.0 which does nothing.
If this fails, I will try 'auto'

It is also good advice to include this section from https://springfall2008.github.io/batpred/apps-yaml/#inverter-reserve-maximum:

  # Workaround to limit the maximum reserve setting, some inverters won't allow 100% to be set
  # Comment out if your inverter allows 100%
  inverter_reserve_max: 98

Rob

M
#1998 matttheotter

Rbor

Historically I just commented out the curves, they’ve not been very important over the summer however with the dark season approaching a little more accuracy won’t hurt.

As for the max reserve, I’m not affected by it, I’ve done quite a bit of testing when I moved to the add-on.

The next thing to watch out for is the migration to GivTCP 3.0

R
#1999 Rbor

matttheotter For givTCP3, the best thread (which you may have been following) is:
https://community.givenergy.cloud/d/4986-experiences-with-givtcp3-and-predbat

You do need to be very careful that you are only running one version of givTCP at a time. I found it safest to stop any old version (v2.4.9), switch of 'start on boot' and amend the auto start in my apps.yaml (good instructions in https://springfall2008.github.io/batpred/apps-yaml/#automatic-restarts.)

I am running givTCP3 now and it seems to be reliable. I have learnt the pitfalls the hard way.

Getting there ......

Rob

M
#2000 matttheotter

matttheotter

matttheotter Between 14:00 and 16:00 the battery charged with 2kWh of energy but the battery is saying its charge went from 2.4kWh to 9.52kWh, I am assuming the battery is having issues reporting its correct SoC?

GivEnergy replied waiting on a job booking team, so I’m thinking a cell may have gone bad?

R
#2001 Rbor

matttheotter
Progress! Hope GE is able to sort things out for you quickly.

Rob

R
#2002 Rbor

PianSom Have you tried v2.4.9 yet and if so have you seen any improved plan for you with IOG.
I have had mixed experience with v2.4.9 using Agile. Difficult to judge though as the plan can change many times during the day, especially when predictions appear with Nordpool at 10 am and Octopus at 4 pm.

Having flipped backways and forwards between v2.4.8 and v2.4.9, I am going to stick with v2.4.9 and see how its plans perform over next days. I am also on givTCP 3.0.0.

Rob

#2003 PianSom

Rbor
I updated a day or two ago. I think that 2.4.9 is slightly better, but it’s a bit too early to say yet. I had a Power-up yesterday, which meant an atypical day.

For sure, it has not solved the problem I have at 23:30. The default plan has a mid evening discharge at around 19:30, aiming for an empty battery just before the cheap period, then a final discharge at 23:30 DURING the cheap period. I counter this by manually inserting a charge slot at 23:30. I have not yet experimented with playing chicken, and seeing if it actually carries out this suboptimal plan.

Where it is better is in the use of freezing during the day. It’s much better at diverting solar which is highly unlikely to be needed for future load straight to export, rather than topping up the battery to 100% for (less efficient) export later. So that’s good.

I will continue to experiment, but atm it looks like a step forward for me.

R
#2004 Rbor

PianSom I wonder whether it is worth you adding something to the issue I started on Github on experience using IOG. https://github.com/springfall2008/batpred/issues/1482
geoffreycoan has added a comment.
This would provide Trefor with a perspective of how v2.4.9 is working with different tariffs.
I guess that there is a magic algorithm under the Predbat hood that balances the predicted statuses during the day. And then the tweaks that we can make within our configurations.

After my initial concern, v2.4.9 seems to have settled down for me and I will monitor/
LIke you, I have notice a greater use of 'freezing' during the day. Today, my day is mainly 'freezing discharge' with 99% limit. From 4 pm, I'm idling, till a return to freeze discharge at 10:30 pm and charging from midnight.
But this is Agile and it will all change of course after 10 am and more so after 4 pm.

I'll see what happens after Nordpool appears at 10 am.

Rob

#2005 PianSom

Rbor I wonder whether it is worth you adding something to the issue I started on Github on experience using IOG.

TBH I don’t think I have a strong enough view yet to say anything insightful. I’ll give it a few days and see how it copes.

R
#2006 Rbor

PianSom I have been thinking about your problem with the 23:30 slot.
I wonder whether this slot is problematic by being the 'last of the day'.
Before a joined Predbat last January, I used Octopus R&D labs to try to hoover up lower rate slots.
The 23:30 slot couldn't be selected.
Perhaps the slots around midnight are not good ones for Octopus to use for its set tariffs such as IOG set period?
givTCP also have to content with the change over between days and I sometimes see warnings in my givTCP log times at just after midnight.

I may be completely wrong (as I am often!) so just a thought.

Rob

#2007 PianSom

Rbor
I actually think it's an issue with Predbat, rather than Octopus. I have two issues

  • discharging in a cheap slot at 23:30, rather than before the slot starts - can't be correct
  • mid-evening (often 19:00 or 19:30) discharging then idling, rather than discharging later - it would clearly be better to delay in case the load increases unexpectedly

Manually putting a discharge in at 23:30 seems to solve both these issues, so that's what I am doing atm.

Programmatically, I can't imagine what might be causing the first - hence I raised it as an issue on Github. (I had wondered for a while if it was something to do with the fact that standing charges are added at midnight, but on reflection I don't think that's material.)

The second is perhaps more fundamental. I would have thought there should be something in the algorithm which allows for uncertainty, and therefore gives higher weight to plans where the economic benefit is equal but there may be a benefit in delaying action.

Both my maths and coding days are long behind me now, and I know all too well how complex optimisation algorithms can be, so I certainly won't be criticising Predbat. But when I can provide evidence of what appears to be a suboptimal decision then it's a good way of giving back.

M
#2008 matttheotter

Rbor HASS identified the problem with the cell 5 (voltage).....now the wait for field services to be available...

B
#2009 browellm

Just wanted to spitball a possible enhancement request with you all to see if it's a) wanted and b) technically feasible before I raise it on github.

I have played around with days previous enough to realise that for our use, weekends are sufficiently different in profile that I don't like to blend them into the mix, so I currently use
days_previous:
- 7

to reference the same day from the previous week. However this isn't without it's own challenges as using a single day from the previous week sometimes throws up high variance outliers that I don't want to repeat in the prediction.
I could of course use
days_previous:
-7
-14

to improve things.

However what I'd really like is a way to average the previous five weekdays and use that as my prediction baseline for the coming weekdays, while averaging the previous Sat/Sun for the upcoming weekend prediction. Thoughts?

#2010 PianSom

browellm
Couple of thoughts:

  • you may want to check out predai, see what you think. I'd love to try it myself, but can't get it to work with my specific setup
  • as suggested by someone on here (forget who, sorry!) I use
      days_previous:
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 14
        - 21
    
      days_previous_weight:
        - 0.25
        - 0.25
        - 0.25
        - 0.25
        - 0.25
        - 1.0
        - 0.25
        - 0.9
        - 0.9
    So a lot like this day last week and quite a lot like this day the previous 2 weeks, and a bit like every day last week (to reflect seasonality). I quite like this, but it's a real pain when I go on holiday, as it takes three weeks after I get back before it catches up again. It doesn't get you to where you want, but perhaps is a move towards your goal?
  • I wonder what Trefor has planned for his imminent implementation of a database in Predbat? I have high hopes for some kind of more sophisticated historic data manipulation
R
#2012 Rbor

PianSom

you may want to check out predai, see what you think. I'd love to try it myself, but can't get it to work with my specific setup

I have run predai for several months. It was easy to set up with my HAOS setup.
I downloaded and installed the predai addon: http://192.168.1.239:8123/hassio/addon/cc2581ab_predai/info
I then followed the documentation in the add on:
http://192.168.1.239:8123/hassio/addon/cc2581ab_predai/documentation

I adapted the example code and chart code for my set up. I now have a predai.yaml
I have also set up temperature based on my weather compensation sensor for my ASHP.

I uncommented lines in my apps.yaml so that predbat would use predai rather than historical data:

  # Load forecast can be used to add to the historical load data from predai
#  load_forecast_only: True
#  load_forecast:
#    - sensor.givtcp_{geserial}_load_energy_today_kwh_prediction$results

From time to time, I try historical data again and then predai (I just leave this running all the time).
HA historical data has always warned me that I have gaps. These disappear with predai.
My workaround for the gaps is to increase the threshold in my apps.yaml (I currently have 480 rather than 30!):

load_filter_threshold: 480

So give predai a try on your setup.
Here's my predai chart:

This is my attempt at a temperature chart:

The project seems to have stood still for a while.
I think that temperature might be good hooked up to ASHP and weather compensation controls the heat output of my ASHP.

I also like the Trefor's idea of of a DB and looking at v2.4.9 code, he has done a lot of work on this already.
I would like to help Trefor and trial this but I fear that I just don't have enough knowledge.

Rob

#2013 Hook

Just came in from cutting the hedge for winter to discover predbat carnage.

It thinks my car is charging, which it isn’t, so it decided to charge the battery too.

Current plan is this, I’ve knocked it into monitor for now.

#2014 Hook

Went into the octopus app and toggled off smart charging as I presume it’s being picked up from the octopus api.

Very odd. Not seen a phantom charge before.

Predbat back to normal now.

L
#2015 Lincs_Will

Hi all, I've just installed Predbat on HA running in a VM on a Synology NAS. I used the new add-on method to install it as it's the recommended method in the install instructions. When I try to start it I get the error messages below in the Supervisor log. Google isn't helping me when I search for the error, or parts of it. Can someone explain to me whats going on and how I might fix it?

2024-09-28 17:31:26.195 ERROR (MainThread) [supervisor.utils.json] Can't write /data/addons/data/6adb4f0d_predbat/options.json: [Errno 2] No such file or directory: '/data/addons/data/6adb4f0d_predbat/tmp0cz0hh41'
2024-09-28 17:31:26.195 ERROR (MainThread) [supervisor.addons.addon] Add-on 6adb4f0d_predbat can't write options

EDIT: Incase this happens to anyone else, uninstalling and reinstalling fixed it. Simply rebuilding the add-on did not.

B
#2016 browellm

Rbor Rob, have you any idea what sensor you'd use to subtract IOG car charging from PredAI when you have a car integration?

R
#2017 Rbor

browellm This is what I did to set up Predai ........

For the subtract line, you need to find the entity for your charger.
I have a zappi charger.
I found the zappi entity by trial and error, looking to see the data provided by each entity.

I constructed my Load Apex chart by substituting my load entity into for the example chart code (See predai add on documentation).
This was my only source of information so I was experimenting.
But it all worked first time!

Predai takes some time to start and I watched the log building up (it is long!).
I also finished up with a long section in the predbat webUI config.
It looks like predai replaces the historical load data.

This is my predai.yaml:

# Example configurations are below, you must set up your own sensors

sensors:
  - name: sensor.givtcp_ce2218g352_load_energy_today_kwh
    subtract: sensor.myenergi_zappi_20464051_charge_added_session
    days: 14
    incrementing: True
    reset_daily: True
    interval: 30
    units: kWh
  - name: sensor.e3_tcu10_x07_outside_temperature
    days: 14
    interval: 30
    incrementing: False
    units: c

There are other options listed in the predai add on documentation but I don't really know what they do.

I have an ASHP with weather compensation.
I tried the entity shown for 'outside temperature' and it worked.
I then adapted the load apex chart for temperature.
This is code for my temperature Apex chart.

type: custom:apexcharts-card
header:
  show: true
  title: Temperature AI prediction
  show_states: true
  colorize_states: true
graph_span: 8d
span:
  start: day
  offset: '-6d'
now:
  show: true
yaxis:
  - min: 0
series:
  - entity: sensor.e3_tcu10_x07_outside_temperature
    stroke_width: 1
    curve: smooth
    name: Temperature
  - entity: sensor.e3_tcu10_x07_outside_temperature_prediction
    stroke_width: 1
    curve: smooth
    name: AI Temperature
    show:
      in_header: raw
    data_generator: >
      let res = []; for (const [key, value] of
      Object.entries(entity.attributes.results)) { res.push([new
      Date(key).getTime(), value]); } return res.sort((a, b) => { return a[0] -
      b[0]  })
  - entity: sensor.e3_tcu10_x07_outside_temperature_prediction
    stroke_width: 1
    curve: smooth
    name: AI Temperature Source
    show:
      in_header: raw
    data_generator: >
      let res = []; for (const [key, value] of
      Object.entries(entity.attributes.source)) { res.push([new
      Date(key).getTime(), value]); } return res.sort((a, b) => { return a[0] -
      b[0]  })

If you set up Predai successfully, you should see the daily Apex chart extending as more days go in.
I don't understand what the AI load and AI Load source mean. It looks as if there is a bug in there somewhere.
I watch the in-day comparison chart to try to visualise how well Predai is working.
You do need to uncomment these 3 lines in your apps.yaml file (line 61 in my apps.yaml):

  # Load forecast can be used to add to the historical load data from predai
  load_forecast_only: True
  load_forecast:
    - sensor.givtcp_{geserial}_load_energy_today_kwh_prediction$results

Let me know how you get on. I haven't really had any feedback on Predai. I don't really know whether I have set it up properly so don't assume that this is a foolproof method.

Rob

B
#2018 browellm

Rbor Thanks, I had everything else set up correctly from your previous post. Chart is working etc.

I've just googled and found a Hypervolt integration via HACS so I'll give that a whirl.

B
#2019 browellm

The other thing I'm looking at now is whether I can use the weather forecast temp as the outside temp as I don't have a specific sensor for this.

R
#2020 Rbor

You may be able to hook into an external weather sensor but you would need to set this up, or a weather station?
I was lucky and my weather comp sensor worked first time for me.

Rob

B
#2021 browellm

For anyone else looking for an external sensor you can create a free account on Openweathermap and get access to these sensors

I'm using the 'Feels like temperature' sensor

B
#2022 browellm

Thanks for the help getting it set up Rbor, feels exciting to be on this model even though I'm a bit unsure what's going on. The model seems to be over-estimating my use for tomorrow but I'm sure it will start to settle down as it collects more data.

R
#2023 Rbor

browellm In the Load apex charts, I don't understand what the AI load and AI Load source mean.
They seem to be cumulative but the graph doesn't seem to match the numbers below and in the header.

Any suggestions?

Rob

B
#2024 browellm

Rbor
I think...
Load (Orange) = Everything consumed by the house (inc. charging)
AI Source load (Red) = what goes into the model after the subtraction
Prediction = What Neuralprophet spits out.

I have an issue with the suggested (by the Hypervolt integration) sensor HSETI for the Hypervolt being "Unknown"

HSE itself looks like a good value so I've swapped to that but it seems like PredAI can't subtract after the fact even after a restart so that charging energy has now gone into my model and is influencing the prediction.

L
#2025 Leeshore

Rbor Set this up with your instructions. Works well but I've just realised my backup went from 460MB to 3.6GB in one day. Not sure have enough room on my disc for backups 😃

R
#2026 Rbor

Leeshore Good to see that you have PredAI set up.
I can well believe that backups increase in size but 3.6 Gb is enormous!. I have had PredAI running for months and my backup is 1.68 Gb.

I experiment from time to time, uncommenting the PredAI on with the apps.yaml setting and then trying out historical HA data by commenting out the PredAI settings. When Predbat uses PredAI, I believe that the historical HA data are ignored. I have left PredAI running all the time anyway whether used with Predbat or not. I think it shoudl then build up better data. It does leave a large footprint in logs.
I like to compare the in-day chart against PredAI chart and using historical data.

I don't really understand what is going on here but easy to experiment and doesn't seem to do any harm.

Rob

W
#2027 Wavy Davy

Rbor "but 3.6 Gb is enormous" No it's not, mine has grown from 5Gb to 8Gb since the end of May.
Can only be historical data that's caused it, but if it keeps on growing at that rate that's a BIG problem. Really need to get them smaller.

R
#2028 Rbor

Wavy Davy Interesting. My full backups are a steady 1.6 Gb with partial backups much smaller.
I will keep an eye on mine in System/backups. I periodically delete old backups that I will be extremely unlikely to need. You are right that very large backup will lead to problems.
If you have the excellent Google backup add-on, make sure that this doesn't run out of space. I have 15 Gb and I limit the number of full backups to 4.

On backup size, I have HA set up for 30 days historical data so extended from the default of 12?
PredAI may grow its backup size – I will generate a partial PrdedAI backup to find out.

Rob

B
#2029 browellm

Not really sure what PredAI is doing right now. May have to but this in read only or charge only mode for a bit while it does more data gathering etc

R
#2030 Rbor

browellm Your Load has evaporated to nothing 18:30-midnight. That can't be right.

I have swapped back to HA historical by commenting out the 2 lines in apps.yaml
I keep PredAI running and it should surely then continue to add data.
I haven't noticed my Load collapsing and may switch back to PredAI again.

So I am undecided about PredAI. I think it needs more development.

Rob

R
#2031 Rbor

Wavy Davy Further to my recent reply, I have run a partial backup for PredAI and it stands at 520 Mb.

Rob

B
#2032 browellm

Rbor perhaps I read the text around adding predAI into the appa.yaml file incorrectly but I thought that once the two PredAI lines are added it overrides the historic data use even without commenting those lines out! Probably wrong but that was my interpretation

R
#2033 Rbor

browellm Yes, I agree with you.

When I use HA historical data, as get some missing data warnings.
As soon as I uncomment the apps.yaml lines, these warnings disappear.
So PredAI does replace historical data in generating a plan.

Rob

W
#2034 Wavy Davy

Rbor

Even the HA only is 7.9Gb

I'm wondering if its also backing up the backup folder, which may explain the expanding size.

R
#2035 Rbor

Have you noticed that this thread now exceeds 2,000 posts!

Rob

W
#2036 Wavy Davy

Rbor Glad I've not just found it, Would take me weeks to read all of it from post 1
😁

W
#2037 Wavy Davy

Just changed number of backups saved in HA from 7 to 4, will see how that affects backup size.

W
#2038 Wavy Davy

Nope.... 8.2Gb. So it's not the backups being included.
Must be just loads of historical data.
Takes 18 mins to backup and sync to google

B
#2039 browellm

I've left PredAI running but commented it out of apps.yaml for now. The values it's coming up with are way too low. Will see if it trains itself over the next couple of weeks.

L
#2040 Leeshore

Wavy Davy I decided to delete predai and also the predai database just to see - my backup went from 3.6GB back to 340MB..............

Might reinstall again........

W
#2041 Wavy Davy

I did have prepaid installed but uninstalled it. I wonder if it's left something installed that's bumping the file size up?

L
#2042 Leeshore

Wavy Davy I deleted predai folder and files via file editor as well. In /addon_configs

#2043 ProximusAl

Last night, WatchTower upgraded my HomeAssistant Docker to 2024.10.0, and all hell has broke loose.

I wondered why PredBat wasnt loading up, and it appears the HomeAssistant crashes after a few minutes of uptime.

I've rolled back my HA docker to 2024.9.3 for now, but just to warn others if it happens to you.

#2044 ProximusAl

ProximusAl Hmm, turns out this might not be HomeAssistant.....as rolling back still causes it to crash.

The only thing I can think that changed overnight also was an update to AlexaMedia HACS component.

I'm gonna have to do some more digging here......

This is the worry with HA/PredBat/Docker etc, is I now rely on this to charge my car/solar batts etc....

W
#2046 Wavy Davy

Leeshore Must have already done that when I uninstalled predai as I don't have any files or folders there.
I did have 2 zipped predbat update files which I deleted, but nothing that would give me such large files.

#2047 PianSom

ProximusAl This is the worry with HA/PredBat/Docker etc, is I now rely on this to charge my car/solar batts etc....

As soon as I get around to sorting out the historic data issues I intend to split my HA into two instances - one for energy and one for everything else. My reasoning was to allow me to secure my energy devices on their own network. But you have nicely demonstrated a secondary reason - to allow me to easily stabilise a solid version I can rely on.

MUST get my finger out.

J
#2048 JasonF

I have an issue I ideally need to get sorted by tonight…

I have multiple AIOs, both are allowed to charge and discharge at 6kw, so I can pull and push a grand total of 12kw into my batteries.

When I first had the second AIO installed, to get predbat to work I had to create some fake sensors because GivTCP didn’t have all the required data. With this setup I had to disable the rest API and I created a static sensor for the charge and discharge rate.

This effectively told predbat that my inverters were set to the full charge and discharge rates. The issue is, they weren’t - I had them manually set to 80% in the GE Portal and I set the predbat charge and discharge scaling to the same (this is because I don’t want to charge at 12kw and then plug my car in and have my main fuse go pop).

I just switched back to the rest api because GivTCP now has all the required data points for it to work, the problem is it keeps forcing my charge and discharge rates back to 100%, I can’t seem to find a way of taking back control of them from predbat.

Is there a way? If not I’ll have to switch rest off again, which is ok but the performance is much worse.

J
#2049 JasonF

Do we know which rest entry predbat is referencing to get the inverter power?

J
#2050 JasonF

Found the settings to limit it. But it makes it very static. I’m going to ask for an enhancement to Giv tcp about the way the max inverter numbers are reported. Would be really helpful to find out which specific value predbat is referencing.

B
#2051 browellm

Do you all get this warning consistently in your HA log? Anything I can fix or can it be safely ignored?

W
#2053 Wavy Davy

Found out that the cause of the large backup isn't predbat its Home assistant db. When I expand it it's 37 Gb !!
Just got to figure out how to reduce its size.

R
#2054 Rbor

Wavy Davy I'm presuming that this is a full backup of HA.

Some ideas.

If you go to System/backups and select 'create backup' followed by 'partial backup', you will be able to see the components of your backup, which may give you a lead. I was hoping that it would give the sizes.

Have you cleared out your old backup files?

I have Predai running with Predbat and my full backup is 1.6 Gb.
I also save to the Google backup add on and my settings delete old backups beyond my most recent 4.

My Google backup space is 15 Gb in total so your 37 Gb is going to have problems!

Rob

W
#2055 Wavy Davy

Rbor Thanks Rob, No Partial doesn't include sizes unfortunately.
Yes have cleared old and ignored backups out.
The 37Gb's is when I expand the Homeassistant.db file. Unexpanded its now got to 8.3 Gb's

R
#2056 Rbor

Well done.

How did you expand and unexpand the homeassistant.db file, and where is it?

Rob

W
#2057 Wavy Davy

Its part of the backup.
Download the backup and use a zip extractor. (i use a mainly use a MacBook so I use archive utility but could use far extractor)
unzip homeassistant.tar.gz and homeassistant.db is one of the files in there.
As I said the backup is now 8.3 Gb and when I extract the HA.db file it expands to 37 Gb. which is far to large.
I have been reading other posts regarding reducing the backup size, but not sure I understand the methods used.

W
#2058 Wavy Davy

Tried opening the homeassistant.db file and because it's so big (now 38.1 Gb) having more than a little bit of difficulty.
and it looks like gibberish !

R
#2059 Rbor

Wavy Davy I have just unzipped the backup file and there has no homeassistant.db inside!

Just to kick me, my plan was showing 0 kWh for load.
I have spent half an hour panicking, restarting predbat and predai, rebooting HA, etc.
I was just checking out how to restore yesterday's backup when Predbat came back to life.
First I was going to try going back to HA historical data rather than predai by changing the lines in apps.yaml.

Phew!

It is really good that we all have some many folk to lean on for problems. I certainly don't feel so isolated then.

Rob

R
#2060 Rbor

Wavy Davy I decided to investigate the homeassistant.db file.
I found a file called home_assistant.db2 in my homeassistant folder using file editor.

I decided to look at the file in file editor.
It completely froze HA. I waited and waited and waited ..... and finally pulling the lead out of my pi (running on a large SSD and not an SD card).
On plugging the lead back in, nothing happened for ages and, after about half an hour, life started to appear. I then restarted predbat twice and after another 15 minutes, predbat started to recover.
I am now back in action and have a plan back.

I looked at this db file and mine is 3.7 Gb (yes Gb) in size.
I tried to find out what it does and it appears to store all data, historical, changes to entities and their attributes, etc. I have noticed that my HA can take a while to reboot. When I first used an SSD, rebooting HA was really quick.

So, whatever you do, don't open this db file!
There are lots of comments on HA forums about this db. I would like to reduce its size. I found many suggestions but I do not know what I am doing here!
I could just delete the file and I guess that I would then lose my historical data and that fresh data would be generated.

I use Predai which has its own database. Mine if 728 kB in size and my Predai has been running for months.

Rob

W
#2061 Wavy Davy

I copied the file to my laptop and unpacked it on that. It didn't like it either but it did manage to do it. I will live with it for now until I get more info.

G
#2063 geoffreycoan

Hello all, I’m back !!

Or rather I have been back for a while but have finally managed to catchup on the 200 or so entries in this thread.

I was away flying a few weeks ago, landed on a beach (in Scotland) for the first time ever, and with the trip away and I don’t know what, I was away from the community forum for a while, and when I came back was overwhelmed by the amount of posts. Now I know what newcomers to this thread feel like!

I have been adding to other threads on the forum and github issues, so not been total radio silence from me. Helped sort out @Wavy Davy ’s database size issue for example.

In fact I’ve spent several hours most evenings trying to tackle the size of my own HA database as I got fed up with forever running out of room on my Google backup drive. I’m writing up what I did to post on the forum when I’ve finished, but have managed to halve my database size so far. There’s still more to go after so it’ll be a bit before I share it.

In other news, two HA database corruptions in the last week or so meant I lost my entire historic data, twice. Am getting good at recovering and rebuilding the database, only loosing a few hours data now when it happens. I suspect something underlying is the root cause and clearing junk out of the database can only be beneficial in the long run.

Been testing a new ‘manual API’ for Predbat that Trefor has created in response to asking for a mechanism to be able to inject Powerup/Free electricity events into Predbat https://github.com/springfall2008/batpred/issues/1457
I now have an end to end process with API’s to get the event details, copy into HA then write to Predbat, all requiring just a few clicks. The solution Trefor has come up with is excellent and will enable reuse for other apps.yaml things that we might want to overwrite such as inverter charge/discharge rate.

Played with GivTCP v3 but have reverted back to 2.4.9. I see a stream of bugs still appearing so am happy to remain as I am for now.

More documentation updates done and are live; adding details of multi-AIO’s and 3 phase inverters, full instructions on installing MQTT and GivTCP added, have extended the GivTCP and Predbat automatic monitors so they now detect Predbat stalling (and auto restart it).

Discovered that GivTCP can mangle its ‘today’ sensors when HA is restarted, causing jumps in the energy dashboard and any sensors you derive such as calculated house load today. I’ve swapped to using the GivTCP Total sensors in the Energy dashboard for battery charge, discharge and solar gen which resolves a lot of the spikes, need to do the same for import and export (but this is more complex for me due to the tariff utility meters I am using).

And am now at the point where I can finally catchup with the rest of you; retire Appdaemon, and start using the Predbat add-on as my last reason to keep on AppDaemon has now been resolved (with the manual API mentioned above)

B
#2064 Boffinboy

geoffreycoan welcome back and thanks for your constant contributions to the project, and advice on the forums!

R
#2065 Rbor

geoffreycoan Great to see you back and that your Predbatmobile has landed safely back in this forum.

You have helped to launch so many of use on our predbat journeys and I hope that we have been able to keep this forum ticking over with helpful advice that is (mostly) correct. I was relieved to see that you popping up on other forums and that you were adding further to the excellent Predbat documentation. What other Github project has this level of support?
Initially, I was worried that you have thrown in the Predbat towel in Solcast fashion or, even worse, that you had been poached.

Sounds like there are some great developments on the Predbat scene – I look forwards to seeing them coming.

You are right about GivTCP v3. I have wasted too much time myself grappling with it and may soon go back to v2.4.9 myself from v3.0.0 (although this is proving to be more difficult than I thought). v3.0.3 was even worse.

Rob

G
#2066 geoffreycoan

Rbor NIce to be away and nice to be back Rob

As you say Predbat has huge community support and Trefor continues to do a great job of enhancing and improving the core product. Even if there are the odd ‘wobbly’ release. I remain surprised about the issues with GivTCP3, would have thought it would be stable by now and I do keep thinking about upgrading, but based on comments like yours, am glad I restrain myself!

G
#2067 geoffreycoan

Looks like the nordpool data website that some of us use for future (tomorrow) agile prices is not working, getting long delays in the predbat logfile whilst it tries to retrieve the data and then times out with an error code 500 or 502.

Predbat status says ‘warn: Error downloading futurerate data from cloud’

Trying to manually access the website page throws an error:

Fix (for now) is to just comment these lines out of apps.yaml to prevent Predbat trying to retrieve the data. Or leave it running as its a warning and maybe it’ll come back in a while

D
#2068 Daveb01

Good morning all, this is my official First Night on Predbat.

Everything is running as expected (phew). Thanks to all that helped on Predbat from scratch.

My first question, has anyone managed to get Octopus Monthly cost into an entity card please. I like to see my monthly cost import/export/gas, then I can see if it costs me anything on a monthly basis. E.g from June export has paid for everything, but it’s changing as the weather and sun depreciates. I am using the Octopus app and a calculator?

Here is what I can see in the Octopus integration and the Octopus app.


I would like to change these to monthly if possible?

#2069 PianSom

Daveb01
Just as a one-off look? I tend to use the Energy dashboard, with the timescale adjusted to months, for this.

G
#2070 geoffreycoan

Daveb01 As PianSom says, by far the most ‘out of the box’ solution is to use the Energy dashboard in Home Assistant. Configure it with your inverter import & export kWh sensors (or data from an Octopus mini if you have one) and the current rate from the octopus integration. You can then see energy in/out, solar generation and money in and out for any time period you want to. It’s what I do.

Details in https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/setup/energy_dashboard/ and there’s a speak to the geek video on this as well.

An alternative approach is to create a utility meter with a monthly reset period and accumulate current import/export cost in that. That will then give you a sensor with just the monthly £

R
#2071 Rbor

geoffreycoan I have looked on the Nord Pool site and it looks as if there was an unplanned outage of the GB/Norway interconnect this morning which got back at 10 am:

It wasn't the only link that was broken.

So fingers-crossed that we will start to get the Nordpool data in. The predbat add-on log keeps us informed!

Rob

R
#2072 Rbor

Daveb01 geoffreycoan PianSom
It doesn't answer the direct question but I use the excellent Octopus Watch app to get this information. It can generate reports for any time period. Massively enhances the Octopus app, which I also use.

I will leave others to answer your direct question.

The Octopus Watch app is cheap and well-supported by the Developer.
There is a very realistically priced subscription which enhances the app further.

Rob

M
#2073 matttheotter

@geoffreycoan want to bounce an idea off you....

Could I setup another HA server locally with GE_Cloud + Predbat to control my parents AIO remotely......? Until I can be bothered to get them a HA Green / Yellow.

G
#2074 geoffreycoan

matttheotter Could I setup another HA server locally with GE_Cloud + Predbat to control my parents AIO remotely......? Until I can be bothered to get them a HA Green / Yellow.

Yes you can run multiple HA servers locally. I run my production HA server as a Virtual Box VM under windows 10 and can bring up a ha-test VM as another virtual server if I want to test things out. I’d suggest briefly shutting down your production HA server, then install Home Assistant as normal on whatever you want to run it on (Pi, Virtual Machine, etc), then when it starts up you need to go into Settings / System / Network and change the name from ‘homeassistant’ to whatever you want it to be. e.g. mine is ‘ha-test’ so the server is http://ha-test.local:8123

You can then start your main HA server back up and run it alongside your new one. Reason for shutting it down is to prevent a name clash when the new one starts up.

And yes you can use ge_cloud to remotely control your parents HA instance with predbat. Just be aware that the data is only at 5 minute granularity. I’ve tested ge_cloud locally and it worked fine for me.

M
#2075 matttheotter

geoffreycoan I run all mine in Proxmox, so shouldn't be too much of an issue as I can amend the installation script so not to screw with my default install.

Will test GE Gloud though as a short term fix, I changed their AIO to Smart Energy (beta) today as Dad is a little twitchy with his battery not being 100% charged, Predbat just makes this so much easier as I can set the minimum battery value required.

R
#2077 Rbor

geoffreycoan Having also played with givTCP v3 for the last few weeks, I have cracked and reverted to v2.4.9. I hope that many of the recurring errors in the givTCP log will now disappear.

I will now await a stable givTCP v3 which interfaces with Prebat better for me.

Rob

W
#2078 Wavy Davy

Rbor Glad I hadn't updated to V3.

W
#2079 Wavy Davy

Rbor I had a problem with this file on Google drive. I deleted the expanded file and it wouldn't stop downloading/syncing. Like for 4 days still spinning. I then spent about 3/4 hour chatting with google support, no difference, Eventually I did solve it, by uninstalling and reinstalling but selecting delete unsynced files which worked.
Moral is don't try syncing/deleting 36 Gb files on google drive.

G
#2080 geoffreycoan

Wavy Davy Never be a problem for me as I’m too mean to pay for the upgraded storage capacity !
Only got a 15Gb limit on my homeassistant backups account.

Maybe if you went into Google drive directly from a web browser and deleted it there, it wouldn’t have had the sync issues. But not that you would have known

G
#2081 geoffreycoan

geoffreycoan Now that I have a method to inject power up events into Predbat (see https://community.givenergy.cloud/d/3968-automating-octopus-power-up-events-into-predbat/56), I upgraded to the Predbat add-on tonight, yay.

Not without its moments, found out that the Predbat add-on had in fact been running since 8th of August, alongside AppDaemon, which I hadn't realised. Then whilst cutting over and taking the opportunity to check I had the latest apps.yaml template I had the predbat error monitor kick in more than once and restart AppDaemon for me.
And then I mis-edited apps.yaml so it wouldn't load.

But got there in the end, all running OK. Gave me a learning experience of trying the Appdaemon to Predbat upgrade instructions and have extended them now to cover changing the Predbat error monitor for the new add-on.

R
#2082 Rbor

geoffreycoan

Not without its moments, found out that the Predbat add-on had in fact been running since 8th of August, alongside AppDaemon, which I hadn't realised. Then whilst cutting over and taking the opportunity to check I had the latest apps.yaml template I had the predbat error monitor kick in more than once and restart AppDaemon for me.
And then I mis-edited apps.yaml so it wouldn't load.

This scared me! I checked my predbat and givTCP monitor automations and they seem very 'out of date' compared with those in documentation: https://springfall2008.github.io/batpred/output-data/#automated-monitoring-that-predbat-and-givtcp-are-running-ok

Have you updated these further? If so, can you post the link to your branch?

Thanks.

Rob

G
#2083 geoffreycoan

Rbor Have you updated these further? If so, can you post the link to your branch?

Certainly, here’s the link to my current fork of the predbat & givtcp monitors https://github.com/gcoan/batpred/blob/main/docs/output-data.md#automated-monitoring-that-predbat-and-givtcp-are-running-ok

This is slightly ahead of the main Predbat version as I have made some more changes today.

But yes, I have been making changes to the monitors in the last few weeks/months:

  • correction to some of the Predbat error detector logic that didn’t actually work
  • new detection trigger in the Predbat automation to spot when Predbat has stalled or crashed
  • addition of auto-restart logic for Predbat, GivTCP and Mosquitto add-on’s, the add-on will be restarted if necessary
  • more documentation in the automation as to what the automation sections do
  • move the ‘Predbat running’ detector from the GivTCP monitor to the Predbat monitor

The last of these is today’s change. The other changes are all in the current Predbat documentation release

Unfortunately these can be missed as when I push a load of changes through they just get flagged as a single change in the Predbat release notes. Only by looking at the detailed change history can you find them.

D
#2084 Daveb01

A quick question please. Predbat plan so far always discharges my 2 x AIO at 16:00, as I am on Agile fixed and not Flux why is this please?

#2085 Hook

Try toggling off the use secondary slots button to see if that makes a difference.

For some reason which I’ve not seen explained yet predbat wants to discharge during the peak period. If you’re not careful and you get unexpected higher load later it can leave you short.

R
#2086 Rbor

Daveb01 Do be careful though. Predbat often modifies its plan based on future evidence.
There are still the nordpool predictions at about 10 am and the actuals from Octopus at about 4 pm.

You have only just gone live. I would let predbat loose and see how it performs.
Last night for me, Predbat didn't seem to want to charge and it looked as if my batteries would be left low this morning (with dreadful weather forecast. But this morning, my batteries were well-charged and my stats reports showed that charging had taken place.

I have made mistakes by forcing changes to the plan as 'I know best'.
Just one of the delights of using Predbat ......

Rob

R
#2087 Rbor

geoffreycoan Thanks. I will update my monitor automations.

It would be good if there were a more streamlined way of checking. It is difficult ensuring that the 'slugs' are correct and there are so many places to check: the add-ons themselves, apps.yaml, the monitor automations, even things like 'start from boot'. There are so many slugs!

Rob

G
#2088 geoffreycoan

Hook Try toggling off the use secondary slots button to see if that makes a difference.

For some reason which I’ve not seen explained yet predbat wants to discharge during the peak period. If you’re not careful and you get unexpected higher load later it can leave you short.

It’s interesting now I am using the Predbat add-on that I can see more obviously the Predbat defaults and where I have changed things from the default. Secondary order slots is one that I have changed from the default (its now off) because at some point I decided I didn’t like its behaviour with my plan/tariff etc

Predbat has no concept of ‘peak rate’ other than what the import and export rates are, I think the reason it does it is something to do with the high import rate, quite why that should encourage discharge when the export rate is fixed, whether it is something to do with coming near to the end of the plan, I don’t know, but several people have found that turning this off has a positive effect on the plan, and on tariffs like IOG/Go, turning it back on later in the evening to discharge the battery to enable full recharging overnight.

I also see I have at various times changed the defaults of metric_cloud_enable, calculate_discharge_oncharge, set_discharge_during_charge, set_charge_freeze and set_charge_low_power. 🤷‍♂️

As @Rbor says though the Predbat plan will revise itself during the day. There is a ‘time window’ logic built in that some functions within the optimisation engine are turned off/on/behave differently in the “immediately forward 4 hour window” so I’ve had to learn to not ignore, but not take too much total notice of the longer range plan.
Predbat is pretty good at getting it right though

R
#2089 Rbor

geoffreycoan Phew, the checking regions of my brain are exhausted having updated the automations. I copied my old automations, replaced with your latest versions in, and then amended the necessary details for inverter, battery, mobile and slug and checked my apps.yaml

I also enabled the binary sensors (the mosquitto sensor was already enabled but the givTCP wasn't).
I noticed that the givTCP monitor was referenced in the mosquitto device area.

But givTCP and Predbat device areas show this:

One possible glitch in the givtcp error automation.
There are several lines (27-34) that refer to battery cells. I have 2 batteries but only one is referred to, which is my primary battery.
Should I duplicate these lines, adding the battery ID for my 2nd battery?

  - platform: state
    entity_id:
      - sensor.givtcp_dy2219g082_battery_cells
    to: unknown
    for:
      minutes: 15
    variables:
      alert_text: Battery dy2219g082 is offline to GivTCP

Finally, for checking my automations, I have selected 'run' beneath the 3 dots on the top-left of the annotation.
Nothing has happened because the when automation conditions haven't been met.

I have then restarted HA but don't know if this was necessary.

Rob



D
#2090 Daveb01

Rbor

Thank for this I have agreed with myself not to touch it for at least 2 days, but may leave it a week (as you say i have only just switched it on).

I could in the future look at limiting the export load so it does not run the battery out during the evening.

G
#2091 geoffreycoan

Rbor I noticed that the givTCP monitor was referenced in the mosquitto device area.

But givTCP and Predbat device areas show this:

Strange, both my GivTCP and Predbat add-on’s in the devices list show up correctly linked to the right error monitor (and a database housekeeping automation I am working on):

It’s only meta data linking things together so not critical, but weird that yours doesn’t show. Double check you have chosen the right addon id’s for GivTCP v2 and Predbat not v3 and AppDaemon?

There are several lines (27-34) that refer to battery cells. I have 2 batteries but only one is referred to, which is my primary battery.
Should I duplicate these lines, adding the battery ID for my 2nd battery?

Yes I would recommend doing that, to detect if either battery goes offline. I’ve only had it happen once when the data cable that connected one of my batteries to the inverter came loose underneath the inverter so it ‘lost’ the battery, and should hopefully never happen to you.

G
#2092 geoffreycoan

Another toppy tip for anyone that is using the Predbat addon and wants to add a quick link to it with your existing Predbat dashboard (rather than adding it to the sidebar menu), add the following weblink to an existing entities card, e.g.

  - type: entities
    entities:
      - entity: predbat.status
      - type: weblink
        name: Predbat Web Console
        url: /hassio/ingress/6adb4f0d_predbat
      - entity: update.predbat_version
      - entity: select.predbat_update

The 'type: weblink' and the following two lines is all you need to add, the other entities are just for context

D
#2093 Daveb01

So guys battery nearly drained again and it’s only 17:54

These are the settings in apps.yaml, as reduced the export limit but it did not seem to do anything? Any ideas for tomorrow please?


GE app says I am exporting at over 10 kWh, battery is at 28%

L
#2094 Leeshore

Really enjoy this thread and tweaking my installation to make it more efficient. However my wife still manages to have the dishwasher, washing machine, tumble dryer, clothes heater and oven on at 6pm just to really test Trefor's programming skills .................

L
#2095 Leeshore

Daveb01 Mine's at 17% (see above).....

D
#2096 Daveb01

Hhhhh second evening on Predbat not going well, 27 kWh discharged both AIO now flat and I am importing from Grid. At higher than 15p 😡

Is Predbat still finding its feet or do I have a setting wrong? I thought my settings to limit export would have worked but it seems not. As I was exporting at over 10 kWh, so 27 kWh battery will not last for long.

Any ideas please?


R
#2097 Rbor

Daveb01 What happens with your plan subsequently?
You are importing from grid but only to cover your low load.
From 20:30 to 23:30, the plan is to import 1.2 kWh at a cost of 17p.
From my plan, Predbat is looking to minimise SOC so that it can charge during lower rates.
Here's mine.

Having topped up the battery, any exporting of excess solar tomorrow would be at 15p, having paid much lower during the night. This should well have compensated the import from 20:20 to 23:30

Rob

D
#2098 Daveb01

Rbor

Thank you for the reassurance, why is my export higher than my setting though?

G
#2099 geoffreycoan

Daveb01 Is Predbat still finding its feet or do I have a setting wrong? I thought my settings to limit export would have worked but it seems not. As I was exporting at over 10 kWh, so 27 kWh battery will not last for long.

Based on what you have shared, the settings look to be correct to reduce your discharge rate to 6kWh, but as you observed, this wasn’t what the AIO was doing. My guess is that the inverter started discharging at full rate which is not what Predbat was expecting, and so hence your battery ran out prematurely.

Its difficult to be 100% sure without seeing the plan beforehand and your predbat logfile, but my guess is that one of two things happened:

  1. Predbat ignored the discharge limit in apps.yaml and so when it instructed the inverter to discharge, it did so at full rate
  2. Predbat correctly sent the discharge limit to GivTCP but GivTCP ignored it

My guess would be number 2 as multi-AIO support in GivTCP v3 is very new, but we’d need to dig into your predbat logfile and givtcp logfile to confirm one of these hypothesis.

First, look at the history of your predbat status, find out what time it started discharging (simply click on the predbat status in the dashboard and you can see the history of it).

Then, can you have a look in your Predbat logfile and see if you can see something like this around the time the discharge started:

2024-10-09 19:22:44.430628: Base discharge window [ 09-10 00:00:00 - 09-10 00:00:00 @ 0p 100.0%, 10-10 00:00:00 - 10-10 00:00:00 @ 0p 100.0% ]
2024-10-09 19:22:44.430676: Charge window will be: 2024-10-09 23:30:00+01:00 - 2024-10-10 00:30:00+01:00 - current soc 44 target 12
2024-10-09 19:22:44.430700: Not setting charging window yet as not within the window (now 10-09 19:20:00 target set_window_minutes 30 charge start time 10-09 23:30:00)
2024-10-09 19:22:44.430727: Include original discharge start 10-09 00:00:00 with our start which is 10-09 00:00:00 (charge start 10-09 23:30:00 end 10-10 00:30:00)
2024-10-09 19:22:44.430749: Next discharge window will be: 2024-10-09 00:00:00+01:00 - 2024-10-09 19:31:00+01:00 at reserve 38
2024-10-09 19:22:44.430763: Discharging now - current SOC 6.99 and target 5.21
2024-10-09 19:22:44.430796: Inverter 0 Adjust force discharge to True, change times from 00:00:00 - 00:00:00 to 00:00:00 - 19:31:00
2024-10-09 19:22:44.430808: Adjust idle time, charge 00:00:00-00:00:00 discharge 00:00:00-19:31:00
2024-10-09 19:22:44.430896: Adjust idle time computed idle is 19:31:00-23:59:00
2024-10-09 19:22:44.430909: Inverter 0 Set new end time to 19:31:00 was 00:00:00
2024-10-09 19:22:55.244173: Inverter 0 Set discharge slot 1 {'start': '00:00', 'finish': '19:31'} via REST successful after retry 0
2024-10-09 19:23:04.715381: Set inverter 0 mode Timed Export via REST successful on retry 0
2024-10-09 19:23:04.715663: Inverter 0 set force discharge to True
2024-10-09 19:23:04.715810: Inverter 0 Current Reserve is 4.0 % and new target is 38 %
2024-10-09 19:23:13.654074: Set inverter 0 reserve 38 via REST successful on retry 0

And are there any lines about setting the discharge rate?

Next, have a look at the battery discharge rate sensor on the gateway. It should be called something like number.gw_xxNNNNgYYY_battery_discharge_rate - have a look at the history of this sensor, can you see what the discharge rate was set to?

Finally, have a look at the GivTCP log at around the time that Predbat started the discharge, you should see the low level commands that Predbat sent to the gateway to start the discharge, there will be a start time, end time, discharge rate and then the discharge is enabled, again you are looking for the discharge rate being set.
As an example (in my case looks like the discharge rate was already set to max so it wasn’t set by Predbat):

2024-10-09 19:22:44,437 - Inv1 - write       -  [INFO    ] - Setting Discharge Slot 1 to: 00:00 - 19:31
2024-10-09 19:22:47,822 - Inv1 - write       -  [INFO    ] - Setting Discharge Slot 1 was a success
2024-10-09 19:22:55,267 - Inv1 - write       -  [INFO    ] - Setting Battery Mode to: Timed Export
2024-10-09 19:22:55,760 - Inv1 - write       -  [INFO    ] - Setting export mode was a success
2024-10-09 19:22:57,416 - Inv1 - write       -  [INFO    ] - Enabling Discharge was a success
2024-10-09 19:23:04,729 - Inv1 - write       -  [INFO    ] - Setting battery reserve target to: 38
2024-10-09 19:23:06,324 - Inv1 - write       -  [INFO    ] - Setting shallow charge 38 was a success

In the meantime, for tomorrow evening, check the plan and manually override any planned forced discharges with force idle, or you can simply set the predbat mode to ‘Control charge’

D
#2100 Daveb01

geoffreycoan

I can only find these.





D
#2101 Daveb01

Here are the GE cloud logs



R
#2102 Rbor

geoffreycoan My turn with questions. Here's the first:

Since going back to givTCP v2.4.9 from v3, I have lost my pause inputs:

I have to populate all of the configuration file. Before I upgraded to v3, I would select 'New firmware' but that option is now absent. I could also get pause mode.

I had to clear out all the mqqt settings again using MQQT Explorer to get my Battery readings back.

Any ideas?

Rob

R
#2103 Rbor

geoffreycoan I have tried adding this but I get an error for the 3 critical lines:
- type: weblink
name: Predbat Web Console
url: /hassio/ingress/6adb4f0d_predbat

Do I have to make HA aware in some way of type: weblink? Is this a type of card?

Thanks

Rob

G
#2104 geoffreycoan

Daveb01 Thanks Dave

So the Predbat log shows it recognises the raw inverter rate is 12000W but charge limit 9.6kW and discharge limit 6.06kW - all as per your apps.yaml

The GivTCP gateway battery discharge rate sensor is set to 6000W correctly (likely the 6061W is rounded) and hasn't changed for some time

GivTCP logs show the discharge being setup but the discharge rate isn't changed (can see the charge rate changing at 17:32, seems a bit pointless, but not causing any harm)

The GE Cloud logs show a mirror of the GivTCP logs and also don't show the discharge rate being changed in tie period of time (matching what the givtcp gateway sensor shows)

So none of that shows any issues.

Two further thoughts:

  1. Can you check in the GE cloud (search the remote control history and see what the current setting is) for gateway discharge rate. I'm assuming it is 6000W, same as the GivTCP sensor in HA, but if not then this indicates a problem in GivTCP reading the discharge rate from the gateway.

  2. Potentially is either GivTCP not instructing the gateway correctly or is the gateway not instructing the two AIO's correctly ... I wonder if when you set a discharge rate of 6000W at the gateway that it just copies that down to each of your AIOs and is NOT apportioning the discharge rate across the AIO's?

Am wondering for number 2 whether you set a discharge limit of 3000 in apps.yaml whether we will then see both AIO's discharge at 3000W making 6000W in total? Of course if you do set that then predbat will expect the total discharge rate to be at 3000W not 2x3000W so you'll again run out of charge too quickly, but it would be easy to see if that is what the behaviour of the gateway is.

A bit of guessing in the dark here as to what the cause of the issue is

G
#2105 geoffreycoan

Rbor I have lost my pause inputs

I didn't uninstall and reinstall GivTCP v2 like you did, I just stopped it and restarted it when I reverted back from GivTCP v3, but in my GivTCP v2 configuration I have:

It's this that needs to be off for the battery pause controls to appear in GivTCP. You don't have this?

Rbor I have tried adding this but I get an error for the 3 critical lines:

The weblink is one of the options on an entities card as it shows at the top of the card I shared. An entities card can contain a list of entities but can also contain buttons, weblinks, divider lines and more.
e.g. I showed a fragment of my entities card on my Predbat control page

R
#2106 Rbor

geoffreycoan If you look at your battery cards, they both show a capacity of 16.48 kWh:

Have you factored each value down to 13.5 kWh? .... and does it matter?

Rob

R
#2107 Rbor

geoffreycoan

It's this that needs to be off for the battery pause controls to appear in GivTCP. You don't have this?

Nope, its disappeared:

This is the yaml for this section of the config:

NUMINVERTORS: 1
INVERTOR_IP_1: 192.168.1.210
INVERTOR_NAME_1: Inv1
INVERTOR_AIO_1: false
INVERTOR_AC_1: true
NUMBATTERIES_1: 2
HADEVICEPREFIX: GivTCP

Can you send me the equivalent yaml code for this section? I may then be able to paste in the critical line.
I wish I'd never cast my eyes on givTCP v3. I uninstalled givTCP v2.4.9 because it seemed to be conflicting with v3 !!

Since the problems with v3 first came to light a few weeks ago, nothing seems to have happened.
And I can't see a way of redownloading v2.4.9.

I do have a partial backup of v2.4.9 and I am going to try restoring it!

Rob

R
#2108 Rbor

geoffreycoan Thanks

The weblink is one of the options on an entities card as it shows at the top of the card I shared. An entities card can contain a list of entities but can also contain buttons, weblinks, divider lines and more.
e.g. I showed a fragment of my entities card on my Predbat control page

Fixed. Usual yaml formatting, etc, in fact here having 'entities' down twice'

and it works. 😃

Rob

R
#2109 Rbor

Rbor Fixed!
I restored v2.4.9 from 3 weeks ago and got back the proper configuration page with correct choices:

I have also got the pause options back:

No repeat errors in givTCP log changing to next day .....

...... givTCP log and predbat log seem to be showing correct and expected entries

.... and all the battery details show up.

So a late but rewarding finish to the day, managing to sort out issues myself (for a change).

This 'progression' from givTCP2 to givTCP3 is a real dog's breakfast !!!!
And how can a configuration page just change like this?
The beauty of backups.

Rob

G
#2110 geoffreycoan

Rbor geoffreycoan If you look at your battery cards, they both show a capacity of 16.48 kWh:

Have you factored each value down to 13.5 kWh? .... and does it matter?

Rob

It's not actually my dashboard, it's @Daveb01

On the screen, you are correct, the card is reporting the wrong size, but its just the battery card config hasn't got the scaling configured.

In 'type: custom:givtcp-battery-card' the line 'custom_dod: 85' is required to scale the reported battery size for the AIO's.

There was some discussion as to whether the Predbat documentation needed battery scaling in apps.yaml for multi-AIO setups or whether the gateway correctly reported the combined capacity with GivTCP v3 (required for multi AIO). I didn't get to the bottom of it either way.

Glad you are sorted on GivTCP v2 and the weblink. See, if I leave you, you can Ninja it yourself !

I spent the evening creating filter sensors to deal with noisy power sensors. All part of my db reduction quest.....

G
#2111 Goshiki2

Hook where do I find the “use secondary slots” toggle? I’m running GivTCP 3.03 and Latest Predbat and I’ve only been “live” for a couple of days so still finding my feet. I’ve enabled Expert mode which didn’t seem to change any options and also enabled Debug mode which also didn’t seem to change any options. I’ve read the documentation but when I search for the entity you mentioned i can’t find an exact match. It is frustrating that Predbat seems to plan a major discharge around 4pm each day when there are still many hours to go before the next cheap Agile rates. Yesterday I was drawing from the grid (small amounts) for about 1.5 hours at more than my fixed 15p export rate before the first low rate charge which seems counter intuitive to me. Im sitting on my hands and forcing myself to let it do its thing but in the background I’m wondering how best to intervene.

G
#2112 geoffreycoan

Goshiki2 where do I find the “use secondary slots” toggle? I’m running GivTCP 3.03 and Latest Predbat and I’ve only been “live” for a couple of days so still finding my feet.

The control is switch.predbat_calculate_secondary_order

If you use the auto-generated control dashboard covered in the documentation https://springfall2008.github.io/batpred/output-data/#creating-a-compact-predbat-control-dashboard then you should be able to see all of the predbat controls, grouped into sections (e.g. all the switches together)

I’ve enabled Expert mode which didn’t seem to change any options and also enabled Debug mode which also didn’t seem to change any options

If you turn expert mode on it doesn’t change any options but what it does do is enable the more detailed control options available to use. Debug mode also doesn’t change any options apart from the Predbat plan, when turned on it shows extra information in the Predbat plan https://springfall2008.github.io/batpred/predbat-plan-card/#debug-mode-for-predbat-plan. for import and export rates, load and PV.

Goshiki2 It is frustrating that Predbat seems to plan a major discharge around 4pm each day when there are still many hours to go before the next cheap Agile rates.

It’s recommended in the installation instructions that you set Predbat up as you want it to be and then turn read only on for a few days so you can get used to the plan it creates and tweak the configuration to get it to be what you want before you ‘turn it on live’ controlling your inverter. It takes a while to get used to it and to tune things how you want so it is worth taking it slowly.

D
#2113 Daveb01

geoffreycoan

It’s very confusing. I can only think there is a hidden hard setting somewhere.

So have screen shot what happened today and what’s set now.




As you suggested I have changed the limit to 3000 at 09:00, let’s see what happens.

D
#2114 Daveb01

@JasonF

Can you check your 2 x AIO’s are definitely charging at your set rate and not defaulting to 12000 kWh please?

D
#2115 Daveb01

I am also thinking if I am setting 3000 in Predbat, then it calculates this setting so if my AIO’s still do 12000 then all the calculations are on a different plant ?

G
#2116 geoffreycoan

Daveb01 am also thinking if I am setting 3000 in Predbat, then it calculates this setting so if my AIO’s still do 12000 then all the calculations are on a different plant ?

Yes that is the problem with this. If the inverter operates at a different rate to what Predbat plans, your battery will charge and discharge faster than Predbat thinks it should do.

Try invoking a manual charge for now in Predbat (set select.predbat_manual_charge to the current time “09:00:00”). Have a look at what happens to the charge rates on the gateway and the individual inverters. Then do the same for discharge and again observe the behaviour.
Then try issuing the charge followed by discharge command in the GivEnergy app. This should give us a strong idea where the issue lies.

D
#2117 Daveb01

geoffreycoan

Just a quick update after the change and a cuppa.

Looks like it’s not getting to GE?

HA settings




GE Cloud and app says this still.
Plus nothing still in the GE cloud log after 09:07 as per above.

G
#2118 geoffreycoan

Daveb01 Assume you have refreshed the browser etc. But the new auto-synchronise code in the portal should have synchronised the portal with what’s on your inverter so this could be indicating the issue….

If you click the little wheel to the left of the charge and discharge power it’ll refresh the portal with what is currently on the inverter.

If it definitely isn’t getting through then this could be the way round the issue in the short term, set the rates to what you want via the portal and then change Predbat to match. I find it strange that you were discharging yesterday at 10kWh but the portal said 6061? Makes me think its not the whole story we are seeing yet…

If it is a bug in GivTCP you’ll need to raise this as a GitHub issue (your first one!). It will probably help if you turn debug mode on in. GivTCP and re-do the test.

G
#2119 Goshiki2

geoffreycoan yes I have been monitoring for a few days before I went live as I wanted to build up a little useage history. I did use the auto generated control dashboard and that switch is not there as far as I can see. I will post a screenshot.
On another note, currently on my plan I am in a slot of several hours of “charging paused” and I can see the status update in the Giv portal to reflect this but my battery is at 90% and still charging from solar. Is this normal? Does charging paused mean just for grid charging?
My plan seems to think it pauses all battery charge as the current SOC of 90% is not predicted to increase until around 5pm tonight.

G
#2120 Goshiki2




R
#2121 Rbor

geoffreycoan I have solved the mystery about the changing configuration page in givTCP v2.4.9.

This is what it should look like with UI and yaml (which I got by restoring v2.4.9):

And this is what you get if reinstalling v2.4.9 after having installed givTCP3, giving the pause issue:

So the 2 entries for INVERTER_AIO_1 and INVERTER_AC_1 are the answer to the 2 prompts in the former configuration page. Born out by comparing UIs and yamls.
I could probably have sorted this by unenabling the INVERTER_AC_1 option.

Could be useful to know if anyone else queries the same issue. Crazy!

Rob

R
#2122 Rbor

geoffreycoan Here's another comment that applies to 'inverter limit' in apps.yaml.
This is the from your latest draft documentation:

inverter_limit - One per inverter. When set defines the maximum AC output power in watts for your inverter or micro-inverters (e.g. 3600). This is used by Predbat in calculating the plan to emulate clipping that occurs in the
inverter when your solar produces more than the inverter can handle, but it won't be that accurate as the source of the data isn't minute by minute. If you have a separate Solar inverter as well then add the solar inverter limit to the battery inverter limit to give one total amount.
For example, if you have a GivEnergy hybrid inverter you should set export_limit to 3600 or 5000 depending on which size inverter you have. If though you have a GivEnergy All-in-one (6kW AC limit) and a 5kW Solis solar inverter, you should set inverter_limit to 11000 (6000+5000).
NB: inverter_limit is ONLY used by Predbat to improve the quality of the plan, any solar clipping is done by the inverter and is not controlled by Predbat.

The suggestion here is that pv and inverter limits are added together in inverter_limit.
But what about 2 inverters, which doesn't seem to be covered.
In apps.yaml from Daveb01, the 2 AIO inverter limits have been added.

Is this correct? ..... and is it covered in Predbat?

Rob

J
#2123 JasonF

Daveb01

Your apps.yaml file should only be pointing at the gateway, you should have nothing configured in there for either of the two AIO’s.

The inverter capping settings I added to my config file seem to be working as I would expect them to work. Mine is set to 9600 in apps.yaml which correlates to 80%

When I go the the inverter on the portal, my max rates show as 0, they have shown as 0 for me since I got the second AIO.

But the % is showing correctly

I am using GivTCP 3.0.1 beta, I’ve been on the beta since I got the AIO

R
#2124 Rbor

Goshiki2 In the switches section, I use these settings:

HTML Plan debug adds bracketed values to the Predbat plan to predict the power with losses. I do have this option enabled but the extra data does clutter the plan somewhat. But easy to switch on and off. You only get this option if you have expert mode enabled, which you do.
For information, see documentation:
https://springfall2008.github.io/batpred/predbat-plan-card/#debug-mode-for-predbat-plan

I don't personally enable Debug enable. I don't want to generate more logs if there is no issue. I can enable if I have an issue. Some may have different opinions here.

Rob

G
#2125 geoffreycoan

Goshiki2 I did use the auto generated control dashboard and that switch is not there as far as I can see. I will post a screenshot.

There’s actually two different versions of the dashboard described in the documentation.

The first, Predbat creates the dashboard configuration based on the control switches and options available. It writes it to predbat_dashboard.yaml and you’ve then copied that into your own dashboard.

All of that is fine and works OK. BUT this gives you a static control board with the switches and controls available that were in place in Predbat when you first started it up. When you turn expert mode on it will add a number of new switches to Predbat and write a new predbat_dashboard.yaml. This is why you can’t see the new control switch.

You can always search for any switch or control manually in Settings / Devices and Searches / Entities

There is another option though, in the documentation (linked above) there is a dynamically generated control panel that auto-generates the controls and switches according to what is present in Predbat at that moment in time. That way you will automatically keep up to date with new controls etc as they are added to Predbat.

On another note, currently on my plan I am in a slot of several hours of “charging paused” and I can see the status update in the Giv portal to reflect this but my battery is at 90% and still charging from solar. Is this normal? Does charging paused mean just for grid charging?

I’d need to see the plan, but generally, charging paused is exactly what it says, it pauses all charging, both grid and solar. However @Rbor and I have found an issue that Predbat doesn’t always properly display ‘split status’ within a half hour block. Predbat actually plans activity in 5 minute slots but only displays it in 30 minute periods so it may be freezing the battery for most of the 30 minute period and charging for the last 5 or 10 minutes.

My plan seems to think it pauses all battery charge as the current SOC of 90% is not predicted to increase until around 5pm tonight.

Predbat will only charge the battery as much as it thinks it needs for your house load. If it’s sufficiently full then it will pause charging and export any solar for the export income.

Rbor The suggestion here is that pv and inverter limits are added together in inverter_limit.
But what about 2 inverters, which doesn't seem to be covered.
In apps.yaml from Daveb01, the 2 AIO inverter limits have been added.

The inverter_limit is for Predbat to model the most you can charge and discharge through the inverter(s), and then compare that against any export limits that the inverter may apply. Unless you are generating loads of solar and Predbat wants to do a force discharge, then it’s unlikely to materially impact the plan. But yes, need to add the two AIO’s and any solar inverter(s) together. I can make this more explicit if you feel it needs it

D
#2126 Daveb01

JasonF
geoffreycoan

Thank you so much again. Every day is a learning day. I have just found this out, then read your post. I changed my setting to 3000 and set a manual discharge. Everything then changed where it was not previously. The settings changed to zero for the inverter charge/discharge plus the charge/discharge % changed to 25%. I then left it for a while and saw the correct discharge in the app. So have now set it back to 6000. I will let Predbat now do its thing during the day. Fingers crossed.

So I guess a note to anyone having the same issue ensure Battery Charge Power is set to 0. If anything else it will use this setting and not anything set 9n Predbat/GivTCP.

G
#2127 Goshiki2

geoffreycoan Thanks for the information. I think I was so excited about getting predbat up and running with the basic dashboard that I skipped over the section about the dynamic version. I’ve got that running now and it’s certainly a lot better. It must be a nightmare to keep the documents “current” as the whole thing is constantly being updated. The information on here has been invaluable to me and I hope I don’t have to bother you with ridiculous questions too often

D
#2128 Daveb01

One thing I did notice when trying to do a manual discharge for the first time it was very confusing.

Here is what I get in the Dashboard Card

Here is what I get on the Predbat Config Tab

D
#2129 Daveb01

Goshiki2

Don’t worry about the questions, yours are good, I have taken over with the newbie questions 👍😀

R
#2130 Rbor

If this Apex chart has flown by you (from another thread), it is a great addition.

No credit for me (unfortunately), unless as the messenger.
The chart with yaml code was posted by @PianSom
The original version was from The_Dragon, now working at GE)

See screenshot of my latest chart together with yaml. Just paste it into a blank apex chart, replace XXXXXX with your inverter ID (5 times) and you have your own chart which updates itself.

I have added to my chart collection. It updates with time, constantly showing the latest 24 hour power flow (unlike GE portal which needs refreshing). Yes that is sun appearing today in my chart. Yorkshire does see the sun (sometimes)
Except for looking at inverter data, there seems to be little reason for me now to visit the GE portal.

type: custom:apexcharts-card
experimental:
  color_threshold: true
header:
  show: false
  floating: false
  title: Last 24h
graph_span: 24h
show:
  last_updated: true
  loading: true
apex_config:
  chart:
    zoom:
      type: x
      enabled: true
      autoScaleYaxis: false
    toolbar:
      show: true
      autoSelected: zoom
    xaxis.type: datetime
series:
  - entity: sensor.givtcp_xxxxxxxxxx_grid_power
    type: area
    name: Grid
    yaxis_id: power
    color: EA3546
    group_by:
      func: last
      duration: 5m
    stroke_width: 2
    extend_to: now
    show:
      extremas: false
      header_color_threshold: true
  - entity: sensor.givtcp_xxxxxxxxxx_battery_power
    type: area
    name: Battery
    yaxis_id: power
    color: darkblue
    group_by:
      func: last
      duration: 5m
    stroke_width: 2
    extend_to: now
    show:
      extremas: false
      header_color_threshold: true
  - entity: sensor.givtcp_xxxxxxxxxx_pv_power
    type: area
    name: PV
    yaxis_id: power
    group_by:
      func: last
      duration: 5m
    color: f9ce1d
    stroke_width: 2
    extend_to: now
  - entity: sensor.givtcp_xxxxxxxxxx_load_power
    type: area
    name: Load
    yaxis_id: power
    group_by:
      func: last
      duration: 5m
    color: 1B998B
    stroke_width: 2
    extend_to: now
  - entity: sensor.givtcp_xxxxxxxxxx_soc
    type: line
    name: SoC
    yaxis_id: soc
    color: 3f51b5
    group_by:
      func: last
      duration: 5m
    stroke_width: 1
    extend_to: now
    show:
      extremas: false
      header_color_threshold: true
yaxis:
  - id: power
    align_to: 500
    min: ~-7500
    max: ~7500
    apex_config:
      tickAmount: 6
  - id: soc
    min: 0
    max: 100
    opposite: true
    apex_config:
      tickAmount: 4

Rob

M
#2131 matttheotter

GOOD NEWS!

GivEnergy came a day early, cell 5 and 13 have been tightened down and now for a recalibration, luckily sunny day....

#2132 PianSom

Rbor
If memory serves, I did post this yaml earlier on in this thread. Obviously there’s no way now of finding it!

There really ought to be a better way to do this sharing thing …

R
#2133 Rbor

It probably flew straight past me then!
You are right about having a better way of sharing code, almost our own repository.

I wish there was a way of searching for key words within a thread ......

Rob

R
#2134 Rbor

matttheotter Great news.
Best of luck and hope you get back into action successfully today.

Rob

D
#2135 Daveb01

JasonF

Hi again Jason

I have just had a thought, as the settings we are playing with are for 2 x AIO’s and if you set 6000 (that means each AIO does 3000). So what setting do you have for battery reserve please? My default is 4%.

Is this setting different as 4% in the same situation would mean 2% each AIO (and they can not do less than 4%) so should it be 8%?

Have you set this higher for any reason to test? And if I wanted say 10% reserve for both batteries what do I set in Predbat?

We may also have to let Geoffrey know so he can update the docs

#2136 PianSom

Rbor
PS At the bottom of the code you will see that min/max settings for the power y axis are set as ~7500 (plus and minus). The 7500 works for me, as my AIO regularly charges and discharges at 6kW and so 7.5kW looks good. But looking at your chart you may want to put a lower number in.

BTW the ~ means "use this value as a base level, but if the actual value that needs to be shown is bigger then use that instead" - a nice way of avoiding fixed axes in Apex charts.

R
#2137 Rbor

Goshiki2 They're not 'ridiculous' questions. The forum is to help everyone to get proficient with Predbat and we all learn so much from each other.
I embarked on Predbat in late January when this thread was in the early hundreds. I had real issues just navigating HA, something that working with Predbat has taught me.
I have received so much help on this forum and feel that I have found a group of like-minded friends.
I hope that I can now help others now under @geoffreycoan's guidance.

Rob

D
#2138 Daveb01

geoffreycoan

This was a question I asked in the setting up from scratch post.

I have set 12000 (as the understanding it was the GW has a limit of 12000 and controls the batteries), however reading the words again it would make me think I need to put 18000?

If I put 18000 would Predbat act differently (but the GW could not exceed 12000)?
One thing to note - when I had just one AIO set to 6000 export max, when the PV got to 6000 as well both were exporting to the grid minus the house load.

6000 - PV inverter
6000 - AIO-1
6000 - AIO-2

R
#2139 Rbor

PianSom Thanks for the hints.
I have tweaked the settings down to 6000 for now and may reduce further.
I have a 5 kW PV inverter and GE AC 3.0 battery inverter (so up to 3000, but with some grid extra needed, as you can see from my chart).
I will try using ~ in my other Apex charts – thanks for this.

It is brilliant how the chart dynamically updates itself.

Rob

R
#2140 Rbor

Daveb01 If you were to export 18000 W, that would need 78 amps (18000/230 if my physics and maths is correct)! Then there is house load .........
Just wait for the breaker and main fuse to blow (stock for residential is 80 A or even 60 A. If you are lucky, you may have 100 A).

Rob

G
#2141 geoffreycoan

Rbor I think the setting is correct, remember it says in the description

• inverter_limit - One per inverter. When set defines the maximum AC output power in watts for your inverter or micro-inverters (e.g. 3600). This is used by Predbat in calculating the plan to emulate clipping that occurs in the
inverter

It is not what Predbat instructs the inverter to do, it’s used in calculation of the plan.

And if you have a 6kW solar inverter that is producing the maximum solar it can, and 2x 6kW AIO that you are discharging at full rate, then yes, you could be exporting 18kW minus house load. The installer should have ensured that the house fuse is sufficient, but if not, you can get the DNO to replace it.

I have a 100A fuse and as part of getting my export MPAN I had to send photos of the fuse and cabling in the fusebox to Octopus, they (or maybe the DNO) wanted to check I had the right sized cabling.
I will update the documentation to cover setting this limit for multi-AIO as it’s provoked discussion amongst us today.

Daveb01 So what setting do you have for battery reserve please? My default is 4%
Is this setting different as 4% in the same situation would mean 2% each AIO (and they can not do less than 4%) so should it be 8%?

I follow your logic but where we’ve set things like target SoC %, the gateway applies this evenly to both inverters - so you set a charge to target of 80%, both AIO’s will charge to 80%, you don’t have to set it to 160%!

Goshiki2 No ridiculous questions. Well not so far 😉

D
#2142 Daveb01

Rbor

Oh yes I forgot about that so don’t add up all inverters (I have 3)

I have a 100A for my house but GW has 80A. So sticking with 12000 then and currently set import and export 6000 so will give that a go for the next few days.

D
#2143 Daveb01

geoffreycoan

Also this won’t be an issue with future AIO’s as the new one has 6 mppt’s, so you can plug PV into the inverter and not have a separate one. If you have a GW as well then it will be just one again.

J
#2144 JasonF

Daveb01

Only the charge and discharge rates get split between batteries. The reserve % sets the value the same on both batteries to give the right percent overall. So setting to 4% puts 4% on both batteries, that’s what mine is.

G
#2145 Goshiki2

One more question and that’s it for today 😬:
I can see that Predbat controls the battery charge power and that was clear from the documentation and also through monitoring the system. However, I can’t see any reference to “inverter charge power” for reducing the battery charge rate. I have a Givenergy AIO and suffered through all the early firmware’s with SOC drops etc but since BMS10 it’s been a bit more stable. One of the things recommended by Giv was to reduce Inverter charge power to 80% which only restricts AC charging rate, not solar. How does this work with Predbat as even though I can see battery charge rate maxed out at 6000 during charging from grid, I can still see my actual charge rate on the graphs as around 4500 because the 80% restriction is still in place on the portal. Is Predbat expecting it to be charging at 6000 and therefore building the plan around the maximum figure?

D
#2146 Daveb01

Hhhmmm and I thought I had fixed it (be careful what you wish for). Yesterday I was exporting at 12000 and my reserve battery at 4%. Battery was empty at 19:00.

I was trying to fix this and I have only changed these settings to 6000 import and export and increased the reserve to 5%.

Now look at my plan (no export and battery does not go below 84%)

What have I done to stop it discharging 🙁 or has Predbat got a toot on from my comment yesterday ?


G
#2147 Goshiki2

Daveb01 That seems like quite a logical plan to me to be fair. Mine also changed drastically just after the 4pm Agile rates for tomorrow were published. No need to export if import rates are high. Better to maintain what’s in there as high as possible and export as early as possible tomorrow.

D
#2148 Daveb01

Goshiki2

Thank you for the reassurance 👍🍺

R
#2149 Rbor

And here's my Agile plan with no interference from me – pure Predbat on Agile and 15p export.

This seems typical when import and export rates are so close together. There will be little cost saving from exporting and importing (in fact, with losses, it could cost more). For me, Predbat is predicting some charging from 1 am to 5:30am, recovering any cost by exporting pv directly tomorrow.

Our plans look reasonable to me.

Rob.

G
#2150 Goshiki2

Rbor Very interesting. I’m on the same tariff with fixed export and you have slightly cheaper overnight import rates from mine which probably is making the difference on charging or holding. Very clever stuff this is.

G
#2151 geoffreycoan

Goshiki2 However, I can’t see any reference to “inverter charge power” for reducing the battery charge rate. I have a Givenergy AIO and suffered through all the early firmware’s with SOC drops etc but since BMS10 it’s been a bit more stable. One of the things recommended by Giv was to reduce Inverter charge power to 80% which only restricts AC charging rate, not solar. How does this work with Predbat as even though I can see battery charge rate maxed out at 6000 during charging from grid, I can still see my actual charge rate on the graphs as around 4500 because the 80% restriction is still in place on the portal. Is Predbat expecting it to be charging at 6000 and therefore building the plan around the maximum figure?

I’m guessing the field you are referring to is number.givtcp_SERIALNO_battery_charge_rate_ac ?

And based on what you have said, it’s set to 80% (whereas mine is set to 100%).

This isn’t a field that Predbat is aware of nor takes account of. As an aside you can always double check what fields Predbat does use by looking at the template apps.yaml, the non-REST Home Assistant GivTCP controls, there’s a list there of all the control fields that Predbat uses.

So yes, if this isn’t set to 100% then Predbat won’t be aware that the inverter is restricting its output from the default maximum (or overwritten with battery_charge/discharge_limit) and as a result your won’t be tracking to your plan.

At the moment I don’t think there is an easy way around this. You could set input_number.predbat_battery_rate_max_scaling (and _discharge) https://springfall2008.github.io/batpred/customisation/#scaling-and-weight-options
to model the reduced battery charging and discharging rate, but this will affect all charging in the Predbat model (solar and AC), not just the AC charging/discharging that the inverter is limiting.

You could scale the PV charging up to counteract this by setting input_number.pv_scaling https://springfall2008.github.io/batpred/customisation/#solar-pv-adjustment-options e.g. to 1.25 to add 25% to the PV forecast from Solcast.

At the end of the day, being adrift from the plan is not the end of the world as Predbat will adjust the plan as it needs to through the day, but ideally you want to get it as accurate as you can do. The above factors would I think get the adjustments you need but might need a bit of thinking about to get the rates correct.

Alternatively you could submit a Feature Request on GitHub for Trefor to add taking account of this field to Predbat. No guarantees as to timeliness of that though.

G
#2152 Goshiki2

geoffreycoan Thanks Geoffrey. You have confirmed what I thought. I think the simplest option is just to revert it back to 100% and monitor it for a while. I only set it to 80% to allow charging over the full cheap rate time period when I was on the GO tariff and to allegedly reduce stress on the battery.

R
#2153 Rbor

geoffreycoan Hopefully, last comment from me on givTCP v2.4.9

Fixed!
I restored v2.4.9 from a partial backup from 3 weeks ago and got back the proper configuration page with the correct choices.

I have now run givTCP v2.4.9 for about 20 hours today and I have had no errors or warnings.
A far cry from my experience with any of the givTCP v3 varieties.

I know that AIO users need givTCP v3 but, with an AC3.0 coupled inverter, v2.4.9 runs smoothly for me until all the glitches have been ironed out in givTCP v3.

Rob

B
#2154 browellm

I have re-enabled PredAI after seeing its output stabilise over the last few days. Will see how it goes again.

J
#2155 JasonF

Rbor I get 0 issues on beta 3.0.1. I upgraded to 3.0.4 and had errors so reverted back.

G
#2156 geoffreycoan

JasonF Was yours a new install on GivTCP v3 or did you upgrade? Some of the issues that Rob and I had like battery sensors not working on v3 were apparently due to upgrading and not being a clean install, and were fixed in v3.0.1.

there’s 2 or 3 pages of issues raised in the last couple of weeks on GivTCP v3 over quite a range of things, so am staying off for now.

D
#2157 Daveb01

I am on v3.0.3, installed from scratch (as you know). I have only had one issue. (Export/import rate, but think that was because I had a setting in the cloud that needed changing.

I will be sticking with this version for a while. There is also a HA update that I have not installed either v2024.10.1

J
#2158 JasonF

geoffreycoan it was a clean install.

R
#2159 Rbor

Goshiki2 The rates can be quite different across regions. Lower rates are more than compensated for by higher standing changes. The chart below shows the Standard Variable Rates (SVR) Oct-Jan

Alternative tariffs such as Agile are based on wholesale prices but the unit rate will be affected by the SVR.
I am in the Yorkshire region. Just compare my Standing Charge (68.32p) and SVR (23.51p) with those of London: Standing Charge (41.59p) and SVR (25.69p).

There is a lot of debate going on about rates generally.
More people could be encouraged to go the Heat Pump route if there was a move towards parity of unit rates across gas and electricity. There are lots of vested interests and protection of share prices, etc, by certain large companies. I don't want to go there here – you can read far more on media outlets but just be careful who you believe.

Rob

D
#2160 Daveb01

Have any of you guys got something working for an alert if there is a grid outage please, either to mobile or notification in HA?

R
#2161 Rbor

browellm I have just gone back to Predai, having used historical HA data for a while.
I did find that I had less in-day adjustments with HA historical data over predai.
So let's see ..... It is very easy to switch between HA historical and predai using the 3 apps.yaml lines (if I have been doing this properly).

I have thought about giving Predheat a spin but, after looking at the installation details, I am passing.
I run my ASHP from a weather compensation sensor and I reckon that Predai and historical data should pick up trends. Preheat documentation suggested that the software was just monitoring for now. It also runs off appdaemon and, having moved onto Predbat standalone, I am reluctant to bring appdaemon back.

I also use Predai to monitor temperature and get some nice temperature lines in the Apex chart. I wonder whether a temperature input into Predbat would be useful without setting up Predheat which links to temperature and want house heat loss. After all, the lower the temperature, the greater the load from my ASHP.

I will report back on my next trialling of Predai and whether I have gone back to HA Historical data.

Rob

#2162 PianSom

Daveb01
I haven't come across a decent method. What I use is to monitor the frequency of the grid from GivTCP with a binary sensor in templates.yaml:

- binary_sensor:
  - name: Grid Status
    unique_id: grid_status
    state: "{{ states('sensor.givtcp_xxxxxxxxxx_grid_frequency')|int < 49 }}"

and then an urgent phone notification (iOS version shown) if things go bad or get better:

alias: Grid Online Status Notifications
description: Notifies loss / resumption of grid status to home battery system
trigger:
  - platform: state
    entity_id:
      - binary_sensor.grid_status
    from: "off"
    id: grid_lost
  - platform: state
    entity_id:
      - binary_sensor.grid_status
    to: "off"
    id: grid_resumed
condition:
  - alias: Uptime is more than 5 min
    condition: template
    value_template: >-
      {{ as_timestamp(now()) - as_timestamp(states.sensor.uptime_174.state) >=
      300 }}
action:
  - if:
      - condition: trigger
        id:
          - grid_lost
    then:
      - metadata: {}
        data:
          title: POWER CUT
          message: >-
            Connection to the grid lost - house is on battery.

            Current load is {{
            states('sensor.givtcp_xxxxxxxxxx_load_power')|int              
            }}W.                

            Current state of charge is {{              
            states('sensor.givtcp_xxxxxxxxxxx_soc')|int }}%.               

            Battery will last approximately {{              
            ((states('sensor.givtcp_xxxxxxxxxx_discharge_time_remaining')|int)/60)|int              
            }} hours.
          data:
            persistent: true
            push:
              sound:
                name: default
                critical: 0
                volume: 0.5
        action: notify.mobile_app_xxxxxxxxxx
    alias: If grid_lost
  - if:
      - condition: trigger
        id:
          - grid_resumed
    then:
      - metadata: {}
        data:
          title: Power Restored
          message: >-
            Connection to the grid resumed.              

            Current load is {{
            states('sensor.givtcp_xxxxxxxxxx_load_power')|int            
            }}W.              

            Current battery state of charge is {{            
            states('sensor.givtcp_xxxxxxxxxx_soc')|int }}%.
        action: notify.mobile_app_xxxxxxxxxx
    alias: If grid_resumed
mode: single

I do get very occasional false alerts from this. I have been told by Paul L from GE that these are most likely due to bad data packets supplied by my AIO. I've taken the view that I'd rather get the odd false alert than have a delay due to error checking.

R
#2163 Rbor

PianSom Thanks. I will try this out.

I do monitor grid voltage and frequency via GE portal on an ad hoc basis but this looks a neat way of being informed of glitches automatically.
Could this automation be extended to monitor grid voltage also?

Rob

#2164 PianSom

Rbor
Very, very easily!

My binary_sensor is the wrong way around (grid_status goes to off when the grid resumes!!), but I've never quite managed to correct it. Lazy, lazy, lazy.

R
#2165 Rbor

PianSom But remember that I am still at rabbit level with all this stuff.

I am trying to teach myself about these HA mystery terms. I now know how to setup a helper, what a service is, and a state... and some of the information that can be extracted from developer tools. My automation skills have really improved.
My main teaching aids have been Smart Home Junkie youtube videos and contributions in these threads including you and our own @geoffreycoan

Rob

#2166 PianSom

Rbor
Don't be like me - do it properly. Change that < for a > in the binary_sensor and (exercise for the reader) make the necessary changes in the automation.

🙂

R
#2167 Rbor

PianSom Will do.

Rob

B
#2168 browellm

Rbor I also use Predai to monitor temperature and get some nice temperature lines in the Apex chart. I wonder whether a temperature input into Predbat would be useful without setting up Predheat which links to temperature and want house heat loss. After all, the lower the temperature, the greater the load from my ASHP.

That would be nice for me too. Although I don't have a heat pump I do have electric underfloor heating in the kitchen and overall electricity use does go up more in winter with the dehumidifier etc.

G
#2169 Goshiki2

When monitoring the system during a decent period of solar generation today, Predbat has enabled “charging Paused”, with the battery at 34%. This is fine and I understand it’s prioritising export at 15p so that’s logical to me. I checked in Givtcp and the battery charge rate is dropped to zero (as expected) but my AIO is still showing charging at 500w which seems excessive. I notice in the Yaml that Trefor comments that some inverters don’t turn off when the rate is set to zero and they still charge or discharge at around 200w so I have adjusted the setting to reflect what I am seeing. Is this a normal level of bleed charge for an AIO? Does anyone know ?

#2170 PianSom

Goshiki2
I also get an approx 500W charge on my AIO when Predbat has Charging Paused

G
#2171 Goshiki2

PianSom Thanks for that. Have you adjusted the YAML setting to reflect that? I’m not sure what difference it would make?

#2172 PianSom

Goshiki2
No, I haven't.

And tbh I haven't even seen Trefor's comment and wouldn't immediately know which setting to adjust!

At this time of year I am not a fan of the Charging Paused functionality, and often turn it off. As the nights draw in I am finding that my load is often higher than projected (even though I have input_number.predbat_load_scaling set to 1.1).

G
#2173 Goshiki2

Is anyone else experiencing spiking on the GivTcp SOC kWh sensor? It makes Predbat throw a temporary wobble as the SOC is seen as 100%. It’s only on the SOC kWh sensor (which Predbat is using). The SOC Power sensor is reporting correctly.

G
#2174 geoffreycoan

Goshiki2 Is anyone else experiencing spiking on the GivTcp SOC kWh sensor?

Is this with GivTCP v3? I think someone has reported it.

You could always create your own template sensor to replace the bad sensor

G
#2175 Goshiki2

geoffreycoan Yes it’s GivTCP 3.03. I like the sound of creating my own template sensor but I’m quite new to Home Assistant so I’ll need to do some investigating first. I’ve done lots of PLC programming over the years but this is an entirely different beast and I’m quite enjoying the challenges to be honest.

D
#2176 Daveb01

Sorry guys I have another newbie question. Below is my current Predbat Plan, however I thought the battery can not charge and discharge at the same time. So guessing this is an either or, if the battery has a low SoC then charge it is has a high SoC then discharge?

Any thoughts please?

#2177 Jase1703

I seem to remember reading that I could use PredBat to switch on a 2kw heater in a room linked to low agile rates, perhaps it was using the iboost rates model! Had a quick search but can’t find it in the now mega thread. If anyone can point me to such a function I’d appreciate it?

R
#2178 Rbor

browellm I have played around with Predheat but it was not straightforward to get it into HA.
The instructions are missing some details that would have help me.
I managed in the end but was worried about the settings in the Predheat yaml file.

I also tried to switch back to PredAI, only to find that all my load readings had become zero in my Plan !
I then switched back to HA historical data and I have load readings back.

So a fruitless couple of hours but I have learnt something ..... ☹️

Rob

R
#2179 Rbor

Daveb01 We see rate slots every half hour. But, behind the scenes, Predbat can adjust what happens within each slot. Predbat is able to allocate different states across a 30 min slot.
This is Predbat's way of trying to optimise costs for you. If you have the 'Set status notify' switch enabled, Predbat will alert you whenever this happens. Predbat is a wise and wily beast.

If you look in your status report, you can often see this happening. My Plan has been all over the place today but my policy is that Predbat knows best (most of the time). Look at the coloured bar in my status report and 3 different statuses within the 21:00 – 21:30 slot. Take a look at yours.

Overnight, I have a lot of house charging going on: dishwasher, washing machine and even DHW on my heat pump. Now Predbat won't know this and I want charging to happen. So here, I have over-ruled Predbat with Force charging.

Rob

R
#2180 Rbor

browellm I was clearly too early today!
I have gone into Github and have looked for Preheat, only to see this:

See details here:
https://github.com/springfall2008/predheat

But having investigated, the header details is the only change.

Rob

R
#2181 Rbor

Goshiki2 geoffreycoan

This is from givTCP v3 issues in Github:
https://github.com/britkat1980/giv_tcp/issues/267

Looks similar to your spurious peaks.

I do look at what is going on in related comments on facebook and several have reported this random peaks that started to appear in v3.0.3.

There are so many issues within the v3 variations .... There is a v3.0.4 out there as well and that seems to have more issues.

Rob

G
#2183 geoffreycoan

Goshiki2 Is anyone else experiencing spiking on the GivTcp SOC kWh sensor? It makes Predbat throw a temporary wobble as the SOC is seen as 100%. It’s only on the SOC kWh sensor (which Predbat is using). The SOC Power sensor is reporting correctly.

Goshiki2 geoffreycoan Yes it’s GivTCP 3.03. I like the sound of creating my own template sensor but I’m quite new to Home Assistant so I’ll need to do some investigating first. I’ve done lots of PLC programming over the years but this is an entirely different beast and I’m quite enjoying the challenges to be honest.

I won’t give you a line by line how to do it, but here’s how to think about the problem:

Home Assistant has a programming language built into its core called Jinja that allows you to write simple code to manipulate sensors. For a good intro search for the ‘Smart Home Junkie’ channel on Youtube, he’s done an excellent introduction series to Jinja

The SoC power sensor you say doesn’t suffer from the spikes that the SoC kWh sensor does. So what you want to do is to create a new sensor (a template sensor) that you can use in place of the GivTCP SoC kWh sensor.
The new sensor will need to get the SoC power sensor value, convert it to a number, then multiply it by an appropriate factor to become a kWh value.
When you create the sensor you’ll need to define a number of attributes of the sensor such as the device class, the units of measurement, the state class and optionally its icon. Have a look at another sensor and read the documentation to understand these values

G
#2184 Goshiki2

geoffreycoan Brilliant. Thanks for the insight. I’ll have a look

W
#2185 Wavy Davy

Geoff, on your GivTCP activity monitor when I try to save the automation I get the following error message

and the traces show

I assume its a problem with sending it to my mobile but messages are sent by other automations to the same phone.

G
#2186 geoffreycoan

Wavy Davy Geoff, on your GivTCP activity monitor when I try to save the automation I get the following error message

It’s complaining about the YAML formatting of the message text missing when you save it so when its executed it fails. I’ve looked at the version in the documentation https://springfall2008.github.io/batpred/output-data/#givtcp-activity-monitor and it looks OK and similar to my own, but maybe there is a transposition error.

Can you share the YAML for the actions part of the automation please

W
#2187 Wavy Davy

Also the automation won't save, I assume that's because there'e an error. When I try to save it it just saves a blank automation.

W
#2188 Wavy Davy

The inverter goes offline for more than 15 minutes
No last_updated_time received from the inverter for more than 15 minutes
Inverter temperature less than 5 degrees for more than 15 minutes (should never happen)
The battery goes offline to the inverter for more than 15 minutes
GivTCP add-on is not running
Mosquitto broker add-on is not running
Predbat/AppDaemon-predbat or AppDaemon add-on (as appropriate) is not running

alias: GivTCP activity monitor
description: Alert when communications to GivTCP have ceased for 15 minutes
trigger:
  - platform: state
    entity_id: sensor.givtcp_sa2244g426_last_updated_time
    to: "null"
    for:
      minutes: 15
    variables:
      alert_text: No GivTCP update received from inverter sa2244g426
      restart_app: GivTCP
  - platform: state
    entity_id:
      - sensor.givtcp_sa2244g426_status
    from: online
    for:
      minutes: 15
    variables:
      alert_text: No GivTCP update received from inverter sa2244g426
      restart_app: GivTCP
  - platform: numeric_state
    entity_id:
      - sensor.givtcp_sa2244g426_invertor_temperature
    for:
      minutes: 15
    below: 10
    variables:
      alert_text: No GivTCP update received from inverter sa2244g426
      restart_app: GivTCP
  - platform: state
    entity_id:
      - sensor.givtcp_BI2250G034_battery_cells
    to: unknown
    for:
      minutes: 15
    variables:
      alert_text: Battery BI2250G034 is offline to GivTCP

  - platform: state
    entity_id:
      - sensor.givtcp_BK2246G371_battery_cells
    to: unknown
    for:
      minutes: 15
    variables:
      alert_text: Battery BK2246G371 is offline to GivTCP

      restart_app: GivTCP
  - platform: state
    entity_id:
      - binary_sensor.givtcp_running
    to: "off"
    for:
      minutes: 15
    variables:
      alert_text: GivTCP add-on is not running
      restart_app: GivTCP
  - platform: state
    entity_id:
      - binary_sensor.mosquitto_broker_running
    to: "off"
    for:
      minutes: 15
    variables:
      alert_text: Mosquitto Broker add-on is not running
      restart_app: Mosquitto
action:
    - service: notify.mobile_app_sm_sm908b
    data:
      title: GivTCP communication issue
      message: |
        {{now().strftime('%-d %b %H:%M')}} ISSUE:
        {{ alert_text }} for the past 15 minutes, restarting
        {{ restart_app }}
      data:
        visibility: public
        persistent: true
        push:
          sound:
            name: default
            critical: 1
            volume: 0.8
          sticky: true
          color: red
  - choose:
      - conditions:
          - condition: template
            value_template: "{{ restart_app == 'GivTCP' }}"
        sequence:
          - alias: Restart GivTCP add-on
            action: hassio.addon_restart
            data:
              addon: 533ea71a_givtcp
      - conditions:
          - condition: template
            value_template: "{{ restart_app == 'Mosquitto' }}"
        sequence:
          - alias: Restart Mosquitto add-on
            action: hassio.addon_restart
            data:
              addon: core_mosquitto
mode: single```
W
#2189 Wavy Davy

Geoff,
Sorted the indentation out.
this time I used the stacked boxes icon to copy it to VSC
When I run it it sends error message and traces show this


Is this correct?

R
#2190 Rbor

Wavy Davy I remember struggling with the mobile phone bit of this automation..
I was trying to use an id and @geoffreycoan helped me out with the much simpler: notify.mobile_app_iphone (for my iPhone)
I wonder if the 'sm' in your line corresponds to Samsung?

I have found my line by searching for iPhone in Developer tools/Actions. (Although I don't know if it appears because to features on one of my automations?)

I am always bemused when a device is referred to sometimes in 'words' and sometimes as an alphanumeric ID.

@geoffreycoan will probably put me right here if my advice is bad. There is so much to learn in HA.

Rob

R
#2191 Rbor

Wavy Davy I upgraded HA to v10.2 last night and this version included a useful vertical bar which helps with checking indentation out in automations.

I will leave the checking of your logbook trace for others.

Rob

G
#2192 geoffreycoan

Wavy Davy Looks to be OK. In the copy/paste code you had above the ‘- service: notify’ is indented two spaces to the right too far, throwing the rest of the YAML off.

You can test it out by causing some of the triggers to fire, e.g. stop the Mosquitto or GivTCP add-on. Change the inverter temperature threshold to a much higher value so it triggers now

W
#2193 Wavy Davy

Rbor Thanks Rob, I'm already on 10.2. didn't know it did that.

geoffreycoan thanks will try that.

R
#2195 Rbor

Can anyone help with this query?

This 'Repair' has appeared at the top of my 'Settings' page:

This seems to be part of HA v2024.10 under: Repairs for long-term statistics.

  1. Should I fix the issue as in the top radio button?
    How do I find the 'previously stored unit'?

  2. If I look for the entity and select the cog, I see this:

    I have seen this before and have ignored because I don't really understand what it means.
    Would the 'FIX ISSUE' do this for me. kWh is the expected energy unit. Pity that HA used a lower case k although perhaps this is to used lower case throughout in the entity.

Thanks

Rob

G
#2196 geoffreycoan

Rbor Yes, hit the repair button.

I have noticed this a few times, GivTCP gets confused about what units something should be in, and that then throws the long term statistics into a tizzy because it expects the units to be consistent.

These errors have been in the background all the time (in developer tools/statistics), HA 2024.10 now makes them more visible as repairs now. As it’s suggesting to replace the blank unit of measure with the correct one, it’s safe to do it. If its a repair in the other direction I would ignore it until the repair back to kWh re-appears!

#2197 PianSom

Nice update to the Solcast integration this evening - it will now self-update the forecast (either over 24 hours, or sunrise-sunset), no need to call an automation any more.

G
#2198 geoffreycoan

PianSom Nice update to the Solcast integration this evening - it will now self-update the forecast (either over 24 hours, or sunrise-sunset), no need to call an automation any more.

This has been in the beta version for the last couple of releases. Intended to make it easier for new users as they don’t have to create an automation any more. I have suggested a sunrise to sunset forecast + midnight extra which will be useful for Predbat (and other battery optimisation tools).

D
#2199 Daveb01

geoffreycoan

Hi yah, as everything has been working good, I have not pressed the button. As you have done it I am guessing it is safe to do so ? I can always go back to the backup this morning.

2024.10.2

G
#2200 geoffreycoan

Daveb01 Hi yah, as everything has been working good, I have not pressed the button. As you have done it I am guessing it is safe to do so ? I can always go back to the backup this morning.

2024.10.2

Personally whilst I watch the Smart Home Junkie video each month as to what is new in each release, I never upgrade Home Assistant at the start of the month, I wait for there to be a couple of patch releases out.

So tonight I upgraded from 2024.9.3 to 2024.10.2. No issues identified with it. You should be OK

D
#2201 Daveb01

geoffreycoan

Done but got these, not see anything like this before.

G
#2202 geoffreycoan

Daveb01 These don't look serious, you get a lot of warnings and messages in the HA logs.

The first one is probably a bug in GivTCP v3, you could try manually setting the sensor to the value 4, but if it persists, it needs raising as a github bug.

Second one is covered in the predbat FAQ's https://springfall2008.github.io/batpred/faq/#predbat-is-causing-warning-messages-about-exceed-maximum-size-in-the-home-assistant-core-log

Webhook, dunno

Gas cost, looks like the sensor got a bad value which is why it is erroring. Probably a startup transient error

Octopus error, this is already raised on the octopus integration and will be fixed in a future release (its a warning about using a function that will be removed in a year's time)

D
#2203 Daveb01

geoffreycoan

Another new thing I have learned today

So clicked on the error and it has documentation & issues in Blue, clicked on issue and got this page, documentation took me to Netatmo. As I have just rebooted the link had not established, so cleared it and it has not come back yet. But it’s nice that you can find out more.

The MQTT error looks like the default setting for an AIO is 4.0, I put in 5.0 but it keeps getting changed back to 5.


D
#2204 Daveb01

I have just spotted a Battery Calibration control. Has anyone tried this?

Settings/Devices/GW Control (mine is named GW in GivTCP)

D
#2205 Daveb01

Had a look at the error in the logs this morning (all the others are warnings)
I thought this was because I had changed the battery reserve from 4% to 5%, however looking at it in more detail it was a different setting. These settings were unknown for some reason. They looked to be 50% ish. They registered a figure once I moved the slider. Put them to 52%. I do not know what they should be with my settings, my discharge setting it set to 6000 (50% ish)

Should they also be 5%?



G
#2206 geoffreycoan

Daveb01 The newer firmwares like your AIO’s have support for multiple sets of discharge and charging activity. It may be that these have never been configured in the GivEnergy portal which is why they are being reported as having invalid values, but you’d have thought that they’d have sensible defaults

The charge target soc is the % target to charge to for that slot, so usually 100%, the discharge soc target is the target to discharge to, so usually 4%.

Predbat only uses slot 1 but its worth checking that the other slots do not have times set as otherwise the inverter will charge or discharge and Predbat wont know about it

R
#2207 Rbor

geoffreycoan I have an AC3.0 coupled inverter with minimal charge (1) and discharge (2) slots.
I have no entity containing discharge_target (or charge_target) on my setup. I am also running givTCP v2.4.9. Perhaps these extra slots were introduced with givTCP v3 ? Can you check?

The log refers to mqtt which communicates with givTCP.

Is this something that needs to be brought up with givTCP ? An issue via Github?

Rob

D
#2208 Daveb01

geoffreycoan

Thank you. I have now put them to 5%, so charge 100% and discharge 5% as per slot 1 (so they are all the same)

I was using your GE control card, then spotted the new one which had a few new functions. I have now added this to a new card in my dashboard as it is very long (as loads of settings).

As I did not know what it would produce, I created a card (GW Control) in Dashboard
In my case I went to Settings/Devices/xxx Control. (I can see AIO and GW control)
I then just clicked add to dashboard at the bottom (into GW Control)
Easy and then compared your old Card control to the new one.

G
#2209 geoffreycoan

Rbor I have no entity containing discharge_target (or charge_target) on my setup

I think these are newer firmwares related. In older firmware like I have on my Gen 1 hybrid and you have on your AC coupled Rob, we have just a single ‘target SoC’ which is acts as charge-to target, and ‘battery power reserve’ which acts as both the lower battery reserve figure and the discharge-to target.
There has been discussion on one of the other forum posts about how setting the discharge to figure in the app will actually set the battery reserve as well once the discharge reaches the target it will start grid importing (because the same target is used for battery reserve).

Just a consequence of our older inverters having limited memory slots, but it does remind me to add to the documentation about the importance of ensuring that the extra slots are not set to charge or discharge.

Daveb01 I was using your GE control card, then spotted the new one which had a few new functions

If you look at the ‘default dashboard’ you get in HA you’ll see all the controls & sensors that HA knows about, grouped into logical sections, like ‘gateway control’, ‘date and time selectors’ etc. If you start adding extra sensors to HA and allocate them to an area then you’ll see those areas appearing in the default dashboard - e.g. I have a number of bluetooth temperature and humidity sensors and power monitors so I have areas like ‘kitchen’, ‘living room’, etc on my dashboard.
My control dashboard is just the key settings I need to change if I want to manually control the inverters when predbat is in read only mode. You’ll see that a number of the GivTCP control dashboard don’t get used by Predbat

New version of Predbat released this morning 8.5.0. Includes the Predbat API I have been using to automate power up events (expert feature!), a number of bug fixes and incorporation of predheat heat loss model which still looks very complicated to setup.

R
#2210 Rbor

geoffreycoan By contrast with Daveb01 and his AIO, this is what I get with my AC3 coupled inverter:

In the configuration tab of givTCP v2.4.9, I no longer need to select 'use old firmware'. The 'new firmware' for me releases the pause options.

I wonder how givTCP3 is coping with all these target options. I assume that they are all listed in v3?
I am sure that givTCP3 will be good when it is all sorted, but it clearly has some way to go (certainly for older hardware).

Rob

R
#2211 Rbor

geoffreycoan

New version of Predbat released this morning 8.5.0. Includes the Predbat API I have been using to automate power up events (expert feature!), a number of bug fixes and incorporation of predheat heat loss model which still looks very complicated to setup.

I will investigate v8.5.0.
One question you may have an answer for:

The release notes for v8.5.0 states:

WARN Breaking change - if you use AppDaemon then ha_url/ha_key must now be set in apps.yaml, Predbat will no longer use AppDaemon to communicate with Home Assistant

I have no idea what this means. I presume it is Predbat's apps.yaml but appdaemon also has an apps.yaml file, as does Predheat and PredAI.
I have looked in my Predbat apps.yaml and I cant see anything related to an 'ha_url/ha_key'.
But the 'templates' contain a sample new section (for me) stating:

  # If you are using Predbat outside of HA then set the HA URL or IP address and Key (long lived access token here)
  #ha_url: 'http://homeassistant.local:8123'
  #ha_key: 'xxx'

Where do I find the 'ha_key' ?
I want to play with Predheat but haven't been able to get it running so far. May be different in v8.5.0.

If it is all in the documentation, just send me there!

Thanks

Rob

J
#2212 JasonF

geoffreycoan for the new api override feature, are you planning to update the docs to make it clear which input string is valid for each command? Or is there already a reference somewhere else?

I want to use inverter_limit_charge and inverter_limit_discharge.

G
#2213 geoffreycoan

Rbor Where do I find the 'ha_key' ?

You shouldn’t need to use this as its (a) originally only if you are running Predbat outside of Home Assistant (e.g. in its own Docker container), and now (b) if you are running Predbat in AppDaemon. As you are using Predbat in the Predbat add-on inside HA, it’s not required.

But ha_key per the apps.yaml is a long-lasting security access token. Click on your initials bottom left in HA, then the security tab, scroll down, and create a long lived token. Its similar to how we access our Octopus account details in the Octopus Integration, we create a security key that can then be used for remote access except this is for access to Home Assistant rather than access to your Octopus account.

JasonF geoffreycoan for the new api override feature, are you planning to update the docs to make it clear which input string is valid for each command?

There is some limited documentation for the new API included by Trefor https://springfall2008.github.io/batpred/manual-api/

For charge/discharge limit (which Trefor added at my suggestion as I knew it would be useful) it should be simply:

charge_limit=2000

As it’s a single value set in apps.yaml. Setting an import rate override for the power up events was more complex, the resultant string is:

rates_import_override?date=CCYY-MM-DD&start=HH:MM:00&end=HH:MM:00&rate=0

It did take me a few goes to get it right myself, crashing Predbat horribly in the process when I put a misformated date in. If you are creating this via an automation then don’t include any quotes around the value, the select has to be set to exactly the text you need (see my power up script for how I did it).

I will extend the documentation with some more examples, yes

R
#2214 Rbor

geoffreycoan

You shouldn’t need to use this as its (a) originally only if you are running Predbat outside of Home Assistant (e.g. in its own Docker container), and now (b) if you are running Predbat in AppDaemon. As you are using Predbat in the Predbat add-on inside HA, it’s not required.

A couple of days ago, I tried to install predheat and succeeded partially. To do this I had to install appdaemon, amend appdaemon config so that it would the predheat repository could be installed as 'type appdaemon', and other bits.
Should I now just uninstall appdaemon which would then remove its predheat, along with its apps.yaml file?
I wonder whether documentation needs something about what to do if you have already attempted to install predheat via appdaemon?

I have found one glitch in v8.5.0:
In v8.5.0, a mysterious new switch appeared labelled 'Enable predbat'. I thought, hold on, predbat is surely already enabled!
I went into Devices & services/entities and here it is:

So looks like the friendly label 'Enable predbat' should be 'Enable predheat'.

Should I flag this as an bug issue in Github for Trefor?

Rob

G
#2215 geoffreycoan

Rbor I wonder whether documentation needs something about what to do if you have already attempted to install predheat via appdaemon?

I think you are on your own with that one Rob, can’t imagine many people have installed predheat, especially those that are running the predbat addon

I have found one glitch in v8.5.0:
So looks like the friendly label 'Enable predbat' should be 'Enable predheat'.

Should I flag this as an bug issue in Github for Trefor?

Already logged by someone else https://github.com/springfall2008/batpred/issues/1534

R
#2216 Rbor

Nordpool down again?
I restarted HA and got errors on downloading Octopus and Nordpool rates.
It took down everything and I had to unplug my pi and plug back in before I could get connectivity to HA again.
After a 30 minute panic, I have everything back.

Anyone else having issues?

Rob

G
#2217 geoffreycoan

Rbor nordpool prices on their website appears to be working fine for me, but looking in my HA logs I see a number of Octopus connection errors between 14:57 and 15:28, but no errors since then.

Just turned my ASHP on for the first time this winter. Great timing (not) - a poor solar day, Agile prices spiking at 69p in the peak tonight so I over-rode the Freeze Discharges Predbat was planning and even did a force charge at 18p 🥴 to give me some confidence that I’d be OK for the evening.

G
#2218 geoffreycoan

geoffreycoan JasonF geoffreycoan for the new api override feature, are you planning to update the docs to make it clear which input string is valid for each command?

There is some limited documentation for the new API included by Trefor https://springfall2008.github.io/batpred/manual-api/

For charge/discharge limit (which Trefor added at my suggestion as I knew it would be useful) it should be simply:

charge_limit=2000

Hi Jason, apart from getting the field name wrong, it should of course be:

inverter_limit_charge=2000

I also just thought that the above is fine and should work if you have a single inverter, but if you have multiple inverters then (from how I read it in the documentation), you will need to set each limit individually via the API as there isn’t the capability to pass multiple values through, so would be:

inverter_limit_charge(0)=2000
inverter_limit_charge(1)=2500

If you were replicating an apps.yaml that looked like this for two inverters:

inverter_limit_charge:
  - 2000
  - 2500

I’ll probably do some playing with this myself as changing the charge limits dynamically is hopefully a way to automate reducing solar clipping (not a problem right now!), and cross-charging that I get.

R
#2219 Rbor

geoffreycoan I may have to throw in some force charges at 16p overnight. Predbat seems to be working on getting my batteries really low. Will need to see if Predbat has any 2nd thoughts.
...... and tomorrow looks dreadful for solar generation.

That's me done for a bit on here before I cause any more problems.

Rob

G
#2220 geoffreycoan

Rbor I’m now getting error 404’s (page not found) from Norddata:

8774 2024-10-14 17:35:01.851376: Info: record_status Warn: Error downloading futurerate data from cloud
8773 2024-10-14 17:35:01.828201: Warn: Error downloading futurerate data from URL https://www.nordpoolgroup.com/api/marketdata/page/325?currency=GBP

And sure enough, accessing that page, does give an error. I don’t know if it’s just a temporary thing or the page has moved as not entirely sure what the page looked like before. It might now be https://data.nordpoolgroup.com/auction/gb-half-hour/prices?deliveryDate=latest&currency=EUR&aggregation=Hourly&deliveryAreas=UK but equally it may not be.

Will wait and see what happens, don’t need norddata until tomorrow morning.

Meanwhile I tried setting an inverter charge limit on my second inverter to stop the cross charging. In developer tools, actions:

action: select.select_option
data:
 option: inverter_limit_charge(1)=0
target:
 entity_id: select.predbat_manual_api

Predbat recognised the command, that it needed to set the second inverter charge limit to 0, tried to do so, got a REST error when doing so, but it appears that the command actually worked as the charge rate is now showing as zero, but its still charging at 156W ☹️. I probably need to set battery pause mode to stop this last bit of charging.

R
#2221 Rbor

Why doesn't predbat want to charging my batteries?
A question that many of us ask.

  • My predbat plan is shown below.
  • My loss/discharge/inverter losses are set as 0.03, 0.03, 0.04

    My conclusion is that Predbat doesn't want to charge my batteries unless the rate is below about 16.30 but will freeze charge up to 17.5(ish)
    The logic must be that, with losses, it is better to use the grid directly, rather than undergo losses.
    .... and that this is most apparent when the rate is between 15 and 17.5ish
    Of course, if there were lower rates it would be far easier and Predbat wouldn't be going here at all.

My temptation is to throw in some force charges to get the battery charge up but I will yield to what I hope is Predbat's wisdom.

On agile, this is a quandary that many of us on Agile go through.

Am I right? Who knows?

If there is some good news ahead, 4pm-7pm rates are much lower tomorrow evening and weather forecasts are predicting return of the winds from Wednesday .... We will forget about plans like this when the plunge prices return.

Rob

W
#2222 Wavy Davy

I had the same question. Today has not been good. Generated 1.6 Kw and exported 0.1 Kw.
Ran out of battery when the cost was 38.15. Luckily I just missed the really high rate of 67.95.
Tomorrows set to charge upto 91% by 16:00 so will keep an eye on it around 15:00 to make sure and maybe force it to get to 100%

B
#2223 Boffinboy

I am getting repeated warnings and errors about being unable to download future rate data from cloud. When the machine rebooted after a crash Predbat wasn’t working. I had to update the Octopus integration, which got Predbat going, but getting the errors still. It seems to be working ok though…

G
#2224 geoffreycoan

Rbor My conclusion is that Predbat doesn't want to charge my batteries unless the rate is below about 16.30 but will freeze charge up to 17.5(ish)
The logic must be that, with losses, it is better to use the grid directly, rather than undergo losses.
.... and that this is most apparent when the rate is between 15 and 17.5ish

I don’t think it’s as simple a rule as that. You are right that with losses (10% in your case in and out of the battery) it can be cheaper to directly use the grid than to charge and discharge the battery.
But the ‘trigger rate’ that Predbat will use to determine whether to charge or not will depend on your projected consumption and future rates. e.g. charge the battery now at 18p to avoid importing when the battery runs out and the rates are 30p.
With little solar we’re all now getting more dependent upon the agile charge rates and Predbat is trying to minimise the amount it charges the battery from grid to minimise import costs. We’re just not used to seeing this. Although your battery runs out at 2am tonight, the grid import over the next few slots is just 11p; I see a similar story with my own.
If you want to retain more in the battery (which will force more grid charging at unfavourable rates) then increase best_soc_keep.

I generated 10.4kWh today with a PV50 estimate of 10.7 and PV10 of 2.4kWh. Tomorrow’s solar isn’t great either so I have turned set discharge freeze off to retain a bit more in the battery rather than exporting it

Wavy Davy if you ran out of battery early it might be worth also looking at:

  • checking switch.predbat_calculate_inday_adjustment is on, increase the values of input_number.predbat_load_scaling and input_number.predbat_metric_inday_adjust_damping - predbat will scale your today’s house load to give a more accurate in-day projection of load
  • increasing input_number.predbat_pv_metric10_weight to increase the weighting towards the 10% forecast and thus be more pessimistic in the solar prediction
R
#2225 Rbor

Boffinboy I had exactly the same problem. Predbat completely froze, as did HA. I had to unplug my pi and plug in again. After about 10 min, HA leapt back in action. The octopus errors had disappeared but Nordpool errors all still there and Predbat couldn't finish its restart.
I then commented out all the Nordpool lines in apps.yaml which made predbat happy and I am back in action, albeit with no Nordpool. I will see if it's back tomorrow and hopefully be able to uncomment the Nordpool lines.

Not the best thing to happen today with Agile rates going through the roof 4-7pm

Rob

G
#2226 geoffreycoan

Boffinboy I am getting repeated warnings and errors about being unable to download future rate data from cloud. When the machine rebooted after a crash Predbat wasn’t working. I had to update the Octopus integration, which got Predbat going, but getting the errors still. It seems to be working ok though…

Me too and Rbor as well.

Have raised a github ticket https://github.com/springfall2008/batpred/issues/1536

Predbat will continue to work but won’t get future agile prices tomorrow morning from Norddata

R
#2227 Rbor

geoffreycoan One reason I want to look at predheat is to see whether the sensors, particularly open weather, predict future temperatures. For a heat pump, temperature is the critical future prediction. 10C needs far less energy than 5C ... and 0C, .....

Certainly when the temperature really does reduce, and with little solar, I would not want to leave my batteries with very little buffer charge.

I got nearly 20 kWh PV today (good) but 4 kWh predicted tomorrow (bad).

Thanks for flagging the Nordpool issue on Github.

Rob

B
#2228 browellm

Got to say as far as Predbat goes, Agile is just way more fun than IOG. But I am kind of addicted to my 7p and it's going to be 6p soon as I'm taking delivery of an Octopus salary sacrifice EV in the next couple of months and they offer a special subsidised IOG to go with it.

W
#2229 Wavy Davy

Thanks Geoff have adjusted those up a little

R
#2230 Rbor

Update on Predheat
Now I am in v8.5.0, I have tentatively got Predheat running (I think) within Predbat.
I copied lots of lines from the documentation into my apps.yaml file and have made changes based on Trefor's documentation. I hope that I have got most of them right.

I have also installed to the Open weather integration and have obtained an api from their website.
I have enabled the 'Enable Predheat' (aka Enable Predbat') button.
predheat.py now appears in the log as 'being watched'.

I have no idea what will happen! Let's see.
I would imagine that any changes will be to the predicted load linked to temperature.
I think I am the real pioneer for this feature.

Is predbat always right?
I have also force charged 6 slots in the early hours at just over 16p/kWh (gone against my earlier ruling that Predbat is always right). This increases my overnight SOC to 61% from 21%. Nice buffer for tomorrow especially if Nordpool is still down.

Rob

B
#2231 browellm

Big new Octopus integration update tonight. Lots for IOG users. Will need to digest.

W
#2232 Wavy Davy

Rbor is preheat a heat pump variation?

R
#2233 Rbor

I see what you mean: Octopus up to v13.0.0
I wonder whether this is the reason for the issues with Octopus this afternoon.
I am resisting the temptation to install – task for tomorrow.

Predheat is enough excitement for the day.

Rob

R
#2234 Rbor

Wavy Davy Yes.
You can read all about it here:
https://springfall2008.github.io/batpred/predheat/#

I have an open mind about it and wonder how much can be gleaned from historical data anyway.
Also, whether I have configured the apps.yaml lines properly.

That's me done for today.

Rob

J
#2235 Josephiah

Rbor had a look at Predheat, but it seems to me that the sheer amount of info and guesswork required is unlikely to get a wonderful result. If you have a bit of historical data to hand from reasonably stable heating settings (in my case from Vaillant app, with heat curves appropriately set, and generally running low and slow 21/7 (1deg setback across Agile peak)), you can do a lot worse than just plotting the usage-against-outdoor-temp curve (effectively a fairly exact result using your house as a calorimeter) and using that to predict usage from the weather forecast.

Here's how I did it:
https://github.com/BuhJuhWuh/home-assistant-gubbins?tab=readme-ov-file#predbat-heat-pump-consumption-forecast

G
#2236 geoffreycoan

Josephiah I have a similar view about predheat. Have got a bit of a jump start with the heat loss calculation that was done prior to our heat pump installation, but TBH I have my doubts about some of the figures it came up with; recommending that we didn’t need to change the kitchen towel rail which we now have, and determining that we needed to run the ASHP at 55 degrees with a 2.65 COP. I’m getting by with much lower flow temperatures.

I see you have taken the heat demand calculation further forward and now have it calculating the predheat input for predbat. I started on this last winter but got bogged down with not getting a decent temperature curve correlation. I’ll have to have another look at it. I have another Q on the logic but will post it on the github discussion.

Still no norddata ☹️

R
#2237 Rbor

geoffreycoan With predheat, I tried to generate the apex-chart but all the sensors looked like predbat fillers. I am going to replace with my own sensors and see if I can at least get a chart.
Meanwhile, I have switched off the 'predheat enable' switch. I don't want to risk my load prediction being adversely affected. And the historical data should pick up HP usage anyway.

I think a link to external temperature or Open Weather in Predbat is all that is needed. My HP runs entirely on weather compensation using an external monitor fastened to an outside shady wall. The external temperature controls modulation and load of my HP.
The daily HP load isn't likely to change much beyond: 'lower temp = HP works harder = greater HP load'.

I have set up PredAI to work in the background, not controlling Predbat, although I do try it from time to time, alternating with HA historical data. I also have temperature monitored by PredAI and have historical data and an apex-chart, like this (temperature monitored by my external sensor):

I don't know whether this makes sense but it does no harm (except a little more bandwidth) running away in the background.

Nordpool ☹️.
I am just hoping that the url has changed and that the link needs tweaking in Predbat. We can see the data on the link you found: https://data.nordpoolgroup.com/auction/gb-half-hour/prices?deliveryDate=today&currency=GBP&aggregation=Hourly&deliveryAreas=UK.

Rob

J
#2238 Josephiah

geoffreycoan yes, that was my feeling looking through the info required for Predheat: "but I've already done this for this house, and had the system designed for it! - surely no need to do it again when I can just use measured data..."
For those interested, some GitHub chat on the subject here: https://github.com/springfall2008/batpred/discussions/837

R
#2239 Rbor

Josephiah With Predheat, I think I will just remove it.
I am struggling to see how Predheat fits into Predbat, unless for monitoring my heat pump usage but I get that anyway from my heat pump software.
The heat pump's electrical usage is part of the house load so will appear within the historical data and therefore my plan. (At least I think that is the case).

Rob

R
#2240 Rbor

Has anyone heard anything further about Nordpool? Our link to futurerate seems to be well broken.

I know that Predbat needs Nordpool, unless an alternative can be found.

For personal use, Agile predict has been mentioned before: https://agilepredict.com

Agile predict gives neat predictions for future days with nice charts, e.g.

You can easily tweak the charts for your region.
You can also integrate into Home Assistant with yaml code for charts.

Something nice for me to experiment with during the incessant October murk up here in Yorkshire. Just before noon, I have only generated 0.8 kWh so far today with visibility reaching half way down my garden - grim.
At least agile rates gave us a nice boost last night.

Rob

G
#2241 geoffreycoan

Rbor Has anyone heard anything further about Nordpool? Our link to futurerate seems to be well broken.

Someone has commented on the github issue I raised that Nordpool have withdrawn the v1 API’s. The blog article they linked to said that the API’s would be withdrawn from late June, so it could well be that that we have fallen foul of and we need Predbat to be migrated to the v2 API.

At the moment I have commented the nordpool API out of my apps.yaml which at least stops the warnings in the logfile and predbat status. I had been starting to identify a possible issue with the prices not being as accurate as they could be, I think due to UK regional agile pricing (think Predbat needs a regional offset adder), but I’ll have to come back to that when the future prices reappears in Predbat.

For personal use, Agile predict has been mentioned before: https://agilepredict.com

Yes I saw that in the long long list of posts that occurred when I was away. I’ve added it to my dashboard and it gives a useful adjunct to the greenness forecast which I had been using as another way of understanding future price trend.
I must try to combine the two on a single chart.
According to agile predict we’re going to get cheap rates on Saturday, Sunday and Monday next week and at least not the crazy peak prices of last week.

Just before noon, I have only generated 0.8 kWh so far today with visibility reaching half way down my garden - grim.

The sun came out in Bedfordshire briefly at lunchtime, peaking at 4.7kW across my panels, but its dropped back down again now. 4.2kWh so far today, and tomorrow looks better.

At least agile rates gave us a nice boost last night.

Yes I started the day on -65p, had the heat pump on overnight it was so cheap. And we had a 2 hour Octopus power up event this morning from 11-1pm as well so discharged and recharged my batteries, ran the heat pump, did the washing and dishwasher. With the remaining sun today we should fill the batteries in the next hour.
Happy days.

Oh, and breakthrough on my quest to reduce the HA database size last night, I removed 650Mb of unnecessary data in a single stroke! More to come on this one…

#2242 PianSom

A Predbat issue I have never seen before just came up. I looked at my plan and found it wasn't planning on charging tonight for some reason. Looked at the logs and all I could find was an error "Completed run status Idle with Errors reported (check log)". Eventually thought to look at the plan page on the Predbat server page and saw this at the top of the plan:

So did my AIO decide to revisit the millennium bug a bit late?! How very retro. 🙂

At 14.30 the plan recalculated and all was good. V strange.

D
#2243 Daveb01

I have just looked at my Octopus logs and they are up to date with Agile rates? Is this info correct with regard what you’re talking about?

D
#2244 Daveb01

Also an update and another thank you to all, as my system seems to be working as expected. I had a look at my plan this morning and battery was due to export and be down to 5% at 19:00, but now ch aged to supplying the house load. Which is what I was expecting as no Sun or wind today.

The Solar prediction looks OK but my system line seems all over the place today.



G
#2245 geoffreycoan

Daveb01 I have just looked at my Octopus logs and they are up to date with Agile rates? Is this info correct with regard what you’re talking about?

I find its hard to tell from the Octopus logs as you showed above how its working as you get events created at various periods of time when the integration checks the Octopus servers for updated rates, rates becoming current, etc.
Unless you see persistent connection errors in the HA system logs, it just works quite reliably in my experience.

The discussion above was about norddata. As you are on Octopus Agile you’ll know that Octopus provide the agile prices from 23:00 through to 23:00 the next night at about 16:00, just before the peak period. Until those prices come through (the Octopus Integration), Predbat has no idea what the prices will be and assumes by default that it’ll just be a repeat of today’s prices - you will see the prices for tomorrow with a question mark after them.

In order to reduce the uncertainty, Predbat has included getting a data feed from norddata at about 10:00 in the morning of the electricity market rate prices for tomorrow. It then converts that into predicted agile prices for tomorrow (denoted by a set of scales). Unfortunately it appears that the API we use has been deprecated and the data feed no longer works.

D
#2246 Daveb01

geoffreycoan

Thank you for the explanation, very helpful. I have had a look at my apps.yaml and I don’t have much set including Nord. Do I leave it as is now we know it’s not working and wait for a fix. Or should I uncomment it?



G
#2247 geoffreycoan

Daveb01 its the nordpool bit right at the bottom. There’s no point uncommenting it at present as its not working (and you’ll just get a warning all the time about unable to get future rates), but when its fixed, you uncomment all the ‘futurerate’ lines (but there will be a new URL to add to apps.yaml)

R
#2248 Rbor

Our Predbat fixer, Trefor, has been hard at work on Nordpool.

I have upgraded to v8.5.1. Fingers crossed for 10 am
Make sure you change the url in apps.yaml as well as in Trefor's instructions.

Rob

S
#2249 SteveCook

I have bitten the bullet and uninstalled Appdaemon version(?) of Predbat and installed the new v1.2.1 version.
I have yet to edit the yaml files (i remember doing this 1st time around with the appdaemon version)
Question. Will the uninstall remove all the "old" stuff or will there be remnants that I need to track down and remove, OR will me yaml editing all seem like a new install or Predbat?
Thanks in advance

S
#2250 SteveCook

All went well and seems to be working.
The HA Predbat addon says I am on V1.2.1, but I gat a HA notification showing that Predbat core update 8.5.1 is available. Should I install this.
How are they related with these strange (version numbers??)

B
#2251 browellm

SteveCook

v1.2.1 is the Add-on docker version
v8.5.1 is the version of Predbat that resides in the Add-on

S
#2252 SteveCook

browellm
Thanks. So do i just hit install?
Do i need to go to GivTCP V3?

R
#2253 Rbor

SteveCook If you have an AIO, you do ideally need givTCP v3, but best to get advice from AIO uses.
I am still on givTCP v2.4.9. I did try v3 but there are some teething issues and I decided to downgrade.

If you do go to givTCP v3 and use the givTCP autostart automation, you need to make one important tweak to apps.yaml.

Documentation
Upgrading from AppDaemon to Predbat add-on
https://springfall2008.github.io/batpred/install/#upgrading-from-appdaemon-to-predbat-add-on

GivTCP activity monitor
If you running this, you need to ensure that you have the correct 'slug id' for your givTCP version in apps.yaml.
See: https://springfall2008.github.io/batpred/output-data/#givtcp-activity-monitor

The critical apps.yaml lines are these:

  auto_restart:
    - shell: 'rm -rf /homeassistant/GivTCP/*.pkl'
    - service: hassio/addon_restart
#      addon: 533ea71a_givtcp
      addon: a6a2857d_givtcp

533ea71a_givtcp is for givTCP v2
a6a2857d_givtcp is for givTCP v3

If you are running the activity monitor and givTCP restarts, the version of givTCP in this code will be restarted. At worse, this could result in you having givTCP v2 and givTCP v3 running together. From my own experience, HA will get confused and this is bad news!

Rob

G
#2254 geoffreycoan

Predbat 8.5.1 working perfectly for me, norddata download working again with the new URL. Happy days

Well, the overnight rate forecast isn’t all that great, so not all that happy, but at least its a sunny day today so filled the batteries off solar

T
#2255 The Black Cat

I've switched to Agile this week, so with the problems with Nordpool, I've only just added it to my apps.yaml. However, it does not appear in the plan, forgive me if I've misunderstood how this works.
If we look at 23:00 for tomorrow (Friday 18/10), it's still repeating the price from 23:00 today:-


My apps.yaml looks like this:-

futurerate_url: 'https://dataportal-api.nordpoolgroup.com/api/DayAheadPrices?date=DATE&market=N2EX_DayAhead&deliveryArea=UK&currency=GBP'
futurerate_adjust_import: True
futurerate_adjust_export: False
futurerate_peak_start: "16:00:00"
futurerate_peak_end: "19:00:00"
futurerate_peak_premium_import: 14
futurerate_peak_premium_export: 6.5

My predbat log file says it's loaded 48 data points but in only shows 24 up to 15:00 tomorrow:-
2024-10-17 16:46:36.648796: Fetching futurerate data from https://dataportal-api.nordpoolgroup.com/api/DayAheadPrices?date=DATE&market=N2EX_DayAhead&deliveryArea=UK&currency=GBP
2024-10-17 16:46:36.649003: Return cached futurerate data for https://dataportal-api.nordpoolgroup.com/api/DayAheadPrices?date=2024-10-17&market=N2EX_DayAhead&deliveryArea=UK&currency=GBP age 12.6 minutes
2024-10-17 16:46:36.649484: Return cached futurerate data for https://dataportal-api.nordpoolgroup.com/api/DayAheadPrices?date=2024-10-18&market=N2EX_DayAhead&deliveryArea=UK&currency=GBP age 12.6 minutes
2024-10-17 16:46:36.653383: Loaded 48 datapoints of futurerate analysis
2024-10-17 16:46:36.665825: Predicted future rates: ['10-17 16:00:00 => 36.98 / 15.16', '10-17 17:00:00 => 43.95 / 18.03', '10-17 18:00:00 => 47.5 / 19.49', '10-17 19:00:00 => 26.23 / 10.79', '10-17 20:00:00 => 21.54 / 8.86', '10-17 21:00:00 => 21.46 / 8.83', '10-17 22:00:00 => 20.31 / 8.35', '10-17 23:00:00 => 19.86 / 8.17', '10-18 00:00:00 => 18.02 / 7.41', '10-18 01:00:00 => 19.31 / 7.94', '10-18 02:00:00 => 19.5 / 8.02', '10-18 03:00:00 => 19.34 / 7.95', '10-18 04:00:00 => 18.86 / 7.76', '10-18 05:00:00 => 20.54 / 8.45', '10-18 06:00:00 => 24.14 / 9.93', '10-18 07:00:00 => 27.54 / 11.33', '10-18 08:00:00 => 23.01 / 9.46', '10-18 09:00:00 => 19.6 / 8.06', '10-18 10:00:00 => 18.17 / 7.47', '10-18 11:00:00 => 16.81 / 6.91', '10-18 12:00:00 => 16.4 / 6.75', '10-18 13:00:00 => 16.4 / 6.75', '10-18 14:00:00 => 16.65 / 6.85', '10-18 15:00:00 => 16.9 / 6.95']

I was expecting it to populate the prices from 23:00 tomorrow in the plan, am I missing something?
I'm on Predbat 8.5.1

I think I get it now. This was run about 16:30 today, after the agile prices have been released and it only gets the data for the next 24 hours. So when it runs at 10am tomorrow, it will then populate then next 24 hours and update the plan with the future prices from 23:00 to 09:00 the next day.

R
#2256 Rbor

The Black Cat

I think I get it now. This was run about 16:30 today, after the agile prices have been released and it only gets the data for the next 24 hours. So when it runs at 10am tomorrow, it will then populate then next 24 hours and update the plan with the future prices from 23:00 to 09:00 the next day.

I agree. See what happens after 10 am tomorrow.
I updated before 10 am this morning and all the Nordpool data came through up to 23:30 pm Friday.
When the octopus rates came through, these overwrote the Nordpool data up to 23:30 Friday. This is what I current see for end of Friday:

From about 10 am tomorrow, you should see the Nordpool data appearing from Fri 23.30 until 23:30 Sat.
From 4 pm with Octopus data, the cycle continues (providing that the connectivity to the new Nordpool api lasts!)

You should see this symbol in your Predbat Plan for any Nordpool predictions:

I hope I have got all the details and times correct!

Rob

J
#2257 JasonF

SteveCook if you have 1 AIO givtcp 2.x is fine. If you have multiple AIO you need V3

S
#2258 SteveCook

JasonF Thanks. Nothing that sophisticated.
Hy5.0 Gen1 plus 9.5 battery.

B
#2259 browellm

Really digging the Solcast update which automates the forecast directly within the add-on. I used to make the HA automation make just 4 calls a day, but I'm fully using all 50/24h of my API calls now and it's much more reactive to changing conditions, such as today where we were supposed to have glorious sunshine but in fact have quite heavy cloud. It's making predbat even more valuable.

T
#2260 The Black Cat

Rbor
Yes, Nordpool is working properly today for me.

S
#2261 SamM

If you are appreciating things like Solcast being integrated directly in to Predbat in an optimal way (after the Solcast addon was removed abruptly) or the quick fix for Nordpool API changes or just generally the magic that is Predbat; sending a bit of beer money over to Trefor would be a good option (link at GitHub: https://github.com/springfall2008/batpred?tab=readme-ov-file#introduction) 🍻

B
#2262 browellm

SamM Agreed. I threw a tenner in the pot shortly after installing predbat for the first time. Probably time for another beer token.

R
#2263 Rbor

browellm I don't have a PayPal account.
Do you know how else I can contribute?

In fact, how do I contribute anyway to Trefor or anyone else?
If I click on the link shown on Trefor's Batpred page on Github, I am taken to an email window.

Rob

D
#2264 Daveb01

Rbor

I uncommented the lines yesterday and 🤞for today.

Thank you for the heads up (icon) mine is now working as well.

D
#2265 Daveb01

While we are on the subject of apps.yaml, is there any other things you guys recommend to uncomment or add to the file to make Predbat predictions better?

The next question would be is there anything in the Predbat control section-n I could look at?

The last question (but I think I am running before I can walk) I have seen in the docs about expert mode and extra things I can look at should I go there yet and if so what’s a good thing to start with please?

W
#2266 Wavy Davy

I was wondering why I didn't have the scales symbol on my plan, despite having changed the url.
I realised I didn't have nordpool.app installed.
On installing it i notice it's not set up for the UK. What settings are people using?

R
#2267 Rbor

Wavy Davy These are the required uncommented nordpool lines in apps.yaml:

  futurerate_url: 'https://dataportal-api.nordpoolgroup.com/api/DayAheadPrices?date=DATE&market=N2EX_DayAhead&deliveryArea=UK&currency=GBP'
  futurerate_adjust_import: True
  futurerate_adjust_export: False
  futurerate_peak_start: "16:00:00"
  futurerate_peak_end: "19:00:00"
  futurerate_peak_premium_import: 14
  futurerate_peak_premium_export: 6.5

The lines are identical to previously except for the url.

You also need to upgrade to v8.5.1 of Predbat.

If you get this set up before 10 am tomorrow (Sat), you will hopefully see the nordpool scales appearing in your plan.

I always feel reassured when I see the nordpool figures appear – far better than using rates from the previous day.
I am sure that Predbat appreciates the data also. Just be careful in assuming too much – Predbat is good at tweaking the prediction many times.

Best of luck.

Rob

W
#2268 Wavy Davy

Rbor Thanks Rob, I had the true and false the wrong way round for some reason, must have been like that for ages!
Hopefully will work tomorrow.
I will now uninstall the hacs Nordpool app. I installed. Doh!

R
#2269 Rbor

Daveb01

The last question (but I think I am running before I can walk) I have seen in the docs about expert mode and extra things I can look at should I go there yet and if so what’s a good thing to start with please?

There is no harm caused by turning Expert mode on. You will then see some extra bracketed values.
Learn about them from documentation:
https://springfall2008.github.io/batpred/predbat-plan-card/#debug-mode-for-predbat-plan

Then get back to this thread if you want further info.

Tricky to offer guidance on your first 2 points.

Rob

R
#2270 Rbor

Wavy Davy I think the True and False are for the two Agile tariffs: Import and Export.
If, like most, you have Agile import and Fixed 15p outgoing, you need True and then False, as I have shown.

Do make sure you upgrade to v8.5.1. I don't think it works otherwise. I am so amazed at what Trefor can do ....
Every time I think I understand a bit more, fixes like this push me further back within my rabbit class.

Rob

W
#2271 Wavy Davy

Rbor Yes, already on v8.5.1. I put auto update on a while ago and have left it on since.
I don't think Trefor sleeps.

R
#2272 Rbor

Daveb01 A thought here:

While we are on the subject of apps.yaml, is there any other things you guys recommend to uncomment or add to the file to make Predbat predictions better?

There are some tweaks that you can make within apps.yaml but pay attention to the 'commented' statements within the code. If you get things wrong in apps.yaml, you might damage a required feature or even break Predbat. ☹️

It is worth checking from time to time the sample apps.yaml file in Github templates:
https://github.com/springfall2008/batpred/tree/main/templates

Changes are made to this template over time and these are not picked up in the upgrades. Definitely worth a periodic check.

Rob

W
#2273 Wavy Davy

Don't know what's happening with my plan but I hope its correct.....


Could do with a windfall of £31,450, 325.00
I'll let them keep the 38p

T
#2274 TX200

Oooh, I wouldn't let the SoC get that low. 🤣

R
#2275 Rbor

Take a look at the Predbat add-on log to see if there's anything strange there.
Also status report.
I would be tempted to restart the add-on, which can clear things and caches, unless you want to stick with your windfall.

It looks as if this started at 23:00 which would have been start of Nordpool predictions for next period.
I think this would have been your first values. If you had True and False the wrong way round, could this be the reason (may be cleared tomorrow morning from 10 am).
It looks like the values at 23:00, 23:30 and 00:30 are throwing a wobbler.

Rob

W
#2276 Wavy Davy

Done a HA restart and then a PC release reboot, still similar, but windfall down to £18 mil.
Will wait and see what happens tomorrow.

G
#2277 geoffreycoan

Wavy Davy Never seen anything like that before.

Have a look at the original Predbat HTML plan, not the reformatted one through the Predbat table card to see if the issue is the same, i.e. is it Predbat throwing a wobbly or is it just a display problem with the table card?

I think though there is something wrong with your inverter or battery losses. The effective rates are showing up 10 times what they should be (import a tenth, export 10 times bigger). Whether that is a side effect of what's wrong or the cause, I don't know, but it might explain the weird financials

R
#2278 Rbor

Wavy Davy geoffreycoan
I hadn't picked up the bracketed values for losses in your plan's import/export column.
I presume that these are correct in your Predbat configuration. The webUI would bee a quick check.
What do they say?

Now we are into Saturday, find out what actually happened overnight.

  • Look at GE Power Graph
  • There is the Octopus app/usage which shows import amounts straight away.
  • Did your SOC really drop from 76 to 10 between 10:45 to midnight?
  • And what does your status show.

Find out what your battery SOC is now (from Predbat plan, SOC was expected to be stuck on 100 now and your battery will have effectively been taken out of your energy usage, with grid taking over (ignoring PV 'cos there isn't any today yet!)

Could having True and False the wrong way round in your Nordpool import and export lines have caused it? (unlikely, clutching at straws here ......) Next Nordpool rates from 10 am.

Sorry for all questions but may provide more evidence for what is going on.

Rob

W
#2279 Wavy Davy

Figures are a bit nearer normal, but still don't think they're correct. (there's a big jump in costs at 10:00).

This is the original plan

will check the other things mentioned out.

W
#2280 Wavy Davy

will see what happens at 10:00.

W
#2281 Wavy Davy

Also the losses look ridiculous. That could be the problem.

W
#2282 Wavy Davy

On checking the predbat addon the configuration says dummy. Don't know what's happened there but that can't be right

R
#2283 Rbor

Wavy Davy

These are my listed losses in WebUI: defaults.

and from my plan:

The predbat add-on config tab does say dummy! This is mine:

Just ignore.

Rob

R
#2284 Rbor

Wavy Davy OK, Nordpool are in and very nice predictions for overnight they are.
See if anything has happened to your plan losses (although I doubt it).

Can you upload your nordpool lines (there are 7) from your apps.yaml, as code?
I posted mine several messages before.

Rob

W
#2285 Wavy Davy

Battery loss and invertor loss figures could be the problem. They were set to 4. Have changed them to 0.03, 0.03 and 0.04 respectively.

W
#2287 Wavy Davy

Rbor
My Nordpool lines are the same as yours, the only thing that was different was the true and false statements which I changed.
Mine's plans just updated and back to normal and Nordpool looks good as well.
Thanks Rob and Geoff, seems it must have been the battery and invertor loss statements that were the cause but don't know how they changed..

Shame, could have done with the money!!

G
#2288 geoffreycoan

Wavy Davy Battery loss and invertor loss figures could be the problem. They were set to 4. Have changed them to 0.03, 0.03 and 0.04 respectively.

that was your problem. These losses are all percentages so setting it to 4 means its a 400% energy loss

W
#2289 Wavy Davy

And I now have the scale's icon on the plan.

R
#2290 Rbor

Great that it's solved although, you must be devastated losing your recent windfall. 😰

The good thing about these threads is that we never feel lost on our own and there is usually help on hand.
Next it will be your turn to help us ......

Rob

W
#2291 Wavy Davy

Rbor That's right, particularly on this thread, have to give a big shout out to Geoff, and yourself, but others are also ready to help when able.
Right Breakfast time now.. Panic over.

B
#2292 browellm

Still having issues getting PredAI to subtract the car charging energy using either of the two the available sensors from Hypervolt. I assume it's some quirk of the Hypervolt sensors rather than PredAI since people seem to be using the Zappi sensor with no problem.

D
#2293 Daveb01

Not bad

D
#2294 Daveb01

Wow it’s very windy tomorrow

D
#2295 Daveb01

There is also a free electric period between 1-2 pm, however I found it better to export at 15p, not so sure as we are now into the Winter schedule?

So a question does Predbat take this into consideration or does the apps.yaml need tweaking?

As I do not get power up events (like some of you do in the east) where I live. The discussion you have had in the other post may not apply, or does it? Do you see this free electric session?

#2296 Jase1703

Daveb01 a quick manual tweak in apps yaml to set a rate override for the free period, rate set to zero, no need to reset afterwards as it’s only set for specific date and time. PredBat plan will pick this up shortly after setting and show 2 half hour slots at zero cost.

D
#2297 Daveb01

Jase1703

I am new to Predbat, so have had a look and guess your talking about these settings.

Is the Rate 0
What about the load_scaling?

#rates_import_override:

- date: '2024-10-20'

start: '13:00:00'

end: '14:00:00'

rate: 0

load_scaling: 0.8

D
#2298 Daveb01

That worked thank you 👍

I left the scaling at 0.8 until you comment

B
#2299 browellm

Seeing a lot of these errors in my predbat log. Is this something to do with the recent Octopus update?
2024-10-19 21:05:02.293226: Warn: octopus_limit is set to a bad value unavailable in apps.yaml, must be a number

R
#2300 Rbor

Daveb01 Jase1703 This is an area of Predbat in which I lack confidence (9 months in!)
In my apps.yaml, I have used the same code as you for 'rates_import_override'

I have omitted a line for load scaling. Default is 1.0 anyway.

Predbat has now absorbed my tweak and I now see:

Hardly seems worth it as the rates were 1.89p and 1.03p for me anyway.
But hopefully, I have learned a new Predbat trick.

I am usually exporting at this time but the forecast is so dire, I doubt that there will be anything to export. In my original plan, Predbat wanted to charge anyway.

Rob

R
#2301 Rbor

browellm I don't know. I haven't upgraded yet to this octopus update. Not seeing any errors like this.

Rob

R
#2302 Rbor

browellm I am on a session away from predAI, relying on HA historical data instead for a while.

Rob

#2303 Jase1703

Rbor @Daveb01 I have the load scaling set at 4, sorry can’t tell you why but remember Trefor recommending it! I agree not usually worth it if on Agile, however my EV is searching out all the low rates tomorrow to get to 100% Soc and it has now picked up this extra hour at zero. PredBat car charging on Agile is unbelievable cheap if you are relative low mileage driver.

R
#2304 Rbor

Jase1703 Thanks. I am low mileage and have always charged car manually using my zappi charger, using low slots.

I haven't had the confidence to use Predbat for car charging. If there is sufficient PV generation (>1.4 kWh), the zappi starts charging. I find the process for setting scheduled charges in zappi software cumbersome.

But if I set up car charging with Predbat, would Predbat override the zappi's urge to charge using PV (or from my battery!) and charge from the grid during low rate slots ?

I need to experiment ...........

Rob

D
#2305 Daveb01

Jase1703

This is in the documents, so 1.0 maybe the better option, not sure about 4 though

load_scaling is a percentage factor, where 1.0 would be no change, 0.8 is 80% of nominal house load.

Chat gpt says:

The statement refers to load_scaling, which is a percentage factor used to adjust the load or demand of a system (in this case, a house load). Here’s what it means:

•	1.0: This represents 100% of the nominal house load, which is the standard or normal load that the house is expected to use. In other words, if load_scaling is set to 1.0, the house is using its typical amount of energy with no adjustment.
•	0.8: This represents 80% of the nominal house load. If load_scaling is set to 0.8, the house is operating at 80% of its normal energy consumption. This means the house is using 20% less energy than its nominal load.

In general:

•	A load_scaling value less than 1.0 indicates that the load is reduced.
•	A value greater than 1.0 would indicate that the load is increased (more than the nominal load).
#2306 Jase1703

Rbor PredBat charging on Agile is very good, helps if you have access to cars API to monitor SOC but not essential. Set Zappi to only divert when solar is above 6800, which I cannot reach so it never diverts to the car. Just tell PredBat your maximum price for charging and time you need the car. If PredBat knows your car Soc and size of car battery, input by you into apps yaml, it looks for the lowest set of rates in the timeframe specified to reach 100% but keeps below your set minimum price, if this is set too low then it will not reach 100%. You’ll get a feeling for what price to set. I’ve added 100kwh over the past few weeks to my car and hasn’t cost me a penny other than sending Trefor a beer token.

G
#2307 geoffreycoan

Daveb01 As I do not get power up events (like some of you do in the east) where I live. The discussion you have had in the other post may not apply, or does it? Do you see this free electric session?

yes the solution I shared on https://community.givenergy.cloud/d/3968-automating-octopus-power-up-events-into-predbat/75 covers both Octopus free electricity and Octopus power up sessions. So if you don’t have power up you can omit that script, REST API and part of the control dashboard.

It basically automates the process of getting the event date and time and pushing it into predbat.

Alternatively you can amend apps.yaml and add a rates_import_override as per other comments above.

Daveb01 What about the load_scaling?

I can expand the documentation if need be, but load_scaling is saying how much you expect your house load to be different from the ‘normal’ predicted house load for that period of time.
So for instance if you are going to put the washing machine on, tumble dryer, etc you might say your load will be three times what it normally is at that time of day, and so load_scaling should be set to 3.0.
Default is 1.0, no change to house load.

Predbat uses this to help decide what it should do with the battery. Tomorrow poor solar forecast so it’ll probably be worth discharging beforehand and importing at the free period (or in the case of agile, lots of imports and exports through the day). But if it were to be a sunny day then it could well be not worth bothering to try to import at 0p if you’re not increasing the house load because you’re generating more solar than your inverter can charge into your battery - so predbat would ignore the free electricity, leave the battery full, and just export all the solar.

G
#2308 geoffreycoan

browellm Seeing a lot of these errors in my predbat log. Is this something to do with the recent Octopus update?
2024-10-19 21:05:02.293226: Warn: octopus_limit is set to a bad value unavailable in apps.yaml, must be a number

I think (mistake in the warning message) it is referring to octopus_charging_limit https://springfall2008.github.io/batpred/apps-yaml/#planned-car-charging

In the release notes for the Octopus integration 13.0.0 it says under breaking changes:
“ The intelligent ready time entity has been renamed. You will need to update any automations or dashboards that relied on the old naming.
The intelligent charge limit entity has been renamed. You will need to update any automations or dashboards that relied on the old naming.”

If you work out what the new sensor names are (as I don’t have IOG), I’ll change the apps.yaml template

S
#2309 SamM

geoffreycoan

With the changes to BottlecapDave's Octopus integration to v13 the intelligent octopus go entity template should be:

octopus_ready_time: 're:(time.octopus_energy([0-9a-z_]+|)_intelligent_target_time)
octopus_charge_limit: 're:(number.octopus_energy([0-9a-z_]+|)_intelligent_charge_target)
G
#2310 geoffreycoan

SamM Thanks Sam, I’ll update the template and documentation (and check the error messages)

R
#2311 Rbor

Jase1703 I have spent all morning experimenting with setting up car charging through Predbat and I have failed. I don't know ether it is with the apps.yaml settings or settings elsewhere, my automation, or just me. At one stage, I got a status error for car_charging_slot. I haven't managed to see any car slots appear in my plan, just a white column. I seem to be a real numpty regarding Predbat car charging. This is not the first time I have tried.

I don't know whether the car itself (a mini) supplies data but when the zappi charges, the zappi picks up the starting SOC and finishing SOC.

Any hints grateful received. For now, I am going back to num_cars 0.
I can charge the car for set times via the zappi app. I do this at night to snap up low slots but disadvantage is that I have to do this manually each time. I have seen the nordpool rates overnight and am moving car charging from the free slot to hopefully pick up some nice predicted big plunges.

On the bad side, it is looking like one of my lowest PV generation, although I have just passed the 1 kWh marking by 1 pm.

Rob

#2312 Jase1703

Rbor it took me some trial and error. Make sure that the entities specific to your Zappi are in the automation and apps yaml. If you have access to your car Soc sensor then that goes in apps yaml. I had problems with my automation and had help changing it slightly from the one in the PredBat documentation. I’ll post a link here to my automation in Pastebin, give me a minute to fire up the laptop.

R
#2314 Rbor

Jase1703 Thanks.
The automation works but I just cannot get predbat to generate any slots for the plan.
I seem to have tried every setting under the sun. I have a white car column in my plan and that's it.

I think my car charging is breaking down with: car_charging_soc

There doesn't seem to be a setting that predbat can pick up from car or zappi.
Documentation suggests this:

If your car does not have a state of charge (SoC) sensor you can set switch.predbat_car_charging_manual_soc to True to have Predbat create input_number.predbat_car_charging_manual_soc_kwh which will hold the cars SoC in kWh.

It is actually very confusion trying to set this up with so many entities and switches with similar names and found in different places.
car_charging_soc is in apps.yaml but the manual alternatives are in entities.

I have finally changed my num_cars to 0 again.
I will charge manually tonight using myenergi app, making use of negative agile slots.

Thanks for your help. I hate being beaten by this type of thing. :☹️

Rob

#2315 Jase1703

Rbor I’m sure you’ll get there in the end and it’s probably something simple, I’ve recently changed EV and had a few testing moments setting up the new car. I’ve got this entities card on my dashboard that helps me know everything is set up and that the right sensors are being seen by PredBat.

R
#2316 Rbor

Jase1703 Would it help me if you posted your entities card yaml?

When I set up the Zappi tonight for charging early next morning, I input the start time and the time in the myenergi app.
On the screen of the Zappi, there is nothing showing current SOC of my car. I suspect that the Zappi just charges away until the charging time that I specify runs out, or when the car is fully charged.

I will play around with other HA, Predbat and Zappi settings. I now suspect that my combination of Zappi and car make no use of car_charging_soc.

Rob

#2317 Jase1703

Rbor ![

#2318 Jase1703

Rbor the starting place needs to be that Zappi is in Stopped mode with no schedule set. Bare minimum PredBat needs to know that car is plugged in (Zappi plug status), you can add car battery size to apps yaml, you tell PredBat the maximum cost for car to charge. Obviously if PredBat can see cars Soc sensor it will then pick the lowest agile rates to reach 100% charge in the duration you have specified. Not sure is Mini EV sensors are accessible!![
](https://)

R
#2319 Rbor

Jase1703 Thanks. More food for thought.
This is my car charging dashboard, based on yours. I have automation turned off at this stage.

I have been through all the documentation yet again and I think it is starting to fall into place.
I think I did manage to get the Zappi showing at 'Stopped' at one stage. But I don't want to mess around any more with Zappi itself until after tonight's manual charge!

My big issue though is that I have yet to see any charging slots appear in my Predbat plan. Just a white car column!

I have also found an automation towards end of car charging documentation. See below.

HA Charging Slot Automation

In Home Assistant (Settings / Automation & Scenes), create an automation to monitor the Predbat car charging slot sensor and turn the charger on and off according to the Predbat plan:

alias: Car Charging Slot
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.predbat_car_charging_slot
action:
  - if:
      - condition: state
        entity_id: binary_sensor.predbat_car_charging_slot
        state: "off"
    then:
      - type: turn_off
        device_id: ac8b06952c7fe838314e
        entity_id: f6de2df0758744aba60f6b5f
        domain: switch
  - if:
      - condition: state
        entity_id: binary_sensor.predbat_car_charging_slot
        state: "on"
    then:
      - type: turn_on
        device_id: ac8b06952c7fe838314e
        entity_id: f6de2df0758744aba60f6b5f
        domain: switch
mode: single
  • Is it needed?
  • Do you know what the alphanumeric device IDs are pointing to?

Thanks. You have been a great help to me. 👏👏

Rob

#2320 Jase1703

Rbor I found that ‘car charge planned ready time’ is key to be set right. I ignored that later automation example as I think it relates to the MG charging on a charger without HA integration. I only have the one automation running. I sense you are close to getting this to work! Best grab those negative rates tonight and solve this tomorrow.

R
#2321 Rbor

Jase1703 Thanks for this advice. I have added to the dashboard and can see that I can change the time easily.
I have noticed this entry with no time in my dashboard:

Your dashboard has a time for this setting. I can't add one>

Is this a slot that Predbat adds as it goes along?

I agree that I should now be close. I would be very disappointed if I can't crack this for my set up.

Mini EV doesn't reveal any sensors (at least to me!) Many EVs are getting sneaky. They seem to want to charge for the smallest extra on a monthly basis. A downside of modern car tech over the old way of doing things.....

Rob

G
#2322 geoffreycoan

Rbor have also found an automation towards end of car charging documentation. See below.

Is it needed?
Do you know what the alphanumeric device IDs are pointing to?

RTFM Rob

With Predbat-led charging as it says in the documentation:

Predbat will set binary_sensor.predbat_car_charging_slot when it determines the car can be charged; you will need to write a Home Assistant automation based on this sensor to control when your car charges.

In the documentation there is then a sample template for that automation (based on a Zappi), and later on there’s an MG4 specific version. The first automation the formatting is off (I have fixed it in my current fork) and the latter isn’t great as its got embedded device id’s and entity id codes, but they should give you the idea of the sort of automation you need to write based on your car charger and how you control it from HA to start/stop your car charging. If you don’t know how to do this in HA then you need to work it out first as this is essential for Predbat to be able to control your EV

#2323 Jase1703

Rbor yes PredBat generates the charge start time once it has identified the slots required. Looks to be some 3rd party integrations in GitHub for BMWmini which allows access to Soc sensor but you need an active iconnect subscription from bmwmini or at least a login, I can’t vouch for this integration but I use a similar one to access Polestar entities as they don’t have public API access.

B
#2324 browellm

SamM Thanks, that's fixed it.

R
#2325 Rbor

Jase1703 Success!

  1. The crunch is this section from Documentation:

Predbat-led charging - Here Predbat plans and can initiate the car charging based on the upcoming low import rate slots. Ensure car_charging_limit, car_charging_soc and car_charging_planned are set correctly in apps.yaml

If your car does not have a state of charge (SoC) sensor you can set switch.predbat_car_charging_manual_soc to True to have Predbat create input_number.predbat_car_charging_manual_soc_kwh which will hold the cars SoC in kWh. You will need to manually set this to the cars current charge level before charging, Predbat will increment it during charging sessions but will not reset it automatically.
NB: If you have car_charging_soc set and working for your car SoC sensor in apps.yaml, switch.predbat_car_charging_manual_soc must be set to Off as otherwise the car SoC sensor will be ignored

  1. My emboldened soc_kwh is where I was going wrong. In apps.yaml, the respective reading from the car sensor is as a % SOC of the total. I had input 92 but my mini EV battery is only 28. So hardly a need to charge!

  2. I changed the entry from 92 to 22 and I have not generated some car slots:

    This is my car dashboard:

  3. There is more!
    I have added the BMW connected drive integration to HA. I tried my login credentials from my Mini app and I got in! And HA showed details of my car. I need to investigate further but quite a lot more testing to do.

  4. As car is fully charged, I need to go somewhere to see what now happens.

Sorry for length of this message. I still have further testing to try but much progress.
My interim conclusion is: If you can get the car sensors into HA, a lot of 'car charging' takes care of itself. I still need to see if Predbat is allowed to select slots based on price. The only Predbat inputs needed should then be 'Max price', 'Time car ready by', and the automation.

Rob

G
#2326 geoffreycoan

Rbor glad to hear you are getting there Rob, and that the documentation is standing up to your scrutiny 🧐 (even if you aren’t reading it properly 🤣)

I have added another NB to the car charging doc to highlight the need for manual car SoC to be in kWh not SoC %

#2327 Jase1703

Rbor brilliant, the feeling of succeeding in working this out is well worth the price of admission alone. I knew you’d get there, bravo.

R
#2328 Rbor

Jase1703 geoffreycoan
Right. I'm there are hope not to be bothering you again with my Predbat car charging woes/inadequacies.

Here is my latest trimmed down car charging dashboard card:

The solution was really getting hold of the bmw sensors and linking these to car_charging limit and car charging soc in my apps.yaml. I have added the results to my dashboard. I couldn't believe my luck at getting access to the BMW Connected Drive integration.

Armed with those sensors, there isn't much else to do! Just the 'planned ready time' and the Plan max price and some entity tweaks.

Thanks so much for your help in bailing me out here. Predbat truly looks a great way of hunting out the lowest rate slots. The zappi app is very clunky.
😃😄😁
Rob

R
#2329 Rbor

geoffreycoan A couple of indenting glitches I have spotted (found when I was checking for manually setting overrides for yesterday's free hour (a waste with the Agile rates). I have copied from documentation so that you can see the extra/missing spaces:
https://springfall2008.github.io/batpred/energy-rates/#manually-over-riding-energy-rates

rates_import_override:
  -  date: '2024-01-21'
     start: '17:30:00'
     end: '18:30:00'
     rate: 150
     load_scaling: 0.8
rates_export_override:
 -  start: '17:00:00'
    end: '19:00:00'
    rate_increment: -10

Rob

G
#2330 geoffreycoan

Rbor A couple of indenting glitches I have spotted

fixed, thanks Rob.

Will be in the next PR which will be sometime this week once I have finished on the output_data. I’m going through ensuring that all of the Predbat output sensors are documented, and expanding the descriptions.
Most are but some are not which requires reverse engineering by looking at the charts and code to try to work out what they do…

D
#2331 Daveb01

Rbor

In my apps.yaml I only have import override (got it working for the Sunday slot)
You also have an export I now have questions please?

  1. Does this go directly under the import lines?
  2. It does not have a date or does it use the import date?
  3. If I don’t want to export do I comment it out or does it go on the date only? Like the im[ort does?
G
#2332 geoffreycoan

Daveb01 Examples of these overrides are in the documentation https://springfall2008.github.io/batpred/energy-rates/#manually-over-riding-energy-rates

  1. The sequence of apps.yaml doesn’t matter. Put things wherever you want to in the file
  2. Date is optional for import and export. If you include a date than the override applies for that date only, if not it is for all dates
    Import and export override are quite different things and both are optional
  3. Don’t quite follow what you mean but I think the answer 2 should help.

Remember that the rates override is to temporarily override the rates you’ve already configured in apps.yaml, e.g. for a specific date, time period, etc

L
#2333 LewisWatt

Hi all, long time lurker on this thread, and I've now got a question regarding the behaviour of Predbat with two techincally independent inverters.

Current System: 3.6kW Gen 3 Hybrid w/ 9.5kWh Gen 2 Battery

I am actively looking to expand the capability of the system, and my installer recommended adding 13.5kWh AIO, technically as an independent inverter. I was looking to increase my total inverter capability so adding the 6kW AC capability appeals to me. It also allows me to run the garage as a lifeboat EPS down the line.

My main question is that of battery balancing, and how predbat would react to having my 3.6kW w/ 9.5kWh (System A) running along side a new 6kW w/ 13.5kWh (System B). Back of napkin math shows that in 20C+ conditions, System A would charge at ~ 0.38C/hour, and System B at ~ 0.44C/hour. Not a huge difference, but considering the predbat tolerance of 1% deviation before balancing, I'm not sure how the two will pair up.

Any and all questions/notes would be appreciated. Cheers!

D
#2334 Daveb01

geoffreycoan

Thank you as always, so now understand I can put date in both and they don’t have to be together 👍🍺

Do you guys have Standing Charge set up as well in Apps.yaml?

G
#2335 geoffreycoan

Daveb01 Thank you as always, so now understand I can put date in both and they don’t have to be together 👍🍺

Typically you'd be overriding for different purposes. Eg a 1 hour free electricity event - would setup an import rate override for the date and time of the event.

On a tariff where you want to export as much as possible before the overnight cheap rate - use an export override with start and end times but no date (ie every day) and a relative rate price adjustment

But you're free to do what you want with dates and times.

Do you guys have Standing Charge set up as well in Apps.yaml?

Personally I don't so I focus on the variable cost in predbat. Have to pay the standing charge regardless. But personal choice

G
#2336 geoffreycoan

LewisWatt My main question is that of battery balancing, and how predbat would react to having my 3.6kW w/ 9.5kWh (System A) running along side a new 6kW w/ 13.5kWh (System B). Back of napkin math shows that in 20C+ conditions, System A would charge at ~ 0.38C/hour, and System B at ~ 0.44C/hour. Not a huge difference, but considering the predbat tolerance of 1% deviation before balancing, I'm not sure how the two will pair up.

There is no major issue with predbat and different sized inverters or batteries. It makes some imperfect assumptions about always having the full charge and discharge rates of both inverters so if one is empty and the other full then predbat doesn't recognise you have only half the charge/discharge rate, so sometimes you need to manually override the plan, but predbat recalculates and it's good enough.

For context I have two gen 1 hybrid inverters, one with a 9.5 and the other with a 5.2 (which is 4.2 usable) and I'm fairly happy with it all.

The problem you will have though is with cross charging. The two independent inverters don't know about each other and will tend to cross charge from one to another, and with faster inverters than my gen 1, the cross charge will be quite aggressive.
I get cross charging regularly. For me it's not that aggressive, maybe 1.5kW at most, but it happens all the time. Especially at night, inverter 1 will discharge to meet the house load, inverter 2 will pick up the excess current and charge up to 100%, usually gently at a few hundred watts but it does it all the time. Its only when inverter 1 battery (the 9.5) is empty does inverter 2 start really supplying the house load.

Predbat has balancing software but it doesn't work very well and I've turned it off as a result.

I do have some github issues raised on these things

L
#2337 LewisWatt

geoffreycoan The problem you will have though is with cross charging. The two independent inverters don't know about each other and will tend to cross charge from one to another, and with faster inverters than my gen 1, the cross charge will be quite aggressive.

Yeah this is what I was mostly concerned with. It'll be a couple of months before I get the new system, so hopefully there's a better solution by then.

G
#2338 geoffreycoan

LewisWatt here’s my SoC graphs for the last 24 hours. I have ringed the big cross charging periods.

In my case it’s predominantly a cross charge from inverter 1 to inverter 2. I have an automation that puts a pausecharge on inverter 2 when it sees it happening, and predbat takes the pause charge off in the next 5 minute run.

I do have some ideas for how to tackle it and just pause charging the inverters when the sun is down and Predbat isn’t planning a charge would fix a lot of it

S
#2339 Slartibartfast

Will EMS handle an AC3 inverter and an AIO? V1 works well for upto three AC inverters. Rumours were that the AIO had EMS built in - true or false? I suppose it's a question for Giv (Mick).

D
#2340 Daveb01

My batteries got a good workout on Monday, first time I have seen this.
Predbat kept them busy.

G
#2341 geoffreycoan

Slartibartfast Will EMS handle an AC3 inverter and an AIO? V1 works well for upto three AC inverters. Rumours were that the AIO had EMS built in - true or false? I suppose it's a question for Giv (Mick).

My guess is that mixed mode EMS is some way off, if ever. It was said that the ‘first release’ of EMS was for AC coupled inverters. I’ve not seen any statements about EMS over the top of hybrid inverters or EMS over AIO’s.

Effectively the AIO does have its own EMS with the AIO gateway which can handle up to three AIO’s.

But AIO and anything else? Maybe future roadmap, maybe never.

Daveb01 Sunday was really good for me with the super-low agile rates and a free electricity session, 35kWh exported, 56kWh imported Likewise, I was well in profit and no issues with the batteries getting cold with all that charging and discharging! And now we’re back to rubbish agile rates 😢

D
#2342 Daveb01

geoffreycoan

My thoughts are:

  1. GE have given away free EVC with AIO’s.
  2. AIO’s can be installed without a GW.
  3. AIO’s have now two versions 6 Kw and 3.6 kw
  4. Reduction on price to get AIO’s out the door.

Is the AIO gen 1 coming to an end, get as many out the door before the end of the year.

AIO gen 2 coming soon (2025) will they stop AIO gen 1’s ???

D
#2343 Daveb01

Another question please

My GivTCP Battery card is indicating my AIO’s have a capacity of 16.48 kWh instead of 13.5 kWh. I have my reserve set at 5%. Is Predbat using these figures or are these just display??

5% of 13.5 is not the same as 5% of 16.48?

G
#2344 geoffreycoan

Daveb01 My GivTCP Battery card is indicating my AIO’s have a capacity of 16.48 kWh instead of 13.5 kWh. I have my reserve set at 5%. Is Predbat using these figures or are these just display??

It’s in the documentation. The AIO mis-represents its true capacity as being its available capacity and you need to set a battery scaling factor in apps.yaml to correct this https://springfall2008.github.io/batpred/apps-yaml/#battery-size-scaling

To get the battery card to show the same capacity figure you need to set a scaling in the battery card config like I do for my 5.2.

B
#2345 browellm

I know this has been raised quite recently but I wonder why Predbat determines this time slot for an export, especially when there is considerable potential jeopardy in evening consumption. I would have thought deferring that to 10 or 10.30pm would be more sensible.

Solar output is barely hitting 10% forecast today, so it's unlikely to happen anyway in this case but I have seen the same slot be scheduled over the past couple of days, and indeed it did export a little at that time last night.

G
#2346 geoffreycoan

browellm I know this has been raised quite recently but I wonder why Predbat determines this time slot for an export, especially when there is considerable potential jeopardy in evening consumption.

I think it’s to do with ‘calculate secondary order slots’. If you turn this off then Predbat will defer discharging until later on. I have this setting turned off for me and don’t have any such peak period exports.
You can also put a small export rate offset override in apps.yaml to discourage export in the peak period. Worth doing that when we get to DFS saving sessions anyway.

#2347 PianSom

geoffreycoan I think it’s to do with ‘calculate secondary order slots’. If you turn this off then Predbat will defer discharging until later on. I have this setting turned off for me and don’t have any such peak period exports.

I just tried this, but even with it Off I still get a 7.30pm discharge. 🙁

#2348 PianSom

... and now it's gone

Ah, the mysteries of Predbat! Thanks, Geoffrey

#2349 PianSom

Oh, for pity's sake.

B
#2350 browellm

PianSom Lucky you, it hasn't for me xD

D
#2351 Daveb01

geoffreycoan

This has confused me a little.
Is the GivTCP Battery card just reading the values and if I alter them it will not change the actual control settings?

I have altered the DoD to 82% in the card this now matches the correct AIO figure 13.5 kWh. Is this what you were saying please?

The setting in the apps.yaml was set to 0.80 as per the documentation however Jason who also has 2 x AIO’s has his set to 1.0059, so I have been running with this setting?
(Do you need to add a note in your document?)

I have just updated the Solcast, and saw your name, well done and thank you again for all your work and help 👍🍺🍺🍺

G
#2352 geoffreycoan

PianSom Oh, for pity's sake.

Likewise, predbat has decided that it’d like to do some discharges for me today. I threw in a few force idle’s to override the freeze discharges it had planned for the morning, to give a bit more battery contingency, but now in the afternoon its decided to start discharging a bit 🤷‍♂️

I tried various values for input_number.predbat_metric_min_improvement_discharge, eventually finding that 3p has done the trick, stopped the discharges and is letting the battery fill up today before the predicted cheaper rate overnight.

Daveb01 This has confused me a little.
Is the GivTCP Battery card just reading the values and if I alter them it will not change the actual control settings?

Remember everything in Home Assistant works on sensor values. GivTCP gives a whole load of sensor values to Home Assistant from your gateway/AIO’s. One of these is the battery capacity and current SoC %.

The GivTCP idea of what the battery capacity is is what the inverter says it is. You can create a NEW sensor with a value derived from the old sensor, but that would be a new sensor, it doesn’t overwrite the GivTCP sensor value.
But unless you are going to get into creating template sensors, this is a blind alley not worth going down.

So GivTCP reports your battery capacity as X. If that battery capacity is reported wrongly then anything that reads that capacity will need to scale the capacity accordingly.

I have altered the DoD to 82% in the card this now matches the correct AIO figure 13.5 kWh. Is this what you were saying please?
Correct. The battery card reads the AIO capacity directly and so if this is wrong, it needs to be scaled via the DoD.

The setting in the apps.yaml was set to 0.80 as per the documentation however Jason who also has 2 x AIO’s has his set to 1.0059, so I have been running with this setting?
(Do you need to add a note in your document?)

I was waiting for people to confirm exactly how GivTCP v3 worked. In GivTCP v2 (which only supports single AIO), the battery capacity is reported wrongly so you have to scale it in Predbat and the battery card. The scale factor is I believe 0.85 though.

For GivTCP v3 I suspect (but not confirmed by anyone) that the gateway reported kWh is already adjusted by the gateway when it adds up the AIO data so doesn’t need scaling for Predbat. I’m not sure of the logic of 1.0059 and whether that makes any real difference or not.
However the individual AIO battery kWh is still as it was with GivTCP v2 that the full not usable capacity is reported so you need to scale it as you have done if using it in the battery card.
Since the gateway manages both the AIO’s as a single unit maybe you could use the battery card pointing to the gateway, I don’t know?

Anyway, ball in the court of people with AIO’s to advise where the Predbat documentation needs tweaking.

I have just updated the Solcast, and saw your name, well done and thank you again for all your work and help 👍🍺🍺🍺

Yes, I continue to dabble in the Solcast integration as well.

#2353 PianSom

geoffreycoan Likewise, predbat has decided that it’d like to do some discharges for me today.

Those two discharges have now disappeared from the plan, and it now looks reasonable again. Without me doing anything.

I really like Predbat, but the algorithm output is not very stable. Small changes in an input can - as this afternoon has amply demonstrated to me - make surprisingly large changes to the output. While it seems that in general terms Predbat seems to get things broadly right, this makes it quite hard to "tune" effectively.

Perhaps this is inevitable, and the algorithm is just reflecting a fundamentally unstable dynamic system. But sheesh!

(Just to be clear - I am not moaning about you, or your suggestion! Thank you for it. Just voicing a little frustration, which I sense you possibly share . 🙂 )

G
#2354 geoffreycoan

PianSom I agree, sometimes tiny changes in the input can cause the plan to oscillate significantly.
I think that’s in its nature that its doing a least cost optimisation, running every 5 minutes and recalculating everything every 10 minutes with no prior knowledge of the previous plan.

Increasing the metric_min_improvement_discharge up from 1p in effect acts as a dampening factor, the battery won’t get discharged unless it passes the financial threshold. Am not convinced whether the threshold operates as the documentation says it should, but that’s a separate github issue raised and in the backlog somewhere.

As I think we have said many many times between us, Predbat is complicated and getting its optimisation to work for everyone’s preferences isn’t simple. We can sort of point the vehicle in the broadly correct direction but like a bumper car it sometimes has a mind of its own!

I have no desire to delve into the depths of the python code that doesn’t have a lot of comments or documentation in it. I leave that to Trefor. Hard enough just working on the documentation for others….

D
#2355 danerf

geoffreycoan hats off you to Geoffrey. I don't know where you find the patience and to write the documents and answer questions. Everyone appreciates you

D
#2356 Daveb01

geoffreycoan

Since the gateway manages both the AIO’s as a single unit maybe you could use the battery card pointing to the gateway, I don’t know?

I tied this and the card disappears when I select GW 🥴

I have set the apps.yaml back to 0.82 the same as the card, let’s see how that goes. I can not ch age more than one setting as to many things could happen


0.85 comes out at 14.008 kWh

G
#2357 geoffreycoan

Just pushed through my most recent PR https://github.com/springfall2008/batpred/pull/1563/

If we can get consensus on how GivTCP works and whether battery scaling is needed for multi AIO's, then I can include that. At the moment it says battery scaling of 0.85 is needed because that's what you AIO owners told me.

A few minor code fixes in this PR, removal of the 'limit 99' on freeze discharge statii, correction of charge/discharge curve error messages that always referred to 'charge curve', lots of minor tweaks based on feedback in this forum and github issues, but the big set of changes are to the output data page where I've made some more improvements to the error automations, updated those to HA 2024.10 notation, but more, I have exhaustively been through all the sensors that predbat outputs and ensured they are documented as to what they contain. It has taken some time to do this (just look at my commit history!)

Advance warning that I will be away from Monday in France for several weeks and will only be online sporadically so probably won't be on here much. Hope my own predbat and HA behaves itself

R
#2358 Rbor

geoffreycoan

Advance warning that I will be away from Monday in France for several weeks and will only be online sporadically so probably won't be on here much. Hope my own predbat and HA behaves itself

Do have a good time in France. We will try to keep the predbat threads going in your absence, hopefully providing (mostly) correct advice.

Rob

B
#2359 browellm

@Rbor do you happen to have the apex chart code for predai external temperature plotting?

R
#2360 Rbor

browellm This is what I have used:

type: custom:apexcharts-card
header:
  show: true
  title: Temperature AI prediction
  show_states: true
  colorize_states: true
graph_span: 8d
span:
  start: day
  offset: "-6d"
now:
  show: true
yaxis:
  - min: 0
series:
  - entity: sensor.e3_tcu10_x07_outside_temperature
    stroke_width: 1
    curve: smooth
    name: Temperature
  - entity: sensor.e3_tcu10_x07_outside_temperature_prediction
    stroke_width: 1
    curve: smooth
    name: AI Temperature
    show:
      in_header: raw
    data_generator: >
      let res = []; for (const [key, value] of
      Object.entries(entity.attributes.results)) { res.push([new
      Date(key).getTime(), value]); } return res.sort((a, b) => { return a[0] -
      b[0]  })
  - entity: sensor.e3_tcu10_x07_outside_temperature_prediction
    stroke_width: 1
    curve: smooth
    name: AI Temperature Source
    show:
      in_header: raw
    data_generator: >
      let res = []; for (const [key, value] of
      Object.entries(entity.attributes.source)) { res.push([new
      Date(key).getTime(), value]); } return res.sort((a, b) => { return a[0] -
      b[0]  })

This is what my Apex chart looks like:

I have a Viessmann heat pump controlled by an external weather compensation unit connected directly to the HP. I found a Viessmann integration which I installed into HA and that came with various entities, including one for my weather comp unit.
This made the task relatively easy for me (although I did have to negotiate the Viessmann web site to get an api code.

I don't know whether other HP manufacturers have HA integrations. I searched for Vaillant but nothing. But there are some HACS add-ons for Vaillant.

Apart from this, I think I adapted the code from the predai documentation in the HA/add-ins area. It isn't used for anything (or at least I don't think it is) but nice to have. As you can see from my chart, it gives a nice historical representation of the ups and downs of temperature.

If you don't have a weather comp unit with an entity, you may be able to set up something via open weathermap (integration). There are details in documentation for predheat on GitHub:
https://github.com/springfall2008/predheat

I have looked at predheat but got a bit lost in setting up a chart. I also wondered about its use for my HP system that is controlled solely by weather compensation. This then switches the HP on and off and modulates the speed of the fans for efficiency.

PS I tend to alternate between using just HA historical and predai.
I have just gone back to using predai, which I have left running continuously since I first set it up months ago. So I might have a good record of my load going back in time.

Rob

B
#2361 browellm

Rbor Thank you. Already had Openweathermap installed to get an external sensor before predheat integrated into predbat.

I think I've solved my EV charger subtraction issues so I'm back over to predbat fully now. Just fancied having the temp charts out of curiosity.

R
#2362 Rbor

Jase1703 Hi, I thought I would report back on my progress with setting up car charging with Predbat.

  1. I have experimented with setting different max prices in my dashboard and seeing the Agile slots that Predbat has chosen in its plan. It looks brilliant with Predbat clearly hunting out the lowest which can be scattered around and choosing the units needed to reach the 'limit'.

  2. In my apps.yaml, I pointed 'car_charging_limit' and 'car_charging_soc' to entities that I obtained from the BMW connected services integration.
    'car_charging_soc' seemed to be critical as this provides Predbat with my car battery SOC%
    'car_charging_limit' just links to 100% which is the default for my car.

I wondered about replacing the 'car_charging_limit' with the helper (explained in car charging documentation for MG4 EV and hypervolt charger. The apps.yaml entry is changed to:

  car_charging_limit:
    - 're:(input_number.ev_max_charge)'

This helper shows a slider and this looks useful for setting a customised charging limit, not necessarily 100%.
I have noticed that documentation uses 'car' within the helper but it should be 'ev'
I will let Geoffrey know!

Have you tried this?

I now understand how all this works. I think that I was confused by the sheer amount of information provided.
If you are lucky enough to have the car sensors, it is relatively straightforward and much of the documentation can be ignored.

I haven't actually charged the car yet using Predbat – I am awaiting some decent Agile rates to return, unless forced to charge if my battery SOC gets too low.

Finally thanks again for your help in setting this up.
I would never have succeeded without your advice.

Rob

R
#2363 Rbor

browellm
Do tell me if you mange to get a nice Apex chart for predai temperature.
Aren't these Apex charts brilliant?

I have finally got car charging set up for Predbat to control (Agile).
So I will need to see if the subtract line is correct in my predai apps yaml file.
I can subtracting on of the zappi entities, hopefully the correct one!

Rob

R
#2364 Rbor

@""#p66753
I have discovered a minor documentation glitch within:
https://springfall2008.github.io/batpred/car-charging/#example-ev-and-charger-setup

In Home Assistant, create two helper entities (Settings / Devices & Services / Helpers) of type 'Number':

• EV Max Charge - input_number.car_max_charge
• EV Current SOC in kWh - input_number.predbat_car_charging_manual_soc_kwh

In HA, The two helpers have 'ev' within their names and not 'car', i.e.
input_number.ev_max_charge
input_number.predbat_ev_charging_manual_soc_kwh

As well as the quoted text above, this glitch appears further down the page.

  car_charging_limit:
    - 're:(input_number.car_max_charge)'

should be

  car_charging_limit:
    - 're:(input_number.ev_max_charge)'

Please check with your helper entries in case I am referring to an old version.

Rob

#2365 Jase1703

Rbor hi Rob, I’m far from an expert here but I did try this. My EV charging strategy has fundamentally changed since shifting to Agile from IOG. With IOG I’d run the car down to low Soc and then request to add 70% or 80% for example and Octopus would give me an extended off peak 7,5p, which would then be maximised accordingly. Now with agile it pays to always top up as high as possible at the lowest possible rates as you don’t know for sure when they’ll come around again. I now try to keep the EV as high as possible. I can see that some people would want to never go above 100% to maximise regen breaking availability.

R
#2366 Rbor

Jase1703 Thanks as always for your advice, which I will follow.
It makes sense to grab low Agile rates while they are there. My last charging was using plunge negative rates.
Up to 100% was my strategy anyway using my 'ad hoc' charging with myenergi app.

I now need some decent Agile rates to try it all out ..... !

Rob

B
#2368 browellm

Rbor Yes, I have quality squiggles 🙂 Thanks again.

W
#2369 Wavy Davy

Anyone else having predbat plan problems?
I'm getting this error and no chart.


Have tried resorting predbat and then HA still no chart.

W
#2370 Wavy Davy

It's now decided to start working, but no idea why or why it occurred in the first place, But been off all morning.

G
#2371 geoffreycoan

Rbor I have discovered a minor documentation glitch

In HA, The two helpers have 'ev' within their names and not 'car', i.e.
input_number.ev_max_charge
input_number.predbat_ev_charging_manual_soc_kwh

I have updated the documentation so that the sensor id's auto-generated are the same as the name of the sensor, and I've used 'car' throughout as well as shortened some of the names and simplified some of the example changes to apps.yaml.

Thanks for highlighting this.

But, it would have been possible to create sensors that precisely matched the original instructions (although would have required a lot more step by step instructions).
If you create a sensor eg. called 'EV Current SOC in kWh' then the sensor will have that mouthful as the name and the sensor id will be auto-generated as input_number.ev_current_soc_in_kwh
Then if you click on the sensor you've just created, click the cog symbol, you can change the sensor id e.g. to 'predbat_car_charging_manual_soc_kwh'

Sensors don't have to have the same id as their name.

R
#2372 Rbor

geoffreycoan I agree that is makes sense use use 'car' consistently.

I am bemused as to how I finished up with 'ev'. I first looked at setting up car charging in predbat last February and I wonder whether the advice was then to use 'ev' in the helper name.

The irony for me is that I now have car charging set up using the sensor provided by my car manufacturer.
So I don't actually need this helper!

Rob

D
#2373 Daveb01

Anyone with AIO’s (or could be those with 2 x batteries) seeing this. Not sure if it has been like this for a while or because of the latest update or a setting I have tweaked.

MQTT readings
Battery correct 71%
GW correct 71%
AIO-1 incorrect 86%
AIO-2 incorrect 85%


R
#2374 Rbor

Predbat plan for 27th October still on British Summer Time.

Hopefully, Predbat will catch up for 1 am tomorrow am.
Octopus Agile tariff for tomorrow is correct on Octopus site, adding on the extra hour.
I hope that Trefor is aware .......

P.S. Looks like @geoffreycoan has beaten me to it and has posted an issue on Github.

Rob

Rob

G
#2375 geoffreycoan

Rbor I was checking Predbat as the Solcast integration (which works mainly in UTC and then converts to local time) got seriously confused about the DST change https://github.com/BJReplay/ha-solcast-solar/issues/207

I’m not majorly worried about, it’ll sort itself out overnight. Rubbish agile rates and poor solar mean I will run out of battery charge again. And not even got the ASHP on yet ☹️

R
#2376 Rbor

geoffreycoan I was expecting the 01:00 and 01:30 Agile rates to be repeated, 2nd time round but not so from Octopus:

Rob

D
#2377 Daveb01

Daveb01

Restarted everything & left it a few hours, looks all back online now phew.
Plus no one needs to look and answer a newbie question 👍👍

G
#2378 geoffreycoan

Rbor I was expecting the 01:00 and 01:30 Agile rates to be repeated, 2nd time round but not so from Octopus:

I wouldn’t expect the rates to be repeated, they are based on market rate supply and demand.

Think about the times in terms of UTC:

12:00 UTC (1:00 BST, 1:00 local time) 14.7p
01:00 UTC (1:00 local time) 22.85p
02:00 UTC (2:00 local time) 15.12p

So although the local time repeats the UTC time doesn’t, it’s just we change our clocks from BST to UTC.

surprising how much the rate jumps during the transition time. Wonder why that is

D
#2379 Daveb01

This is the first time I don’t agree with Predbat (but going to leave it alone)
Why not charge the battery from the sun today instead of exporting solar and I am expecting the battery flat by 21:00?

R
#2380 Rbor

Daveb01 Ye of little faith!
Predbat has 2 big moments in its life today:

  • 10 am for Nordpool predictions (you do have these switched on in apps.yaml?)
  • 4 pm for Octopus actual rates

And as the day progressed, Predbat may often change its mind anyway.

You say that your battery is 'flat' by 21:00 but from you plan you have 20%. I believe you have two AIOs so 20% is still a total of 5.4 kWh.
For comparison, I have two 8.2 kWh batteries and this is my plan for the day:
You can see some of my setting at the top but I run very much on defaults. I worry that I might mess things up by tweaking too much.

So I started daylight on 6% SOC, about 1 kWh SOC.

If you are worried, you could try restarting your inverter/Gateway or whatever you do with AIO!
But only another 1 hr 20 min till Nordpool time, with a little more for Predbat thinking time.

Also, what about your solar predictions. Looking at our plans, they are similar. Mine are:
Sunday (Today): 23.1 kWh😀
Monday (Tomorrow): 6.4 kWh ☹️

.... and have you made any adjustments (apps.yaml or tweaks) that might be throwing things.
Get an idea of how much you have adjusted things in WebUI/Configuration.

Oh, and have a look at your status and see what is really happening, and see what was happening overnight.
... and looking at mine, what does your plan do from 22:30-00:00?

Rob

T
#2381 TX200

So re nordpool, the terms say this

Nord Pool does not permit automatic extraction of data or other usage that reduces the performance of the website. Any such extraction or usage will lead to the user being blocked from the website without further notice.

So that means they allow extraction if it does not impact their performance, right?

Nordpool

D
#2382 Daveb01

Rbor

Looks the same as yours 👍, I think the battery will be flat earlier now as it’s down to 28% and not had teas, lunch etc yet. Hopefully Predbat will have a rethink at the next 30 min slot.

G
#2383 geoffreycoan

Daveb01 I’ve turned set_discharge_freeze off on mine for a while so predbat lets the battery fully charge up. It’s a sunny day at last and I’ve just put the heating on for the winter so I know that my forecast load will be all wrong.

Predbat seemed to handle the clock change OK last night but my auto-restart script kicked in twice and restarted Predbat because it thought Predbat had got stuck with the status.last_updated not changing for 20 minutes.
In reality I think the clock change confused HA’s trigger mechanism. For a once-a-year issue I think I will overlook it

D
#2384 Daveb01

geoffreycoan

Thank you for the advice, I have found the setting and turned it off as well. Is this something that I should do when going from summer to winter mode? And visa versa?

I should also have waited until after 10 as advised as it’s changed a bit, but should change again after the teak of setting.

G
#2386 geoffreycoan

Daveb01 Thank you for the advice, I have found the setting and turned it off as well. Is this something that I should do when going from summer to winter mode? And visa versa?

Discharge freeze is a mode that Predbat stops the battery from charging but allows it to continue to discharge if needed for house load (above solar generation). If you turn this switch off then Predbat won’t be able to invoke discharge freeze mode.
Discharge freeze is useful if your solar generation is predicted to be greater than your home demand as there is no point in charging the battery only to force discharge it later on (eg when rates are lower), its more economical to just export the solar generation.

But if you think you will need the extra charge later on or you don’t care so much about the charge and discharge losses then its worth turning the setting off.

Sometimes I find Predbat can be a bit too optimistic about future load or future rates and will tend to freeze discharge when I don’t necessarily want it to so hence why I turned the setting off today. I will probably put it back on again in a couple of days time when the load history has more data of the heat pump being on

D
#2387 Daveb01

geoffreycoan

Every days is a learning day for us newbies.

It now looks like this, the washing machine is now on. I may turn it back on in an hour 🤞

R
#2388 Rbor

Daveb01 So, in this plan, from midnight to 4 am your batteries are being charged up from 5% to 89%. The AIO can really shift the charge at about 17-18% SOC every 30 min.
My AC3.0 managed about 9% SOC.
My 'puny' AC3.0 gets me from 4% to 50% in same time.

With losses, it is more effective to export solar during the day and to fill up using lower rates during the night from the grid. Using grid (AC-> DC) rather than solar (DC->AC->DC) cuts down on conversions for AIO and AC3.0. Hybrids from solar have no conversion.

Solar not looking good tomorrow and I predict that Predbat will change its plan after 4 pm.

geoffreycoan I’ve turned set_discharge_freeze off on mine for a while so predbat lets the battery fully charge up. It’s a sunny day at last and I’ve just put the heating on for the winter so I know that my forecast load will be all wrong.

Having praised my policy of using defaults, I may try seeing the effect of set_discharge_freeze off on my plan. I can always turn it back on again.
My ASHP has been on for a while (800' up in Yorkshire)

  • But ..... Discharging freeze does seem to work quite well with my set up.
  • I have also seen the latest v8.5.2 with improvements to set_discharge_freeze so I will upgrade and leave my setting on for now.

Rob

D
#2389 Daveb01

Rbor

Leave it alone Dave (it’s saying in my head now). Have just updated Predbat. Put settings back to where they were this morning and it now looks like this.

I am leaving it alone (go have a coffee)

G
#2390 geoffreycoan

Rbor I have also seen the latest v8.5.2 with improvements to set_discharge_freeze so I will upgrade and leave my setting on for now.

The changes to discharge freeze were in response to a github bug, I think if you turned discharge freeze off and then did a manual override of a discharge freeze, it didn’t work. Or something like that.

Also improvements to the prediction of future norddata prices which we were discussing with Trefor, will be useful and a whole load of documentation changes from yours truly.

I however am not going to update my predbat, nor swap to GivTCP v3.0.4, will leave it running as-is since I will be away from tomorrow and don’t want to risk anything new breaking.
Have had the heating on actually for a couple of weeks but set at 17 degrees and the house has pretty much stayed above that. But starting to get colder so have turned it up to 19 degrees to be kind to the family whilst I’m away 😘

D
#2391 Daveb01

geoffreycoan

While looking for the set_discharge_freeze setting, I looked at the other sections and noticed this, could I put in a request next time you speak to Trevor (what the reason he chose $ over £? Is it possible to change this per region or possible pic your own symbol for currency?

D
#2392 Daveb01

geoffreycoan

Are you flying your giant kite round or a sunny holiday this time?

Have a great time and hope the weather is kind 🍺🍹

G
#2393 geoffreycoan

Daveb01 could I put in a request next time you speak to Trevor (what the reason he chose $ over £? Is it possible to change this per region or possible pic your own symbol for currency?

its always been like that, for some reason Trefor chose the $ symbol for ‘money’ sensors, and its hard coded.

I’ll add it to my to-do list. What would people prefer, user definable or work it out from the currency symbol in apps.yaml (that is only used on the predbat plan)?

No, I’m driving to france, got some jobs to do over there.

D
#2394 Daveb01

geoffreycoan

No preference which ever is the easiest.

R
#2395 Rbor

geoffreycoan I upgraded to v8.5.2 at 12:25pm and I get this message every 5 mins when the predbat plan updates:
2024-10-27 12:25:21.642205: Info: Calibrating Nordpool data... adjust_import True adjust_export False

The predbat.log shows several lines each time that seem to be identical.

2024-10-27 14:45:03.556550: Fetching futurerate data from https://dataportal-api.nordpoolgroup.com/api/DayAheadPrices?date=DATE&market=N2EX_DayAhead&deliveryArea=UK&currency=GBP
2024-10-27 14:45:03.557062: Return cached futurerate data for https://dataportal-api.nordpoolgroup.com/api/DayAheadPrices?date=2024-10-27&market=N2EX_DayAhead&deliveryArea=UK&currency=GBP age 139.7 minutes
2024-10-27 14:45:03.558194: Return cached futurerate data for https://dataportal-api.nordpoolgroup.com/api/DayAheadPrices?date=2024-10-28&market=N2EX_DayAhead&deliveryArea=UK&currency=GBP age 139.7 minutes
2024-10-27 14:45:03.571260: Loaded 97 datapoints of futurerate analysis
2024-10-27 14:45:03.609465: Info: Calibrating Nordpool data... adjust_import True adjust_export False
2024-10-27 14:45:03.933420: Calibration for import best diff 2975.772000000019 multiply 1.92 add_peak 11.5 add_all 0.0 
2024-10-27 14:45:03.945736: Calibration for export best diff 9999999 multiply 0.95 add_peak 1.0 add_all 5.0 
2024-10-27 14:45:03.959367: Predicted future rates: ['10-27 00:00:00 => 19.17 / 14.74', '10-27 01:00:00 => 19.41 / 14.86', '10-27 02:00:00 => 16.89 / 13.61', '10-27 03:00:00 => 14.52 / 12.43', '10-27 04:00:00 => 15.4 / 12.87', '10-27 05:00:00 => 18.18 / 14.25', '10-27 06:00:00 => 23.26 / 16.76', '10-27 07:00:00 => 22.36 / 16.31', '10-27 08:00:00 => 19.58 / 14.94', '10-27 09:00:00 => 20.38 / 15.33', '10-27 10:00:00 => 18.69 / 14.5', '10-27 11:00:00 => 16.37 / 13.35', '10-27 12:00:00 => 15.42 / 12.88', '10-27 13:00:00 => 16.87 / 13.6', '10-27 14:00:00 => 17.38 / 13.85', '10-27 15:00:00 => 18.24 / 14.28', '10-27 16:00:00 => 35.78 / 18.03', '10-27 17:00:00 => 38.44 / 19.35', '10-27 18:00:00 => 34.55 / 17.42', '10-27 19:00:00 => 18.65 / 14.48', '10-27 20:00:00 => 17.4 / 13.86', '10-27 21:00:00 => 16.87 / 13.6', '10-27 22:00:00 => 15.26 / 12.8', '10-27 23:00:00 => 14.62 / 12.48', '10-28 00:00:00 => 14.52 / 12.43', '10-28 01:00:00 => 13.39 / 11.87', '10-28 02:00:00 => 12.06 / 11.22', '10-28 03:00:00 => 11.09 / 10.74', '10-28 04:00:00 => 12.14 / 11.25', '10-28 05:00:00 => 15.12 / 12.73', '10-28 06:00:00 => 18.43 / 14.37', '10-28 07:00:00 => 19.66 / 14.98', '10-28 08:00:00 => 18.93 / 14.62', '10-28 09:00:00 => 18.87 / 14.59', '10-28 10:00:00 => 19.72 / 15.01', '10-28 11:00:00 => 19.01 / 14.66', '10-28 12:00:00 => 19.13 / 14.72', '10-28 13:00:00 => 20.28 / 15.28']
2024-10-27 14:45:03.996840: Adding rate rates_import_override: {'date': '2024-10-20', 'start': '13:00:00', 'end': '14:00:00', 'rate': 0, 'load_scaling': 1.0} => 10-27 13:00:00 to 10-27 14:00:00 @ 0.0 date 2024-10-20 00:00:00 increment False
2024-10-27 14:45:04.882344: Rate min forward looking: now 10.91 at end of forecast 10.91

I guess this is the 'auto calibration' but do you think it is working properly?
Should I post on Github for Trefor as a possible issue?

Rob

G
#2396 geoffreycoan

Rbor The predbat.log shows several lines each time that seem to be identical.

I guess this is the 'auto calibration' but do you think it is working properly?
Should I post on Github for Trefor as a possible issue?

Trefor does like his debugging info in the logfile! They’re not actually identical messages, there is two retrievals of (cached) norddata prices, one for today and one for tomorrow; then the calibration messages are one for import and one for export, but given the prior line says that export rate prediction is set to false, logging the export calibration is all a bit pointless.

I guess the proof will found out soon when you see how much more accurately this calibration gets tomorrow’s agile rates.
Might be worth feeding back to Trefor the amount of logging it generates. The issue where I raised this as a feature request is still open

R
#2397 Rbor

geoffreycoan Thanks.
I will take a screenshot of my plan before 4 pm.

I can then post this as a new issue.
Do you think the calibration a one-off or will it run continuously?

Rob

#2398 PianSom

geoffreycoan But starting to get colder so have turned it up to 19 degrees to be kind to the family whilst I’m away

Maybe we can start a sweep on what setting it's on by the time you get back? 🙂

B
#2399 browellm

Apropos of nothing I got mid-afternoon IOG slots today. A first for me, despite being on the tariff over three years. Predbat handling it all wonderfully of course.

R
#2400 Rbor

PianSom 22C

Rob

R
#2401 Rbor

geoffreycoan I have posted as a possible issue on GitHub with the code.
I have also added screenshots of my Nordpool predictions just prior to 4 pm and actual rates after 4 pm. Good for assessing accuracy of Nordpool in v8.5.2.

I will now leave you in peace. Have a good trip.

Rob

R
#2402 Rbor

Daveb01 The big question of the day has to be:

"Have you managed to leave Predbat alone?".

Other than upgrade versions, I haven't adjusted anything and predbat has done me proud.

Rob

#2403 Hook

Rbor looks like a spelling mistake. 8.5.3 is out.

R
#2404 Rbor

Hook It says 8.5.3 now (didn't initially)

Rob

G
#2405 geoffreycoan

👋 ⛴️ 🇫🇷

D
#2406 Daveb01

Rbor

Hhhmmm I tried, but saw the post about battery % set to 0.85, as my battery card was saying 16 kWh instead of 13.5. I tweaked the card so it now says 13.5 which indicated 0.82.

I changed yaml from 1.0059 to 0.82 then back again.

I also learned about set_discharge _freeze on/off. On for a few hours then off again.

I am now like you, leaving it alone. However if I see something I don’t like in the plan it is good to know what control you can turn on/off to get past it, so may ask.

You were right it is hard not to go in and look at things, I do look at my cards a lot, especially the new ones I have set up with batteries in so I know when to change them?

Thank you for all your advice again, you and the rest of the guys here have been invaluable

#2407 PianSom

I got my solar + AIO installed in Sep last year and started using Predbat around Xmas last year. As we are now approaching my 1y anniversary I have been thinking about doing some analysis about how much I am saving, and what my payback period could be if this year repeated.

The null case (how much would I have spent if I didn't have the kit) is pretty easy - I can see what my daily Load is, and can easily multiply up the average of that by a suitable tariff rate to see how much I would have spent had I not had the kit.

But the actual case (how much did I actually spend) is a bit more complicated. How can I determine that? I am an Octopus IOG/Fixed export user, and I benefit from DFS, Power-ups and occasional Free electricity periods. (I am prepared to ignore these in the null case, as I would probably have ignored them in the bad old days.) Almost all of my import is at the overnight 7p rate, and I work my battery hard and most nights do a partial export. I have a reasonable sized array of panels, so have been exporting happily all summer.

The simplest I can think of doing is going through my bills and manually adding up the electricity import and export numbers and the adjustments (DFS etc) manually. But surely there is a better way than that?? Has anyone come across a programmatic way of querying the Octopus data?

(HA is not much good here btw - no knowledge of the adjustments, and quite complex to manage the time tariff data.)

D
#2408 DD

PianSom Has anyone come across a programmatic way of querying the Octopus data?

Interactively you can download your usage as a CSV in 30-min timeslots over as long a period as you want. Then you could put that in a spreadsheet and analyse it that way, or read line by line with a script.

#2409 PianSom

DD
Sadly, that would ignore the Adjustments (DFS, Power-ups etc), which will be reasonably significant

G
#2410 geoffreycoan

PianSom if you have setup the import utility meter with different tariffs (eg day, free) and swap between them for the free events, it makes a lot of the analysis easy from the energy dashboard 😁.
Just need to add the DFS payouts

D
#2411 DD

PianSom In that case you'd almost certainly have to delve into GraphQL - there's a huge amount of information available from there.

#2412 PianSom

geoffreycoan if you have setup the import utility meter with different tariffs (eg day, free) and swap between them for the free events,

Bof. Malheureusement, non. (As you must be saying now.)

I didn't do this. Maybe next year.

DD In that case you'd almost certainly have to delve into GraphQL - there's a huge amount of information available from there.

Yeah - I was hoping someone had already done this, or something like it! Hence the q.

D
#2413 DD

PianSom I've only got as far as downloading scheduled IOG charging slots.

L
#2416 Lincs_Will

As this appears to be a general Predbat setup issues thread hopefully adding my problem here is appropriate. I'm on IOG and am trying to get Predbat to updatye the plan as soon as my car is plugged in and octopus decides on it's charging slots, rather than waiting for the plan to refresh as scheduled. The relevant bits of my apps.yaml file are in the screenshots below. I thought I'd made all the necessary changes to get it to work but it doesn't recognise the car has been plugged in and waits for the next scheduled refresh of the plan to update with charging slots. Charging the car and Predbat's scheduling of charging/discharging of the house battery and the hot water immersion heater around IOG slots works fine once the plan has been updated.

I've read through the Predbat documentation to get this far. I presume I'm missing something but can't see what it is. Does anyone have any ideas?

R
#2417 Rbor

Lincs_Will The relevant bits of my apps.yaml file are in the screenshots below. I thought I'd made all the necessary changes to get it to work but it doesn't recognise the car has been plugged in and waits for the next scheduled refresh of the plan to update with charging slots.

This looks like IOG. I am not on this tariff but isn't this the way that IOG works?

There are others on IOG who may be able to help out here.

Rob

G
#2418 geoffreycoan

Lincs_Will I’ve never used the watch_list in predbat apps.yaml, but I think you haven’t selected the right set of sensors.

The key one I think you are missing for what you want to do is car_charging_planned https://springfall2008.github.io/batpred/apps-yaml/#car-charging-integration which should detect when the car is plugged in.

You probably only really need octopus_intelligent_slot set (and octopus_saving_session when DFS sessions come later this winter).

Have a read of the documentation of the different sensors and which ones you want to force a predbat plan update to occur. BTW you can always turn switch.predbat_active on at any time to force a replan in between the normal 10 minute replan cycle.

L
#2419 Lincs_Will

Rbor Yes, on the whole it works as you'd expect IOG to. However, when plugging the car in Predbat doesn't automatically update the plan. This results in the house battery draining into the car for several minutes until the next scheduled update of Predbat's plan occurs which I've set to every 5 mins. Not the end of the world but I'd like to fix it if possible. Trefor's video here explains the watch_list function but I'd clearly not implemented it correctly.

geoffreycoan

Thanks! By checking the history fo a few entities I can see that intelligent_dispatching switches on and off when IOG charging slots are reached as time goes by. I've uncommented car_charging_planned in the watch list so I'll see how that works.

#2420 PianSom

I am liking Trefor's new "p/kWh" sensor and graph.

Although the information is just the same as already available, seeing the average "in" price is nice. Look forward to putting a historic chart together for it when I have enough data.

T
#2421 TX200

What do people have the battery loss charge and battery loss discharge set to in Predbat?

0.03 is the default value.

Plus 0.04 for the inverter.

Is that about right or a bit low for GivEnergy. I've read circa 15-20% round trip loss?

Mines a hybrid, so it'll prefer to charge from solar (lol right now eh!).

I've tweaked the battery values up slightly to 0.04, which I assume gives 12-16% loss (depending on how you calculate it?).

Wasn't sure if it is battery charge loss + inverter loss + battery discharge loss + inverter loss, or just the three values (e.g. inverter loss once not twice).

G
#2422 geoffreycoan

TX200 What do people have the battery loss charge and battery loss discharge set to in Predbat?

My inverter loss is 0.04, my battery charge loss is 0.055 and discharge loss 0.05. There was a reason for this but I can’t remember what it is.

I’ve heard different estimates of 10-20% round trip, so have tended to think of it at the mid-point of 15%, but I think it all depends on how and where you measure the figures (got a feeling that battery charge and discharge figures are measured on the DC side, so after DC to AC conversion), but this may be wrong.

I believe the inverter loss is the AC to and from DC conversion, so if you are charging a hybrid inverter from solar then there is no inverter loss, but when discharging you will incur the power conversion loss. AC coupled and AIO’s are more consistent as they will incur the losses both ways round.

But it’s all a guess anyway. Solar generation, house load, losses, etc. As long as it’s broadly the right direction …

R
#2423 Rbor

TX200 I have an AC3.0 inverter so I have additional losses compared to hybrid inverters for PV into the battery (DC->AC->DC). But checking back, most of my PV goes into my house load or out as excess to the grid.

I currently use 0.04, 0.04, 0.04 but, as geoffreycoan stated, it is all inspired guesswork.

Rob

S
#2424 Sandy

I have been finding recently that my home cost prediction is reliably giving me numbers for best and best 10 that are higher than the base, by a fair bit in some cases. Any idea why? My daily spend has gone up a lot too. I feel like I must have something configured wrong here!

#2425 PianSom

TX200
On my AIO I am using 5%, 5%, 5%

G
#2426 geoffreycoan

Sandy have been finding recently that my home cost prediction is reliably giving me numbers for best and best 10 that are higher than the base, by a fair bit in some cases. Any idea why? My daily spend has gone up a lot too. I feel like I must have something configured wrong here!

Best should be the best optimisation that Predbat can find, and should be better than the base.

Can you share your plan so we can see what’s planned to happen?

S
#2427 Sandy

geoffreycoan
Absolutely

and heres the cost prediction

J
#2428 Jellybaby

How am I supposed to set a long charge slot with limited speed if this thing keeps resetting charge/discharge to 6,000w every 5 minutes?

What settings did people need to change for the AIO?

G
#2429 geoffreycoan

Sandy

It’s a weird one. As you say the cost plan shows best and best10 being above base and base10 which doesn’t make logical sense when you think about it.

The plan itself looks fine, Predbat is charging at the cheapest slots it can find overnight, it’s not charging too much and is leaving room for solar charging during the day. The battery doesn’t run out at all, and there are periods where Predbat holds the battery SoC (freeze charge) and lets the house run off grid - in these cases its cheaper to do that than to charge the battery and then discharge it again later on.

All in all the plan is fine.

I’m thinking this is a problem with the interpretation of the cost chart. The chart shows cost increasing overnight when Predbat charges your battery and in the base plan the battery wouldn’t be charged so cost wouldn’t increase.
Through the plan your battery therefore has more SoC than the base plan would have, and its gaining this extra SoC is the cause of the extra cost. The cost graph itself shows just cost incurred and doesn’t ‘value’ the extra SoC, and of course that extra SoC has a value because it will prevent future grid import for home demand, its just the cost plan doesn’t show that.

I wouldn’t worry about it, your plan looks fine to me. If you wanted to reduce the amount of SoC that Predbat plans to keep in the battery you can reduce best_soc_keep, but given how bad agile prices have been, its no bad thing to keep some SoC retained.

(and thanks BTW for sharing the plan and cost graph, makes looking at a query like this nice and easy)

Jellybaby How am I supposed to set a long charge slot with limited speed if this thing keeps resetting charge/discharge to 6,000w every 5 minutes?

What settings did people need to change for the AIO?

RTFM !

Predbat is controlling your battery and inverter, if you make manual changes yourself directly through GivTCP or the GivEnergy app then Predbat is liable to change them to match the plan it is executing.

If you want Predbat to execute a long charge slot set, turn on switch.Predbat_set_charge_low_power https://springfall2008.github.io/batpred/customisation/#inverter-control-options

AIO specific settings are in the inverter installation instructions https://springfall2008.github.io/batpred/inverter-setup/#givenergy-with-givtcp

L
#2430 Lincs_Will

Morning all. For some reason Predbat stopped working for me last night. I checked the Givenergy app this morning and was surprised to discover the house battery hadn't charged. The Predbat plan hadn't updated since 2140 yesterday. I restarted Home Assistant (installed as a VM in my Synology NAS) and the errors in the Predbat log after the restart are the same as in the period 2140-2145 last night. Log file extract pasted below. Hoping someone can tell me what it means as I've not changed anything on the NAS or router or updated any HA add-ons/integrations.

2024-11-07 06:53:10.790196: Error: Traceback (most recent call last):
10101 2024-11-07 06:53:10.789776: Error: Web Socket exception in startup: 502, message='Invalid response status', url=URL('http://supervisor/core/api/websocket')
10099 2024-11-07 06:53:05.765726: Warn: Web Socket closed, will try to reconnect in 5 seconds
10097 aiohttp.client_exceptions.W SServerHandshakeError: 502, message='Invalid response status', url=URL('http://supervisor/core/api/websocket')
10096 raise WSServerHandshake Error(

I'm away from home at the moment. Despite being able to connect to the NAS and view files on it a restart of the NAS fixed the problem and Predbat is now planning again. I'd still appreciate someone telling me what the above errors mean though. I wonder if I can set up some sort of warning so I get notified if it happens again.

#2431 PianSom

Lincs_Will
I had a similar thing happen to me, as a one-off a couple of weeks ago. I restarted Predbat and it hasn’t re-occurred. Yet!

R
#2432 Rbor

Sandy geoffreycoan
The plan looks fine.
This is my cost chart and it is similar to yours (providing that I don't have a problem):

geoffreycoan Think that Geoffrey has interpreted what the cost chart is showing:

The cost graph itself shows just cost incurred and doesn’t ‘value’ the extra SoC, and of course that extra SoC has a value because it will prevent future grid import for home demand, its just the cost plan doesn’t show that.

Rob

Rob

D
#2433 Daveb01

Jellybaby

Hi yah, this is what I was trying to say, I was having a similar issue when I first went to Predbat, it was not doing what I wanted it to, because I was thinking about what I used to do. Now I just let it get on with it now I have the correct settings on Apps.yaml.

I am happy to share my apps.yaml & GE inverter Control etc, to help you set it up for an AIO.
I also have my inverter control settings in a card so I can see what Predbat is setting it to, but don’t touch it once you have set it up. Only change one thing at a time so you can observe the new Predbat predictions and controls etc.

I have only used the manual charge once, and have set a date in the charge and discharge code so it only does it once not every day etc. the manual thing is really an emergency in my opinion.

The guys on here have helped me get it all working even if they have not had an AIO and I am happy to pass this info on to you to save you experimenting and getting frustrated.

R
#2434 Rbor

Sandy geoffreycoan
Is the crux that you can't look solely at the 'Home cost chart' without considering the 'Battery SOC chart'? These are my two charts as of 11 am today (7th Nov):

Although Best and Best 10 are shown as costing more, the money has been spent filling the battery, whereas Base and Base 10 results in an empty battery and will continue to do so until the November murk lifts (9 days in with no sun here!)
I hope that I am correct.

Having been on Predbat for 9 months, I think I am finally able to interest these charts and to understand what Best, Base, etc mean.
Please correct me if I am wrong!

Comparing the two, 'best' and 'best 10' do indeed show as costing more than 'base' and 'base 10'.
But Base and Base 10 are not costing because they are using the battery. Once the battery has emptied, the grid has to be used and the Base curves start to rise. They only level off during daylight hours when it is assumed that there is enough PV energy for the house load.

Rob
(Resident Predbat numpty)

G
#2435 geoffreycoan

Rbor Is the crux that you can't look solely at the 'Home cost chart' without considering the 'Battery SOC chart'?
Although Best and Best 10 are shown as costing more, the money has been spent filling the battery, whereas Base and Base 10 results in an empty battery and will continue to do so until the November murk lifts (9 days in with no sun here!)
I hope that I am correct.

Yep good point about needing to look at both charts together. I agree with your analysis.

Lincs_Will I very occasionally get issues with bits of Predbat and GivTCP stopping working. Predbat itself is now pretty good at restarting GivTCP if it spots it then it can restart GivTCP, but if Predbat dies or goes into la-la land there’s nothing ‘in the box’ that spots this.

I have written a couple of automations, shared in the Predbat documentation that detect GivTCP, MQTT or Predbat issues, including the case of ‘stale plan’ where Predbat just dies and doesn’t update the plan.

https://springfall2008.github.io/batpred/output-data/#automated-monitoring-that-predbat-and-givtcp-are-running-ok

R
#2436 Rbor

geoffreycoan Yep good point about needing to look at both charts together. I agree with your analysis.

Phew. At this rate, I may graduate from my Predbat Numpty status.

Rob

T
#2437 The Black Cat

Daveb01 I am happy to share my apps.yaml & GE inverter Control etc, to help you set it up for an AIO.
I also have my inverter control settings in a card so I can see what Predbat is setting it to, but don’t touch it once you have set it up. Only change one thing at a time so you can observe the new Predbat predictions and controls etc.

If you could share your setup, I'm sure it would be very useful to all AIO owners.

J
#2438 Jellybaby

Daveb01 Honestly I don't know if its worth it if it does all its charging based off current SOC cause it will never ever EVER fill up to 100% within cheapest periods

EDIT
Thought id try out control charge/discharge

Its only going to charge twice between now and this time tomorrow

D
#2439 Daveb01

Jellybaby

You’re still thinking old school. Mine is the same as I posted, it charges when it needs to. You need to consider the conversion loss, Predbat does and will not charge if it does not need to, it also considers if you need to export. Mine has not exported for over 7 days because of the weather. It’s keeping my costs down.

Because I have 2 x AIO I could charge at 12 kWh and export at 12 kWh, however I have set a limit to only discharge at 6 kWh and charge at 10 kWh. Predbat also adjusts the charge when it gets closer to 100%.

To be honest, if you would like to give it a go I am willing to help, if you want to just charge and discharge fully most days please continue the way you are today 👍😀

This was one earlier in the year (very good day)

D
#2440 Daveb01

The Black Cat

Hi yah, I am not sure where you are or what stage your at with HA etc. I have two posts

One is setting up hardware etc. HA Green/Yellow, Pi, PC, NAS etc. then to install apps to get to Predbat.
The second 0ne is setting up Predbat ready for Read Only, then when your ready go for Control Harte/discharge.

If you are already on HA, I can share the settings I use for AIO and the controls I have set for the inverter.
(Mine will now be a bit different as I know have 2 x AIO and all the setting are now on the Gateway.

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

https://community.givenergy.cloud/d/4996-basic-config-of-predbat-after-staring-from-scratch/215

J
#2441 Jellybaby

Daveb01 That black card is very nice, on the charging thing id just feel a lot more comfortable if 20% didn't keep equaling 1kwh.

Hilarious that it thinks battery will last til 4am when it doesnt last til 2 and thats when mum didnt use the electric shower lol

Ill wait for prices to settle before trying to figure it out.

G
#2442 geoffreycoan

Jellybaby Hilarious that it thinks battery will last til 4am when it doesnt last til 2 and thats when mum didnt use the electric shower lol

Predbat usually is pretty good at predicting how long the battery will last for.

But it does rely on:

  • correct setting of the battery size (including battery scaling if its an AIO or 5.2)
  • decent load history. What have you set days_previous to in apps.yaml, and have you been running givtcp that long to enable the history to build up
  • inverter and battery losses being ‘about right’

If you keep on running out of SoC prematurely then usually its one of these that needs tweaking

J
#2443 Jellybaby

geoffreycoan I only run out prematurely because the SOC tracking sucks, last two nights from fresh 4>100% charges the last 20-25% has been about 1-1.5kwh which isnt right and thats from the portal not givtcp or predbat, out of ~ every flat to full 14.2-14.5kwh of charge I get around around 1.2-5kwh less than that to use

Previous days has both 7 and 1 listed and ive been running home assistant all year so months of data.

EDIT
Right this minute im on 27% SOC remaining after 14.2kwh 4>100% ive used so far10.9 which should leave 3.3kwh and remove the 4% reserve that leaves you with 23% remaining which based on the charge amount is 3.266kwh but I know its not going to be exact but im waiting for it to hit 20% so I can see how fast it tanks compared to teh last 2 nights.

Currently I am on 307.83v.

R
#2444 Rbor

Jellybaby We need more info on your system and settings.

  • What is your battery? I am unsure what you mean by 14.2kwh 4>100%.
  • In your apps.yaml, do you have setting for battery_scaling?
  • In Control/input variables, what are your battery and inverter losses set at?

Thanks

Rob

M
#2445 matttheotter

Evening All,

Now that I am all swapped over to IOG I want someone to confirm my logic for sorting out my parents AIO.

Eventually I will need to get them their own HA install sorted on something like a Pi, but in the interim I am thinking I can spin up a second Predbat instance on my Proxmox server.

Configure it with GE_Cloud and have that manage their AIO?

One of the issues that we have spotted is they are capable of draining their battery much faster than expected (yeah 13.5kW in a day due to electric showers, induction hob and oven).

My Dad is pretty good at having stuff run at night when rates are "lower" all be it not by much atm, however running the default Giv system it is just pulling from the battery when the charge cycle stops.

I am sure @geoffreycoan you mentioned the polling frequency on GE_Cloud is quite high compared to Giv_TCP?

J
#2446 Jellybaby

Rbor Yes, 14.2kwh is from 4>100%, flat to full charge on the AIO for last night. Ill have a look but thought id stick this in here for example on the SOC starting to drop faster closer it gets to 4%

As I mentioned this is all outside of predbat, predbat can't fix SOC issue and if it gets low and and puts a charge in and it only goes up by half of what it expected what happens then?

I have months of data to look back on, maybe I should just leave it in read only for a week but so far it still thinks my battery is going to last til gone 2am lol

Oh better add this

EDIT
Finally hit 4%

Do I need to change anything in the yaml bit I posted at all?

R
#2447 Rbor

Jellybaby Thanks. this info is really useful.
This is what I think is happening and how you may be able to fix things.
First, for context, see the Predbat documentation about battery scaling, a setting that is needed in apps.yaml for AIO.
https://springfall2008.github.io/batpred/apps-yaml/#battery-size-scaling
The clue for me was your quoted SOC of 14.2 kWh.
Also your GE power graph wasn't in line with your Predbat plan. From this, you were getting to 20% SOC at about midnight and would have reached 0% at about 03:30 am.
Have a look at the 'Battery chart' in the Predbat WebUI.
You should see a green horizontal line showing your battery capacity. For an AIO, this should be 13.5 kWh. I suspect that yours is showing 15.9 kWh.

This should resolve your problem.

  • An AIO has a working capacity of 13.5 kWh

  • Predbat reads the SOC in an AIO as 15.9 kWh

  • A 'correction' battery scaling value of 0.85 in needed in your apps.yaml:

    battery_scaling:
      - 0.85

    It doesn't matter where you place these 2 lines. Be very careful that you get the indentation correct.

  • Without the battery scaling line, when you reach 20% SOC in your Predbat plan,
    Predbat is working on 0.8 * 15.9 = 12.72 kWh used with 15.9 – 12.72 = 3.18 kWh remaining.

  • As the AIO has a working capacity of 13.5 kWh, the actual capacity remaining is 13.5 – 12.72 = 0.78 kWh
    So the battery is very nearly empty and this is before considering 4%

I hope that makes sense and that my logic is correct.

It is worth looking through the documentation again carefully, especially the sections of installing and apps.yaml.
Feel free to upload your apps.yaml file after adding the battery scaling lines so that we can see what you have.

I look forwards to hearing whether this has worked.

There is a whole thread on setting up the AIO which was initiated by @Daveb01.
See the previous comment by Daveb01 within this thread for details.
Especially have a look at the 2nd thread: starting at about #106 where battery scaling is being discussed.
https://community.givenergy.cloud/d/4996-basic-config-of-predbat-after-staring-from-scratch/215
It may also depend on whether you are running givTCP 2.4.9 or givTCP 3 but let's get this issue sorted first.

@"Daveb01" may be able to help you further.

Rob

G
#2448 geoffreycoan

matttheotter Configure it with GE_Cloud and have that manage their AIO?

One of the issues that we have spotted is they are capable of draining their battery much faster than expected (yeah 13.5kW in a day due to electric showers, induction hob and oven).

I am sure @geoffreycoan you mentioned the polling frequency on GE_Cloud is quite high compared to Giv_TCP?

Yes this would work Matt, you remotely control their AIO via the GivEnergy cloud. Relies on their inverter having a decent internet connection and the GivEnergy servers working, but that’s no different to MyEnergyOptimiser, Octopus R&D or WonderWatt.

The only limitation is that the inverter only sends data to the GE cloud every 5 minute so if there’s a big change in load or solar generation then Predbat won’t see it, but it’ll work. Given Predbat only runs every 5 minutes anyway it’s not a major failing.

We probably all have similar problems with electric showers, ovens, the iron, etc that all gobble up electricity unexpectedly. Usually when there’s a peak period of Agile rates coming up leading me to ‘SoC anxiety’ ! Keep a decent number of days_previous (I average 2 through to 8) and increase best_soc_keep to give some buffer space in the battery is about all you can do.

Jellybaby Ah yes, I forgot you’re suffering from the AIO SoC drops. Not a great deal Predbat can do to correctly predict these behaviours. Again if you increase best_soc_keep it will plan on extra buffer space in the battery but yeah, SoC drops it will just have to deal with when they happen.

M
#2449 matttheotter

geoffreycoan thanks for replying on GH this morning, pasting my yaml config over highlighted I hadn’t removed the #

Yeah, Predbat via GE Cloud will be similar to WonderWatt, but I’ll be able to keep an eye on it all for them as they’re just not into the detail 😆

D
#2451 Daveb01

Jellybaby

Here is my apps.yaml. I have highlighted the sections you need to change to 1 x AIO or as per the documentation from Geoffrey.

Change GW to your AIO inverter S/N etc

In GivTCP I have named my inverters and not left them as GivTCP1, 2, 3 etc mine is AIO-1, AIO-2 & GW

Battery scaling should be 0.85, I have mine set differently as 2 x AIO again.

------------------------------------------------------------------

This is an example configuration, please modify it

------------------------------------------------------------------


pred_bat:
module: predbat
class: PredBat

Sets the prefix for all created entities in HA - only change if you want to run more than once instance

prefix: predbat

Timezone to work in

timezone: Europe/London

Currency, symbol for main currency second symbol for 1/100s e.g. $ c or £ p or e c

currency_symbols:

  • '£'

  • 'p'

    Number of threads to use in plan calculation

    Can be auto for automatic, 0 for off or values 1-N for a fixed number

    threads: auto

    If you are using Predbat outside of HA then set the HA URL and Key (long lived access token here)

    #ha_url: 'htt:homeassistant.local:8123'
    #ha_key: 'xxx'

    Set to auto-match with a GivEnergy serial number, but you can override the serial or the sensor names

    if it doesn't work or if you have more than one inverter you will need to list both

    geserial: 'gw2316g235'
    #geserial2: 're:sensor.givtcp2(.+)soc_kwh'

    Sets the maximum period of zero load before the gap is filled, default 30 minutes

    To disable set it to 1440

    load_filter_threshold: 30

    #

    Sensors, more than one can be specified and they will be summed up automatically

    #

    For two inverters the load today would normally be the master load sensor only (to cover the entire house)

    If you have three phase and one inverter per phase then you would need three load sensors

    #

    For pv_today if you have multiple solar inverter inputs then you should include one entry for each inverter

    #
    load_today:

    • sensor.gw{geserial}load_energy_today_kwh
      import_today:
    • sensor.gw{geserial}import_energy_today_kwh
      export_today:
    • sensor.gw{geserial}export_energy_today_kwh
      pv_today:
    • sensor.gw{geserial}pv_energy_today_kwh

    Load forecast can be used to add to the historical load data (heat-pump)

    To link to Predheat

    Data must be in the format of 'last_updated' timestamp and 'energy' for incrementing kWh

    #load_forecast:

    - predheat.heat_energy$external

    #

    If you enable ge_cloud_data then the load/import and export data will be fetches from the GE cloud instead of from GivTCP sensors

    this is usually less efficient and of course prone to internet downtime, but could be useful if you lost your GivTCP data

    Set the serial to the inverter serial to pull the data from and the key to your API key

    When this is set load_today, import_today and export_today are not used

    #
    ge_cloud_data: False
    ge_cloud_serial: '{geserial}'
    ge_cloud_key: 'xxxx'
    #

    Controls/status - must by 1 per inverter

    #
    num_inverters: 1
    #

    Run balance inverters every N seconds (0=disabled) - only for multi-inverter

    balance_inverters_seconds: 60
    #

    When set use the REST API rather than HA entity for control, should be more reliable/faster to control

    Set one per inverter

    If using Docker then change homeassistant.local to the Docker IP address

    givtcp_rest:

    When enabled automatic restart will restart the add-on if communication fails

    Example below is auto-restart for GivTCP add-on itself

    #auto_restart:

    - shell: 'rm -rf /homeassistant/GivTCP/*.pkl'

    - service: hassio/addon_restart

    addon: a6a2857d_givtcp

    Example on how to restart the inverter via GivTCP

    - service: switch.turn_on

    entity_id: switch.givtcp{geserial}reboot_invertor

    If not using REST then instead set the Control here (one for each inverter)

    You should keep this section even when using REST as a fallback if it fails and for charge curve calculations

    charge_rate:

    • number.gw{geserial}battery_charge_rate

      - number.givtcp2{geserial2}battery_charge_rate

      discharge_rate:
    • number.gw{geserial}battery_discharge_rate

      - number.givtcp2{geserial2}battery_discharge_rate

      battery_power:
    • sensor.gw{geserial}battery_power

      - sensor.givtcp2{geserial2}battery_power

      pv_power:
    • sensor.gw{geserial}pv_power

      - sensor.givtcp2{geserial2}pv_power

      load_power:
    • sensor.gw{geserial}load_power

      - sensor.givtcp2{geserial2}load_power

      soc_kw:
    • sensor.gw{geserial}soc_kwh

      - sensor.givtcp2{geserial2}soc_kwh

      soc_max:
    • sensor.gw{geserial}battery_capacity_kwh

      - sensor.givtcp2{geserial2}battery_capacity_kwh

      reserve:
    • number.gw{geserial}battery_power_reserve

      - number.givtcp2{geserial2}battery_power_reserve

      inverter_mode:
    • select.gw{geserial}mode

      - select.givtcp2{geserial2}mode

      inverter_time:
    • sensor.gw{geserial}invertor_time

      - sensor.givtcp2{geserial2}invertor_time

      charge_start_time:
    • select.gw{geserial}charge_start_time_slot_1

      - select.givtcp2{geserial2}charge_start_time_slot_1

      charge_end_time:
    • select.gw{geserial}charge_end_time_slot_1

      - select.givtcp2{geserial2}charge_end_time_slot_1

      charge_limit:
    • number.gw{geserial}target_soc

      - number.givtcp2{geserial2}target_soc

      scheduled_charge_enable:
    • switch.gw{geserial}enable_charge_schedule

      - switch.givtcp2{geserial2}enable_charge_schedule

      scheduled_discharge_enable:
    • switch.gw{geserial}enable_discharge_schedule

      - switch.givtcp2{geserial2}enable_discharge_schedule

      discharge_start_time:
    • select.gw{geserial}discharge_start_time_slot_1

      - select.givtcp2{geserial2}discharge_start_time_slot_1

      discharge_end_time:
    • select.gw{geserial}discharge_end_time_slot_1

      - select.givtcp2{geserial2}discharge_end_time_slot_1

    Pause mode is not supported by all firmware's and will be ignored if not present

    pause_mode:

  • select.gw{geserial}battery_pause_mode

    - select.givtcp{geserial2}battery_pause_mode

    Not all firmwares support pause start/end time, delete these if not supported

    to avoid spurious writes/warnings

    pause_start_time:

  • select.gw{geserial}battery_pause_start_time_slot

    - select.givtcp2{geserial2}battery_pause_start_time_slot

    pause_end_time:

  • select.gw{geserial}battery_pause_end_time_slot

    - select.givtcp2{geserial2}battery_pause_end_time_slot

    Inverter max AC limit (one per inverter). E.g for a 3.6kw inverter set to 3600

    If you have a second inverter for PV only please add the two values together

    inverter_limit:

  • 12000

    Export limit is a software limit set on your inverter that prevents exporting above a given level

    When enabled Predbat will model this limit

    export_limit:

    - 6000

    **inverter_limit_charge:

  • 10000


    inverter_limit_discharge:

  • 6000**


    Some inverters don't turn off when the rate is set to 0, still charge or discharge at around 200w

    The value can be set here in watts to model this (doesn't change operation)

    inverter_battery_rate_min:

    - 200

    Workaround to limit the maximum reserve setting, some inverters won't allow 100% to be set

    Comment out if your inverter allows 100%

    inverter_reserve_max: 100

    Some batteries tail off their charge rate at high soc%

    enter the charging curve here as a % of the max charge rate for each soc percentage.

    the default is 1.0 (full power)

    The example below is from GE 9.5kwh battery with latest firmware and gen1 inverter

    #

    Predbat can compute this curve automatically if you have enough data, restart the add-on and look in the logfile for the data

    once set here Predbat will no longer re-compute the curve.

    Can also be set to 'auto' to just use the calculation curve, not recommended if you are using low power charging mode.

    battery_charge_power_curve:
    91 : 0.91
    92 : 0.81
    93 : 0.71
    94 : 0.62
    95 : 0.52
    96 : 0.43
    97 : 0.33
    98 : 0.24
    99 : 0.24
    100 : 0.24
    #battery_discharge_power_curve:

    4 : 1.0

    Inverter clock skew in minutes, e.g. 1 means it's 1 minute fast and -1 is 1 minute slow

    Separate start and end options are applied to the start and end time windows, mostly as you want to start late (not early) and finish early (not late)

    Separate discharge skew for discharge windows only

    inverter_clock_skew_start: 0
    inverter_clock_skew_end: 0
    inverter_clock_skew_discharge_start: 0
    inverter_clock_skew_discharge_end: 0

    Clock skew adjusts the Appdaemon time

    This is the time that Predbat takes actions like starting discharge/charging

    Only use this for workarounds if your inverter time is correct but Predbat is somehow wrong (AppDaemon issue)

    1 means add 1 minute to AppDaemon time, -1 takes it away

    clock_skew: 0

    Solcast cloud interface, set this or the local interface below

    solcast_host: 'https://api.solcast.com.au/'

    solcast_api_key: 'https://api.solcast.com.au/rooftop_sites/c5f7-acd2-9a16-1943/forecasts?format=json'

    solcast_poll_hours: 8

    Set these to match solcast sensor names if not using the cloud interface

    The regular expression (re🙂 makes the solcast bit optional

    If these don't match find your own names in Home Assistant

    pv_forecast_today: re🙁sensor.(solcast|)(pv_forecast|)forecast_today)
    pv_forecast_tomorrow: re🙁sensor.(solcast|)(pv_forecast|)forecast_tomorrow)
    pv_forecast_d3: re🙁sensor.(solcast|)(pv_forecast|)forecast(day_3|d3))
    pv_forecast_d4: re🙁sensor.(solcast
    |)(pv_forecast|)forecast(day_4|d4))

    car_charging_energy defines an incrementing sensor which measures the charge added to your car

    is used for car_charging_hold feature to filter out car charging from the previous load data

    Automatically set to detect Wallbox and Zappi, if it doesn't match manually enter your sensor name

    Also adjust car_charging_energy_scale if it's not in kwH to fix the units

    car_charging_energy: 're🙁sensor.myenergi_zappi[0-9a-z]+charge_added_session|sensor.wallbox_portal_added_energy)'

    Defines the number of cars modelled by the system, set to 0 for no car

    num_cars: 0

    car_charging_planned is set to a sensor which when positive indicates the car will charged in the upcoming low rate slots

    This should not be needed if you use Intelligent Octopus slots which will take priority if enabled

    The list of possible values is in car_charging_planned_response

    Auto matches Zappi and Wallbox, or change it for your own

    One entry per car

    car_charging_planned:

    • 're🙁sensor.wallbox_portal_status_description|sensor.myenergi_zappi[0-9a-z]+plug_status)'

    car_charging_planned_response:

    • 'yes'
    • 'on'
    • 'true'
    • 'connected'
    • 'ev connected'
    • 'charging'
    • 'paused'
    • 'waiting for car demand'
    • 'waiting for ev'
    • 'scheduled'
    • 'enabled'
    • 'latched'
    • 'locked'
    • 'plugged in'

    In some cases car planning is difficult (e.g. Ohme with Intelligent doesn't report slots)

    The car charging now can be set to a sensor to indicate the car is charging and to plan

    for it to charge during this 30 minute slot

    #car_charging_now:

    - off

    Positive responses for car_charging_now

    car_charging_now_response:

    • 'yes'
    • 'on'
    • 'true'

    To make planned car charging more accurate, either using car_charging_planned or the Octopus Energy plugin,

    specify your battery size in kwh, charge limit % and current car battery soc % sensors/values.

    If you have Intelligent Octopus the battery size and limit will be extracted from the Octopus Energy plugin directly.

    Set the car SOC% if you have it to give an accurate forecast of the cars battery levels.

    One entry per car if you have multiple cars.

    #car_charging_battery_size:

    - 75

    #car_charging_limit:

    - 're:number.tsunami_charge_limit'

    #car_charging_soc:

    - 're:sensor.tsunami_battery'

    One per car, when true only one car can charge at once, when False multiple cars can charge at once

    #car_charging_exclusive:

    - True

    If you have Octopus intelligent, enable the intelligent slot information to add to pricing

    Will automatically disable if not found, or comment out to disable fully

    When enabled it overrides the 'car_charging_planned' feature and predict the car charging based on the intelligent plan (unless octopus intelligent charging is False)

    This matches either the intelligent slot from the Octopus Plugin or from the Intelligent plugin

    octopus_intelligent_slot: 're🙁binary_sensor.octopus_energy([0-9a-z]+|)intelligent_dispatching)'
    octopus_ready_time: 're🙁time.octopus_energy([0-9a-z]+|)intelligent_ready_time)'
    octopus_charge_limit: 're🙁number.octopus_energy([0-9a-z]+|)intelligent_charge_limit)'

    Example alternative configuration for Ohme integration release >=v0.6.1

    #octopus_intelligent_slot: 'binary_sensor.ohme_slot_active'
    #octopus_ready_time: 'time.ohme_target_time'
    #octopus_charge_limit: 'number.ohme_target_percent'

    Carbon Intensity data from National grid

    carbon_intensity: 're🙁sensor.carbon_intensity_uk)'

    Octopus saving session points to the saving session Sensor in the Octopus plugin, when enabled saving sessions will be at the assumed

    Rate is read automatically from the add-in and converted to pence using the conversion rate below (default is 8)

    octopus_saving_session: 're🙁binary_sensor.octopus_energy([0-9a-z]+|)saving_session(s|))'
    octopus_saving_session_octopoints_per_penny: 8

    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)'

    Standing charge in pounds, can be set to a sensor or manually entered (e.g. 0.50 is 50p)

    The default below will pick up the standing charge from the Octopus Plugin

    The standing charge only impacts the cost graphs and doesn't change the way Predbat plans

    If you don't want to show the standing charge then just delete this line or set to zero

    metric_standing_charge: 're🙁sensor.(octopus_energy|)electricity[0-9a-z]+[0-9a-z]+current_standing_charge)'

    Or set your actual rates across time for import and export

    If start/end is missing it's assumed to be a fixed rate

    Gaps are filled with zero rate

    #rates_import:

    - start: "00:30:00"

    end: "04:30:00"

    rate: 7.5

    - start: "04:30:00"

    end: "00:30:00"

    rate: 40.0

    #
    #rates_export:

    - rate: 4.2

    Can be used instead of the plugin to get import rates directly online

    Overrides metric_octopus_import and rates_import

    rates_import_octopus_url : "https://api.octopus.energy/v1/products/FLUX-IMPORT-23-02-14/electricity-tariffs/E-1R-FLUX-IMPORT-23-02-14-A/standard-unit-rates"

    rates_import_octopus_url : "https://api.octopus.energy/v1/products/AGILE-FLEX-BB-23-02-08/electricity-tariffs/E-1R-AGILE-FLEX-BB-23-02-08-A/standard-unit-rates"

    Overrides metric_octopus_export and rates_export

    rates_export_octopus_url: "https://api.octopus.energy/v1/products/FLUX-EXPORT-BB-23-02-14/electricity-tariffs/E-1R-FLUX-EXPORT-BB-23-02-14-A/standard-unit-rates"

    rates_export_octopus_url: "https://api.octopus.energy/v1/products/AGILE-OUTGOING-BB-23-02-28/electricity-tariffs/E-1R-AGILE-OUTGOING-BB-23-02-28-A/standard-unit-rates/"

    rates_export_octopus_url: "https://api.octopus.energy/v1/products/OUTGOING-FIX-12M-BB-23-02-09/electricity-tariffs/E-1R-OUTGOING-FIX-12M-BB-23-02-09-A/standard-unit-rates/"

    Import rates can be overridden with rate_import_override

    Export rates can be overridden with rate_export_override

    Use the same format as above, but a date can be included if it just applies for a set day (e.g. Octopus power ups)

    This will override even the Octopus plugin rates if enabled

    #
    rates_import_override:

  • date: '2024-10-20'
    start: '13:00:00'
    end: '14:00:00'
    rate: 0
    load_scaling: 1.0

    rates_export_override:

  • date: '2024-10-20'
    start: '17:00:00'
    end: '19:00:00'
    rate_increment: -10


    For pv estimate, leave blank for central estimate, or add 10 for 10% curve (worst case) or 90 or 90% curve (best case)

    If you use 10 then disable pv_metric10_weight below

    pv_estimate: 10

    Days previous is the number of days back to find historical load data

    Recommended is 7 to capture day of the week but 1 can also be used

    if you have more history you could use 7 and 14 (in a list) but the standard data in HA only lasts 10 days

    days_previous:

    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8

    Days previous weight can be used to control the weighting of the previous load points, the values are multiplied by their

    weights and then divided through by the total weight. E.g. if you used 1 and 0.5 then the first value would have 2/3rd of the weight and the second 1/3rd

    Include one value for each days_previous value, each weighting on a separate line.

    If any days_previous's that are not given a weighting they will assume a default weighting of 1.

    days_previous_weight:

    • 1

    Number of hours forward to forecast, best left as-is unless you have specific reason

    forecast_hours: 48

    Specify the devices that notifies are sent to, the default is 'notify' which goes to all

    #notify_devices:

    - mobile_app_treforsiphone12_2

    Battery scaling makes the battery smaller (e.g. 0.9) or bigger than its reported

    If you have an 80% DoD battery that falsely reports it's kwh then set it to 0.8 to report the real figures

    One per inverter

    **battery_scaling:

    • 1.0059**

    Can be used to scale import and export data, used for workarounds

    import_export_scaling: 1.0

    Export triggers:

    For each trigger give a name, the minutes of export needed and the energy required in that time

    Multiple triggers can be set at once so in total you could use too much energy if all run

    Creates an entity called 'binary_sensor.predbat_export_trigger_<name>' which will be turned On when the condition is valid

    connect this to your automation to start whatever you want to trigger

    export_triggers:

    • name: 'large'
      minutes: 60
      energy: 1.0
      • name: 'small'
        minutes: 15
        energy: 0.25

    If you have a sensor that gives the energy consumed by your solar diverter then add it here

    this will make the predictions more accurate. It should be an incrementing sensor, it can reset at midnight or not

    It's assumed to be in Kwh but scaling can be applied if need be

    #iboost_energy_today: 'sensor.xxxxx'
    #iboost_energy_scaling: 1.0

    Gas rates for comparison

    #metric_octopus_gas: 're🙁sensor.(octopus_energy|)gas[0-9a-z]+[0-9a-z]+current_rate)'

    Nordpool market energy rates

    futurerate_url: 'https://dataportal-api.nordpoolgroup.com/api/DayAheadPrices?date=DATE&market=N2EX_DayAhead&deliveryArea=UK&currency=GBP'
    futurerate_adjust_import: True
    futurerate_adjust_export: False
    futurerate_peak_start: "16:00:00"
    futurerate_peak_end: "19:00:00"
    futurerate_peak_premium_import: 14
    futurerate_peak_premium_export: 6.5

    Watch list, a list of sensors to watch for changes and then update the plan if they change

    This is useful for things like the Octopus Intelligent Slot sensor so that the plan update as soon as you plugin in

    Only uncomment the items you actually have set up above in apps.yaml, of course you can add your own as well

    Note those using +[] are lists that are appended to this list, whereas {} items are single items only

    #watch_list:

    - '{octopus_intelligent_slot}'

    - '{octopus_ready_time}'

    - '{octopus_charge_limit}'

    - '{octopus_saving_session}'

    - '+[car_charging_planned]'

    - '+[car_charging_soc]'

    - '{car_charging_now}'

D
#2452 Daveb01

Sorry guys I do not know when the text is so large

D
#2453 Daveb01

Jellybaby

This is what I see in the inverter control



D
#2454 Daveb01

Jellybaby

I would also advice to move away from the GE portal, I don’t go there any more as I can see everything in HA.

I only go to the GE Cloud now to see if there is any software updates.

R
#2455 Rbor

Daveb01 To get rid of large text, please post again but with 3 back ticks : ``` on lines above and below your apps.yaml code.

Rob

D
#2457 Daveb01
# ------------------------------------------------------------------
# This is an example configuration, please modify it
# ------------------------------------------------------------------
---
pred_bat:
  module: predbat
  class: PredBat

  # Sets the prefix for all created entities in HA - only change if you want to run more than once instance
  prefix: predbat

  # Timezone to work in
  timezone: Europe/London

  # Currency, symbol for main currency second symbol for 1/100s e.g. $ c or £ p or e c
  currency_symbols:
   - '£'
   - 'p'

  # Number of threads to use in plan calculation
  # Can be auto for automatic, 0 for off or values 1-N for a fixed number
  threads: auto

  # If you are using Predbat outside of HA then set the HA URL and Key (long lived access token here)
  #ha_url: 'htt:homeassistant.local:8123'
  #ha_key: 'xxx'

  # Set to auto-match with a GivEnergy serial number, but you can override the serial or the sensor names
  # if it doesn't work or if you have more than one inverter you will need to list both
  geserial: 'gw2316g235'
  #geserial2: 're:sensor.givtcp2_(.+)_soc_kwh'

  # Sets the maximum period of zero load before the gap is filled, default 30 minutes
  # To disable set it to 1440
  load_filter_threshold: 30

  #
  # Sensors, more than one can be specified and they will be summed up automatically
  #
  # For two inverters the load today would normally be the master load sensor only (to cover the entire house)
  # If you have three phase and one inverter per phase then you would need three load sensors
  #
  # For pv_today if you have multiple solar inverter inputs then you should include one entry for each inverter
  #
  load_today:
    - sensor.gw_{geserial}_load_energy_today_kwh
  import_today:
    - sensor.gw_{geserial}_import_energy_today_kwh
  export_today:
    - sensor.gw_{geserial}_export_energy_today_kwh
  pv_today:
    - sensor.gw_{geserial}_pv_energy_today_kwh

  # Load forecast can be used to add to the historical load data (heat-pump)
  # To link to Predheat
  # Data must be in the format of 'last_updated' timestamp and 'energy' for incrementing kWh
  #load_forecast:
  #  - predheat.heat_energy$external
  #
  # If you enable ge_cloud_data then the load/import and export data will be fetches from the GE cloud instead of from GivTCP sensors
  # this is usually less efficient and of course prone to internet downtime, but could be useful if you lost your GivTCP data
  # Set the serial to the inverter serial to pull the data from and the key to your API key
  # When this is set load_today, import_today and export_today are not used
  #
  ge_cloud_data: False
  ge_cloud_serial: '{geserial}'
  ge_cloud_key: 'xxxx'
  #
  # Controls/status - must by 1 per inverter
  #
  num_inverters: 1
  #
  # Run balance inverters every N seconds (0=disabled) - only for multi-inverter
  balance_inverters_seconds: 60
  #
  # When set use the REST API rather than HA entity for control, should be more reliable/faster to control
  # Set one per inverter
  # If using Docker then change homeassistant.local to the Docker IP address
  givtcp_rest:
    - 'http://10.0.130.60:6345'
  # - 'http://homeassistant.local:6346'

  # When enabled automatic restart will restart the add-on if communication fails
  # Example below is auto-restart for GivTCP add-on itself
  #auto_restart:
  #  - shell: 'rm -rf /homeassistant/GivTCP/*.pkl'
  #  - service: hassio/addon_restart
  #    addon: a6a2857d_givtcp

  #  Example on how to restart the inverter via GivTCP
  #  - service: switch.turn_on
  #    entity_id: switch.givtcp_{geserial}_reboot_invertor

  # If not using REST then instead set the Control here (one for each inverter)
  # You should keep this section even when using REST as a fallback if it fails and for charge curve calculations
  charge_rate:
    - number.gw_{geserial}_battery_charge_rate
  # - number.givtcp2_{geserial2}_battery_charge_rate
  discharge_rate:
    - number.gw_{geserial}_battery_discharge_rate
  # - number.givtcp2_{geserial2}_battery_discharge_rate
  battery_power:
    - sensor.gw_{geserial}_battery_power
  # - sensor.givtcp2_{geserial2}_battery_power
  pv_power:
    - sensor.gw_{geserial}_pv_power
  # - sensor.givtcp2_{geserial2}_pv_power
  load_power:
    - sensor.gw_{geserial}_load_power
  # - sensor.givtcp2_{geserial2}_load_power
  soc_kw:
    - sensor.gw_{geserial}_soc_kwh
  # - sensor.givtcp2_{geserial2}_soc_kwh
  soc_max:
    - sensor.gw_{geserial}_battery_capacity_kwh
  # - sensor.givtcp2_{geserial2}_battery_capacity_kwh
  reserve:
    - number.gw_{geserial}_battery_power_reserve
  # - number.givtcp2_{geserial2}_battery_power_reserve
  inverter_mode:
    - select.gw_{geserial}_mode
  # - select.givtcp2_{geserial2}_mode
  inverter_time:
    - sensor.gw_{geserial}_invertor_time
  # - sensor.givtcp2_{geserial2}_invertor_time
  charge_start_time:
    - select.gw_{geserial}_charge_start_time_slot_1
  # - select.givtcp2_{geserial2}_charge_start_time_slot_1
  charge_end_time:
    - select.gw_{geserial}_charge_end_time_slot_1
  # - select.givtcp2_{geserial2}_charge_end_time_slot_1
  charge_limit:
    - number.gw_{geserial}_target_soc
  # - number.givtcp2_{geserial2}_target_soc
  scheduled_charge_enable:
    - switch.gw_{geserial}_enable_charge_schedule
  # - switch.givtcp2_{geserial2}_enable_charge_schedule
  scheduled_discharge_enable:
    - switch.gw_{geserial}_enable_discharge_schedule
  # - switch.givtcp2_{geserial2}_enable_discharge_schedule
  discharge_start_time:
    - select.gw_{geserial}_discharge_start_time_slot_1
  # - select.givtcp2_{geserial2}_discharge_start_time_slot_1
  discharge_end_time:
    - select.gw_{geserial}_discharge_end_time_slot_1
  # - select.givtcp2_{geserial2}_discharge_end_time_slot_1

  # Pause mode is not supported by all firmware's and will be ignored if not present
  pause_mode:
   - select.gw_{geserial}_battery_pause_mode
 # - select.givtcp_{geserial2}_battery_pause_mode

  # Not all firmwares support pause start/end time, delete these if not supported
  # to avoid spurious writes/warnings
  pause_start_time:
   - select.gw_{geserial}_battery_pause_start_time_slot
 # - select.givtcp2_{geserial2}_battery_pause_start_time_slot
  pause_end_time:
   - select.gw_{geserial}_battery_pause_end_time_slot
 # - select.givtcp2_{geserial2}_battery_pause_end_time_slot

  # Inverter max AC limit (one per inverter). E.g for a 3.6kw inverter set to 3600
  # If you have a second inverter for PV only please add the two values together
  inverter_limit:
   - 12000

  # Export limit is a software limit set on your inverter that prevents exporting above a given level
  # When enabled Predbat will model this limit
  # export_limit:
  # - 6000

  inverter_limit_charge:
   - 10000
  
  inverter_limit_discharge:
   - 6000
  
  # Some inverters don't turn off when the rate is set to 0, still charge or discharge at around 200w
  # The value can be set here in watts to model this (doesn't change operation)
  # inverter_battery_rate_min:
  #  - 200

  # Workaround to limit the maximum reserve setting, some inverters won't allow 100% to be set
  # Comment out if your inverter allows 100%
  inverter_reserve_max: 100

  # Some batteries tail off their charge rate at high soc%
  # enter the charging curve here as a % of the max charge rate for each soc percentage.
  # the default is 1.0 (full power)
  # The example below is from GE 9.5kwh battery with latest firmware and gen1 inverter
  #
  # Predbat can compute this curve automatically if you have enough data, restart the add-on and look in the logfile for the data
  # once set here Predbat will no longer re-compute the curve.
  # Can also be set to 'auto' to just use the calculation curve, not recommended if you are using low power charging mode.
  battery_charge_power_curve:
    91 : 0.91
    92 : 0.81
    93 : 0.71
    94 : 0.62
    95 : 0.52
    96 : 0.43
    97 : 0.33
    98 : 0.24
    99 : 0.24
    100 : 0.24
  #battery_discharge_power_curve:
  #  4 : 1.0

  # Inverter clock skew in minutes, e.g. 1 means it's 1 minute fast and -1 is 1 minute slow
  # Separate start and end options are applied to the start and end time windows, mostly as you want to start late (not early) and finish early (not late)
  # Separate discharge skew for discharge windows only
  inverter_clock_skew_start: 0
  inverter_clock_skew_end: 0
  inverter_clock_skew_discharge_start: 0
  inverter_clock_skew_discharge_end: 0

  # Clock skew adjusts the Appdaemon time
  # This is the time that Predbat takes actions like starting discharge/charging
  # Only use this for workarounds if your inverter time is correct but Predbat is somehow wrong (AppDaemon issue)
  # 1 means add 1 minute to AppDaemon time, -1 takes it away
  clock_skew: 0

  # Solcast cloud interface, set this or the local interface below
  # solcast_host: 'https://api.solcast.com.au/'
  # solcast_api_key: 'https://api.solcast.com.au/rooftop_sites/c5f7-acd2-9a16-1943/forecasts?format=json'
  # solcast_poll_hours: 8

  # Set these to match solcast sensor names if not using the cloud interface
  # The regular expression (re:) makes the solcast bit optional
  # If these don't match find your own names in Home Assistant
  pv_forecast_today: re:(sensor.(solcast_|)(pv_forecast_|)forecast_today)
  pv_forecast_tomorrow: re:(sensor.(solcast_|)(pv_forecast_|)forecast_tomorrow)
  pv_forecast_d3: re:(sensor.(solcast_|)(pv_forecast_|)forecast_(day_3|d3))
  pv_forecast_d4: re:(sensor.(solcast_|)(pv_forecast_|)forecast_(day_4|d4))

  # car_charging_energy defines an incrementing sensor which measures the charge added to your car
  # is used for car_charging_hold feature to filter out car charging from the previous load data
  # Automatically set to detect Wallbox and Zappi, if it doesn't match manually enter your sensor name
  # Also adjust car_charging_energy_scale if it's not in kwH to fix the units
  car_charging_energy: 're:(sensor.myenergi_zappi_[0-9a-z]+_charge_added_session|sensor.wallbox_portal_added_energy)'

  # Defines the number of cars modelled by the system, set to 0 for no car
  num_cars: 0

  # car_charging_planned is set to a sensor which when positive indicates the car will charged in the upcoming low rate slots
  # This should not be needed if you use Intelligent Octopus slots which will take priority if enabled
  # The list of possible values is in car_charging_planned_response
  # Auto matches Zappi and Wallbox, or change it for your own
  # One entry per car
  car_charging_planned:
    - 're:(sensor.wallbox_portal_status_description|sensor.myenergi_zappi_[0-9a-z]+_plug_status)'

  car_charging_planned_response:
    - 'yes'
    - 'on'
    - 'true'
    - 'connected'
    - 'ev connected'
    - 'charging'
    - 'paused'
    - 'waiting for car demand'
    - 'waiting for ev'
    - 'scheduled'
    - 'enabled'
    - 'latched'
    - 'locked'
    - 'plugged in'

  # In some cases car planning is difficult (e.g. Ohme with Intelligent doesn't report slots)
  # The car charging now can be set to a sensor to indicate the car is charging and to plan
  # for it to charge during this 30 minute slot
  #car_charging_now:
  #  - off

  # Positive responses for car_charging_now
  car_charging_now_response:
    - 'yes'
    - 'on'
    - 'true'

  # To make planned car charging more accurate, either using car_charging_planned or the Octopus Energy plugin,
  # specify your battery size in kwh, charge limit % and current car battery soc % sensors/values.
  # If you have Intelligent Octopus the battery size and limit will be extracted from the Octopus Energy plugin directly.
  # Set the car SOC% if you have it to give an accurate forecast of the cars battery levels.
  # One entry per car if you have multiple cars.
  #car_charging_battery_size:
  #  - 75
  #car_charging_limit:
  #  - 're:number.tsunami_charge_limit'
  #car_charging_soc:
  #  - 're:sensor.tsunami_battery'

  # One per car, when true only one car can charge at once, when False multiple cars can charge at once
  #car_charging_exclusive:
  #  - True

  # If you have Octopus intelligent, enable the intelligent slot information to add to pricing
  # Will automatically disable if not found, or comment out to disable fully
  # When enabled it overrides the 'car_charging_planned' feature and predict the car charging based on the intelligent plan (unless octopus intelligent charging is False)
  # This matches either the intelligent slot from the Octopus Plugin or from the Intelligent plugin
  octopus_intelligent_slot: 're:(binary_sensor.octopus_energy([0-9a-z_]+|)_intelligent_dispatching)'
  octopus_ready_time: 're:(time.octopus_energy([0-9a-z_]+|)_intelligent_ready_time)'
  octopus_charge_limit: 're:(number.octopus_energy([0-9a-z_]+|)_intelligent_charge_limit)'
  # Example alternative configuration for Ohme integration release >=v0.6.1
  #octopus_intelligent_slot: 'binary_sensor.ohme_slot_active'
  #octopus_ready_time: 'time.ohme_target_time'
  #octopus_charge_limit: 'number.ohme_target_percent'

  # Carbon Intensity data from National grid
  # carbon_intensity: 're:(sensor.carbon_intensity_uk)'

  # Octopus saving session points to the saving session Sensor in the Octopus plugin, when enabled saving sessions will be at the assumed
  # Rate is read automatically from the add-in and converted to pence using the conversion rate below (default is 8)
  octopus_saving_session: 're:(binary_sensor.octopus_energy([0-9a-z_]+|)_saving_session(s|))'
  octopus_saving_session_octopoints_per_penny: 8

  # 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)'

  # Standing charge in pounds, can be set to a sensor or manually entered (e.g. 0.50 is 50p)
  # The default below will pick up the standing charge from the Octopus Plugin
  # The standing charge only impacts the cost graphs and doesn't change the way Predbat plans
  # If you don't want to show the standing charge then just delete this line or set to zero
  # metric_standing_charge: 're:(sensor.(octopus_energy_|)electricity_[0-9a-z]+_[0-9a-z]+_current_standing_charge)'

  # Or set your actual rates across time for import and export
  # If start/end is missing it's assumed to be a fixed rate
  # Gaps are filled with zero rate
  #rates_import:
  #  -  start: "00:30:00"
  #     end: "04:30:00"
  #     rate: 7.5
  #  -  start: "04:30:00"
  #     end: "00:30:00"
  #     rate: 40.0
  #
  #rates_export:
  #  -  rate: 4.2

  # Can be used instead of the plugin to get import rates directly online
  # Overrides metric_octopus_import and rates_import
  # rates_import_octopus_url : "https://api.octopus.energy/v1/products/FLUX-IMPORT-23-02-14/electricity-tariffs/E-1R-FLUX-IMPORT-23-02-14-A/standard-unit-rates"
  # rates_import_octopus_url : "https://api.octopus.energy/v1/products/AGILE-FLEX-BB-23-02-08/electricity-tariffs/E-1R-AGILE-FLEX-BB-23-02-08-A/standard-unit-rates"

  # Overrides metric_octopus_export and rates_export
  # rates_export_octopus_url: "https://api.octopus.energy/v1/products/FLUX-EXPORT-BB-23-02-14/electricity-tariffs/E-1R-FLUX-EXPORT-BB-23-02-14-A/standard-unit-rates"
  # rates_export_octopus_url: "https://api.octopus.energy/v1/products/AGILE-OUTGOING-BB-23-02-28/electricity-tariffs/E-1R-AGILE-OUTGOING-BB-23-02-28-A/standard-unit-rates/"
  # rates_export_octopus_url: "https://api.octopus.energy/v1/products/OUTGOING-FIX-12M-BB-23-02-09/electricity-tariffs/E-1R-OUTGOING-FIX-12M-BB-23-02-09-A/standard-unit-rates/"

  # Import rates can be overridden with rate_import_override
  # Export rates can be overridden with rate_export_override
  # Use the same format as above, but a date can be included if it just applies for a set day (e.g. Octopus power ups)
  # This will override even the Octopus plugin rates if enabled
  #
  rates_import_override:
   -  date: '2024-10-20'
      start: '13:00:00'
      end: '14:00:00'
      rate: 0
      load_scaling: 1.0

  rates_export_override:
   -  date: '2024-10-20'
      start: '17:00:00'
      end: '19:00:00'
      rate_increment: -10
    
  # For pv estimate, leave blank for central estimate, or add 10 for 10% curve (worst case) or 90 or 90% curve (best case)
  # If you use 10 then disable pv_metric10_weight below
  # pv_estimate: 10

  # Days previous is the number of days back to find historical load data
  # Recommended is 7 to capture day of the week but 1 can also be used
  # if you have more history you could use 7 and 14 (in a list) but the standard data in HA only lasts 10 days
  days_previous:
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8

  # Days previous weight can be used to control the weighting of the previous load points, the values are multiplied by their
  # weights and then divided through by the total weight. E.g. if you used 1 and 0.5 then the first value would have 2/3rd of the weight and the second 1/3rd
  # Include one value for each days_previous value, each weighting on a separate line.
  # If any days_previous's that are not given a weighting they will assume a default weighting of 1.
  days_previous_weight:
    - 1

  # Number of hours forward to forecast, best left as-is unless you have specific reason
  forecast_hours: 48

  # Specify the devices that notifies are sent to, the default is 'notify' which goes to all
  #notify_devices:
  #  - mobile_app_treforsiphone12_2

  # Battery scaling makes the battery smaller (e.g. 0.9) or bigger than its reported
  # If you have an 80% DoD battery that falsely reports it's kwh then set it to 0.8 to report the real figures
  # One per inverter
  battery_scaling:
    - 1.0059

  # Can be used to scale import and export data, used for workarounds
  import_export_scaling: 1.0

  # Export triggers:
  # For each trigger give a name, the minutes of export needed and the energy required in that time
  # Multiple triggers can be set at once so in total you could use too much energy if all run
  # Creates an entity called 'binary_sensor.predbat_export_trigger_<name>' which will be turned On when the condition is valid
  # connect this to your automation to start whatever you want to trigger
  export_triggers:
     - name: 'large'
       minutes: 60
       energy: 1.0
     - name: 'small'
       minutes: 15
       energy: 0.25

  # If you have a sensor that gives the energy consumed by your solar diverter then add it here
  # this will make the predictions more accurate. It should be an incrementing sensor, it can reset at midnight or not
  # It's assumed to be in Kwh but scaling can be applied if need be
  #iboost_energy_today: 'sensor.xxxxx'
  #iboost_energy_scaling: 1.0
  # Gas rates for comparison
  #metric_octopus_gas: 're:(sensor.(octopus_energy_|)gas_[0-9a-z]+_[0-9a-z]+_current_rate)'

  # Nordpool market energy rates
  futurerate_url: 'https://dataportal-api.nordpoolgroup.com/api/DayAheadPrices?date=DATE&market=N2EX_DayAhead&deliveryArea=UK&currency=GBP'
  futurerate_adjust_import: True
  futurerate_adjust_export: False
  futurerate_peak_start: "16:00:00"
  futurerate_peak_end: "19:00:00"
  futurerate_peak_premium_import: 14
  futurerate_peak_premium_export: 6.5

  # Watch list, a list of sensors to watch for changes and then update the plan if they change
  # This is useful for things like the Octopus Intelligent Slot sensor so that the plan update as soon as you plugin in
  # Only uncomment the items you actually have set up above in apps.yaml, of course you can add your own as well
  # Note those using +[] are lists that are appended to this list, whereas {} items are single items only
  #watch_list:
  #  - '{octopus_intelligent_slot}'
  #  - '{octopus_ready_time}'
  #  - '{octopus_charge_limit}'
  #  - '{octopus_saving_session}'
  #  - '+[car_charging_planned]'
  #  - '+[car_charging_soc]'
  #  - '{car_charging_now}'
D
#2458 Daveb01

Rbor

Phew thank you I did not know about ```

I can not find a way to delete the post, after someone posts after me. Is there a way to delete an old post?

R
#2459 Rbor

Daveb01 I haven’t found a way of deleting or amending a post after the next person has posted.

Suffice to say that I have taught you a lesson.
Just don’t do it again!

Rob

G
#2460 geoffreycoan

Daveb01 A few observations/improvements to your apps.yaml config for predbat:

In comment the auto_restart (shell and service) lines. This will enable Predbat to automatically restart GivTCP if it detects an error such as a comms timeout. For quite a while I didn’t have this enabled but since enabling it it has reduced the number of times that my own givtcp automation picks up an error.

You might want to set battery_discharge_power_curve, not essential but it might give a more accurate discharge profile to the Predbat plan

Since you don’t have an EV you can comment out the car_charging_energy, car_charging_planned, car_charging_planned_response, car_charging_now_response entries in apps.yaml

Finally, export_triggers large and small are just dummy placeholder entries, if you are not running your own automations off them you can comment these out and delete the binary_sensor.predbat_export_trigger_small and _large that predbat created

And since not on IOG, can comment out the octopus_intelligent_slot, _ready_time and _charge_limit

J
#2461 Jellybaby

I have changed scaling as suggested and set days previous to 1, 2, 3, 4, 5 and 6 or have I misunderstood it and with just 7 it also went back previous 7 days?

I have used snipping tool to see how it compares later to what it was after altering settings but I did notice on last update it no longer shows it getting to 4% before the manual charging period.

R
#2462 Rbor

Jellybaby It will be interesting to see how your plan works with the scaling lines in.
There is a good explanatory section on historical days here: https://springfall2008.github.io/batpred/apps-yaml/#understanding-how-days_previous-works

This is what I have set up which mirrors in advice in the documentation above:

  days_previous:
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8

  # Days previous weight can be used to control the weighting of the previous load points, the values are multiplied by their
  # weights and then divided through by the total weight. E.g. if you used 1 and 0.5 then the first value would have 2/3rd of the weight and the second 1/3rd
  # Include one value for each days_previous value, each weighting on a separate line.
  # If any days_previous's that are not given a weighting they will assume a default weighting of 1.
  days_previous_weight:
    - 1

Rob

D
#2463 Daveb01

geoffreycoan

Sorry 😀

Q1 - I have uncommented this, do I do anything with homeassistant word e.g IP?
Q2 - do I also uncomment the bit underneath as well ?

auto_restart:
    - shell: 'rm -rf /homeassistant/GivTCP/*.pkl'
    - service: hassio/addon_restart
      addon: a6a2857d_givtcp

  #  Example on how to restart the inverter via GivTCP
  #  - service: switch.turn_on
  #    entity_id: switch.givtcp_{geserial}_reboot_invert

Q3 - do I just uncomment this and leave as default or should I look at your documentation for what’s correct?

  battery_discharge_power_curve:
    4 : 1.0
R
#2464 Rbor

Daveb01
Q1: This is what I have in my apps.yaml. You don't have to do anything else.
Q2: Leave this bit commented.

I know that the auto restart works as it does kick in every so often.

Rob

D
#2465 Daveb01

Rbor

Thank you. Q3 please? Then I am done and can restart Predbat

T
#2466 TX200

I've gone for weighting of days 6,7,8
I can't guarantee I'll do the same thing today that I did last week. Chances are if I don't put the washing machine or dishwasher on today, it'll be tomorrow. It's never every Thursday! So hopefully that'll smooth things out a bit load wise.

D
#2467 Daveb01

Daveb01
Rbor

Q4 - I have just noticed this, however is the (peak time) for set tariffs (Flex etc and normal during summer for Agile). However Agile lately has peak starting earlier. Should this be talked about on your calls with Trevor? Can it be automated on the future?

Hhhmmm just looked for to,or row and it’s back to normal now

  # Nordpool market energy rates
  futurerate_url: 'https://dataportal-api.nordpoolgroup.com/api/DayAheadPrices?date=DATE&market=N2EX_DayAhead&deliveryArea=UK&currency=GBP'
  futurerate_adjust_import: True
  futurerate_adjust_export: False
  futurerate_peak_start: "16:00:00"
  futurerate_peak_end: "19:00:00"
  futurerate_peak_premium_import: 14
  futurerate_peak_premium_export: 6.5
R
#2468 Rbor

Rbor Sorry, I missed Q3.
If the power curve is commented then predbat.log should generate a discharge curve and you cab use those values.
Easiest way to find the lines in predbat.log is to search for something, say power_curve, or even curve, until you find it.
Personally, I have looked for this in predbat.log and it seems a bit hit and miss.
I think @geoffreycoan uses auto but he can confirm.

Rob

R
#2469 Rbor

Daveb01
Q4 Peak period is definitely 16:00 to 19:00.
These lines are identical to those in my apps.yaml

The Agile rates are getting worse outside of the peak period as the windless murk continues.
There is hope for early next week for ☀️, although I have forgotten what the ☀️ looks like.
10 days now since the sun appeared – my average Nov daily generation is 2.3 kWh.

Rob

D
#2470 Daveb01

Rbor

Here is an example. Started at 15:30 - 20:00 (but I understand if it is set 16:00 - 19:00 for Agile) and the prices have created a bit.

#2471 PianSom

One day soon (probably) Winter is going to arrive. When it does named storms will doubtless start up again, and with them an increased possibility of power outages. One advantage that Tesla has over GE is its "Storm Watch" functionality - if adverse weather is forecast then the Powerwall keeps reserves up in case they are needed.

I was wondering if anyone has yet built an automation for Predbat which does this? In principle it should be pretty straightforward, but if anyone has something I'd prefer to steal+build rather than start from scratch. 🙂

Anyone ahead of me?

G
#2472 geoffreycoan

Daveb01

Q1 apart from your yaml looking mis-indented this is fine

Q2 no you don’t need to, its an example of how you could get predbat to restart the inverter via ivtcp if you found that this was necessary. I have occasionally had to manually restart the inverter but most predbat to givtcp issues are fixed by restarting givtcp

Q3 as Rob says look for the curve in your logfile. It is created when predbat starts/restarts so restart the addon if you need to make it appear
I used to use auto for a long time but have now put the proper curves in my apps.yaml. Not least because you need them if using slow overnight charging to keep the. battery warm

Q4 those peak premium are for how Predbat knows when to apply a premium uplift on the norddata market rates.
Per the Agile rates Octopus apply a premium in the peak period

J
#2473 Jellybaby

Thought I would post a wee update, the clip I took earlier with the little one snipped at 20:00.

G
#2474 geoffreycoan

Jellybaby Looks like the SoC is tracking quite well against the earlier plan

In your apps.yaml have you uncommented the norddata lines? I notice your original plan the tomorrow rates after 23:00 appeared with ?’s on them. If you uncomment the norddata lines then Predbat will use the norddata market rates that are available at about 10am onwards to predict the tomorrow prices. Without this Predbat just rolls forwards yesterday’s prices to today/tomorrow,hence the ?’s

D
#2476 Daveb01

Rbor

Thank you for this, I have updated yaml.

Newbie issue, I can not get the search function to find (predicted battery discharging curve)
How do I do this please?

What do your curve setting in yaml look like please?

R
#2477 Rbor

Strange error message for Predbat add-on log.
See below

Any ideas?
I have tried restarting Predbat add on and restarting HA.

I can't get a log for any add-ons, givTCP, MQTT of Predbat.

Thanks

Rob

J
#2478 Jellybaby

geoffreycoan I heard there was a warning against that so opted not to.

J
#2479 Jellybaby

Rbor That was a supervisor bug from the update they pushed out, you have two options, wait for next supervisor update or update HA to latest.

R
#2480 Rbor

Jellybaby I switched my pi off and back on. Am now restoring from yesterday’s backup.
I didn’t get a warning or anything. I didn’t update HA. Perhaps I should have done but panic settles in.

Providing I get back into HA, I will update HA.

So what did you see for opting out?

Rob

R
#2481 Rbor

After restoring from backup, still no luck.

I am now charging battery using the GE app for next half hour while I am updating HA!
Then to see if my add-ons reappear properly.

I hope this is not going to finish with me having to start again with a fresh HA installation, Predbat, .... everything!

☹️😢😰

Rob

R
#2482 Rbor

Update on my HA woes.
I updated to latest versions of HAOS and Core.

Predbat is now back in action. I had a scary few minutes when the load in my predbat plan was zero but the column suddenly populated and I got my working predbat plan back.

I have lost a day of historical data but I can live with that to get Predbat back.

HA is now a lot quicker and I wonder whether the strange error message indicated that my HA was corrupted.
HA had been running sluggishly for a while.

That's me done for the day.

Rob

R
#2483 Rbor

Daveb01 I will respond properly tomorrow when I get a day's historical data back after my HA issues.
I have commented out the discharge lines in my apps.yaml but predbat log cant get generate discharge curve data.

Meanwhile, open predbat log in File Editor.
Click the Search magnifying glass top right and search for 'curve'.
I may end up selecting auto!

Rob

R
#2484 Rbor

Jellybaby The bug wasn't with the Nordpool lines in apps.yaml.
There was an issue with accessing the data when Nordpool changed the URL but Trefor sorted it for us.

...... So get those Nordpool futurerate uncommented.

Rob

J
#2485 Jellybaby

Rbor supervisor update is a pushed forced update, you have no say in the matter, instead of waiting I updated as I was trying to get predbat working and it came back.

This is what im currently on

This was why I opted out of using it

EDIT
Also, what do you mean uncommented?

#2486 PianSom

Lincs_Will
Spoke too soon. Last night I had the same Predbat crash and woke this morning to an empty battery. Expensive. The first time it happened to me was Oct 5, so not a regular occurrence.

Like you, I am not a HAOS user, so @geoffreycoan 's automations are not appropriate for me, though I currently use Docker rather than VMs. I have now moved Predbat into my "naughty step" set of docker containers which have a scheduled daily restart (see here for a basic container, though this won't be appropriate for your VM). From today I will be restarting Predbat at 22.55 daily.

G
#2487 geoffreycoan

PianSom From your HA can you invoke a shell script to restart the Predbat docker container?
If so then you could use this script in place of the add-on restart thats in my automation.

In my experience Predbat hanging is very rare, maybe once every few months. Some of the hangs I experienced were I think due to VM resources; I got a series of thread starvation errors in the Predbat logs that Predbat wasn’t able to trap and then it’d just get itself very lost. The ‘stale plan’ was a way to detect this and restart Predbat if the plan wasn’t being updated regularly.

I personally didn’t see any issues with Predbat and HA last night. From looking at the logs it looks like it did what it should have done and charged up overnight on the “wonderfully cheap” overnight agile rates.

Mine says it’s running HA Core 2024.10.4, Supervisor 2024.11.2 and HAOS 13.2.

I tend to hold off installing upgrades for a few weeks to allow bugs to be found and fixed by others!

Jellybaby Uncomment means take out the # symbol before all the nordpool lines in apps.yaml
Yes there is a warning about using the nordpool data within Predbat. The terms and conditions of Nordpool do seem to not like you doing automatic scrapes of their site. Predbat uses a cache to reduce the load on their site and only starts looking for data when it’s likely to be available.
Make your own decision as to whether to use this feature or not, the disclaimer was Trefor covering himself.

Daveb01 Newbie issue, I can not get the search function to find (predicted battery discharging curve)
How do I do this please?

As Rob says, search for ‘curve’. But as I said, the charge and discharge curves are only created when Predbat starts up or is restarted for the first time. So restart the add on and you should see the curves in your logfile after the Predbat restart.
However Predbat does need your battery to have been fully discharged and fully charged in the preceding history days, if its not then it won’t have any data to create the curve from.

R
#2488 Rbor

Jellybaby

CAUTION: You may violate the terms and conditions of the Nordpool site if you use this data and
as such the authors of Predbat accept no responsibility for any violations:

I wouldn't worry about the Nordpool T&C conditions. Many of us use Nordpool and it helps Predbat to set up its plan for the 'current day', the 'following night and day'. You get Nordpool predictions from about 10 am rather than just duplicating the current day and waiting for the actual rates at about 4 pm.

The worst thing that could happen is that your access to Nordpool is taken away.
It won't crash Predbat or HA – my issue was something different and currently unknown in origin.

Also, what do you mean uncommented?

Deleting the # in apps.yaml.
The # sign signifies 'ignore what follows: for guidance'.
With no hash, HA will do as told.

 # Nordpool market energy rates
  futurerate_url: 'https://dataportal-api.nordpoolgroup.com/api/DayAheadPrices?date=DATE&market=N2EX_DayAhead&deliveryArea=UK&currency=GBP'
  futurerate_adjust_import: True
  futurerate_adjust_export: False
  futurerate_peak_start: "16:00:00"
  futurerate_peak_end: "19:00:00"
  futurerate_peak_premium_import: 14
  futurerate_peak_premium_export: 6.5

Be very careful that you get the indentation correct. Use the other apps.yaml lines as guidance.
When you delete the #, there must be two spaces before each line.
I see this as two faint dots.
If you do this before 10 am today, you will get a far more accurate plan much earlier.
(The plan will change of course after the actual rates arrive at 4pm)

Rob

#2489 PianSom

geoffreycoan From your HA can you invoke a shell script to restart the Predbat docker container?
If so then you could use this script in place of the add-on restart thats in my automation.

I'm sure I could (not least because the restart docker container script I linked to does exactly that from another container). But philosophically I prefer my containers to stand alone if at all possible. So I'll stick with a daily Predbat restart unless/until the bug is eliminated.

@Lincs_Will - bug report posted here, if you want to add/follow

D
#2490 Daveb01

geoffreycoan

Thank you as always, I think as I have just uncommented the line and my battery has not done much over the past week, it’s not showing up yet. I will try again in a few days.

If someone could post what there’s looks like in apps.yaml, then I will know what to look for.

B
#2491 Boffinboy

I am struggling to get the rate card to show with the new ppwkh status - it says the entities don’t exist. Anyone know why this would be?

G
#2493 godfreym

Boffinboy I think there is a new update coming and these entities will be created by it.

Here is the code that was previously there, if you want to try it

`type: custom:apexcharts-card
header:
show: true
title: Energy rates
show_states: true
colorize_states: true
graph_span: 72h
span:
start: day
offset: +0h
now:
show: true
series:

  • entity: predbat.grid_power_best
    name: power
    stroke_width: 1
    type: area
    opacity: 0.2
    data_generator: >
    let res = []; for (const [key, value] of
    Object.entries(entity.attributes.results)) { res.push([new
    Date(key).getTime(), value*5]); } return res.sort((a, b) => { return a[0]
    • b[0] })
  • entity: predbat.rates
    attribute: threshold
    name: Low threshold
    curve: stepline
    stroke_width: 1
  • entity: predbat.rates_export
    attribute: threshold
    name: High threshold
    curve: stepline
    stroke_width: 1
  • entity: predbat.rates
    stroke_width: 1
    curve: stepline
    name: import
    data_generator: >
    let res = []; for (const [key, value] of
    Object.entries(entity.attributes.results)) { res.push([new
    Date(key).getTime(), value]); } return res.sort((a, b) => { return a[0] -
    b[0] })
    show:
    in_header: raw
  • entity: predbat.rates_export
    stroke_width: 1
    type: area
    opacity: 0.2
    curve: stepline
    name: export
    data_generator: >
    let res = []; for (const [key, value] of
    Object.entries(entity.attributes.results)) { res.push([new
    Date(key).getTime(), value]); } return res.sort((a, b) => { return a[0] -
    b[0] })
    show:
    in_header: raw
  • entity: predbat.rates_gas
    stroke_width: 1
    type: area
    opacity: 0.2
    curve: stepline
    name: gas
    data_generator: >
    let res = []; for (const [key, value] of
    Object.entries(entity.attributes.results)) { res.push([new
    Date(key).getTime(), value]); } return res.sort((a, b) => { return a[0] -
    b[0] })
    show:
    in_header: raw
  • entity: predbat.cost_hour
    stroke_width: 1
    type: line
    curve: stepline
    name: Hourly p/kWh
    attribute: p/kWh
    extend_to: false
  • entity: predbat.cost_today
    stroke_width: 1
    type: line
    curve: stepline
    name: Today p/kWh
    attribute: p/kWh
    extend_to: false
    `
B
#2494 Boffinboy

Thanks both - makes sense - I just realised I’d taken it off main, rather than the previous release! I’ll wait for the update and try again.

B
#2495 Boffinboy

Rbor all three appear in that, that’s where I took the template from

J
#2496 Jellybaby

How do I undersell the forecasted PV generation?

Edit
nvm, figured it out, so is there a reason it doesn't fully charge in cheapest slots, between now and this time tomorrow it only wants charge in 2x 30m slots and freeze charging, also whats the difference between FrzChrg and HoldChrg? Seems im mostly running off grid when it could charge in the 18p slots and then run off battery.

This is its current plan

#2497 PianSom

Jellybaby so is there a reason it doesn't fully charge in cheapest slots, between now and this time tomorrow it only wants charge in 2x 30m slots and freeze charging, also whats the difference between FrzChrg and HoldChrg?

Although it's sometimes hard to find them, most answers are readily available if you ... RTFM! 🙂

Specifically, start with -
https://springfall2008.github.io/batpred/predbat-plan-card/#understanding-the-predbat-plan
https://springfall2008.github.io/batpred/what-does-predbat-do/#predbat-status
https://springfall2008.github.io/batpred/faq/
and take it from there.

But lots of people here are quite happy to help out if you are still confused or don't understand something you've read. You will probably get most value by referring to specific things in the docs, or when the behaviour you are seeing disagrees with something you have read there.

R
#2498 Rbor

Boffinboy I have taken a look at main and I can see these mysterious 3 entities in the code for the rates chart. They don't feature though in Devices & Services/Entities.

Can you try deleting the last three sections in the yaml code for the rates chart and see what you get?
I wonder if these entities are linked to the extra bits that he has added to the rates chart in the webUI?

If Trefor releases main as v8.5.10 without amending, we will have some issues ready for him on GitHub.

Rob

Rob

J
#2500 Jellybaby

Rbor Ill see what Sunday ends up costing me compared to previous days.

D
#2501 Daveb01

Jellybaby

I did say it was not going to be easy moving to Predbat. I don’t think about it any more and just let it get on with it.
I have used the charge over ride in the apps yaml once.
I have also seen a major shift in the way Predbat now operates my battery etc, now there is not much sun or wind. It has been about 10 days. If I were you I would leave it a week or so and then make a decision if you would like to carry on with Predbat or go back to your manual charge/discharge.

Please also bear in mind what Geoffrey & the others have said about battery loss.

D
#2502 Daveb01

Just been looking at my logs all good except for the repeated issue. It’s been like this since I set it up. Is anyone else getting this same error?

Has anyone found out how to stop this error occurring please?

#2503 PianSom

Daveb01
That does not show an error. Just shows a regular connection to the broker (presumably followed by a posting) then a disconnection. Like the database update at 13:52:33, the rest are regular log entries.

On my system (which is slightly oddly set up) I see that kind of behaviour from GivTCP, so it could be the same on yours. I need to update my version, but my early v3 beta actually identifies itself in the equivalent log entry. I don't recall whether it did on v2. I guess you could check by seeing if you have GivTCP running at 172.30.32.2.

B
#2504 Boffinboy

Rbor in the latest version the only bit that causes an issue is the gas one. Removed that and the chart works 👍

D
#2505 Daveb01

PianSom

Thanks for this, I don’t have anything on 172, mine are all 10.0.x.x. Not sure why it’s pinging this address or showing a connection?

#2506 PianSom

Daveb01
My understanding is that HAOS is actually an instance of Docker, and that all the Add-ons (and HA itself) are actually managed containers. So the MQTT broker, GivTCP and Predbat are individual containers, and communicate via an internal Docker network. So I expect the 172. addresses are all just that.

Of course, my understanding may be completely wrong!

EDIT - more reading (if you are REALLY interested!!) - https://developers.home-assistant.io/docs/add-ons/

R
#2507 Rbor

Daveb01 PianSom
I don't know how it all works but this is a screenshot of part of my MQTT add-on log:


And my connections start with 192.168.....

So nothing to worry about. These are not errors – just the way that HA and MQTT interact (as far as I know/don't know!)

Rob

#2508 PianSom

Rbor
Which version of GivTCP are you on, Rob?

R
#2509 Rbor

Boffinboy I am now on v8.5.11 which has taken on board the main modifications and corrected some subsequent glitches via v8.5.10.
Seems to be running OK.

Rob

R
#2510 Rbor

PianSom I'm on v2.4.9.
I have tried all variations of v3 up to v3.0.4 but there were issues for me with the all of them.
I reverted back to v2.4.9 which was not an easy exercise. My system I had picked up entities from both v3 and v2. I had to learnt how to use MQTT Explorer to delete MQTT entries for the givtcp version that I wasn't running.

v2.4.9 is running smoothly. I know that v3 is the way forwards and I have contemplated trying v3.0.4. But I am sticking until a stable version emerges.

Still, another skill learnt. Working with HA has taught me so much, assisted by @geoffreycoan, you and so many others in these forums. I would have given up without your collective guidance.

Rob

R
#2511 Rbor

Daveb01 I did say it was not going to be easy moving to Predbat. I don’t think about it any more and just let it get on with it.

From this comment, I can see just how much you have learnt about how Predbat works in the short time you have been on board.
I can remember you having exactly the same reservations about how Predbat is compelling its plan. And me suggesting that you wait to see how Predbat works and not over over-rule its decisions. They are not always perfect but I am convinced that they are better than most over-rides that I may be tempted to make.
And Predbat does change its mind as it receives Nordpool, Octopus rates, Solacst PV predictions, etc.

Rob

G
#2512 geoffreycoan

I’m still on GivTCP v2.4.9 which is working fine, and yes, I too see these frequent connects and disconnects in the MQTT logfile from GivTCP. You’d think it would keep the client connection open, MQTT Explorer does.

But anyway, just normal MQTT and GivTCP behaviour.

I will probably give GivTCP 3.0.4 another go when I get back from France but don’t fancy debugging it remotely if I have any issues. Likewise not on the latest HA 2024.11, Predbat or Solcast versions.

I also don’t want any of Trefor’s new cost tracking sensors mucking up my nice small database size before I can tame them….

#2513 PianSom

Rbor
Thanks.

Actually, looking at your logs again, I see you have both GivTCP (172.30.32.1) and "unknown" (172.30.32.2) connections. I wonder if the latter is Predbat.

Anyway, as everyone says - all normal and expected.

R
#2514 Rbor

PianSom
Good point. I have no idea!
If I look at MQTT in Devices & Services, I have 11 devices listed, all referenced to my GivTCP inverter.
When I was experimenting with givTCP v3, and returned to v2.4.9, the number of devices had increased to 14 and I couldn't see some data including battery cell info.

It was then that I deleted all the MQTT messages using MQTT Explorer. MQTT then redownloaded its messages and I was then down to 11 devices (and the battery cell data re-emerged). I wonder if there is still some cruft in there showing an extra unknown connection.

As well as Predbat, I am running Predai, but givTCP is the only add-on that is connected to MQTT.

Rob

S
#2515 SteveCook

Home Assistant Supervisor will not update to 2024.11.3 from 11.2.
Any ideas from anyone please?
I am just using a PI with "standard HA" install

R
#2516 Rbor

SteveCook I have no idea but I experienced the same this morning.
I decided to finally upgrade from givTCP2 to givTCP3.0.4

I then got this error:

I then tried to update 2014.11.3, same as you and got the same error message.

I tried restarting HA but no difference.

There's a thread on this on HA forums:
https://community.home-assistant.io/t/cannot-install-supervisor-2024-11-3-hassos/793231

The HA developers must be sorting this out or we can't install any adding.

Rob

S
#2517 SteveCook

Rbor
Thanks. I thought it was my rubbish IT skills

T
#2518 TX200

I had a similar issue a few days back, different version, but similar error. It worked later on.

Guess GitHub just can't keep up with the number of requests when something gets released.

R
#2519 Rbor

I have just tried to update HA Supervisor 2014.11.3 again and got a different error message.

I then tried to update the givTCP v2.4.9 to givTCP v3.0.4 and succeeded!
I looked back at the HA supervisor update and that had installed also.

HA seems to be going through some flaky times at the moment. It stopped add-on log files from being displayed last week for me and I rescued my system by restoring from a backup.

Now to see if givTCP v3.0.4 works for me or whether I will need to retreat back again to v2.4.9.

So if you failed earlier today, it's worth a retry.

Rob

Z
#2520 Zakalwe

Yeah, mine has been up and down like a bride's nightie! I think some recent HA updates borked it as lots of my sensors and dashboards no longer worked.
I woke this morning to find a discharged battery.
I rolled back to an old back up and this brought Predbat back online. I am also getting the errors with the Supervisor and Core updates. Then about an hour ago, the Supervisor update dropped out of the Notification panel. Predbat also stopped at the same time.
I do have GivTCP v3 installed and it seemed to be running OK up until an hour ago. Now Predbat looks to be running, but all the sensors and dashboards are flatlining.

Something seriously flaky is going on at the moment.
I've put Predbat into Monitor mode and enabled Eco and a Timed Charge in the GE portal. luckily today was sunny so I managed to get 30% charge into the batteries which will keep me running until the IO cheap period.

L
#2521 Leeshore

Mine has just updated OK to HA Supervisor 2014.11.3

R
#2522 Rbor

PianSom Actually, looking at your logs again, I see you have both GivTCP (172.30.32.1) and "unknown" (172.30.32.2) connections. I wonder if the latter is Predbat.

I have now managed to upgrade to givTCP v3.0.4 from v2.4.9.
This is my new add-on log

My strange double connection (172.30.32.1) and (172.30.32.2) has gone and I now have just the one 'unknown' connection (172.30.32.2). This mirrors the MQTT log from Daveb01.

Does this also match what you are seeing in your MQTT addon log when running v3.0.4?

I need to see how v3.0.4 performs but the MQTT connection looks cleaner.

Rob

R
#2523 Rbor

Well, after my earlier euphoria about givTCP v3.0.4, it turned out that I had lost all my battery details. This was the same issue as when I tried the other versions of givTCP v3.

I have now reverted back to v2.4.9 (yet again).
In the current state of v3, there are just too many inconsistencies.

The screenshots below shows what happened when I upgraded from v2.4.9 to v3.04.
The top chart is the inverter SOC, which is fine.
The lower two charts are for my two batteries. You can see that the battery details did not change from about 13:30, when I upgraded to v3.0.4
I degraded back to v2.4.9 as about 20:30 pm and the battery details reappeared.

My MQTT log has now reverted to my original with two connections.

I will put together another Github issue for the givTCP developers – a job for tomorrow.

I just feel so dejected with this. I have spent hours trying to get this upgrade to work ......... and it doesn't with my AC3.0 inverter.

And to add insult to injury, I have now gained an HA warning, which gives mmm no clue about where to start. There is nothing referring to this in the HA System log, so where do I start?

Rob

J
#2524 Jellybaby

Inquiry, how does Predbat deal with power cuts, if you have an AIO will it still switch over or will I have to intervene?

J
#2525 Jellybaby

Rbor I have not upgraded myself permanently either yet, I have copy pasted the home assistant folder and tried it out but lost all history and didn't like it so just deleted the copy and went back to main.

Shame can't migrate history from previous sensors into what it renames them, I think next time I try I will try switcherooing the gateway and aio see if I can get rid of the givtcp2 thing

#2526 PianSom

Jellybaby
Interesting question.

If there’s a grid failure then Predbat will not notice and will carry on its merry way, updating its plan regularly. The AIO will just ignore Predbat and switch over to battery usage as it should do, without intervention. As the battery depletes, Predbat’s plan may flip over to grid charging, but since this won’t be possible for the AIO while the grid is out, I don’t believe there will be any effect. The AIO will (by necessity) ignore any instructions to charge from grid.

On grid resumption Predbat’s (possibly revised) plan will be implemented.

(This is all a bit theoretical for me. Every time I move to Island Mode my AIO fails. I am hoping this will be rectified tomorrow!)

G
#2527 geoffreycoan

Rbor Oh that’s annoying Rob, I too was hoping that 3.0.4 would be stable enough to use now

Did you just stop v2 and restart v3 or do anything different? Last time I think we were told that the issues were with the sensors not getting deleted and recreated on an upgrade by the v3 integration properly, and suggested that a fix was to manually delete them with MQTT Explorer.

Personally I was loathe to do that, don’t want to muck about with the sensors and risk breaking things more

T
#2528 TX200

Tried to stop my battery discharging during a cheap 30min slot yesterday.

Wanted to use the grid whilst the washing machine was on (and solar where present).

Seems freeze discharge doesn't mean what I think it means?

I wanted freeze charge?

Kinda sounds the wrong way around?

Z
#2529 Zakalwe

I have had to uninstall GivTCPV3 and reinstall 2.4.9 to get it working again.

G
#2530 geoffreycoan

TX200 Tried to stop my battery discharging during a cheap 30min slot yesterday.

Wanted to use the grid whilst the washing machine was on (and solar where present).

Seems freeze discharge doesn't mean what I think it means?

I wanted freeze charge?

You’re not the first person who has felt that the names of the Freeze operations are the wrong way round, and there’s been plenty of comments about trying to understand what the modes do - I have updated the documentation as best I can to describe how they operate, but further suggestions for improvement always welcome.

The way I think of them is:

  • Freeze discharge is freeze the SoC, but allow (house load) discharging still - i.e. don’t let the SoC increase due to solar generation
  • Freeze charge is freeze the SoC but allow (solar) charging still - i.e. don’t let the SoC drop due to house load
T
#2531 TX200

I suspect they need changing to something like this

Pause charging (aka don't charge from grid?)

Pause discharging (aka use solar or grid?)

Would make much more sense.

D
#2532 Daveb01

Rbor

Have you thought about the following? Instead of upgrading from v2 to v3, why not uninstall GivTCP completely? Then install v3.0.4?

This is just a thought on how I would do it if I got these issues after a few goes?

Stop MQTT
Stop GivTCP
Stop Predbat
Uninstall GivTCP v2
Install GivTCP v3
Stop GivTCP
Start MQTT
Start GivTCP
Start Predbat

#2533 PianSom

Daveb01
I haven’t tried the upgrade dance yet, but just to sound a note of warning …

MQTT is a publish/subscribe protocol - clients connect to the broker and can publish or listen for messages on a topic. But it contains the mechanism of “retained” messages, which are held by the broker and delivered to any client that subscribes to that topic.

GivTCP uses retained messages, and stopping and starting the broker will NOT delete them. One needs to delete them by hand, either using a tool like “MQTT Explorer” or another method. If you want to go for a clean install then make sure you delete any GivTCP retained messages before restarting it.

J
#2534 Jellybaby

PianSom It is an interesting one isnt it, I wonder if it ignores commands set to pause charging and overwrites any current paused discharge settings and powers house instantly.

W
#2535 Wavy Davy

Anyone else having problems with entities not available?
I noticed this morning that predbat wasn't working properly.
Get the following display.

Log shows

2024-11-12 15:24:18.991468: Info: record_status Error: Exception raised 'attributes'
Error: Failed to initialize predbat 'attributes'
Traceback (most recent call last):
File "/config/hass.py", line 49, in main
p_han.initialize()
File "/config/predbat.py", line 11084, in initialize
raise e
File "/config/predbat.py", line 11079, in initialize
self.load_user_config(quiet=False, register=True)
File "/config/predbat.py", line 10826, in load_user_config
self.api_select_update(name, new_value=ha_value)
File "/config/predbat.py", line 9619, in api_select_update
self.expose_config(config_item, values, force=True)
File "/config/predbat.py", line 10432, in expose_config
self.set_state_wrapper(entity_id=entity, state=value, attributes={"friendly_name": item["friendly_name"], "options": options, "icon": icon})
File "/config/predbat.py", line 783, in set_state_wrapper
return self.ha_interface.set_state(entity_id, state, attributes=attributes)
File "/config/ha.py", line 645, in set_state
self.update_state(entity_id)
File "/config/ha.py", line 322, in update_state
self.update_state_item(item, entity_id)
File "/config/ha.py", line 354, in update_state_item
attributes = item["attributes"]
KeyError: 'attributes'

2024-11-12 15:24:18.992021: Stopping Predbat
Web interface stop called
Web interface stopped
2024-11-12 15:24:20.594121: Info: Web socket stopping
2024-11-12 15:24:20.595867: Info: Web socket stopping
Shutdown, sleeping 20 seconds before restarting

Z
#2536 Zakalwe

Yep....my dashboards have been up the spout for the last couple of days.

Z
#2537 Zakalwe

One thing that i cannot seem to fix (and its probably a simple thing) is that some entities do not appear to be updating in HA.
Example, the entities for individual battery SOCs appear frozen at 47% and 28% in my HA dashboards. yet, if I use MQTT Explorer I can see that the correct SOCs are being broadcast:


Any ideas?

W
#2538 Wavy Davy

Zakalwe Have you tried deleting the entities and re installing them, I've cured entity problems by doing that in the past.
I've just cured my problem by reloading a backup from 2 days ago, doing the updates again and all is good again. Only problem is missed the octopus free power up.

W
#2539 Wavy Davy

Seems my problem may be a bug in the Octopus energy app. Have given the update a miss until the next one.
There is a report on the Octopus GitHub page.

Z
#2540 Zakalwe

Wavy Davy

Tried that but its not gone anyway.

D
#2541 Dpe

Zakalwe
I had a similar problem with battery temperatures, they all showed unknown when I could see in MQTT explorer that they were there and updating. I also found an error in HA core logs "Platform mqtt does not generate unique IDs.........."
I deleted the HA duplicates by choosing one of the unknown entries navigating to "device info" deleting the entries from the MQTT line, stopping MQTT, Restarting HA then restarting MQTT. I have no idea why, but this worked and the battery temperatures are now available and updating in HA

G
#2542 geoffreycoan

Dpe I also found an error in HA core logs "Platform mqtt does not generate unique IDs.........."

Have you recently upgraded from GivTCP v2 to v3?

I found this with all the battery entities in HA when I upgraded to v3, I got errors in the HA logs about duplicate entity id’s and the battery entities were not updating. Reverting back to GivTCP v2 the entities started working OK but I still see those errors in the HA logs.
Seems to be something to do with the mapping of MQTT topics to HA entities goes awry. Deleting them in MQTT at least gives it the chance to re-create the entities in HA.

Doesn’t explain the problem Wavy Davy had, error in predbat entities not being available. Can only suggest try restarting the predbat addon

D
#2543 Dpe

geoffreycoan
Yes I had done the upgrade, and it was a few days until I realised there were no battery temperatures. But it was only the battery temperatures - all of the other entities on both batteries worked fine. With the exception of this v3 has worked very well for me.

#2544 PianSom

Post for the nerd-inclined only!

Without wanting to go TOO deep into the murky MQTT depths, it may be worth a few words about how MQTT and HA communicate.

As I mentioned above, GivTCP is a MQTT client which posts its data to the MQTT broker. The data it posts are of two types.

(1) it posts (under a topic like homeassistant/GivEnergy/sensor/SERIALNO_DATAITEM - where DATAITEM is eg Grid_Voltage or any number of other things) a definition of a data item that it is going to broadcast. This definition includes information like - the topic where updates to the data item will appear in MQTT, the units used by the data item, the class of the data item, and so on. Importantly, GivTCP posts these definitions as a Retained item to MQTT. So the definitions are stored non-destructively within MQTT - even if MQTT stops and restart then the definitions will be posted whenever a client subscribes to that topic. The definitions could be for something like a sensor, but can be binary_sensors or any other HA data type.

(2) for every data item defined in (1) GivTCP will post data from time to time to the topic set out in the definition. So when the Voltage, SoC, whatever changes then this is where the update will be posted. For example, for grid voltage in GivTCP v2 it is GivEnergy/SERIALNO/Power/Power/Grid_Voltage. These topics are not Retained.

Now, whenever HA starts up it subscribes to the MQTT broker topics starting with homeassistant. So, in particular, it will pick up all the definitions in (1) above (because homeassistant/GivEnergy etc are sub-topics. Even if GivTCP is not running HA will pick up the definitions of the data items set out in GivTCP (because the definition topics are Retained).

So this hopefully goes some way to explaining why - as described above - sensors appear to freeze when GivTCP is updated. The definitions of the old data items are still hanging about, Retained, like a ghost in the machine. HA reads them and then looks for the old data content - which no longer updates. The new data definitions from the new version of GivTCP will also be spotted and incorporated by HA, but could potentially cause errors like "not unique IDs".

Long story short - unless the GivTCP devs get around to fixing their update path, this is how I'd upgrade:
(i) stop old GivTCP
(ii) use MQTT Explorer to delete the Retained messages llke homeassistant/EVERYTHING/GivEnergy where EVERYTHING includes sensor, number, switch etc
(iii) install and start new GivTCP
I'll then be restarting HA and Predbat

This is all theoretical for me - I haven't done the upgrade yet. But I hope it helps!

D
#2545 Dpe

PianSom
Thanks for taking the time to write the explanation, I am now a fully signed up nerd!

R
#2546 Rbor

I haven't been looking on this thread today, ironically because I have been trying to update from givTCP v2 to v3! If upgrading, duplicate entities are causing the problem.

This was what I did:

  1. If you are running auto restart, comment out the auto restart lines in apps.yaml to stop Predbat throwing up an error in the process, rebooting you into the wrong version of givTCP!

  2. You must only have 1 version of givTCP running at a time or you have problems.
    I am assuming that you are running v2.4.9 and have downloaded v3.0.4.

  3. Stop 2.4.9 and make sure that 'Start on boot' is switched off.

  4. Start 3.0.4 and check the logs. You can select Start on boot

  5. Look in Devices & Services/Integrations/MQTT devices.
    I had 14 devices listed, some with no data. The model column was often shown as 'unknown.
    All relevant data was there but if I restarted HA, anything that was battery related showed as 'unknown'.

  6. Now the Fix! You need to get hold of MQTT Explorer available as an app.
    These are my credentials (pretty generic). The password is what I use to log into HA:

    WARNING: This may or may not work for you.

  7. In MQTT Explorer, delete all Battery related entries in the homeassistant area, which should get rid of any duplicates. This took me quite some time as I could only delete up to 50 at a time and there were hundreds! You just need to delete the entries referencing your battery/batteries.
    The entries will get automatically get regenerated but not as duplicates.
    When I checked, I had 9 MQTT devices and all were assigned to Gen 1 Ac

  8. Uncomment the apps.yaml auto restart lines, making sure that the addon line points to givTCP3: addon: 533ea71a_givtcp

  9. Restart HA as a check. All the battery entities should have values and not be 'unknown.

I have done this so many times, I reckon I could upgrade in my sleep now.
It is a great pity that so many of us are having to solve this upgrade puzzle that is very time-consuming and frustrating

Hope there is something here to help. I am now on v3.0.4 and I am hopeful that I won't need to downgrade again to the trusty v2.4.9. DON'T uninstall it – you may need it! Just make sure that you are only running one version.

Tomorrow, I will read through the explanation about how MQTT works from PianSom.
I may then start to learn a little about how MQTT works – I really have no idea!

Rob

#2547 PianSom

Rbor This took me quite some time as I could only delete up to 50 at a time and there were hundreds!

It should be easy to delete all the offending Retained topics by running a command which looks something like mqtt_pub homesassistant/*/GivEnergy/* " " since publishing an empty string to a Retained topic deletes it. (DON'T use this command - it won't work. I'll need to look up/remind myself of the correct syntax when I have a mo.)

Alternatively, deleting the MQTT Add-on, restarting HA and then installing it again should get rid of all the Retained messages. The Retained topics for GivTCP which need to be there will be recreated next time GivTCP restarts. This is probably the best route, on reflection.

R
#2548 Rbor

PianSom Alternatively, deleting the MQTT Add-on, restarting HA and then installing it again should get rid of all the Retained messages. The Retained topics for GivTCP which need to be there will be recreated next time GivTCP restarts. This is probably the best route, on reflection.

I like this method. It should also give the cleanest result with no gruff.
I would try it myself if I hadn't spent so much time already getting v3 up and running.
The only proviso is that givTCP has to be the only addon running under MQTT. And will there be any MQTT gruff hiding away in config files and caches, etc?

We just need someone to try out the 'delete MQTT' method when upgrading from givTCP v2 to givTCP v3. @geoffreycoan ?

Rob

D
#2549 Daveb01

Don’t know if you guys have ever done this? I noticed a load of entries under the heading unknown in Entities. I clicked on a few and there is no data and it says to delete these.

I deleted 2 and checked the logs (no errors)
I have now deleted all of them (no errors)

Screen shot of Entities and if you click Available it hides these and you just get Unavailable (I have deleted them all so I don’t get any at the moment)


Z
#2550 Zakalwe

Rbor In MQTT Explorer, delete all Battery related entries in the homeassistant area, which should get rid of any duplicates. This took me quite some time as I could only delete up to 50 at a time and there were hundreds! You just need to delete the entries referencing your battery/batteries.

Daft question...how do you delete multiples? Even when I Shift-Select it will only delete a single entry at a time. I'll be here all week deleting at that rate!!

#2551 PianSom

And we have a willing victim/volunteer! 🥳

R
#2552 Rbor

Zakalwe PianSom
Well done @Zakalwe 👏👏

In case you back down, this is how I selected multiples in MQTT Explorer:

  • I burrow down in the homeassistant branch and look for battery details. You may found these scattered around.
  • Here, I first select 'Givenergy' in the homeassistant branch and look into the sub-folders such as sensor, number, select and switch. I start with 'sensor' and the total shown on the right is 50+. The screenshot shows my current 'mended' messages but I started off with far more. I got rid of them all. – don't worry, they will get regenerated but with no duplicates.

  • So I delete 50, select givenergy again in this branch, and keep going until I have got rid of all entries linked to the battery IDs. I think I got rid of over 500!
  • I stopped givTCP while I did this as I envisaged MQTT putting the entries back as fast as I was removing.
  • I did try stopping MQTT also but MQTT Explorer then didn't have a server to communicate with.

At least this worked for me. Too many invented workarounds to solve a problem not of our making.

Rob

G
#2553 geoffreycoan

Rbor I’m not planning on doing any updates to my HA whilst I am still in France. Its all working fine and whilst I have remote control to get into the host PC if I have to, let’s not tempt providence.

Thanks PianSom for the detailed explanation of how MQTT, GivTCP and HA all work together. Very useful.
I think the additional bit of the jigsaw is that some of the tree structure you mention above has been changed when upgrading from v2 to v3, specifically, looking at my own environment,

/core-mosquitto.local.hass.io/GivEnergy/INVSERIALNO/Battery_Details/BATTSERIALNO/Battery_*

(which contains things like cell voltage, cell temperature, battery cycles, battery SoC, …)

have moved to:

/core-mosquitto.local.hass.io/GivEnergy/INVSERIALNO/Battery_Details/Battery_Stack_1/

With BMS_Temperature and BMS_Voltage being directly under Battery_Stack_1/ and all the other Battery_* sensors being under Battery_Stack_1/BATTSERIALNO/

For some people the GivTCP v3 upgrade is not cleaning up the old data definitions but is publishing the new ones so HA complains about duplicate id’s that it rejects and we get the old definitions stuck.

Deleting either the entire MQTT broker or deleting the definitions with MQTT explorer sounds like a good fix, although the upgrade should really be doing this itself. Clearly for some people it works seamlessly, for others it doesn’t.

I also BTW have stuff published under /tasmota/discovery/deviceid and /tele/tasmota_deviceid from the 8 Tasmota smart plugs I have. No Tasmota stuff under /homeassistant though

#2554 PianSom

geoffreycoan
Yes, sorry - I should have mentioned that the issues are arising because GivTCP has changed the topics it posts to between v2 and v3. Hence the update causes problems. And yes, the devs should have spotted the potential issue and cleaned out all the Retained topic info as part of the upgrade process.

Yes, tasmota uses the same discovery mechanism, but using the tasmota path. This is where the HA Tasmota integration looks for it. The type (2) info is under tele IIRC.

Other types of product do use the HA/MQTT discovery process in homeassistant, in particular those where one is not using a HA integration but is using the MQTT integration for device discovery. If you ever venture in to the world of Zwave or Zigbee devices then you will soon find that zwave2mqtt and zigbee2mqtt use it. The Faikin modules I use in my Daikin air-to-air heat pumps do also. As does my Weatherflow weather station.

D
#2555 Daveb01

Wow the sun is shining again and the battery will get to 100% first time since October.

D
#2556 Daveb01

@geoffreycoan

Here is the updated yaml as you suggested. I have no red sections in the Predbat app apps.yaml tab.

Please let me know if I need to tweak or uncomment anything else 👍😀

How long does a newbie need to wait before he’s ready to tick the expert mode. Do I get permission in Jan 25?

pred_bat:
  module: predbat
  class: PredBat

  # Sets the prefix for all created entities in HA - only change if you want to run more than once instance
  prefix: predbat

  # Timezone to work in
  timezone: Europe/London

  # Currency, symbol for main currency second symbol for 1/100s e.g. $ c or £ p or e c
  currency_symbols:
   - '£'
   - 'p'

  # Number of threads to use in plan calculation
  # Can be auto for automatic, 0 for off or values 1-N for a fixed number
  threads: auto

  # If you are using Predbat outside of HA then set the HA URL and Key (long lived access token here)
  #ha_url: 'htt:homeassistant.local:8123'
  #ha_key: 'xxx'

  # Set to auto-match with a GivEnergy serial number, but you can override the serial or the sensor names
  # if it doesn't work or if you have more than one inverter you will need to list both
  geserial: 'gw2316g235'
  #geserial2: 're:sensor.givtcp2_(.+)_soc_kwh'

  # Sets the maximum period of zero load before the gap is filled, default 30 minutes
  # To disable set it to 1440
  load_filter_threshold: 30

  #
  # Sensors, more than one can be specified and they will be summed up automatically
  #
  # For two inverters the load today would normally be the master load sensor only (to cover the entire house)
  # If you have three phase and one inverter per phase then you would need three load sensors
  #
  # For pv_today if you have multiple solar inverter inputs then you should include one entry for each inverter
  #
  load_today:
    - sensor.gw_{geserial}_load_energy_today_kwh
  import_today:
    - sensor.gw_{geserial}_import_energy_today_kwh
  export_today:
    - sensor.gw_{geserial}_export_energy_today_kwh
  pv_today:
    - sensor.gw_{geserial}_pv_energy_today_kwh

  # Load forecast can be used to add to the historical load data (heat-pump)
  # To link to Predheat
  # Data must be in the format of 'last_updated' timestamp and 'energy' for incrementing kWh
  #load_forecast:
  #  - predheat.heat_energy$external
  #
  # If you enable ge_cloud_data then the load/import and export data will be fetches from the GE cloud instead of from GivTCP sensors
  # this is usually less efficient and of course prone to internet downtime, but could be useful if you lost your GivTCP data
  # Set the serial to the inverter serial to pull the data from and the key to your API key
  # When this is set load_today, import_today and export_today are not used
  #
  ge_cloud_data: False
  ge_cloud_serial: '{geserial}'
  ge_cloud_key: 'xxxx'
  #
  # Controls/status - must by 1 per inverter
  #
  num_inverters: 1
  #
  # Run balance inverters every N seconds (0=disabled) - only for multi-inverter
  balance_inverters_seconds: 60
  #
  # When set use the REST API rather than HA entity for control, should be more reliable/faster to control
  # Set one per inverter
  # If using Docker then change homeassistant.local to the Docker IP address
  givtcp_rest:
    - 'http://10.0.130.60:6345'
  # - 'http://homeassistant.local:6346'

  # When enabled automatic restart will restart the add-on if communication fails
  # Example below is auto-restart for GivTCP add-on itself
  auto_restart:
    - shell: 'rm -rf /homeassistant/GivTCP/*.pkl'
    - service: hassio/addon_restart
      addon: 533ea71a_givtcp

  #  Example on how to restart the inverter via GivTCP
  #  - service: switch.turn_on
  #    entity_id: switch.givtcp_{geserial}_reboot_invertor

  # If not using REST then instead set the Control here (one for each inverter)
  # You should keep this section even when using REST as a fallback if it fails and for charge curve calculations
  charge_rate:
    - number.gw_{geserial}_battery_charge_rate
  # - number.givtcp2_{geserial2}_battery_charge_rate
  discharge_rate:
    - number.gw_{geserial}_battery_discharge_rate
  # - number.givtcp2_{geserial2}_battery_discharge_rate
  battery_power:
    - sensor.gw_{geserial}_battery_power
  # - sensor.givtcp2_{geserial2}_battery_power
  pv_power:
    - sensor.gw_{geserial}_pv_power
  # - sensor.givtcp2_{geserial2}_pv_power
  load_power:
    - sensor.gw_{geserial}_load_power
  # - sensor.givtcp2_{geserial2}_load_power
  soc_kw:
    - sensor.gw_{geserial}_soc_kwh
  # - sensor.givtcp2_{geserial2}_soc_kwh
  soc_max:
    - sensor.gw_{geserial}_battery_capacity_kwh
  # - sensor.givtcp2_{geserial2}_battery_capacity_kwh
  reserve:
    - number.gw_{geserial}_battery_power_reserve
  # - number.givtcp2_{geserial2}_battery_power_reserve
  inverter_mode:
    - select.gw_{geserial}_mode
  # - select.givtcp2_{geserial2}_mode
  inverter_time:
    - sensor.gw_{geserial}_invertor_time
  # - sensor.givtcp2_{geserial2}_invertor_time
  charge_start_time:
    - select.gw_{geserial}_charge_start_time_slot_1
  # - select.givtcp2_{geserial2}_charge_start_time_slot_1
  charge_end_time:
    - select.gw_{geserial}_charge_end_time_slot_1
  # - select.givtcp2_{geserial2}_charge_end_time_slot_1
  charge_limit:
    - number.gw_{geserial}_target_soc
  # - number.givtcp2_{geserial2}_target_soc
  scheduled_charge_enable:
    - switch.gw_{geserial}_enable_charge_schedule
  # - switch.givtcp2_{geserial2}_enable_charge_schedule
  scheduled_discharge_enable:
    - switch.gw_{geserial}_enable_discharge_schedule
  # - switch.givtcp2_{geserial2}_enable_discharge_schedule
  discharge_start_time:
    - select.gw_{geserial}_discharge_start_time_slot_1
  # - select.givtcp2_{geserial2}_discharge_start_time_slot_1
  discharge_end_time:
    - select.gw_{geserial}_discharge_end_time_slot_1
  # - select.givtcp2_{geserial2}_discharge_end_time_slot_1

  # Pause mode is not supported by all firmware's and will be ignored if not present
  pause_mode:
   - select.gw_{geserial}_battery_pause_mode
 # - select.givtcp_{geserial2}_battery_pause_mode

  # Not all firmwares support pause start/end time, delete these if not supported
  # to avoid spurious writes/warnings
  pause_start_time:
   - select.gw_{geserial}_battery_pause_start_time_slot
 # - select.givtcp2_{geserial2}_battery_pause_start_time_slot
  pause_end_time:
   - select.gw_{geserial}_battery_pause_end_time_slot
 # - select.givtcp2_{geserial2}_battery_pause_end_time_slot

  # Inverter max AC limit (one per inverter). E.g for a 3.6kw inverter set to 3600
  # If you have a second inverter for PV only please add the two values together
  inverter_limit:
   - 12000

  # Export limit is a software limit set on your inverter that prevents exporting above a given level
  # When enabled Predbat will model this limit
  # export_limit:
  # - 6000

  inverter_limit_charge:
   - 10000
  
  inverter_limit_discharge:
   - 6000
  
  # Some inverters don't turn off when the rate is set to 0, still charge or discharge at around 200w
  # The value can be set here in watts to model this (doesn't change operation)
  # inverter_battery_rate_min:
  #  - 200

  # Workaround to limit the maximum reserve setting, some inverters won't allow 100% to be set
  # Comment out if your inverter allows 100%
  inverter_reserve_max: 100

  # Some batteries tail off their charge rate at high soc%
  # enter the charging curve here as a % of the max charge rate for each soc percentage.
  # the default is 1.0 (full power)
  # The example below is from GE 9.5kwh battery with latest firmware and gen1 inverter
  #
  # Predbat can compute this curve automatically if you have enough data, restart the add-on and look in the logfile for the data
  # once set here Predbat will no longer re-compute the curve.
  # Can also be set to 'auto' to just use the calculation curve, not recommended if you are using low power charging mode.
  battery_charge_power_curve:
    91 : 0.91
    92 : 0.81
    93 : 0.71
    94 : 0.62
    95 : 0.52
    96 : 0.43
    97 : 0.33
    98 : 0.24
    99 : 0.24
    100 : 0.24
    
  battery_discharge_power_curve:
    4 : 1.0

  # Inverter clock skew in minutes, e.g. 1 means it's 1 minute fast and -1 is 1 minute slow
  # Separate start and end options are applied to the start and end time windows, mostly as you want to start late (not early) and finish early (not late)
  # Separate discharge skew for discharge windows only
  inverter_clock_skew_start: 0
  inverter_clock_skew_end: 0
  inverter_clock_skew_discharge_start: 0
  inverter_clock_skew_discharge_end: 0

  # Clock skew adjusts the Appdaemon time
  # This is the time that Predbat takes actions like starting discharge/charging
  # Only use this for workarounds if your inverter time is correct but Predbat is somehow wrong (AppDaemon issue)
  # 1 means add 1 minute to AppDaemon time, -1 takes it away
  clock_skew: 0

  # Solcast cloud interface, set this or the local interface below
  # solcast_host: 'https://api.solcast.com.au/'
  # solcast_api_key: 'https://api.solcast.com.au/rooftop_sites/c5f7-acd2-9a16-1943/forecasts?format=json'
  # solcast_poll_hours: 8

  # Set these to match solcast sensor names if not using the cloud interface
  # The regular expression (re:) makes the solcast bit optional
  # If these don't match find your own names in Home Assistant
  pv_forecast_today: re:(sensor.(solcast_|)(pv_forecast_|)forecast_today)
  pv_forecast_tomorrow: re:(sensor.(solcast_|)(pv_forecast_|)forecast_tomorrow)
  pv_forecast_d3: re:(sensor.(solcast_|)(pv_forecast_|)forecast_(day_3|d3))
  pv_forecast_d4: re:(sensor.(solcast_|)(pv_forecast_|)forecast_(day_4|d4))

  # car_charging_energy defines an incrementing sensor which measures the charge added to your car
  # is used for car_charging_hold feature to filter out car charging from the previous load data
  # Automatically set to detect Wallbox and Zappi, if it doesn't match manually enter your sensor name
  # Also adjust car_charging_energy_scale if it's not in kwH to fix the units
  #car_charging_energy: 're:(sensor.myenergi_zappi_[0-9a-z]+_charge_added_session|sensor.wallbox_portal_added_energy)'

  # Defines the number of cars modelled by the system, set to 0 for no car
  num_cars: 0

  # car_charging_planned is set to a sensor which when positive indicates the car will charged in the upcoming low rate slots
  # This should not be needed if you use Intelligent Octopus slots which will take priority if enabled
  # The list of possible values is in car_charging_planned_response
  # Auto matches Zappi and Wallbox, or change it for your own
  # One entry per car
  #car_charging_planned:
  # - 're:(sensor.wallbox_portal_status_description|sensor.myenergi_zappi_[0-9a-z]+_plug_status)'

  #car_charging_planned_response:
  # - 'yes'
  # - 'on'
  # - 'true'
  # - 'connected'
  # - 'ev connected'
  # - 'charging'
  # - 'paused'
  # - 'waiting for car demand'
  # - 'waiting for ev'
  # - 'scheduled'
  # - 'enabled'
  # - 'latched'
  # - 'locked'
  # - 'plugged in'

  # In some cases car planning is difficult (e.g. Ohme with Intelligent doesn't report slots)
  # The car charging now can be set to a sensor to indicate the car is charging and to plan
  # for it to charge during this 30 minute slot
  #car_charging_now:
  #  - off

  # Positive responses for car_charging_now
  #car_charging_now_response:
  # - 'yes'
  # - 'on'
  # - 'true'

  # To make planned car charging more accurate, either using car_charging_planned or the Octopus Energy plugin,
  # specify your battery size in kwh, charge limit % and current car battery soc % sensors/values.
  # If you have Intelligent Octopus the battery size and limit will be extracted from the Octopus Energy plugin directly.
  # Set the car SOC% if you have it to give an accurate forecast of the cars battery levels.
  # One entry per car if you have multiple cars.
  #car_charging_battery_size:
  #  - 75
  #car_charging_limit:
  #  - 're:number.tsunami_charge_limit'
  #car_charging_soc:
  #  - 're:sensor.tsunami_battery'

  # One per car, when true only one car can charge at once, when False multiple cars can charge at once
  #car_charging_exclusive:
  #  - True

  # If you have Octopus intelligent, enable the intelligent slot information to add to pricing
  # Will automatically disable if not found, or comment out to disable fully
  # When enabled it overrides the 'car_charging_planned' feature and predict the car charging based on the intelligent plan (unless octopus intelligent charging is False)
  # This matches either the intelligent slot from the Octopus Plugin or from the Intelligent plugin
  #octopus_intelligent_slot: 're:(binary_sensor.octopus_energy([0-9a-z_]+|)_intelligent_dispatching)'
  #octopus_ready_time: 're:(time.octopus_energy([0-9a-z_]+|)_intelligent_ready_time)'
  #octopus_charge_limit: 're:(number.octopus_energy([0-9a-z_]+|)_intelligent_charge_limit)'
  # Example alternative configuration for Ohme integration release >=v0.6.1
  #octopus_intelligent_slot: 'binary_sensor.ohme_slot_active'
  #octopus_ready_time: 'time.ohme_target_time'
  #octopus_charge_limit: 'number.ohme_target_percent'

  # Carbon Intensity data from National grid
  # carbon_intensity: 're:(sensor.carbon_intensity_uk)'

  # Octopus saving session points to the saving session Sensor in the Octopus plugin, when enabled saving sessions will be at the assumed
  # Rate is read automatically from the add-in and converted to pence using the conversion rate below (default is 8)
  octopus_saving_session: 're:(binary_sensor.octopus_energy([0-9a-z_]+|)_saving_session(s|))'
  octopus_saving_session_octopoints_per_penny: 8

  # 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)'

  # Standing charge in pounds, can be set to a sensor or manually entered (e.g. 0.50 is 50p)
  # The default below will pick up the standing charge from the Octopus Plugin
  # The standing charge only impacts the cost graphs and doesn't change the way Predbat plans
  # If you don't want to show the standing charge then just delete this line or set to zero
  # metric_standing_charge: 're:(sensor.(octopus_energy_|)electricity_[0-9a-z]+_[0-9a-z]+_current_standing_charge)'

  # Or set your actual rates across time for import and export
  # If start/end is missing it's assumed to be a fixed rate
  # Gaps are filled with zero rate
  #rates_import:
  #  -  start: "00:30:00"
  #     end: "04:30:00"
  #     rate: 7.5
  #  -  start: "04:30:00"
  #     end: "00:30:00"
  #     rate: 40.0
  #
  #rates_export:
  #  -  rate: 4.2

  # Can be used instead of the plugin to get import rates directly online
  # Overrides metric_octopus_import and rates_import
  # rates_import_octopus_url : "https://api.octopus.energy/v1/products/FLUX-IMPORT-23-02-14/electricity-tariffs/E-1R-FLUX-IMPORT-23-02-14-A/standard-unit-rates"
  # rates_import_octopus_url : "https://api.octopus.energy/v1/products/AGILE-FLEX-BB-23-02-08/electricity-tariffs/E-1R-AGILE-FLEX-BB-23-02-08-A/standard-unit-rates"

  # Overrides metric_octopus_export and rates_export
  # rates_export_octopus_url: "https://api.octopus.energy/v1/products/FLUX-EXPORT-BB-23-02-14/electricity-tariffs/E-1R-FLUX-EXPORT-BB-23-02-14-A/standard-unit-rates"
  # rates_export_octopus_url: "https://api.octopus.energy/v1/products/AGILE-OUTGOING-BB-23-02-28/electricity-tariffs/E-1R-AGILE-OUTGOING-BB-23-02-28-A/standard-unit-rates/"
  # rates_export_octopus_url: "https://api.octopus.energy/v1/products/OUTGOING-FIX-12M-BB-23-02-09/electricity-tariffs/E-1R-OUTGOING-FIX-12M-BB-23-02-09-A/standard-unit-rates/"

  # Import rates can be overridden with rate_import_override
  # Export rates can be overridden with rate_export_override
  # Use the same format as above, but a date can be included if it just applies for a set day (e.g. Octopus power ups)
  # This will override even the Octopus plugin rates if enabled
  #
  rates_import_override:
   -  date: '2024-10-20'
      start: '13:00:00'
      end: '14:00:00'
      rate: 0
      load_scaling: 1.0

  rates_export_override:
   -  date: '2024-10-20'
      start: '17:00:00'
      end: '19:00:00'
      rate_increment: -10
    
  # For pv estimate, leave blank for central estimate, or add 10 for 10% curve (worst case) or 90 or 90% curve (best case)
  # If you use 10 then disable pv_metric10_weight below
  # pv_estimate: 10

  # Days previous is the number of days back to find historical load data
  # Recommended is 7 to capture day of the week but 1 can also be used
  # if you have more history you could use 7 and 14 (in a list) but the standard data in HA only lasts 10 days
  days_previous:
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8

  # Days previous weight can be used to control the weighting of the previous load points, the values are multiplied by their
  # weights and then divided through by the total weight. E.g. if you used 1 and 0.5 then the first value would have 2/3rd of the weight and the second 1/3rd
  # Include one value for each days_previous value, each weighting on a separate line.
  # If any days_previous's that are not given a weighting they will assume a default weighting of 1.
  days_previous_weight:
    - 1

  # Number of hours forward to forecast, best left as-is unless you have specific reason
  forecast_hours: 48

  # Specify the devices that notifies are sent to, the default is 'notify' which goes to all
  #notify_devices:
  #  - mobile_app_treforsiphone12_2

  # Battery scaling makes the battery smaller (e.g. 0.9) or bigger than its reported
  # If you have an 80% DoD battery that falsely reports it's kwh then set it to 0.8 to report the real figures
  # One per inverter
  battery_scaling:
    - 1.0059

  # Can be used to scale import and export data, used for workarounds
  import_export_scaling: 1.0

  # Export triggers:
  # For each trigger give a name, the minutes of export needed and the energy required in that time
  # Multiple triggers can be set at once so in total you could use too much energy if all run
  # Creates an entity called 'binary_sensor.predbat_export_trigger_<name>' which will be turned On when the condition is valid
  # connect this to your automation to start whatever you want to trigger
  #export_triggers:
    # - name: 'large'
    #   minutes: 60
    #   energy: 1.0
    # - name: 'small'
    #   minutes: 15
    #   energy: 0.25

  # If you have a sensor that gives the energy consumed by your solar diverter then add it here
  # this will make the predictions more accurate. It should be an incrementing sensor, it can reset at midnight or not
  # It's assumed to be in Kwh but scaling can be applied if need be
  #iboost_energy_today: 'sensor.xxxxx'
  #iboost_energy_scaling: 1.0
  # Gas rates for comparison
  #metric_octopus_gas: 're:(sensor.(octopus_energy_|)gas_[0-9a-z]+_[0-9a-z]+_current_rate)'

  # Nordpool market energy rates
  futurerate_url: 'https://dataportal-api.nordpoolgroup.com/api/DayAheadPrices?date=DATE&market=N2EX_DayAhead&deliveryArea=UK&currency=GBP'
  futurerate_adjust_import: True
  futurerate_adjust_export: False
  futurerate_peak_start: "16:00:00"
  futurerate_peak_end: "19:00:00"
  futurerate_peak_premium_import: 14
  futurerate_peak_premium_export: 6.5

  # Watch list, a list of sensors to watch for changes and then update the plan if they change
  # This is useful for things like the Octopus Intelligent Slot sensor so that the plan update as soon as you plugin in
  # Only uncomment the items you actually have set up above in apps.yaml, of course you can add your own as well
  # Note those using +[] are lists that are appended to this list, whereas {} items are single items only
  #watch_list:
  #  - '{octopus_intelligent_slot}'
  #  - '{octopus_ready_time}'
  #  - '{octopus_charge_limit}'
  #  - '{octopus_saving_session}'
  #  - '+[car_charging_planned]'
  #  - '+[car_charging_soc]'
  #  - '{car_charging_now}'
R
#2557 Rbor

geoffreycoan I have put together this diagram to show the changes that I saw in MQTT devices upgrading from givTCP v2.4.9 to v3.0.4, before and after using MQTT Explorer to clear out duplicates and gruff. Restarting of HA is important. I found that some entities initially showed up but became unknown after restarting HA.

The diagram should help out anyone upgrading. Note that your set up may well have a different collection of devices at the first hurdle but the same after MQTT Explorer treatment with your inverter and battery IDs in place of mine.

Key points

  1. Seven MQTT devices were shown as 'unknown'. If selected, some of these linked to an entities labelled as unknown.
  2. After MQTT Explorer treatment, the 7 'unknown' devices either disappeared or, as with the two 'Battery details devices, they reappeared under a new name with 'Battery details' gone. Only 3 devices came through with an unchanged name.
  3. After MQTT Explorer treatment, my initial list 14 MQTT devices had been reduced to 9, all linked to my Gen1 Ac model and with no 'unknowns'.

Conclusions (Do shout if I am wrong anywhere)

  • All entities now show up, including the battery entities which we refer to when monitoring the health of our batteries.
  • As a user, I think you would only spot this issue of you looked for battery details which are for monitoring purposes. The inverter is the brains behind the system and the operational devices didn't have an 'unknown label'. Note how many names were changed.
  • I think I had so many problems because I was running on a combination of the v2.4.9 and v3.0.4 devices that MQTT had chosen for me.
  • I am surprised that this wasn't picked up during testing. I think there are various other test versions of givTCP v3 being developed but the MQTT issue for those upgrading from givTCP v2 does need to be addressed.

I am happy to help out anyone grappling with this upgrade and hope that this contribution helps.

If I was doing this again today, I think I would try the 'Delete MQTT' method of @PianSom.
See PianSom
I look forwards to the results from our Delete MQTT Guinea pig(s).

Rob

G
#2558 geoffreycoan

looks good, but of course you don’t escape without getting some more free feedback ….

its hard to be 100% sure but it looks like some of your YAML is mis-formatted, specifically you need two indented spaces after the tag entry, and tags should be two spaces indented so they are part of the module: predbat at the beginning

This may or may not cause you problems, have seen other people have settings ignored because the YAML indentation was wrong

so:

  sometag:
    - value

not:

  sometag:
   - value

Looking at your YAML I noticed this potential mis-formatting on the following entries:

> pause_mode:
>    - select.gw_{geserial}_battery_pause_mode
> 
>  pause_start_time:
>    - select.gw_{geserial}_battery_pause_start_time_slot
>   pause_end_time:
>    - select.gw_{geserial}_battery_pause_end_time_slot
> 
>   inverter_limit:
>    - 12000
> 
>   inverter_limit_charge:
>    - 10000
>   
>   inverter_limit_discharge:
>    - 6000
#2559 PianSom

There are loads of online tools you can run your yaml through. They usually check for errors, format properly and, if wanted, strip comments.

yamllint.com is my go-to, but that's just a habit. There may well be better ones out there.

R
#2560 Rbor

PianSom I had a look at Yamllint but it didn't seem to reformat.
I copied in the code from Daveb01 but it didn't correct the indentation.
It also stated that the yaml was valid.

I found Yaml Validator which also formats the code
https://jsonformatter.org/yaml-validator
It mended the code from Daveb01
So I will add Yaml Validator to my toolkit.

Rob

W
#2561 Wavy Davy

Is updating to givTCP compulsory, beneficial or advised (or any combination of).
I'm still on 2.4.9 and don't have any of the devices listed.
Not sure I want to be a guinea pig, unless I have to be !!

D
#2562 Daveb01

Thank you all for the advice. I have had a look and it’s all in line? Perhaps it was my copy and paste that was throwing it off.

My HA in file edit mode has a green tick ✅ in the corner if it is valid and a red exclamation mark ❗️ if it’s not.

Here is a screenshot rather than a copy and paste.

D
#2563 Daveb01

Wavy Davy

Let’s see how many 🍺🍺 icons you get in reply posts (to being a guinea pig) 👍😀

L
#2564 Leeshore

I updated when givtcp 3.0 was released. I deleted all the relevant battery entities not being used and then restarted givtcp. The new battery entities just appeared. I have had no problems since. It was straightforward. I always update software immediately on release. I like to live dangerously 😬😬

D
#2565 Daveb01

geoffreycoan

I have now lined up all the # and -

D
#2566 Daveb01

Jellybaby

FYI - here is my Predbat plan for tomorrow (the guys will correct me if I am wrong)

It is one of the things I had difficulty with, why is it charging for 2 slots and then maintaining SoC and using the Grid (in the middle of the night)

The Solar forecast tomorrow in my area is crap so Predbat wants to make sure I have enough battery to last (especially at peak time). Plus why discharge the battery (battery loss) and then charge it back up again (battery loss) if there is no sun and the prices are higher during the day than at night. If there is more sun than predicted then the battery can be charged back up and can also be held, and solar exported to the grid to give me a bit of £. Welcome to Predbat 🥴🥴


J
#2567 Jellybaby

Predbat been in charge few days now and ive not seen it tank like this in a while, 2.8kwh and its gone down 40%

LAST WEEK FOR COMPARISON

It reckons its going to last til 9pm LUL

17% now and still above 310v, thats odd, I can't even set a minimum cushion incase of power cut as within a week it will probably SOC crash from 50% lol

EDIT
13% and ive still not gone below 311v lol

I don't know how everyone elses system is handling this better than mine.

D
#2568 Daveb01

Jellybaby

I have set mine to 5% instead of 4%. You can set it higher if you need to for power cuts.

If you would like more info on setting up this card please let us know. It’s an Entities Card btw.
I don’t touch the settings as it messes up Predbat. I have only changed the one setting.

D
#2569 Daveb01

Has anyone set this up please?

Not sure what to put in place of letting Trevor know about all my notifications (he will not be happy)

# Specify the devices that notifies are sent to, the default is 'notify' which goes to all
  #notify_devices:
  #  - mobile_app_treforsiphone12_2
J
#2570 Jellybaby

Setting a minimum is useless if the battery is going to be this big of a problem in regards to SOC and capacity.

Ok, before battery hit 4% Saturday shortly after midnight it discharged 0.8kwh before hitting 4% so officially this is day 5 predbat has been in charge.

20:00 310v at 6%

Minus the 0.8kwh before it hit 4% on Saturday that is 35kwh charged, 26.7kwh discharged, 8.3kwh discrepancy over 5 days is 1.6kwh so it matches with my previous history of losing 1.4-1.6kwh a day from a flat to full charge.

20:06

T
#2571 TX200

Daveb01 go into settings, devices

Search for mobile

You'll see what yours are called there.

Then search in entities for the device and you should see the underlying name (e.g. the one with no apostrophes and spaces).

You can then uncomment out that line and change it accordingly (keep the mobile_app_ bit just edit the second half of it). Or leave it as is and it will notify all devices that have the HA app installed.

You can create notify groups too, so certain things can have different phones notified.

R
#2572 Rbor

Daveb01 Your 1st 'select is correct but the other 3 are all wrong!
You need 2 spaces underneath the top statement in each case.
i.e. (I have used . to represent a space each time).
And when you have a dash, there is one space after.

..pause mode: 
....-.select

Your two inverter limit statements are similarly missing a space before the -

Battery charge statements are fine.

Rob

R
#2573 Rbor

Daveb01 The Solar forecast tomorrow in my area is crap so Predbat wants to make sure I have enough battery to last (especially at peak time). Plus why discharge the battery (battery loss) and then charge it back up again (battery loss) if there is no sun and the prices are higher during the day than at night. If there is more sun than predicted then the battery can be charged back up and can also be held, and solar exported to the grid to give me a bit of £. Welcome to Predbat 🥴🥴

Well done. You are learning the Predbat way.
Predbat is grabbing the 2 'lowest' import rates @ 18.08p and just topping up the battery for the other slots.
And even then, it is only charging @ 18.08 p for a small amount for one of the slots.

Rob

G
#2574 geoffreycoan

Daveb01

Explaining your plan, brief notes:

  • poor solar forecast tomorrow with the solar forecast being about the same or sometimes lower than your predicted house load
  • import rates for the day are in the 22-26p range, higher than they are overnight
  • therefore predbat plans to give you a reasonably full battery at the start of the day so you don’t import at those 22+p rates
  • overnight battery is being charged in the two cheapest slots - note the status is “Planned Charge” and your cost and accumulated cost are going up - i.e. Predbat is grid importing to charge the battery
  • most of the rest of the time Predbat is ‘Maintaining SoC’, holding SoC at a fixed level (what’s in the limit column). This will cause grid importing as its running the home off the grid, but you can see your predicted load is very low and most slots its only incurring 2 or 3p of grid importing
  • why not let the battery meet the house load? Simply it’s cheaper to grid importing at the 19/20p rates overnight and not incur the inverter and battery losses of letting the battery discharge and then have to recharge it later on, when as you can see the rates are increasing
  • in the 21:00 and 6:00 onwards slots predbat is not doing a forced discharge, the battery is in Eco/Idle mode and the battery is meeting house demand (you can see that by SoC dropping but there is no negative (export) cost). These are the comparatively more expensive slots so best to let the battery discharge

and Rbor has the YAML issue correctly identified

R
#2575 Rbor

Wavy Davy If v2.4.9 is running smoothly, you don't really need to upgrade.
v3 has been flaky and I decided to take the plunge as reports suggested that v3.0.4 seems to be more stable.
I always like to have latest versions, if possible.
..... and I can always downgrade back to v2.4.9 if I need to (as I have done several times over last couple of months)

I think that v3 is needed for AIO but AIO users could confirm this. I have an old AC3.0 inverter.

Rob

J
#2576 Jellybaby

Daveb01 Mine only wants to take me to 77% which isn't going to last through this

I usually fully charge from grid and have it start discharging from battery at 6am typically.

EDIT
It dropped from 4 charge slots to 3 so would only put in 9kwh overnight, can't risk it, predbat stopped for now.

It put in 3kwh during first charge and its up to 34%, according the the average charge that goes into the battery 30% is around 4.26, equipment is too crap for predbat to work properly.

Never seen it above 310v at 5% before.

Edit
New record low went into battery today, 11.2 which means I won't even get 10kwh use out of it today, safe to say my predbat experiment is over with if 5 days was enough to screw it up this badly.

I have not seen charge numbers this bad since BMS8 but at least BMS8 was a lot better at tracking in/out.


T
#2577 TX200

Jellybaby maybe a bit late now, but if you think you're going to use more load on a particular day, adjust the load scaling value from 1.05 to something higher maybe 1.5

Likewise if you think you won't use as much as normal, drop it down to say 0.8 and PredBat can then plan to export or at least not charge as much.

G
#2578 geoffreycoan

TX200 I was going to say the same to @Jellybaby

as you’ve said before, Predbat can’t be blamed for the poor soc management on your AIO, it naturally assumes that the SoC will track correctly based on loss factors and predicted load etc. It is trying to minimise your costs by only charging the battery enough to meet your load through to the next cheap charging period.

If you increase best_soc_keep to tell it the amount of soc you want to keep in the battery for ‘just in case’ situations or load_scaling to tell it that you predict to use more load than historically you have, these will encourage Predbat to charge more overnight.
You can also manually tell it specific slots you want to charge with select.predbat_manual_force_charge if you want to add extra charging although this may cancel charge slots predbat had planned so you might need to set a whole load overnight. Could do this manually or via an automation

Or if its really not working for you overnight, create an automation to set it to read only, force your own charge, then set back to read only when you want to.

M
#2579 matttheotter

@geoffreycoan new battery has been swapped out on my system, do I need to re-configure the MQTT broker for it to be visible in HA?

D
#2580 Daveb01

Rbor

Thank you again 🍺🍺, this now makes sense, 2 dots and 4 dots. I have checked it again and hopefully I now have this correct after the third go.

One question then please. Is the battery_charge_power_curve correct. 4 dots before the first number 91?

M
#2581 matttheotter

matttheotter note to self, the answer was yes 😃

G
#2582 geoffreycoan

matttheotter When I had my 9.5 battery replaced GivTCP found the new battery fine but as the new battery has a new id, yes, I noticed 8 months later that all the old battery entities were still in HA. HA wouldn’t let me delete them, so more googling and found that (as recently covered) you have to delete the MQTT topics with MQTT explorer and then reboot MQTT and HA.

Swapping an inverter is less disruptive as the engineer can make the new inverter take on the identity (serial number) of the old inverter. The cumulative PV total, battery charge and discharge total all get reset to zero though, but the import and export totals which come from the CT meter, these don’t get zero’d.

Daveb01 One question then please. Is the battery_charge_power_curve correct. 4 dots before the first number 91?

Yes, each sub-entry is indented a further two spaces each time

It doesn’t help that the original apps.yaml template had some YAML indentation issues. I think I have fixed them all now, but I have a plan to rework the structure of apps.yaml and merge the different inverter versions together, so will have another look when I get back from France

R
#2583 Rbor

Daveb01 A lesson on yaml for you.

First go to Predbat documentation here:
https://springfall2008.github.io/batpred/apps-yaml/#warning-appsyaml-file-format

Then watch the video mentioned in the documentation:

The YAML Basics from This Smart Home is a good introduction video to how YAML should be correctly structured,
https://www.youtube.com/watch?v=nETF43QJebA

That should help you with some of your yaml formatting queries.
I have just watched it again. It has helped me and I will look at some of his other videos.

Extra point on apps.yaml
In the start of apps.yaml, you see this:

# ------------------------------------------------------------------
# This is an example configuration, please modify it
# ------------------------------------------------------------------
pred_bat:
  module: predbat
  class: PredBat

And in apps.yaml, everything under the initial 'pred_bat' is indented with two spaces.
Scroll down the file and you will see this.

Rob

M
#2584 matttheotter

geoffreycoan was a bit easier, I deleted the additional battery from MQTT (didn't need explorer) and rebooted, it seemed to clear it up.

I purged the old records from recorder as its not essential.

Battery voltage seems stable, back to 200Ah capacity (mine had dropped down to 184Ah).

J
#2585 Jellybaby

I think it holding the charge all the time threw the SOC off which left me empty at over 310v still and resulted in only 11.2 being put into battery which is around 3kwh less than what usually goes in on BMS10.

R
#2586 Rbor

Jellybaby It would be good if you can stick in there with predbat.
Looking at the rates, this is a difficult time for making predictions.

For most of the year, there is a larger difference between 15 kWh for export and import rates. Currents rates are hovering around the cut off point between saving and costing.

I moved onto Agile in mid-January 2024 and onto Predbat at the end of January. I am still learning.
Looking back, my mean import rate since January is 9.2 p/kWh. Current rates are atypical and a real consequence of lack of wind (and until recently, solar).

My daily imports into the battery do vary. It depends on how much is in the battery at midnight for the start of the day. I can see that you are expecting about 14 kWh being imported during the day but is this always from the same starting point?

If you are using the WebUI, it is worth looking at the Configuration tab and seeing how many entries are red, indicating that they are not default entries. I find this very useful as it is easy to lose track of any tweaks that I have made. The Config tab reminds me of the defaults and shows if I have any entries that are wayward and may be causing issues.

Rob

J
#2587 Jellybaby

Rbor The around 14kwh is the charge put into the battery not the overall import but 11.2 is the lowest ive seen outside of BMS6+7 and the charge til full has been relatively consistent as has the roughly 1.5kwh less I get out that I put in which seems to over time give less capacity overall every day I go without full discharge.

310v at empty is extremely high imo even for several days without full discharging.

Going back through my charge/discharge chart even when a full charge occurred on the 25th of August and I never had a flat discharge til the 31st of August the voltage still got down to low 300's.

Even full charge on August 12th and flat on the 16th it got down to 302v, this has been the first time its been that high and the lowest charge ive seen go into the battery outside of 6+7 and that was only 5 days after using predbat.

It got to 4% at over 310v and given ive only gone below 14kwh into battery 3 times since BMS10 went on 5th August for 2x13.8 and 1x13.7 to find only 11.2 going into it last night was quite alarming.

G
#2588 Goshiki2

Jellybaby if you’ve got GivTCP 3 installed it might be worth checking individual cell voltages rather than the overall voltage displayed on the app. If you have a dodgy cell or bank of cells it might explain your SOC concerns. It’s not a quick job but I’ve put all mine on a dashboard showing voltage and temperature of each cell and by temperature alone I can clearly see the order in which the packs are stacked with the coolest nearest the floor. I also have one bank of 12 cells which appear to drop voltage quicker than the others so I’m keeping my eye on that as the weather starts to cool down.

M
#2589 matttheotter

@geoffreycoan just looking at my "new" to me pack, do you have much cell to cell diviation on your 9.5.

The new pack is already showing that cell 8 struggles when underload, dipping quite a way from the other 15
cells.

#2590 PianSom

Just me?

G
#2591 Goshiki2

PianSom I had that last week after I had done an update. It eventually went through all the days previous I had in apps.yaml but then it’s been fine since.

R
#2592 Rbor

PianSom no, not just you.
I have experienced this issue for months. At least your times are just 5 min.

I got rid of the warning by increasing this line in apps.yaml from the default of 30 min:
load_filter_threshold: 30
I did raise this as an issue on GitHub but nothing came of it.

I found that changing 30 to 60 did the trick for me. At times, I increased the threshold further.

So this is a 'solution' to getting rid of the warnings but it doesn’t get down to the cause. I could see no evidence of where the missing data had come from.

Rob

J
#2593 Jellybaby

Goshiki2 Currently I do not, it would mean starting with fresh history, but I may have to bite the bullet, I don't really deal with the app unless I want to check if there is a connection issue, I mainly deal with the portal.

Id love to start over fresh but ive not learnt enough about HA and how to get the info on addons manually I have just had it dump everything onto overview tab that takes around 2gb when I load it lol.

J
#2594 Jellybaby

How do people with AIO have their voltages set up, tried history graph for each battery but for some reason it looks like this lol

First two are side by side but can't get the other two side by side.

Or does everyone just slam them all in the same one?

J
#2595 Jellybaby

Jellybaby I just wanted to do an update on this, I should have done it earlier but hey ho at just after midnight I was at 313.5v and 47% SOC so I decided to try force discharging, yesterday 11.2 went in from flat to full and then later 1.9kwh went into the battery via solar for a total of 13.1kwh.

After the battery got to 4% tonight
Battery Charge Total 13.1
Battery Discharge Total 14.3
Discrepancy -1.2
Battery Voltage at 4% 300.56, bounced back to 303.01 then 304.67 the minute after.

Not sure why this may have occurred but im going to do another full charge to see what goes into the battery now.

EDIT
Seems updating to GivTCP3 came at a cost, is this common

EDIT 2
Battery just finished charging, 13.9kwh went into it.

D
#2596 Daveb01

Jellybaby

This is what I have. (Geoffrey) posted all the card in the set up Predbat from scratch post.

As the AIO has 4 modules it was easy with 2 columns. However as I have 2 x AIO’s I had a load of cut and paste to do, to replay the s/n.


R
#2597 Rbor

Jellybaby HA is a rabbit warren. I am steadily learning HA. Using Predbat has taught me many of HA tricks.

I wish that HA's error messages were more helpful.
I had one the other day 'See Supervisor logs'. So where on earth are they?
I found them after a Google search as I discovered all the logs under a non-obvious drop menu top right of System/logs page.
I want to learn about the info in the Developer page, a project in its own right.

Rob

D
#2598 Daveb01

Rbor

I have two big learning lessons.

  1. There are really lovely people on here willing to help, and they all like a puzzle (if we come across one in HA/Pradbat).

  2. Only change on setting at a time, and leave it a few days to see how it goes. Don’t be tempted to change more or your thinking of what should happen may not and you wont know which one to change back etc.

G
#2599 geoffreycoan

matttheotter The new pack is already showing that cell 8 struggles when underload, dipping quite a way from the other 15

You’ve got great correlation on all bar one cell. Similar to my own which has the cells broadly tracking together but has two cells that deviate. That deviation indicates either a bad cell or a bus bar that’s loose so looks like another call to GivEnergy support as it’s not going to get better on its own …

PianSom the “missing data” I too get it all the time. There’s something ‘not quite right’ with the historical load process and both Rob and I have mentioned it to Trefor but nothing has come of it.
I just ignore it now, it does it for every day saying there is a data gap when I know there isn’t, but it averages out from other days so its just part of the general muddle of it being a series of approximations of historical data.

Jellybaby Screen layouts in Home Assistant are not great. The default Masonry view is a pain to use and results in the sort of layout you have shared. I use an alternative (HACS) layout called Grid for my templates but for quite a well Home Assistant has been developing a new view type called ‘Sections’ which are much more flexible.
The latest release 2024.11 of Sections the release notes say they have moved from being ‘Experimental’ to being mainstream so I’d recommend you change the view type to Sections and that should give you much better screen layout control.

Jellybaby The negative energy and solar, yes this is a problem with GivTCP.
Are you using the ‘today’ sensors or ‘total’ sensors on the HA Energy dashboard? You can actually use either and the Totals are more stable than the today sensors. So if you are not, I’d recommend swapping to using the Totals for Battery charge, Import, Solar gen, etc on the Energy dashboard.

This fixed a lot of my Energy dashboard weirdness but on GivTCP v2 I still get a residual issue with the Energy dashboard with wild values every time I restart HA. The fix is to correct the underlying statistics (Developer Tools/Statistics - search for the sensor name, select the date and time of the data bump and correct the sensor value). I think this may be less of an issue with GivTCP v3 but I’m not on it yet

R
#2600 Rbor

geoffreycoan the “missing data” I too get it all the time. There’s something ‘not quite right’ with the historical load process

My 'fix' of increasing load_filter_threshold in apps.yaml is a workaround, rather than a fix (and may do more harm than good!)
For some time, I have run Predai alongside Predbat and I periodically try using predai instead of directly using HA historical data in apps.yaml. I then look for differences in the charts, particularly 'in day adjustment. When I use predai, the "missing data" warnings are not there, which is good. But I think (?) that predai uses the same historical data as HA ???
I like 'no warnings' but the downside is that predai obviously has overheads and it can take predbat a long time to update after tweaks, even changes to apps.yaml.

I am going back to HA historical from predai in apps.yaml and I am also going back to the default threshold of 30 min and I will see if "missing data" improves or at least decreases (I suspect not but all parts of experimentation). Perhaps it may be time to remind Trefor that this issue hasn't gone away.

The fix is to correct the underlying statistics (Developer Tools/Statistics - search for the sensor name, select the date and time of the data bump and correct the sensor value). I think this may be less of an issue with GivTCP v3 but I’m not on it yet

It would be great to have a 'Starter' on using Developer/Tools which is an intriguing part of the HA rabbit warren. Where does one start? You have been great in directing us to relevant parts of Developer Tools but next time I visit the page, the vast number of options sends my mind into a spin and back to first base.
Do you know any good sources of info/useful videos, etc?

Rob


W
#2601 Wavy Davy

PianSom Nope !
Mine used to be about 5 mins missing Just checked now and it seems a bit excessive.

W
#2602 Wavy Davy

Looking again at it it decreasing by 5 mins every 5 mins.
I did have a problem where predbat was off line for a while, so I'm hoping it's just missing data from that time and it will clear it as it adds new data into the historical data.

R
#2603 Rbor

Having gone back to using HA historical directly and load_filter_threshold: 30, this is my latest (with no predai):

Over the past week, I was again grappling with trying to upgrade from givTCP v2.4.9 to v3.0.4. There were certainly some gaps in my records. I will see if the day number with missing data progresses day-to-day or if new days gain missing data.
I have followed documentation guidance for previous, using days 2–8 inclusive with equal weighting.
My Mosquitto logs used to contain two MQTT links but with v3.0.4 (hopefully working properly now), I now just have one link. I wonder whether the two links could have contributed to the errors for me.
So one to monitor.

So one to watch.

Rob

R
#2604 Rbor

Strange error/warning.
When I look at an add-on log, I get this comment at top of screen:

The reference changes depending on the add-on.

In System logs (Core), I get more info. There IDs refer to givTCP 3, predbat, mosquitto, predai, and givTCP v2.4.9

I have searched for this error on internet and there are several HA issue threads linked to this, one started in May 2024 and still rumbling on. I may add to these.
There are suggestions that the error is linked to aiohttp.server (whatever that is!). I think I started to see the message after I upgraded to latest version of HA a week ago. But I have also changed my router and I now have different IP addresses. But givTCP finds the new IP address just fine.

Any clues? Anyone else seeing this?
I am continuing to just ignore the message, especially as I can see the logs anyway.
The good news is that it doesn't look like a predbat problem.

EDIT
I have now found these error lines in homeassistant.log, followed by tracebacks.
I will add details to the HA issues on Github, together with my download of homeassistant.log.

Rob

#2605 PianSom

Goshiki2 Rbor geoffreycoan Wavy Davy
Thanks all, nice to hear. Sounds like one of those things that perhaps ought to be in a debug log but is now taking over.

More generally, my view is that the logging/messaging by Predbat needs a little love. I use Discord to keep an eye what is going on in various containers, and find that serious Predbat problems don't get reported while general "moving to charge mode"-type things do (to notify_devices). Is that fair, do you think? I will raise as an issue if others share my view.

R
#2606 Rbor

PianSom If anyone is brave enough to go back through this thread, we have often discuss the same issues. How many times have we questioned days previous? And the counter-intuitive situation where 'days_previous: 2' means yesterday from today. https://springfall2008.github.io/batpred/apps-yaml/#understanding-how-days_previous-works

@geoffreycoan has often stepped in to expand documentation to provide explanations and answers.
This "missing data" issue keeps getting raised, often as more folk come on to predbat, spot the issue, and then seek help from us.
As I get this warning every 5 minutes, every time that predbat reviews the plan, I will switch on debug to capture this warning. I can then post the debug file within a predbat GitHub issue focussed on the "missing data"
I think we had an explanation along the lines that the warning will have been in slots during which there was little data. Hardly the case currently! One of my gaps is for 700 minutes which is nearly 12 hours.

Would it be useful to compile a list of unresolved predbat issues?

Rob

G
#2607 geoffreycoan

Rbor yes I think it would be a good idea to re-raise this as a new github issue for Trefor.

Like Mark with GivTCP, Trefor gets a lot of github issues raised, so not surprising that he doesn’t get time to look at some of the lower priority things. It would be good if some of these warnings could be cleared up though as the clutter does cause repeated questions.

Looking at my own log I see the following warnings:

22024	2024-11-15 16:31:07.672200: Warn: Historical day 4 has 10 minutes of gap in the data, filled from 35.44 kWh to make new average 35.69 kWh (percent 99%)
21979	2024-11-15 16:31:04.556851: Warn: Out of range index 1 within item device_id value
21942	2024-11-15 16:31:03.395158: Warn: Out of range index 1 within item inverter_battery_rate_min value 0
21729	2024-11-15 16:30:05.727553: Warn: Out of range index 1 within item inverter_battery_rate_min value 0

My HA hasn’t been rebooted since 27th October so it can’t be that that’s causing a gap in data.

The out of range warnings I did mention to Trefor before and I think he knew what they were. One of them is I think due to having more than one inverter. Dunno

Sorry no idea about your logfile error either. Sounds like a supervisor problem if its affecting multiple addons. Maybe a full shutdown and reboot of HA and all addons might cure it?

R
#2608 Rbor

Wavy Davy I have looked at what its happening to 'missing historical day minutes' in my predbat addon log and here is a snapshot:

  • At 11:50, day 4 started to lose 5 min and this was picked up by day 5 joining the party
  • Then every 5 min, day 4 loses 5 min and day 5 gains 5 min. This trend continues.
  • At this rate, day 4 should have transferred all its remaining 600 minutes to day 5 in 10 hours (effectively the end of day 4).

In apps.yaml, my 'previous days' are set as 2-8 but ....

  • From 11:45, day 7 is losing 5 min every 5 min and it looks like these are disappearing.
  • So I am hopeful that I may have lost my missing data in about 3 days time. let's see.

On to your data ....

  • I think you might have an issue with your day 5.
  • Your day 3 is losing 5 min every 5 min but where are they going? To day 6 which is gaining 5 min every 5 min.
  • You have a day 8 which is stuck on 15 min (at the moment)
  • But what are your 'previous days' shown in apps.yaml?

Lots of food for thought if you have made it through to this point!

Rob

R
#2609 Rbor

geoffreycoan Today looks like investigating glitch day for me.

In your historical dat log, are you seeing the transfer of minutes from day to day identified by Wavy Davy and me.

What does your Mosquitto log look like?

Once I had moved properly from v2.4.9 to v3 my log looks clean:

On v2.4.9, the log had 2 connections and I reckon it included fragments from v2.4.9 and v3 as I has tried the transfer several times. There is a TCP_1 suggesting duplication.

See how clean your mosquitto log looks.

Rob

R
#2610 Rbor

geoffreycoan Sorry no idea about your logfile error either. Sounds like a supervisor problem if its affecting multiple addons. Maybe a full shutdown and reboot of HA and all addons might cure it?

You're a genius .... Full shutdown followed by HA reboot, followed by the anxious wait for predbat to get up to speed and now the weird error messages have gone.

Thanks

Rob

M
#2611 matttheotter

geoffreycoan

More than one oddity with this pack, if anything the variation is worse than my previous battery.

Other more positive news, my parents AIO is on Predbat using GEC.

It gives me a good view on how things are running, managed to convince my Dad that having this run locally means we can make the EVC run smarter with their Mini on IOG as there are some quirks, going to get one of those N100 boxes for them as it will just sit there running HASS.

J
#2612 Jellybaby

matttheotter Hopefully they fair better than I did, I tried turning it on after updating to GivTCP 3 (before reverting back to 2.4.9 VM folder I copied before updating) but got a load of errors despite sensors being same name.

That greenish line is quite out of whack though.

V
#2613 Vestas

matttheotter That battery is unwell to say the least. I'd stop using it were I you and insist on an immediate visit from GE.

G
#2614 geoffreycoan

Rbor My Predbat log today shows a 10 minute gap of house load on day 5. Yesterday it reported a gap of 10 minutes in day 4.

So if you think about it, this and the behaviour of the gaps moving backwards makes sense as time marches forward any data gaps will recede into the past.

What it doesn’t explain is why there is, or Predbat thinks there is, a 10 minute gap in the house load data.

If you are using a ‘standard default’ config then you’ll be using the load sensor directly from the inverter so any breakdowns in the inverter->givtcp->mqtt->HA chain could well cause a small data gap. Unless you’ve had a major outage then I’m doubtful you’d get gaps as big as Wavy Davy reports, but this could explain why there is such a prevalence of these issues - for standard installs/configs.

But for me I don’t use the load sensor from my inverter as there are two inverters and they share the load between them so the load figure is meaningless. Instead I calculate my own instantaneous load but do so on a time based trigger every 5 minutes. So as long as HA is running (and the uptime says it has been for the past 3 weeks), I should get a new house load figure automatically every 5 minutes with no data gaps.

🤷‍♂️

Try to look at my Mosquitto log from the add on and I get a random error, and getting this from the Log tab of other add-ons as well:

But no errors in the core log as you had and I can see the Mosquitto log ok in system/logs/mosquitto:

2024-11-16 09:01:45: New client connected from 172.30.32.1:48905 as GivEnergy_GivTCP_2 (p2, c1, k60, u'addons').
2024-11-16 09:01:46: Client GivEnergy_GivTCP_2 disconnected.
2024-11-16 09:01:46: Client <unknown> closed its connection.
2024-11-16 09:01:46: New connection from 172.30.32.1:58123 on port 1883.
2024-11-16 09:01:46: New client connected from 172.30.32.1:58123 as GivEnergy_GivTCP_1 (p2, c1, k60, u'addons').
2024-11-16 09:01:46: Client GivEnergy_GivTCP_1 disconnected.
2024-11-16 09:02:22: New connection from 172.30.32.1:57861 on port 1883.
2024-11-16 09:02:22: New connection from 172.30.32.1:57335 on port 1883.
2024-11-16 09:02:23: Client <unknown> closed its connection.
2024-11-16 09:02:23: New connection from 172.30.32.1:52985 on port 1883.
2024-11-16 09:02:23: New client connected from 172.30.32.1:52985 as GivEnergy_GivTCP_2 (p2, c1, k60, u'addons').
2024-11-16 09:02:23: Client GivEnergy_GivTCP_2 disconnected.
2024-11-16 09:02:23: Client <unknown> closed its connection.
2024-11-16 09:02:23: New connection from 172.30.32.1:48603 on port 1883.
2024-11-16 09:02:23: New client connected from 172.30.32.1:48603 as GivEnergy_GivTCP_1 (p2, c1, k60, u'addons').
2024-11-16 09:02:24: Client GivEnergy_GivTCP_1 disconnected.
2024-11-16 09:02:47: New connection from 172.30.32.2:58408 on port 1883.
2024-11-16 09:02:47: Client <unknown> closed its connection.

It looks similar to your own, regular connections from ‘givtcp’ and ‘unknown’ which are repeatedly made and disconnected. I have givtcp_1 and givtcp_2 presumably as a result of two threads in the addon corresponding to the two inverters.

matttheotter I wonder if doing a low power recalibration is needed first, its likely that GivEnergy will suggest that before sending an engineer out. Basically initiate a calibration from the portal (or GivTCP !), and set the discharge and charge power to low values, say 900W. I’m planning on trying that on my battery first but will wait until I get back to the UK and have some reasonable Agile rates as it’ll take all day or night to fill the battery slowly

V
#2615 Vestas

geoffreycoan I wonder if doing a low power recalibration is needed first

Not with variances that large. Looks like busbars again, hence me suggesting he insists on an immediate visit. Replacing a faulty battery with another faulty battery justifies this as legally they're not honouring their warranty.

Edit - I can definitely see why Octopus binned GE.....

R
#2616 Rbor

geoffreycoan Looking at my own log I see the following warnings:

> 22024	2024-11-15 16:31:07.672200: Warn: Historical day 4 has 10 minutes of gap in the data, filled from 35.44 kWh to make new average 35.69 kWh (percent 99%)
> 21979	2024-11-15 16:31:04.556851: Warn: Out of range index 1 within item device_id value
> 21942	2024-11-15 16:31:03.395158: Warn: Out of range index 1 within item inverter_battery_rate_min value 0
> 21729	2024-11-15 16:30:05.727553: Warn: Out of range index 1 within item inverter_battery_rate_min value 0

Is HA objecting to the inverter_battery_rate values that you have set?
What settings do you have here?
This is from my apps.yaml which follows documentation advice:

  # Some inverters don't turn off when the rate is set to 0, still charge or discharge at around 200w
  # The value can be set here in watts to model this (doesn't change operation)
  inverter_battery_rate_min:
    - 200

  # Workaround to limit the maximum reserve setting, some inverters won't allow 100% to be set
  # Comment out if your inverter allows 100%
  inverter_reserve_max: 98

But for me I don’t use the load sensor from my inverter as there are two inverters and they share the load between them so the load figure is meaningless. Instead I calculate my own instantaneous load but do so on a time based trigger every 5 minutes.

..... and where does your 'instantaneous load' fit in?

Rob

R
#2617 Rbor

Wavy Davy Rbor geoffreycoan
Back to historical data.....
I have tracked what has been happening to my "missing data" (previous days set to 2-8 inclusive, weighting 1).
The good news (for me!) is that I now don't have any "missing data" for the first time in months.
And coincidentally, I had finally successfully upgraded from givTCP v2 to v3 but had carefully filtered out conflicting/duplicated MQTT entries using MQTT Explorer.

This is what happened and may give you an idea of what to look out for.
Made more complicated as the day ID changes each day.

Historical day 4 disappears: All "missing data" passed on to historical day 5

Historical day 7 disappears: All "missing data" now lost

Historical day 5 disappears: 620 minutes of missing data disappears all in one.

And finally, no "missing data". I hope that I will get better agreements now in charts, especially the 'in-day adjustment' where my predicted load has been consistently and significantly lower than actual.

I have re-read documentation (many times) on historical data and 'how days_previous works' https://springfall2008.github.io/batpred/apps-yaml/#understanding-how-days_previous-works.
Perhaps we need to add the phrase 'by magic'.

G
#2618 geoffreycoan

Rbor > 22024 2024-11-15 16:31:07.672200: Warn: Historical day 4 has 10 minutes of gap in the data, filled from 35.44 kWh to make new average 35.69 kWh (percent 99%)

21979 2024-11-15 16:31:04.556851: Warn: Out of range index 1 within item device_id value
21942 2024-11-15 16:31:03.395158: Warn: Out of range index 1 within item inverter_battery_rate_min value 0
21729 2024-11-15 16:30:05.727553: Warn: Out of range index 1 within item inverter_battery_rate_min value 0
Is HA objecting to the inverter_battery_rate values that you have set?
What settings do you have here?

inverter_battery_rate_min and inverter_reserve_max are both commented out in my apps.yaml as my inverter doesn’t suffer from the 200W partial discharge issue and I can set the reserve to 100%. I think you can probably set the reserve to 100% on yours Rob. Changing the default to 98 was introduced I think for AIO’s that don’t like being set to 100.

I think it’s just a code bug, not checking for the end of an array iteration properly.

Well done with getting to no missing load data. To explain my load calculation, I create the following sensor in templates.yaml and use that for Predbat’s load input:

# Home consumption sensor, updated every 5 minutes instead of the default of every minute
- trigger:
    - platform: time_pattern
      minutes: "/5"
  sensor:
    - name: "House Load Today"
      unique_id: "house_load_today"
      unit_of_measurement: kWh
      state_class: total
      device_class: energy
      state: >
        {% set x=(states('sensor.total_solar_energy_today')|float(0) 
          + states('sensor.total_battery_discharge_today')|float(0)
          - states('sensor.total_battery_charge_today')|float(0) 
          + states('sensor.grid_import_today')|float(0)
          - states('sensor.grid_export_today')|float(0) ) 
        %}
        {{ max(x,0)|round(1) }}

This sensor is auto-updated every 5 minutes (the time_pattern trigger) with the house load, calculated as you can see. Its triggered every 5 minutes as this is good enough granularity for Predbat’s calculation and it saves unnecessary state history in the HA database

R
#2619 Rbor

geoffreycoan
I wonder sometimes whether HA and/or Predbat hates me:

Looking at my previous breakdown: Rbor

  • At 04:10 today, historical day 5 got rid of all 620 min of "missing data" at 04:10 today, leaving no "missing data"
  • At 11:50 am today, historical day 6 started to pick up "missing data", presumable from the data lost earlier from historical day 5. I suspect that all 620 min will be picked at, 5 minutes, every 5 minutes.
  • ... and for the process to continue until the 620 minutes have been passed on to day 7 and then lost.

Coincidentally, looking right back through my logs, what was day 5 started being filled at 11:50 yesterday.
So it looks like 04:15 am is 'emptying time' and 11:50 am is 'filling time.

Apologies if this makes no sense. At times the process makes little sense.

Rob

T
#2620 The Black Cat

This is what I don't understand about predbat. Why would it choose to charge in the 06:00 slot at 9.55p instead of the 03:30 slot at 8.18p?

It's just about charging at full rate from 04:00 to 06:30 but could have easily charged from 03:30 to 06:00 instead. I know it's not much in terms of cost but I can't see any logic why it would do it that way.

It also doesn't make sense that it only charges up 6% between 05:30-06:00 at 7.93p, then charges up 15% between 06:00-06:30.

Any ideas why it's doing this?

B
#2621 browellm

The Black Cat If it thinks charging later is going to prevent you from dipping into a high import cost later by covering house use from the battery then I guess that would do it.

R
#2622 Rbor

The Black Cat I can see your point but remember that these predictions are based on Nordpool data, almost a probate holding pattern.
Once the real rates appear at 4 pm, predbat will revise the slots anyway and the revisions will continue through the evening (and during the night!)
And as browellm has said, predbat will also be looking ahead at future rates and optimising your export from the welcome sun predicted to come.
You do have the option of force charging the 03:30 slot and force idling at 06:00.

Rob

T
#2623 TX200

I have mostly left PredBat to do it's own thing, it's cleverer than me when it comes to energy and price optimisation

The only things I've played with are the load scaling when I'm going to use less than it expects and tried the manual freeze charge/discharge options once. Tried both as I misunderstood the wording!

W
#2624 Wavy Davy

Rbor Not just you I think I'm top of predbats hate list!
I have got rid of the missing data, or at least its not there now, but now it seemsI have missing entities.

The second one shows that the predbat table card not loading. It has sometimes been a bit slow after a restart but seems to have now given up the ghost. Maybe I shouted at it or something.

W
#2625 Wavy Davy

Just checked other dashboard pages and there's a lot of missing entities. Mostly apex chart ones.
Will have to check if its done a update or something.

W
#2626 Wavy Davy

Looking at the apex graphs it seems to be all predbat ones that are missing.

W
#2627 Wavy Davy

Have re-installed a backup, done the updates and alls well except now back with missing data errors, but hopefully that will clear in time.

Still think it hates me !!

T
#2628 TX200

When connecting to nordpool, does PredBat add some randomness to the data requests, or would every HA start trying to get the data at 4pm?

Just wondering if any changes might be needed to ensure none of us get blocked.

Similar to what happened with solcast (requesting randomness) and the Octopus integration (BottleCapDave).

R
#2629 Rbor

Wavy Davy
It is certainly your predbat entities that were missing.
I usually find that predbat entities can slowly appear with Apexcharts appearing last.
I take it that you restarted predbat. Did you check the addon log and wait until the status messages started?

I have just noticed that you had an exception error in the status card on the left.
That would likely have indicated the problem.

Perhaps predbat is having 'How dare you doubt me' day.

Anyway, it looks like you are back up and running.
I hope that our "missing data" warnings will finally work their way our setups ....
These must be an HA issue rather than predbat.

Rob

W
#2630 Wavy Davy

Rbor Thanks Rob,
Re re starting yes my entities do sometimes take a little while to populate, but waited for quite some time, and there was no sign of them, so I had to reload a backup from 3 days ago to get predbat up and running. I then had 4 updates pending.
Did them one by one to see if the issue returned, it didn't so no idea what the problem was.
It's just bloody minded and does things like that to wind me up. 🤬

D
#2631 Daveb01

Hi all,

Looks like the oldest AIO is on a dive and will crash soon, after todays export (voltage looks OK though)
First time I have seen it this far out of sync.


D
#2632 Daveb01

Hi all,

There has been quite a few updates for Octopus. However my sensors and card do not match what the Octopus app says. Anyone else seeing this as well please?

HA sensor and my card are the same. (Export, import and Gas) e.g Previous Accumulative Cost Electric

Octopus app



G
#2633 geoffreycoan

Daveb01 Do you have an Octopus Home Mini or Pro? Either one of these is needed to send within-day data from your smart meter back to Octopus, and then the Octopus integration will show current accumulated cost, consumption, etc. If you don’t have a OHM/Pro then I’m not sure what these sensors show, probably yesterday’s data retrieved from the smart meter.

The screen shots from the app are month to date data. You need to look at the view for today (fed by the OHM/Pro) to see comparative data for today.

G
#2634 geoffreycoan

Wavy Davy Re re starting yes my entities do sometimes take a little while to populate, but waited for quite some time, and there was no sign of them

If you restart HA or Predbat then Predbat has to do a full calculation run before the entities are populated. Sometimes that can take a while. Worth looking at the Predbat log to see what it was doing, whether it had failed for some reason or was just running slow, etc

R
#2635 Rbor

geoffreycoan Wavy Davy And as I found out yesterday, a full close down of HA can clear out HA gruff that may be interfering with running our integrations and addons.

In true HA style, I had to do a Google search to find out how to do a full reboot of HA, rather than potentially cause more problems by switching off my pi at the switch.
The secret sequence is: Developer Tools/Restart/Advanced options/Shut down system

I sometimes think that the HA developers do this on purpose .......

Despite the ups and downs, predbat is a brilliant piece of software.
We need to remember that it is real cutting edge, written by a real Whizz.
It is exciting to be involved in helping to make the software better. We are really Beta testers (sometimes Alpha testers).

Rob

R
#2636 Rbor

Daveb01 The SOCs of my two batteries wander apart over time. Recently, my secondary battery was 25% SOC behind the primary. I had never seen this difference before – really caused by the recent rates.
Two nights ago, predbat took both batteries to 100%SOC. My secondary battery caught up and the 100% gave the batteries a chance to calibrate against each other (they are supposed to do this).
The batteries really need a chance to do similar at the lower end of the SOC scale, hopefully soon as the winds are reappearing and night rates are finally dropping.
GE batteries are LFP chemistry and they need to work hard between their SOC extremes to operate in sync.
So I wouldn't worry at this stage.

Rob

D
#2637 Daveb01

geoffreycoan

Hi yah,

Yes I have got a OHM and ticked the box when I set it up. I also thought I had set up the card to get the info daily and display it monthly. It it’s not working like that 🙁

G
#2638 geoffreycoan

Daveb01 Yes I have got a OHM and ticked the box when I set it up. I also thought I had set up the card to get the info daily and display it monthly. It it’s not working like that 🙁

Great so you’ve got an OHM so do I (but ironically I don’t use it in HA; long story! Also got an OH Pro still in the box not being used either …)

So this is giving you the live consumption and today figures you shared above. Not sure what ‘card’ you are referring to to display monthly data, what you showed above is the raw sensors associated with the Octopus Integration, they will only show todays values.
You may be thinking of the energy dashboard - if you setup your import and export sensors and rates in the energy dashboard (instructions in the Octopus Integration documentation) you can then show consumption & costs by day/week/month etc for any time period you wish

e.g. (costs are further down the screen)

D
#2639 Daveb01

geoffreycoan

So what I thought I had done was to set up a helper with the sensor added the cost part as well, then in the card set it monthly, but it does not seem it’s doing it.

I think a bit more research and maybe the settings need a tweak. If I get it going I will let you know.

Thanks again for your help and comments. (It’s a shame I can not get the Octopus app settings into the card, that would save me loads of time)

G
#2640 geoffreycoan

Daveb01 So what I thought I had done was to set up a helper with the sensor added the cost part as well, then in the card set it monthly, but it does not seem it’s doing it.

You can create a utility meter to accumulate the value of any other sensor (kWh, cost, etc), and set a monthly reset period to the UM. This’ll give you a ‘cost per month’ of say the Octopus import cost

But as I say, look at configuring the energy dashboard - see https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/setup/energy_dashboard/

Will enable you to look at data like this, my November month to date figures for solar, battery, import and export

R
#2641 Rbor

Trefor's new cost entities
Does anyone understand the two new entities that Trefor has recently added for
Total p/kWh cost entity in v8.5.5
Hourly p/kWh cost entity in 8.5.7.
Both entities were revised across additional releases so difficult to follow.

I have recently raised a GitHub issue as midnight values for the 'Today' entity in the WebUI chart were very different from values in Apex chart.
I keep looking back at the ‘What’s changed’ sections for the releases and the two charts but I am getting more and more confused about what these entities are telling me!

Thanks

Rob (Predbat expert/numpty)

R
#2642 Rbor

PianSom More words from me on historical data:
I have no idea what is going on!

After rejoicing that I had finally got rid of historical data "missing values" from predbat addon logs, they have come back with a vengeance:

  • Historical day 2 is getting a 5 min gap filled each 5 min (matching your screenshot in PianSom)
  • Historical day 7 has got in on the act, adding 5 min every 5 min.

Strangely 'adding 5 min every 5 min' always seems to start at 11:05 am. Now, at 15:10 pm, I am up to 205 min being dumped in every 5 min.
Each time, a gap has been identified and filled, an even bigger gap (+5 min) is then filled in 5 min later.
The whole process doesn't seem to make any sense unless it is part of HA moving from one historical day to the next part way through a day.
I don't believe this is a predbat issue but what is happening?

I will see if the "missing data" works its way through the system.
.... and I will continue to ignore what is going on (apart from whinging about it).

Rob

R
#2643 Rbor

Jase1703 This goes right back to our discussion about car charging.
Last night, with the first sub-10p slots on Agile for weeks, I set predbat loose on charging my car using non-contiguous slots.
It working so smoothly and is a truly great set up for car charging.

Thanks again for all your help in getting this set up for me. I couldn't have done this without your help.

😬🚙🤠

Rob

W
#2644 Wavy Davy

Rbor I'm stopping looking at my log file for at least a week, It keeps telling me to fix my system !!.

R
#2645 Rbor

Wavy Davy What do you have for 'days_previous', etc, in your apps.yaml?
I have used those suggested in predbat documentation:

  # Days previous is the number of days back to find historical load data
  # Recommended is 7 to capture day of the week but 1 can also be used
  # if you have more history you could use 7 and 14 (in a list) but the standard data in HA only lasts 10 days
  days_previous:
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8

  # Days previous weight can be used to control the weighting of the previous load points, the values are multiplied by their
  # weights and then divided through by the total weight. E.g. if you used 1 and 0.5 then the first value would have 2/3rd of the weight and the second 1/3rd
  # Include one value for each days_previous value, each weighting on a separate line.
  # If any days_previous's that are not given a weighting they will assume a default weighting of 1.
  days_previous_weight:
    - 1

  # Number of hours forward to forecast, best left as-is unless you have specific reason
  forecast_hours: 48

In your missing days in the log, you go right up to 14. Have you got 14 down in your apps.yaml?
HA only stores 10 days by default. Have you asked HA to save more days?
This is a setting in homeassistant/configuration.yaml
I have this for 8 days:

recorder:
  purge_keep_days: 8
#  commit_interval: 30

You can increase the number of day.
Have you done so for 14?

Can you copy relevant sections from your yaml file?

I am at the edge of my limited knowledge here but seeing your code would help me or others more learned than me.

Rob

W
#2646 Wavy Davy

Rbor
I think (hope) you may have found it.
I hadn't changed the the config .yaml value, it was on 10, so have changed that to 14.
Also I've change the values in the app.yaml to as below.

Don't know why i had the weight at 0.5 and 0.9 but will keep them at that for now and see how it goes.

R
#2647 Rbor

Wavy Davy Have you checked configuration.yaml to see if there was a recorder entry?
If there isn't, I would guess that 10 will have been used as the default.
If HA was working on 10 days, I wonder whether days 5–14 would have been used.
But you have day 7 as 'no data'.

See what happens now that you have changed your apps.yaml
Hopefully I have started a resolution for your issue.

Rob

W
#2648 Wavy Davy

Rbor Yes I found the config.yaml was set to 10. Have changed it to 14.

R
#2650 Rbor

Jase1703 Please tell those winds to head my way up in Yorkshire.

I may well need the winds to reduce my Agile rates – it looks like I am in the firing line for snow tonight which will knock out my PV.
....... and my heat pump is starting to get energy-hungry with the reduced temperatures. I am forecast 1C max for next 2-3 days and it's only mid November.
........ and now I have about an inch of snow on everything!

Rob

R
#2651 Rbor

@geoffreycoan Documentation omission?
I have been seeing a warning in my Supervisor Core log:

      - "State attributes for predbat.import_energy exceed maximum size of 16384 bytes. This can cause database performance issues; Attributes will not be stored" exceed maximum size of 16384 bytes. This can cause database performance issues; Attributes will not be stored"

On checking FAQ section. a line containing predbat.import_energy is not in the list.
See https://springfall2008.github.io/batpred/faq/#predbat-is-causing-warning-messages-about-exceed-maximum-size-in-the-home-assistant-core-log

Is this an omission?

I have added "missing" the list to the list in my configuration.yaml file and have rebooted HA.
The warning has now disappeared.

Rob

G
#2652 geoffreycoan

Rbor Documentation omission? …

Doesn’t surprise me. Thought I had a fairly comprehensive list of exclusions for the recorder warnings but I haven’t looked at that list for ages so some may have slipped through the net.

But (spoiler alert), the current exclusion list is a cludge, I have a much more in depth analysis of the predbat entities to come out soon … when I get back from France and when I finish off the article.

Needless to say all you have seen before is temporary, I have a far more ultimate solution coming …..

(but yes, in the mean time, add it to the exclusion list)

R
#2653 Rbor

I'm glad that I have got a healthy Octopus piggy bank from the summer's generation:

Still, heat pump is keeping the house nice and warm but will be using the grid from late evening.
Hope the weather has treated you all better than me.

Rob

T
#2654 TX200

Rbor I'm generating 2W right now. Might be a rounding error or interference. 🤣

V
#2655 Vestas

TX200 One of the (few) advantages of having in-roof PV panels (and breathable membrane) is I can point a fan heater at them from inside the loft. Top string is just about clear now, bottom string is going to take a while as all the snow from the top string slid down onto them 😃

S
#2656 SteveCook

Rbor
Try and brush off any snow/ice from the coil.
The coil draws heat from ambient air and if there is moisture about, ice will form and block airflow. The heat pump will detect that and (depending on design) may go into a defrost mode to melt any ice buildup. Some heat pumps use electric resistance heaters for the defrost which can take a lot of power/charge .

G
#2657 geoffreycoan

Rbor I'm glad that I have got a healthy Octopus piggy bank from the summer's generation

Still, heat pump is keeping the house nice and warm but will be using the grid from late evening.
Hope the weather has treated you all better than me.

I’m trying not to think about my electricity bill too much. Yesterday, the day before, and today is predicted to be just over £10, thats with Predbat doing its thing every day but the batteries only last until just after the peak period. So far in November I have imported 585kWh for £100 cost, and exported 3.9kWh for 58p.
Compared to last November the export is significantly down but the import is probably on a par, my total November 23 bill was £221.

As you say, offset by large credit balance in the summer. Still, it’s painful to watch the change.

My panels peaked at 1.1kW of output earlier today, probably on track for about 4kWh of total generation

R
#2658 Rbor

geoffreycoan I spent all morning shovelling snow around the house and trying to clear snow from my extension panels, balanced on a ladder or reaching out of windows. By midday, I had cleared 6 panels and was getting some PV generation. And snow had started to slide off some of my main roof panels in the tropical 2C and some very hazy sun, better than –2C overnight.
Compare with my earlier photo at midday today:

By the end of daylight, I have generated 1.2 kWh, greater than some earlier Nov days!
And greater than Solcast prediction of 0.6 kWh!

So far this Nov (up to 19th),

  • I have generated 108 kWh
  • I have imported 293 kWh (£49 without SC) and exported 8 kWh (£1.21)

Last Nov up to 19th Nov,

  • I generated 149 kWh
  • I imported 302 kWh (£60 without SC) and exported 17.5 kWh (£2.93)

So although it may not feel like it, I am doing better cost-wise this Nov than last Nov, despite my generation being 28% down.

But last year, these were pre-predbat and Agile days for me.
I was on a mixture of Flux and Cosy.
I went onto Agile mid-January 2024 and onto Predbat on 29th January 2024.

Cold week ahead with hopefully some sun and panels getting clearer by the day.
Then wind and rain for the weekend and ahead.

I am exhausted .....

Rob

S
#2659 SamM

Rbor I am exhausted .....

Yes, I wouldn't have thought 1.2kWh of generation was worth the effort? You saved maybe 30p over grid import.

V
#2660 Vestas

SamM Tomorrow is supposed to have a fair bit of sun and at these temperatures arrays will get to around 80% of peak summer output even at this time of year.

I have a minor avalanche in waiting at the front dormer section - slid off the panels and is about 30cm thick in the corner 😃

R
#2661 Rbor

Load scaling and cold weather
Predbat has a default setting for Load scaling of 1.05 (input_number.predbat_load_scaling)
From documentation, predbat uses historical data to predict load with 1.0 being an exact match.
https://springfall2008.github.io/batpred/customisation/#scaling-and-weight-options

I have a heat pump and 4 days ago my normal power during the day is about 700 W (T = 7C)
The last 3 days, 'normal power' has roughly doubled to about 1400W (T = 0C).
It is reducing today as I am blessed with blue sky and I have half of my cold panels clear of snow.
So my load is above historical load average.

At 7C, my daily energy usage is about 18 kWh (12 kWh from HP and 6 kWh background)
At 0C, my daily energy usage is about 30 kWh (24 kWh from HP and 6 kWh background)
My in-day adjustment chart shows that my 'expected' is well below 'actual'

I have increased my Load scaling to 1.4 which I am monitoring.

I wondered whether my policy is good and what others may have done.

Are there any other tweaks that I should be contemplating?

Rob

D
#2662 Daveb01

I also have a question on understanding something please.

In Predbat
I have set my Charge Rate to 10000
I have set my Discharge Rate to 6000

In GW Control I can see those settings (if I move the slider down to say 9000 & 5000 Predbat puts it back) so all go and I understand what’s happening.

In GW Control
I have Charge Rate AC which is set to 82%
I have Discharge Fate AC which is set to 50%

I can not see any setting in Predbat for this?

Q1. Is there any setting in Predbat I am missing to set the AC charge/discharge?
Q2. What is this actually doing (is this Power to the house only?)

Thank you for any explanation or help in advance.

Sorry @Rbor your above post is not a newbie question so have no idea, but will be interested in any replies 👍😀


L
#2663 Lincs_Will

Hi all. I'm having truble using HA automations to control my hot water immersion heater. I'm using a SONOFF POWR3 flashed with Tasmota to control the heater which has a built-in thermostat so I wont boil the tank.

I'm using predbat's iboost_active entity to switch the POWR3 on/off. I did have 1 automation which worked (copied below) but this would cause the heater to be switched on when HA/predbat restarted after an update as it just toggled the switch to the opposite state every time the iboost_active entity changed state. I did try adding another automation to switch the POWR3 off everytime HA (re)starts but that doesnt work as it runs the automation before Predbat starts so it has no effect.

alias: Switch Immersion Heater on When Commanded by Predbat iBoost Model
description: ""
triggers:

  • trigger: state
    entity_id:
    • binary_sensor.predbat_iboost_active
      attribute: full
      conditions: []
      actions:
  • action: switch.toggle
    metadata: {}
    data: {}
    target:
    entity_id: switch.sonoff_immersion_switch_sonoff_immersion_switch
    mode: single

I'd come to the conclusion that instead of 1 automation which toggles the switch I'd need 2 automations which control on & off separately. binary_sensor.predbat_iboost_active reports a state of either True or False yet neither of these automations automatically trigger. If I run them myself from within the HA settings menu the heater switches on & off so for some reason changing the setup to monitor for a switch to the True or False state hasn't worked. I've tried google and looking through some HA help pages but I can't figure it out. Can anyone see whats wrong? I made the automations using the GUI but pasted the generated yamls in here,

alias: Switch Immersion Heater on When Commanded by Predbat iBoost Model
description: ""
triggers:

  • trigger: state
    entity_id:
    • binary_sensor.predbat_iboost_active
      attribute: full
      to: "True"
      conditions: []
      actions:
  • action: switch.turn_on
    metadata: {}
    data: {}
    target:
    entity_id: switch.sonoff_immersion_switch_sonoff_immersion_switch
    mode: single

alias: Turn Immersion Heater Off When Commanded by Predbat
description: ""
triggers:

  • trigger: state
    entity_id:
    • binary_sensor.predbat_iboost_active
      to: "False"
      attribute: full
      conditions: []
      actions:
  • action: switch.turn_off
    metadata: {}
    data: {}
    target:
    entity_id: switch.sonoff_immersion_switch_sonoff_immersion_switch
    mode: single
R
#2664 Rbor

Lincs_Will I haven't got a direct answer for you but I would recommend the following video:
https://www.youtube.com/watch?v=fE_MYcXYwMI&t=0s
It is about trigger IDs where you can have one automation that controls switching something on or off.
This is the many videos from Smart Home Junkie.
I find his videos better than any of the others that I have viewed.
He goes through processes step by step at a reasonable pace, almost to show 'Look at what I know (and you don't)'.
I find that so many of the videos race through steps that cannot be followed and I then give up.

Rob

B
#2665 browellm

Rbor Sounds sensible to me. At this time of year my battery is too small for any change in load scaling to make a material difference to my plan, on IOG.

I have kept the faith with PredAI and it's working well, adapting to the increase in use.

R
#2666 Rbor

browellm Good point about predai.
I alternate between using HA historical and predai.
Despite increasing Load scaling, I am getting a large difference between predicted and actual load.

Looks like it's time to give predai another spin .....

In the predai log, temperature is listed so does predai use temperature in its predictions?
I have linked predai to my HP weather comp sensor so T is accurate for my house.

EDIT: I have swapped to predai and I have changed the load scaling entity back to its default of 1.05.
The in-day adjustment chart with predai has a much better agreement than with HA historical.
The missing day warnings have also gone.
I will see how it goes .....

Rob

G
#2667 geoffreycoan

Daveb01 I have Charge Rate AC which is set to 82%
I have Discharge Fate AC which is set to 50%

I can not see any setting in Predbat for this?

Q1. Is there any setting in Predbat I am missing to set the AC charge/discharge?
Q2. What is this actually doing (is this Power to the house only?)

Q1 no, Predbat only manipulates the battery charge and discharge rate, there’s no extra settings you have missed.

Q2, sorry don’t know, its an AIO-specific set of controls. I wonder if it limits the charge and discharge rate to the grid as opposed to meeting house load?

Rbor At 7C, my daily energy usage is about 18 kWh (12 kWh from HP and 6 kWh background)
At 0C, my daily energy usage is about 30 kWh (24 kWh from HP and 6 kWh background)
My in-day adjustment chart shows that my 'expected' is well below 'actual'

I have increased my Load scaling to 1.4 which I am monitoring.

Last week when the temperature was around 8 degrees the ASHP was consuming about 17-22kWh a day
The day before yesterday the average outside (porch) temperature was 4.2 degrees, the ASHP consumed 30.3kWh
Yesterday the average temperature was 2.1 degrees and the ASHP consumed 44.6kWh ☹️

I did bump my load scaling up from 1.1 to 1.15 a few days ago, but at these kind of consumption figures it’s all a bit moot as the consumption way exceeds my 13.5kWh battery capacity so Predbat can’t really plan too far ahead and just keeps the battery topped up on the lowest rates it can find. Not sure predai would add much to the mix for me, other than knowing more accurately when I will run out of SoC.

I do inevitably wonder whether there is anything further I can do to improve my heat pump performance/lower the electricity consumption, but I have tweaked it to death over the last two years and not sure I can optimise the settings any further. Fortunately as said before I have a large summer export buffer that means this its not money coming out of my pocket.
Am thinking about whether Cosy might be better. One envelope calculation said it was about the same, another said it would be a bit cheaper than Agile. Need to look into it more closely…

Lincs_Will I did have 1 automation which worked (copied below) but this would cause the heater to be switched on when HA/predbat restarted after an update as it just toggled the switch to the opposite state every time the iboost_active entity changed state

Don’t use switch.toggle, it as you have found out just toggles the switch which relies on the switch being in a known state when you run the automation.

The documentation has a sample automation for using the iboost trigger https://springfall2008.github.io/batpred/customisation/#iboost-output-data that has different conditions for whether the trigger is on or off; using this would be much safer as you can then explicitly turn your switch on or off according to the iboost setting.

If you want to avoid the automation running when HA Is restarted, enable the ‘uptime’ sensor and add a condition to your automation to check that HA has been running for more than a minute:

conditions:
  - alias: Uptime is more than 1 minute
     condition: template
     value_template: “{{  (as_timestamp(now()) - as_timestamp(states('sensor.uptime')) ) >= 60 }}”
B
#2668 browellm

Rbor In the predai log, temperature is listed so does predai use temperature in its predictions?

I don't think it is. Would be a cool feature - I alluded to it earlier in the mists of the thread.

But I think PredAI does react well to earlier trends, it's really ramping up my predicted use now. I think it's related to the seasonality algorithms - daily, weekly, monthly etc.

Z
#2669 Zakalwe

PianSom

Apologies....I have been daft busy at work.

I fixed the issue by deleting the Mosquito Broker and then re-installing. It only took a couple of minutes and a few reboots. A couple of sensor names had changed, but fixing those were easy.

Far simpler than all the other messing about in MQTT Explorer!

#2670 PianSom

Zakalwe
Thanks - nice to know that what should work, actually does!

G
#2671 Goshiki2

Daveb01

Daveb01 I think you might be talking about the settings which are labelled in the portal as inverter charge power and inverter discharge power.
Paul Landregan has recommended using the inverter charge power setting to slow down charging which keeps heat in the battery for longer. This is especially important during the winter months. (Reducing It was also touted as a possible solution to the SOC issue but it didn’t make any difference for mine). I had mine set at 80% when I was on Octopus go which was about perfect to keep charging over the full cheap rate period. Apparently it’s only grid charging that is affected by this setting so solar would still charge at 6000w max rate. Unfortunately Predbat doesn’t look at this setting so I’m thinking it would always assume the battery was charging at maximum rate which would throw the plan out if it was reduced below 100%.
It also raises the question about how Predbat copes with a reduced charging rate due to the battery being lower than 20 degrees. Does it still assume charging at full rate even though it is potentially throttled by temperature?

G
#2672 geoffreycoan

Goshiki2 It also raises the question about how Predbat copes with a reduced charging rate due to the battery being lower than 20 degrees. Does it still assume charging at full rate even though it is potentially throttled by temperature?

Predbat can only assume that your battery will charge at the rate that the inverter says it can, so if it’s actually charging at a lower rate then the plan will be wrong. Of course Predbat runs every 5 minutes so it will spot that the SoC isn’t rising as it should be and will re-plan, extending the charge period if necessary, but obviously you may run out of cheap charge slots …

If you know your inverter is charging or discharging faster than the inverter says it can then you can set input_number.predbat_battery_rate_max_scaling https://springfall2008.github.io/batpred/customisation/#scaling-and-weight-options

I have my charge rate set to 0.92 and the discharge rate to 1.04 as my battery charges at about 2.4kWh and discharges at 2.7kWh vs inverter “limit” of 2.6kWh. Potential these could be more dynamically based on outside temperature.

D
#2673 Daveb01

geoffreycoan

So this is now very confusing for me as the wording is different in HA than it is in the GE Cloud. Plus what you have just said above.

So if you set 10000 & 6000 as per my Yaml it changes Inverter Control to the same (in my case the GW)
“Battery Charge Rate” in W
“Battery Discharge Rate” in W

If you change the “Battery Charge/Discharge Rate AC in HA, it changes the “Inverter Charge/Discharge Power %” in the GE Cloud


D
#2674 Daveb01

geoffreycoan

I have set my % to 83% (12 x 0.83 = 9.96)

G
#2675 Goshiki2

Daveb01 So now Predbat does not know your charge rate is restricted as it does not look at inverter charge rate in GivTCP. Is that correct? I am confused myself now 😂

D
#2676 Daveb01

Goshiki2

Not an easy one to answer, after some homework I have this info:-
(I have looked at Predbat apps.yaml, HA Inverter Control (GW in my case) & GE Cloud Remote Control.)
I have 2 x AIO’s & Gateway

Yaml
inverter_Limit - 12000
Inverter_Limit_Charge - 9990 (was 10000)
Inverter_Limit_Cischarge - 6000

HA Inverter Control (GW Control for me)
Battery Charge Rate - 9990
Battery Discharge Rate - 6000
Battery Charge Rate AC - 83%
Battery Discharge Rate AC - 50%

GE Cloud (Remote Control)
Battery
Inverter Charge Power % - 83%
Inverter Discharge Power % 50%

% Limits
Reserve Limit - 5% (this is what I have set mine to)
Battery Charge Power - 0% (this is what I think changes with Predbat)
Battery Discharge Power - 0% (this is what I think changes with Predbat)
Battery Cut Off Piwer % - 0% (this is what I think changes with Predbat)

Predbat changes these with what’s in your yaml. Plus what’s in the scaling sections. I think Predbat puts it back to 0% when not charging/discharging etc.

See pics above and this one

G
#2677 Goshiki2

Daveb01 Yes but if you have set Inverter charge power to 83% doesn’t that restrict AC charging and Predbat isn’t checking for that ?

D
#2678 Daveb01

Goshiki2

The only thing we can do is change the Inverter charge power % and see what it does in GE/GivTCP and Predbat.

I would suggest:-

  1. Change both to 100%
  2. Change both to 50%
  3. Change both to 0%

I am doing Firmware updates in the next few days, so may have a go later in the week. Let me know if your brave and willing to have a go.

G
#2679 Goshiki2

Daveb01 You should see the impact of reducing it during the first AC charge as the actual charge power is shown on the app. As I said before, mine was permanently set to 80% giving a charge rate of around 4,800w when I was on Octopus Go but once I switched to Agile and Predbat I changed it back to 100% as I found it wasn’t monitored by Predbat. I’m more than happy to try reducing it to see how Predbat copes with it but I’m going to wait until the Agile prices get down to a more reasonable level first. I suppose the question really is what are we trying to prove or achieve with the testing?
Edit: I’ve just tried it as Predbat was charging in this 30 minute slot. reducing inverter AC charge power % either in the portal or on GIVTCP does immediately restrict the charge rate shown on the app and Predbat has no idea. Images show 50%, 80% and 100%

G
#2680 geoffreycoan

Goshiki2 If you reduce the charge rate and Predbat doesn’t know about it, be aware that the plan that Predbat produces won’t be achievable. Predbat will of course recalculate the plan but it’ll always be behind what’s actually happening.

So best to set the battery charge & discharge rate to something Predbat knows about

G
#2681 Goshiki2

geoffreycoan Yes that was my point to Daveb01 and exactly why I reverted from 80% to 100% when I started using Predbat with Agile. For anyone on a tariff with a fixed low price window and a sufficiently sized battery though it’s an extremely useful feature as it allows you to reduce the charge rate so that the battery is slowly charged for the whole period (retaining heat) rather than quickly charging at the start of the period and then idle for the rest ( losing heat).
This was Paul Landregans recommendation last winter.

D
#2682 Daveb01

Goshiki2

Thank you both for your comments and tests. My main issue was with the wording being different in all three places, so it was not clear what setting was being changed where. Now I understand this it has made it a bit better.

As I do not want to charge and discharge at the full 12 kWh, I have reduce both to match what I wanted.
Charge at 10 kWh (5 kWh for each AIO), discharge at 6 kWh. This has been working like this for a while now.

The answer to the question is Predbat does not know about the % setting and you have to set it yourself. It will then stay at this setting unless you change it. It is best to match it to the Charge/Discharge settings you have put in the apps.yaml.

Anyone having an issue with Charging/Discharging should look at this. I look at the Power Graph in HA to see the import and export.

Note: setting a whole number in Predbat does not always work in GE % e.g I set 10000 but this translates to 9990. So once you know this change the 10000 in Predbat to 9990 if you wish. 👍😀

G
#2683 geoffreycoan

Goshiki2 it allows you to reduce the charge rate so that the battery is slowly charged for the whole period (retaining heat) rather than quickly charging at the start of the period and then idle for the rest ( losing heat).
This was Paul Landregans recommendation last winter.

Predbat has a similar feature, the switch.predbat_set_charge_low_power https://springfall2008.github.io/batpred/customisation/#inverter-control-options which I normally leave on for just those reasons

T
#2684 TX200

Is it about time someone starts a thread called "second night live on PredBat" 🤣

G
#2685 Goshiki2

geoffreycoan I had seen that entity but hesitated because I couldn’t work out if All charging was at a reduced rate. I.e solar included.
The beauty of reducing inverter charge power % is that it affects timed charges only.

G
#2686 geoffreycoan

Goshiki2 geoffreycoan I had seen that entity but hesitated because I couldn’t work out if All charging was at a reduced rate. I.e solar included.
The beauty of reducing inverter charge power % is that it affects timed charges only.

The predbat control only affects forced grid imports to the battery, not solar. I have that switch turned on and my inverters are both set to 2600W ready for a lovely sunny day - currently generating 638W off one array and 414W off the other, so I’ll be waiting a while ….

I’ll put something in the documentation https://springfall2008.github.io/batpred/inverter-setup/#givenergy-with-givtcp about setting or not these AC charge controls. What is the actual GivTCP entity name?

G
#2687 Goshiki2

geoffreycoan
number.givtcp************battery_charge_rate_ac

#2688 PianSom

TX200 Is it about time someone starts a thread called "second night live on PredBat" 🤣

In a few weeks I can start one called "Second year live on Predbat"!!

Nice to see the @geoffreycoan got a shout-out on the original post, which opens with

Lofthouse I installed PredBat a couple of weeks ago and have been running it in Read-Only mode (just show the plan, don’t control the inverter). I quickly found out that it is a lot cleverer than I am !

Plus ca change ....

R
#2689 Rbor

PianSom Good thinking.
You are in charge of initiating a new thread on Dec 21st 2024.

That should give us a chance of getting this thread up to 3,000.

Rob

G
#2690 geoffreycoan

PianSom Was just reading the first few dozen messages, I get blamed twice in those messages for encouraging people onto Predbat 🤷‍♂️

It’s not until about message 50 before I add to the thread replies, but it was Christmas 🎅. I found mention of my Christmas Eve and Christmas Day rates, a few pence for one day and negative for the other, hope we get the same on Agile this year.
The future rate agile forecast suggest we will get negative prices on Sunday and Monday 24th & 25th. Hope so, the ASHP is guzzling away at the moment

R
#2691 Rbor

geoffreycoan Fascinating looking back at the first posts on this thread.
I was a latecomer to the party, arriving on Jan 28th with Post 231.

The great thing is how much we have learnt from each other under @geoffreycoan 's guiding eyes and his wonderful documentation. And it is good to see so many familiar names in those first posts.

Some topics come and go and come and go. I found our first discussions on historical loads in Post 52.

It has been a privilege being part of this community and feeling that I may be making a (small) contribution to making predbat better.

geoffreycoan Thought I had a fairly comprehensive list of exclusions for the recorder warnings but I haven’t looked at that list for ages so some may have slipped through the net.

Having raised a very minor documentation omission, I don't know how to break this news to you if you haven't already seen it:
See https://github.com/springfall2008/batpred/releases/tag/v8.7.0
Trefor's starred first line may have a small impact for some but not for you I fear with your documentation and automations.

I will upgrade and find out the damage.

Rob

G
#2692 Goshiki2

Rbor I’m avoiding this update for now as it’s one of Trefor’s last lines that concerns me. I run the custom plan and according to his comments, it will likely break it 🙄

R
#2693 Rbor

browellm But I think PredAI does react well to earlier trends, it's really ramping up my predicted use now. I think it's related to the seasonality algorithms - daily, weekly, monthly etc.

Having incorporated predai into predbat again, and looking at my 'in-day' chart, I am getting a better agreement between predicted and actual using predai than with HA historical load.

I will keep predai going within predbat and see what happens.
I have never turned predai off so it has always been there for me in the background.

I have said this before, but linking the predai temperature info with predai could surely automatically tell predbat that the load is going to increase.

Rob

R
#2694 Rbor

Goshiki2 I will be a guinea pig here .... I can always downgrade ....

I went into GitHub to tell pacemaker82 the raise an issue to break the news but @geoffreycoan had beaten me to it!

Rob

D
#2695 Daveb01

Rbor

Hi yah, as you have pasted on some great information especially when I got told off for posting yaml without ‘’’.

I now have a question on how you post answers to question using there post on what I can see if light blue/grey background.

D
#2696 Daveb01

Rbor

I had to screen shot the update as it had a few things I may need to look at and change, as not sure where this info is once I have updated.

R
#2697 Rbor

Daveb01 Copy the relevant text from a post.

  • Reply to the post and paste the copied text in.

  • Highlight all the text that you want highlighted in light blue/grey.

  • Then select the 'Quote' button at the bottom:

    Make sure that you insert a line before adding your comments or they will also be highlighted. You will see the effect above.

Rob

B
#2699 browellm

@Daveb01 you can highlight specific text from someone's post and you'll get a quote button pop up unless you are running some software that blocks scripting or other such oddness.
e.g.

R
#2700 Rbor

Daveb01 As guinea pig for v8.7.0, I have installed the pacemaker82's predbat table card in a new view in my dashboard.

It looks OK to me. See below. You know the table card so see what you think.

If I use the old_skool options and friendly states, the card shows the old names.
But it looks like it works!

Rob

R
#2701 Rbor

@geoffreycoan
Looks like the documentation is sorted following v8.7.0.
Well done. 👏👏

Rob

G
#2702 Goshiki2

Rbor Looking good. To be honest though I really don’t understand Trefor’s logic in renaming discharging to export. To me, export is exporting to grid. Discharging is supplying the house. If the custom plan is still using the original descriptors I would be more than happy.

R
#2703 Rbor

Goshiki2 I think it was the confusion with the freeze options, especially freeze discharge. If you are happy with the old terms, perhaps you can use the existing table card and not upgrade.

Rob

B
#2704 browellm

Did the other charts need much fixing?

G
#2705 geoffreycoan

Daveb01 I had to screen shot the update as it had a few things I may need to look at and change, as not sure where this info is once I have updated.

the details of ‘what’s new’ is always available in the github release history e.g. https://github.com/springfall2008/batpred/releases/tag/v8.7.0

Rbor If I use the old_skool options and friendly states, the card shows the old names.
But it looks like it works!

I’m using old_skool option with the card and given Trefor’s list of breaking changes I thought it might not work so hence I raised the ticket for @pacemaker to have a look at it. Currently I’m running predbat 8.5.3 and I’ll likely continue to stay on it until I get back from France and can take a fuller look at all that’s changed in the last few releases. I’ve picked up a few documentation enhancements to do and suspect that there will be more as a result of the name change. Not least all the stuff I did on reducing the database size will need a once over to see what’s changed as will some of my dashboards and automations.

Personally the change from Discharging to Export makes sense, it aligns better with the GivEnergy terminology in their app, and Freeze Exporting is logical as well. The rename of Idle to Demand, I’m less keen on, personally would have preferred calling it Eco, but it is what it is.

D
#2706 Daveb01

geoffreycoan

I would like Eco as well. I have found quite a few wording issues recently with Predbat, GivTCP & GE Cloud settings. It is confusing sometimes especially when you explain something very well and document it, then something goes wrong and you have a look at the source e.g GE nothing makes sense with the setting you may have changed.

Sorry rant over 👍😀

R
#2707 Rbor

browellm Did the other charts need much fixing?

They all look fine for me.

Rob

R
#2708 Rbor

Daveb01 We all deserve a rant now and then.
You have learnt the ``` method and hopefully quote highlighting so you deserve a few brownie points..

Rob

M
#2709 matttheotter

Evening all,

After avoiding setting up HA / Predbat for my folks I have come to the conclusion it will be easier........ for me 😃 I can setup remote access should there be any issues and automate out car charging for them which at the moment is problematic due to their car incorrectly requesting power outside of its schedule.

Bought them a Lenovo SFF with a i3 6100, plenty for just HA and Predbat, just want to check my logic now I am doing this for their system:

  • MQTT
  • GivTCP 3 (assuming its preferred for AIO?)
  • Octopus
  • Predbat

They're on IOG so I will config it to be the same as my config, will probably have it in monitor for a few days before enabling charge control.

For those following my battery saga, Giv are coming back, I got an email in the week saying they have been monitoring and it hasn't settled, cannot fault Giv for the level of support in getting this resolved.

Speaking of GivTCP 3, how is it going?

M
#2710 matttheotter

geoffreycoan got to be said, the terminology change makes sense for me, Eco would probably make sense but I am kinda okay with Demand.

I saw you had raised it already with the custom card, I had gone in earlier to flag but just left a thumbs up.

I am a bit of a trial by fire and just have Predbat set to auto update.

G
#2711 geoffreycoan

matttheotter Bought them a Lenovo SFF with a i3 6100, plenty for just HA and Predbat, just want to check my logic now I am doing this for their system:

your list looks reasonable. How are you running HA on the SFF, as a VM or native?

Need to think about how you will get remote access, and if possible setup multiple options. I have a static IP on my router and setup port forwarding for HA, I also installed wireguard VPN as a HA add on to tunnel into the local network, but TBH most of the time I Just use the HA port forwarding (secured with 2FA)

Another option for remote access/security is duckDNS addon which SSL’s all your traffic, but I got fed up with certificate errors when accessing locally and duckdns is blocked by O2 mobile so I always had to open the VPN which was a pain.

But you need a backup as well. I have SSH running on my HA but my primary backup is Teamviewer to remote connect to the PC that I run HAOS as a guest VM in. I have had at least a couple of occasions where the HA VM has frozen and being able to remote into the host PC meant I could unfreeze it.

GivTCP v3 is only needed if you have multiple AIO’s controlled by the gateway. If a single AIO you can use either v2 or v3. I’m still on v2 but will have another go at v3 (deleting the MQTT first) when I get back home

M
#2712 matttheotter

geoffreycoan will run native, adding Proxmox will add another layer of complexity that they won’t need.

As for remote access, yeah thats sorted in my head I’ll run cloudflared on it and point it at a subdomain, they don’t have a static IP so this will resolve that problem.

If it does become a problem I might switch it to a VM, I’m trying to keep it simple, if there are any issues they don’t live too far away for a visit 😂

#2713 PianSom

matttheotter will run native, adding Proxmox will add another layer of complexity that they won’t need.

Honestly, I'd be tempted to put them all in Docker if you don't fancy doing Proxmox now. Future you will thank you when it comes to an update failing or a log needing checking. (I like Dozzle for the latter.)

An old i3 should be just fine. I have mine on an ageing i3 NUC (so an 8109) which also runs Plex and an *arr stack. Never really breaks a sweat. (That said, I'm trying to persuade myself that I really don't need to swap it out for a Minisforum MS-01 i9 ...)

Do they have a PV array? You will probably want to integrate that - either inside HA or with another standalone/container. I guess the same holds for the EV charger.

R
#2714 Rbor

browellm Revised answer.
I have spotted one change in the battery chart for 'discharge -> export. A change here was flagged in the 'What's changed' section for v8.7.0.

These are the new lines:

  - entity: predbat.best_export_limit_kw
    stroke_width: 2
    curve: stepline
    name: export_best

The only change that I observed was for the labels to change on the chart.
The old chart did still work because the old discharge entities are still there, presumably for compatibility with previous versions of predbat, which otherwise would get broken.

I copied the revised chart in and had to tweak the y axis max value to fit my batteries.
I had changed this before but the total copy took out my previous tweak.

Rob

G
#2715 geoffreycoan

Rbor The old chart did still work because the old discharge entities are still there, presumably for compatibility with previous versions of predbat, which otherwise would get broken.

The way I read the release note, the export entities replace the discharge entities.

Due to the way HA works, when you upgrade Predbat the new named entities will be seen as entirely new entities and the old entities will be orphaned with no updates happening to them. Part of this is due to the entities Predbat creates not having unique id’s as far as HA is concerned (if you select a Predbat entity and click the cog symbol to make changes to it, you can’t).

So I suspect your unchanged chart had frozen data in it.

There’s not a lot can be done about this without unique id’s for the entities. I found a way to get unique id’s allocated but it required changing to use MQTT as a layer between Predbat and HA and Trefor wasn’t keen on the amount of work that would have entailed.

The new entity names will of course not inherit any of the history or long term stats from the old entity names. You’d have to manually migrate that

R
#2716 Rbor

geoffreycoan The changed entity makes no difference to what is seen in the chart. In my chart below, it is the green horizontal line but there are some small inconsistencies.

In Devices & Services/Entities, both the old discharge entity and the new export entity can be seen.
The new export entity shows some ups and downs whereas the discharge entity is a horizontal line:

In the Apex chart, if I select the export best in the header, I get the export entity chart shown as 16.22. But the footer shows 16.4
The Web UI labels the horizontal line as export but its value is 16.38.

I have copied my yaml code for the Apex battery chart into a word processor. Searching the code, I have 2 entries for 'export' and none for 'discharge'.

Perhaps some minor teething problems.

Rob

D
#2717 Daveb01

Oh dear a bit disappointed with Predbat today, I have been out. I was expecting a nice full battery ready for the storm Sat/Sun as it’s been sunny all day. However Mr Bat decided otherwise.

It maintains SoC most of the day to export to grid, then my battery gets down to 5% and imports.

R
#2718 Rbor

Remember that Mr Bat controls your inverter and has the ability to change his mind. Also, he can only work on predicted rates from Nordpool and will get the actual rates at around 4 pm.
So take some patience pills!

I have a similar plan to yours. I suspect that Predbat is considering battery losses and it may be more cost effective to use the grid directly than to charge the battery with losses when their are cheaper rates ahead (see below).

You've also cut off your plan just as the rates are reducing and predbat is charging. I reckon that predbat predicts that it is more cost effective to load the battery from the lower rates than to use the higher rates in the preceding slots. Predbat is starting to charge your batteries when the rates are 7-8p less than before.

This is my current plan based on Nordpool. You can load your battery much quicker as I have an AC3.0 inverter that can only charge by 9% SOC every half hour. From your plan, you can charge at twice that rate. I am consuming more as I also have a heat pump to feed and heat pumps get hungry at these temperatures.

See what happens after 4 pm and have faith in Mr Bat.

Rob

D
#2719 Daveb01

Rbor

Thank you as always for the encouragement. I have bought into Mr Bat now so let it get on with it, but it’s hard sometimes to agree with him. The one thing which is good to see is yours and Geoffrey’s doing the same as mine, this keeps me happy you have helped me configure it correctly.

You can see why some guys are finding it difficult to move to Mr Bat

Here is the one after 16:00.


D
#2720 Daveb01

As there is a storm coming and it’s going to be wind, I was hoping the price was going to drop, but it looks like it will for 1 slot (at the moment)

G
#2721 geoffreycoan

Daveb01 As there is a storm coming and it’s going to be wind, I was hoping the price was going to drop, but it looks like it will for 1 slot (at the moment)

I’ve got a two hour Octopus Power up event from 3-5pm tomorrow (Saturday afternoon), presumably due to the storm.

Tomorrow’s solar forecast though, 2kW for PV50 and 1.6kW for PV10. Awful. Today I generated (and the ASHP guzzled) 13.7kWh

At least the Agile forecast indicates cheap and negative rates coming up on Sunday/Monday still

Just to add to the selection of shared plans for tomorrow, here’s mine. Predbat has charged the batteries enough during the day to see me through the peak period with the batteries lasting until 7pm, there’s then a weird thing that its been doing several evenings now, charging immediately after the peak rate but only to 6, 7 or 9%, its a sort of weird Hold Charge. Don’t know why it does this but it does it every night once my batteries run out. (and as I just typed this the plan changed to now not charge until 9pm, but I wouldn’t be surprised if it changes again next run)

Then it’s run off grid, charge in some cheaper slots before a big charge in the overnight cheapest slots.
The 21:00 and 22:30pm it may be better to avoid charging then and instead charge at 22:30 and hold charge in between, but the plan may change when it gets there and its pennies so I probably won’t intervene

Rbor In Devices & Services/Entities, both the old discharge entity and the new export entity can be seen.
The new export entity shows some ups and downs whereas the discharge entity is a horizontal line:

In the Apex chart, if I select the export best in the header, I get the export entity chart shown as 16.22. But the footer shows 16.4
The Web UI labels the horizontal line as export but its value is 16.38.

The reason for this is as I said before Rob, Predbat has created new export best entities and is now updating those, the discharge best entities are still hanging around with the old values they used to have just before you upgraded. Reason they are showing as horizontal lines is the old values isn’t changing - discharge best says “last updated 2 days ago”

#2722 PianSom

geoffreycoan I’ve got a two hour Octopus Power up event from 3-5pm tomorrow (Saturday afternoon), presumably due to the storm.

Me too.

First one since 1 Nov here. Before that was 3 Oct. FAR fewer than this time last year, sadly. (Though on the upside I guess there have been a few Free Electricity Sessions.)

G
#2723 geoffreycoan

PianSom First one since 1 Nov here. Before that was 3 Oct. FAR fewer than this time last year, sadly. (Though on the upside I guess there have been a few Free Electricity Sessions.)

It’s very strange, we live maybe 15 miles apart yet are getting quite different power up events now. They are definitely getting more regionalised, I saw there was a new github issue from someone who had a powerup event today 22/11 from 7:30-9:30am

Looking back I have had power up events on 1/11 same as you but also 5/11, 6/11, 12/11 and 15/11. October was 1/10, 3/10, 8/10, 10/10 and 16/10. Last free electricity event was 20/10.

It’s still making quite a difference for me, across October and November, 10% of my imports have been free electricity. Some of the early October events were so sunny I hardly imported anything as the solar generation was exceeding my battery charge rate. Those days are gone

#2724 PianSom

geoffreycoan
My only consolation is that the rest of the country will resent you 5x more than they resent me! 🙂

I guess it is pretty reasonable that these things are very local.

R
#2725 Rbor

PianSom geoffreycoan
My only consolation is that the rest of the country will resent you 5x more than they resent me! 🙂

Octopus have hinted that power ups might get extended to other regions of the country:

I have responded but it looks as if you two are part of the privileged few.

Still, first Agile plunge tomorrow and some lower rate slots (although only 3!) – I hope there will be more.

I have had 2 decent solar days with 11 kWh followed by 12 kWh with blue sky and sun.
My extra 1 kWh today following an avalanche this morning as the blanket of snow that was still covering 6 of my roof panels finally decided to slide off.

Tomorrow sounds like an interesting day, 800' up in the foothills of the Pennines, just outside of the Peak District ...........

Rob

R
#2726 Rbor

geoffreycoan the discharge best entities are still hanging around with the old values they used to have just before you upgraded. Reason they are showing as horizontal lines is the old values isn’t changing - discharge best says “last updated 2 days ago”

So will discharge best disappear as an entity after HA 10 day history?
........ Or will it just sit there orphaned (rather like the the old givTCP2 entries in MQTT after upgrading to givTCP3?

Rob

G
#2727 geoffreycoan

Rbor all of the originally named discharge entities will be orphaned in HA. You can see them already showing as ‘last update X days ago’ and eventually (probably after your next HA restart) they will go to Unknown.

Getting rid of these orphaned entities is not straight forward as they don’t have a unique id so the normal way of deleting an entity in HA (Devices and Services/ Entities/ select name/ cog/ delete) doesn’t work.
They don’t do any harm but just clutter up your entity list

However the normal HA data history purge will still progressively be working and over 10 days (or whatever you have set in configuration.yaml) the state history will get removed. I’ve never tried it with a predbat entity but thinking about it, it should remove the entity as well when there’s nothing left after 10 days. Might need to tidy up the long term statistics afterwards for any entities that now no longer exist in the main HA database but have LTS.

D
#2728 Daveb01

geoffreycoan

Last post on this, I am glad I am not Mr Bat as I would have charged my battery up in the negative slots to 100%, then maintained SoC to use the grid. 🙁

R
#2729 Rbor

geoffreycoan thanks. I do have 10 days for HA data purge so I will see what happens. Presumably, if you haven't upgraded to v8.7.0, discharge continues to work as before until you do upgrade.

I must start looking at long term statistics. Learning the ins and outs of HA is a never-ending task.

Rob

R
#2730 Rbor

Daveb01 Echoing my comments from yesterday, it isn’t 4pm yet and Predbat has a mind that often changes as more evidence emerges.

Rob

D
#2731 Daveb01

Rbor

So I am a little confused (not unusual for a newbie). After the update everything has still been working until today. I have not updated anything yet (mainly because I do not know where to look or how to). I am keeping an eye on your posts to see if I get it soon.

This is the only thing I have seen and I can go in and change it. Is this because it is an Apex card?
Will any of the settings affect the way Predbat is working or is it just graphs etc?

D
#2732 Daveb01

That was easy.

R
#2733 Rbor

Daveb01 You underestimate what you have picked up since you joined predbat.
I looked at your original screenshots and thought "this must be the battery prediction chart".
And then you changed 'discharge' to 'export' here:

  - entity: predbat.best_export_limit_kw
    stroke_width: 2
    curve: stepline
    name: export_best

.... and you fixed it.
I recommend that you now graduate from 'newbie' level to 'rabbit level.
I have been on predbat now for 9 months and I am (very) slowly graduating up the levels. The goal is to achieve @geoffreycoan level and I have a long way to go ......

PS. Looking again at your battery chart, I think you need to change the y axis scale as the vertical scale is really cut off.
I have two 8.2 batteries and I have set my at 16.4:

yaxis:
  - min: 0
    max: 16.4

Take a look at yours for your capacity.
And look at the WebUi battery chart which should show the total range.

Rob

D
#2734 Daveb01

Rbor

Thank you, I have updated the vertical scale to 27. However I looked at the Record (which was 0) and get this when I click the cog wheele. I tried another setting and get the same. Any ideas please.

Regards Rabbit (my new Predbat Level)


D
#2735 Daveb01

Rbor

I now think Mr Bat is reading my posts, and updated everything.
I was expecting a message at the bottom of the plan from Mr Bat saying BE PATIENT Rabbit 👍😀

I am now off to do some jobs and have a coffee.

G
#2736 geoffreycoan

Daveb01 See earlier explanation. Because of the way that Predbat “injects” entities into Home Assistant, they don’t get created with unique id’s so you can’t configure them in HA with the cog symbol. Things like the unit of measure (kW/W) and the friendly name are hard coded in the Predbat python code and you can’t change them in HA as you can with other entities (such as those from GivTCP or from anywhere else).

Particularly annoying is you can’t change the display precision.

As I said before, I did find a way to change this but Trefor wasn’t keen on the rework it would have required.

If you want to have a go at changing the Predbat code, you can find the old issue I raised in github, and the fix is linked in the comments. Such a change will definitely get your promoted up the predbat experience level chart

D
#2737 Daveb01

It’s very windy so Octopus are helping out. I am not getting up at 7am on a Sunday so will have to automate a few things to come on between 7-9am

D
#2738 Daveb01

geoffreycoan

Thank you that makes sense now 👍😀🍺

T
#2739 TX200

Wonder how that works with agile, if it's negative pricing at the time, I assume agile would automatically win and I wouldn't get the free credits. (Quite rightly I guess!)

Whereas if agile is say 3p, I'd get the free electric?

T
#2741 TX200

Just updated to HA 2024.11.3 and all the predbat controls entities etc were missing post reboot.

Restarted the predbat addon to fix it. Still waiting for the html predbat plan to appear, but I think that can take a while to appear post reboot.

Had multiple errors in the log - e.g. multiple failed re-tries:

raise WSServerHandshakeError(
aiohttp.client_exceptions.WSServerHandshakeError: 502, message='Invalid response status', url=URL('http://supervisor/core/api/websocket')
2024-11-23 11:50:52.547593: Warn: Web Socket closed, will try to reconnect in 5 seconds
2024-11-23 11:50:57.580279: Info: Start socket for url http://supervisor/core/api/websocket
2024-11-23 11:50:57.632584: Error: Web Socket exception in startup: 502, message='Invalid response status', url=URL('http://supervisor/core/api/websocket')
2024-11-23 11:50:57.633515: Error: Traceback (most recent call last):
File "/config/ha.py", line 184, in socketLoop
async with session.ws_connect(url) as websocket:
File "/usr/local/lib/python3.10/dist-packages/aiohttp/client.py", line 1167, in __aenter__
self._resp = await self._coro
File "/usr/local/lib/python3.10/dist-packages/aiohttp/client.py", line 821, in _ws_connect

R
#2742 Rbor

TX200 Thanks for the warning. I will stay on HA 2024.11.3 for now.

Rob

T
#2743 TX200

Some entities still missing, e.g. battery hours left onwards, further down the controls list. Restarting HA again.

Yay, second HA reboot sorted it. All entities in the card now showing, I have a plan and a notification saying we are in demand mode. Phew.

R
#2744 Rbor

TX200 Until 4 pm today, we won't know the actual official octopus rates 7-9 am tomorrow.

I think I can manually set up a rate of zero for tomorrow times in apps.yaml like this (I did this once before):

  rates_import_override:
    - date: '2024-11-24'
      start: '07:00:00'
      end: '09:00:00'
      rate: 0
      load_scaling: 1.0

Can someone confirm that this is correct?
I think I can set up an automation (or helper?) for this so that I can change date and times without diving into apps.yaml.

If Octopus agile rates are negative at these times, I won't use the override code.

I am going to set the date in my code above to yesterday for now until I know that the override is correct.

Thanks

Rob

T
#2745 TX200

Rbor looks good to me.

I’ve created the helpers and a card for them, but not sure about the date as it appears to be in American format.

I’ve not update the yaml to use the helpers yet, but it should be fairly easy - except for the date which might need some work on.

G
#2746 geoffreycoan

Rbor correct, you set a zero rate import override in apps.yaml

strictly speaking this isn’t 100% correct for the free electricity events as its only free electricity over and above what your normal average import is for 7-9am, but if you are not generally importing then, a zero rate is fine.

[Although with my heat pump guzzling away, I’m not so sure my average is zero]

There is a whole automated solution I created on https://community.givenergy.cloud/d/3968-automating-octopus-power-up-events-into-predbat/82 : use of a REST API to get the free electricity date and time, scripts to copy those details into helper entities, then another script to use the predbat manual API to send the rate override into predbat so you don’t have to manipulate apps.yaml
You might want to increase load scaling if you plan to use more electricity than normal in the free event

TX200 I’ve not update the yaml to use the helpers yet, but it should be fairly easy - except for the date which might need some work on.

I’m not sure you can use helpers in this part of apps.yaml, never tried.

As an extra helper for you all, if you don’t want to use my solution above, just set select.predbat_manual_api to the value

rates_import_override?date=2024-11-24&start=07:00:00&end=09:00:00&rate=0
T
#2748 TX200

Rbor I wonder what it does if the price for agile users is negative at the same time. Hopefully that's accounted for. 🤞

G
#2749 geoffreycoan

Rbor Yes I saw that. I’ll have to see if I can find a way to detect when a free session starts and ends as I have an automation that swaps between the ‘day’ and ‘free’ tariffs on my import utility meter so I get the right data in the energy dashboard.

Otherwise I’ll just stick with what I have which is needed for power up events anyway

T
#2750 TX200

Updated to 8.7.1 missing a load of PredBat entities again.

Something dodgy about HA 2024.11.3 maybe.

Done a restart of PredBat addon entities seem to be all back. Hopefully the plan re-appears soon.

D
#2751 Daveb01

Rbor

You may have promoted me to Rabbit a bit early, if I have got this wrong. I have followed the link, enabled the Octopus Free session in HA. Updated Predbat. That was the easy bit.

I have looked in yaml and no free session code, (my understanding is Predbat updates do not change yaml)
I have copied the code and paste it into yaml and restarted.

The bit I am not sure about is the comment at the end, can you help please. Do I need to do something after _session:

‘’’
octopus_free_session: 're🙁event.octopus_energy([0-9a-z]+|)_octoplus_free_electricity_session_events)'
‘’’

M
#2752 matttheotter

geoffreycoan updated both my instances.....guessing Octopus updates the api data at 16:00 along with the Agile rates?

M
#2753 matttheotter

Daveb01 remember to go to the Octopus integration and turn on the Free Session sensors.

D
#2754 Daveb01

matttheotter

Thank you did that

T
#2755 TX200

TX200 needed another HA reboot and sorted again.

M
#2756 matttheotter

Daveb01 oh, my apologies, Trefor did update all the templates, the following section is new to add to the yaml:

  # Octopus free session points to the free session Sensor in the Octopus plugin
  # Note: You must enable this event sensor in the Octopus Integration in Home Assistant for it to work
  octopus_free_session: 're:(event.octopus_energy_([0-9a-z_]+|)_octoplus_free_electricity_session_events)'

I think you have done everything, I suspect we need to wait for the Octopus API to announce the session.....

B
#2757 browellm

matttheotter didn't appear in mine after updating. I had to add it in manually

M
#2758 matttheotter

browellm its always an add manually, could have done with a little more clarification in the notes 😃

L
#2759 Leeshore

matttheotter I had to reload the octopus energy integration to see the sensors....

T
#2760 TX200

So 7am to 7.30 am for me is negative pricing. As is 8am to 8.30am.

It looks like my consumption for 7.30 and 8.30 slots over the last four weekends days is quite low.

Guess it'll make sense to tell PredBat it's free for the two half hour slots rather than update the yaml for the automatic way.

Let it show/see the agile prices for the other two slots.

B
#2761 browellm

Anyone had their plan populated yet with the output from the sensor yet?

D
#2762 Daveb01

TX200

At the moment Mr Bat is not thinking about the free 2 hr slots. It looks like my battery will be very knackered by the end of tomorrow (up/down/up/down).

I understand my logic is different and it will work out all good in the end on Predbat.

I just think the loss of charging and discharging was not good, just charge it during the negative slots, hold the charge and import from the grid for the rest of the low slots up to 12p?

W
#2763 Wavy Davy

Any one else had problems with entities disappearing?
My select.predbat_manual_discharge and select.predbat_manual_freeze_discharge seem to have gone missing.
and when checking entities all predbat ones show as unmanageable.

T
#2764 TX200

Wavy Davy the discharge ones have been renamed to export. Scroll up a bit in this thread for the info.

T
#2765 TX200

Daveb01 a difference of 14-17p should be enough to account for any losses.

You can always tweak the settings on the predBat card, e.g. battery charge loss, discharge loss, inverter loss. I've set all mine to 5% (0.05)

R
#2766 Rbor

I have jumped through all the hoops with this upgrade to v8.7.1, but my predbat plan hasn't changed at all from before I added the line to apps.yaml and enabled the free sessions in the Octopus energy integration.
Like @Leeshore , I had to reload the Octopus energy integration for the free lines to be exposed:
The event has a little tick by the eye icon:

If I select the event line, I see this:

But there is nothing to suggest that the events have been found.

The 'What's changed' section of v8.7.1 refers to input_number.predbat_load_scaling_free but this is nowhere to be seen within entities:

I have restarted predbat and HA but no luck at all.

Anyone had any luck getting this to work?
...........And if so, what am I doing wrong?

For now, I give up. ☹️

Rob

B
#2767 browellm

Rbor Nope nothing for me either. I'll resort to manual override if we don't work it out this evening.

G
#2768 geoffreycoan

Daveb01 If you turn off the switch switch.predbat_set_discharge_during_charge then Predbat won’t schedule charge and discharge during the same slot and you’ll end up with a plan looking more like this:

Less up-y and down-y

Like TX200 I have put the zero rate in for the slots that would have been charged for, and left the negative rate slots in the free electricity event as they are.

G
#2769 Goshiki2

geoffreycoan Have you noticed that the “with loss” column where there are minus values is going the wrong way. I.e the savings are forecast to be more rather than less.
Not my spot by the way, I’ve just seen someone has commented on Facebook

M
#2770 matttheotter

Looks like a fix has come out to scrape the data from the website 😃

R
#2771 Rbor

matttheotter Yep, we are into v8.7.2 but I'm not updating now.

It would be good to set up free sessions automatically but I have spent hours trying to get v8.7.1 working and I find it a lot quicker to manually set this up in apps.yaml.
In my spying capacity of Trefor's facebook page, It looks like noone has got v8.7.1 to work.

I will look at other methods when I have more time but apps.yaml manual override will do for me tomorrow.
I have set 7:30 and 8:30 to 0 and have left the two negatives. And these show up nicely in my plan.

Rob

G
#2772 geoffreycoan

Goshiki2 geoffreycoan Have you noticed that the “with loss” column where there are minus values is going the wrong way. I.e the savings are forecast to be more rather than less.
Not my spot by the way, I’ve just seen someone has commented on Facebook

It is actually correct. I’ve raised a github issue on this before, as has someone else when we last had a decent spell of negative rates.

Think about it, assume 50% losses to make the maths easy, and import price is -10p. You import 1kWh at -10p but you only actually get half of that, 0.5kW (50% losses) into the battery for your -10p spend.
So to get the full kWh into the battery, and to calculate the effective price per kWh after losses, you have to import 2kWh for every kWh stored. So the effective import rate per kWh after losses is -20p

I’m still sticking with my own REST API based Octopus electricity session stuff

D
#2773 Daveb01

geoffreycoan

Oh no I may get demoted from Rabbit back to Newbie.

I have hopefully done what you said & checked it in two places (see photos)
I have restarted HA
I have restarted Predbat

It’s still the same as above. Do I have to wait more than the time Predbat says recalculating has finished?


D
#2774 Daveb01

Rbor

I have upgraded and now see this between 7-9 but I don’t like the $ symbol it should be £

R
#2775 Rbor

Daveb01 I think it is really confusing knowing the best think to do with free electricity and negative rates.
I plumped for this override in apps.yaml:

  rates_import_override:
    - date: '2024-11-24'
      start: '07:30:00'
      end: '08:00:00'
      rate: 0

    - date: '2024-11-24'
      start: '08:30:00'
      end: '09:00:00'
      rate: 0

I couldn't make up my mind whether to keep the negative slots or to change all 4 slots to 0:00p in one go.

And I got this plan between 7am and 9 am:

Poor predbat can't make up its mind about my two 0.00p slots, flitting between Charging, Exporting, and a mixture of the two!
I bet this won't be the final version.

I think this is how it works, but I may be wrong:

  • Octopus works out our number of free hours by comparing our import with our mean import (last 4 weekends, I believe; 10 weeks during the week)
  • Predbat sees the 0.00p rates and uses this for its plan.
  • Octopus won't be using predbat rates, The 0.00p is artificial as far as Octopus is concerned. Our rates are the Agile rates.

That's me done with predbat for the day. I hope that I have got everything setup properly for overnight: dishwasher, washing, EV, HP hot water.

Rob

R
#2776 Rbor

Daveb01 Oh no I may get demoted from Rabbit back to Newbie.

You get demoted if you forget to use ```

Rob

G
#2777 geoffreycoan

And on top of the negative rates overnight and the free electricity session from 7-9am tomorrow, I’ve now got a power up event from 9-12 tomorrow. Just got the email at 00.35. Or that might be 23:35 which isn’t a lot of notice.

Bizarrely some bits of HA like Apex charts and history graphs work out my time zone correctly in France which gives confusing results when looking at HA running in GMT. Hope I have managed to program Predbat correctly.

Another crappy day of solar forecast tomorrow but my Predbat forecast expenditure by 12:00 is -£2.94. Makes a pleasant change from recent daily spending

G
#2778 geoffreycoan

Daveb01 It’s still the same as above. Do I have to wait more than the time Predbat says recalculating has finished?

sorry I got the switch name wrong, didn’t check the absolutely brilliant documentation https://springfall2008.github.io/batpred/customisation/#calculation-options

its switch.prebdat_calculate_export_oncharge

to stop export/discharge appearing in a charge slot

W
#2779 Wavy Davy

Have gone back to 8.7.0. had too many errors on 8.7.2.
Every time I looked there were more entities that were unavailable.

T
#2780 TX200

Wavy Davy that sounds like what I was having. What HA version are you on? I noticed it after I upgraded to 2024.11.3

I've had to restart PredBat addon then restart home assistant to get it working (twice so far).

#2781 PianSom

geoffreycoan And on top of the negative rates overnight and the free electricity session from 7-9am tomorrow, I’ve now got a power up event from 9-12 tomorrow. Just got the email at 00.35. Or that might be 23:35 which isn’t a lot of notice.

Mine came in at 23:32. Just entered it into apps.yaml, and - on first plan, at least - Predbat has decided that the best it can do is stay charged at 100% from 9-12. Pah - I'm sure we can cane the battery a bit!

D
#2782 Daveb01

geoffreycoan

Thank you again, do I switch the one you suggested back on again?

I will RTFQ again 👍😀

Oh that’s expert mode, I was going to ask when should I switch that on?

G
#2783 geoffreycoan

Daveb01 Thank you again, do I switch the one you suggested back on again?

I will RTFQ again 👍😀

Oh that’s expert mode, I was going to ask when should I switch that on?

The other switch probably won’t make any difference for you.

You can turn expert mode on any time, it was introduced just as a way of reducing the clutter of the number of controls and switches so new users were slightly less overwhelmed. Turning it on makes those other options available to be changed.

D
#2784 Daveb01

geoffreycoan

So that worked, all good. This is what is on and off, if you could advice please.

Q1, now I have selected that switch, can I turn expert mode off (does it just hid it?)
Q2 any others recommended while it’s on?


W
#2785 Wavy Davy

TX200 I'm on the same 2024.11.3

R
#2786 Rbor

Daveb01 Oh that’s expert mode, I was going to ask when should I switch that on?

A 🐇 has permission to use Export mode.

Daveb01 Q1, now I have selected that switch, can I turn expert mode off (does it just hid it?)

Just leave it on.

If you get bothered by the extra 'clutter', you can turn it off and back on again when you need to.

Rob

R
#2787 Rbor

Just checked and I have imported 37 kWh so far today, all on negative or zero rates except for last hour with rates of 1p and 4p.

SVR for 37 kWh would be close to £9. I am in profit and I have a fully charged EV, washing done, dishes clean ....... 😁
Somewhat makes up for the rest of November and a reward for sticking with Agile – I knew it would come good.

Rob

G
#2788 geoffreycoan

Daveb01 I think if you turn expert mode off then Predbat will just take the default for the expert switches, you need to have expert mode turned on to be able to turn those features on/off. Worth testing this though.

Looking at your settings:

  • calculate secondary order slots, you might prefer this off. It seems to have disappeared from the documentation as to what it does, but I definitely preferred it off
  • I turned cloud model off because I didn’t like the way it was being pessimistic with my solar generation within a slot. In summer it kept swapping inverter modes as it artificially modelled cloud behaviour. Personal choice and probably makes no difference for winter
  • HTML plan debug will show the effective rates after losses in the predbat plan. Might be useful if you are trying to understand the plan, or just extra clutter
  • Inverter hybrid should be off for you as you have an AIO not a hybrid inverter. It is incorrectly modelling your solar losses with that turned on
  • Set charge low power mode is useful in winter so predbat will do a long slow charge (if it can) overnight rather than a full rate charge. Keeps the batteries warmer longer
R
#2789 Rbor

TX200

Wavy Davy Have gone back to 8.7.0. had too many errors on 8.7.2.

I upgraded to v8.7.1 but couldn't get it to work.
In my apps.yaml, I had added:
octopus_free_session: 're:(event.octopus_energy_([0-9a-z_]+|)_octoplus_free_electricity_session_events)'
It wasn't easy add the required 'free' entities in the Octopus Energy integration, requiring then to be found and then enabled and than an HA reboot.
The entity 'input_number.predbat_load_scaling_free' never appeared and my predbat plan just ignored my efforts.

I saw folk with v8.7.2 issues and decided to stick with v8.7.1
I had commented 'octopus_free_session' in my apps.yaml until things are resolved. So I am effectively on v8.7.0 also.

I haven't upgraded to HA v2024.11.3 yet. This also appears to have issues.

I am usually a predbat and HA pioneer but I will sit this one out for the time being.

Rob

D
#2790 Daveb01

geoffreycoan

Another learning curve, you were right, I turned Expert mode off, took dog out, when I got back I checked the plan and it was back to charge/discharge in same slots. So you have to leave it 0n if you set anything in expert mode.

I have set the ones you mentioned and will see how it goes.

I like the fact that Predbat config show you what is NOT set to default with the red highlight, this means to me if I change something it goes red and it’s easy to find and switch it off if something goes wrong.

I can see the Load Scaling is set to 1 and the default is 1.05. I have not set 1 so will see if I can find this setting and put it back to default. I will come back to you if I can not find it 👍😀🍺

R
#2791 Rbor

Daveb01 I can see the Load Scaling is set to 1 and the default is 1.05. I have not set 1 so will see if I can find this setting and put it back to default. I will come back to you if I can not find it

You can change settings directly in the WebUI Config screen.
Just type 1.05 in the select box for Load Scaling. You will see 1.0* change to 1.05* and the red shading disappears.

Rob

D
#2792 Daveb01

geoffreycoan Set charge low power mode is useful in winter so predbat will do a long slow charge (if it can) overnight rather than a full rate charge. Keeps the batteries warmer longer

My battery’s are in the Garage with everything else, so far the temp is a constant 12 deg when it went below 0.
So if there are very few slots to charge in winter is this best left as default for me so the AIO’s charge, does this mode require more 30 min slots to get back to the higher charge? If that makes sense.

D
#2793 Daveb01

Rbor

I tried that and it kept going back to 1, I found it in here, and it’s changed.

D
#2794 Daveb01

HTML debug off & on. Thank you again Geoffrey it’s a bit different and will have a look and decide if I need to go up a Mr Bat level to understand it 😀

P.S. you can tell the weather is crap and I am looking at HA with a cuppa, sorry for all the questions on a Sunday.

D
#2795 Daveb01

Hi all,

More tea and looking. Apps.yaml Should I fill in my GW SN in these sections or leave as is please? It’s not clear from what I have read.

I am using REST so did not fill them in, have you guys?


G
#2796 geoffreycoan

Daveb01 My battery’s are in the Garage with everything else, so far the temp is a constant 12 deg when it went below 0.
So if there are very few slots to charge in winter is this best left as default for me so the AIO’s charge, does this mode require more 30 min slots to get back to the higher charge? If that makes sense.

My batteries are in the garage as well. The low charge mode works alongside all the rest of Predbat’s planning so you’ll still reach your target SoC overnight, it’ll just charge at a lower rate so instead of your batteries filling at max rate in an hour or so and then getting cold for the rest of the night, it’ll spread the charge over the longer period.
If there isn’t enough time for a low rate charge it’ll do a max rate charge as normal. The charge rate is determined dynamically based on the target SoC and rates through the night.

I leave it on except for when there’s a free/power up event when I turn it off so I can maximise charging in the free period.

Predbat’s having fun with the free sessions, I’m at -£3.13 today so far. Looking at your switch settings and comparing to my own was useful as I found that set charge freeze was turned off for reasons unknown. Turned on and Predbat will be using it this afternoon to preserve the SoC for the evening peak

G
#2797 geoffreycoan

Daveb01 geserial is hard coded to your gateway serial number so the below is already configured correctly.

It’s useful to have the HA controls configured in apps.yaml as a backup in case the REST doesn’t work. You also need a subset of these set to work out the charge/discharge curves

W
#2799 Wavy Davy

My predbat has auto updated, even though auto update is off.
Now i'm back to lots of entities not available, one of which is predbat version. So I cant use that to go back to previous one.
Is there a way to do this without reloading a backup?

D
#2800 Daveb01

geoffreycoan

Just noticed this, was not expecting it after the new setting, do you have this?

T
#2801 TX200

Wavy Davy try going to add-ons, PredBat, restart.

If the entities don't come back or don't all come back after a few minutes, then try a HA restart

I've had to do this at least once, sometimes twice, after the recent PredBat updates.

I think it's related to HA 2024.11.3 rather than PredBat itself as it happened after I'd upgraded HA, not after I upgraded PredBat.

W
#2802 Wavy Davy

TX200 Already tried those, no difference.
I think I'll go back to a backup and stop updates, at least for now.
Is there any settings to stop HA updating automatically?

G
#2803 Goshiki2

Looking at the Predbat solar forecast chart. Where does Predbat.pv_energy_h0 get its data from? It’s currently reporting 0.8kWh generated today but if I look at sensor.givtcp******pv_energy_today_kwh it’s reporting 1.4kWh generated which is the same as the portal. The Giv App is reporting 1.13kWh and the Solis string inverter is reporting 1.2kWh. It seems to be a large discrepancy on such small numbers and they have been pretty much aligned before today.

G
#2804 geoffreycoan

Wavy Davy I think I'll go back to a backup and stop updates, at least for now.
Is there any settings to stop HA updating automatically?

You can turn auto-update on for each individual add-on, and Predbat has its own auto-update switch as well.

Shouldn’t need to restore from a backup, just instruct Predbat to install an older version from select.predbat_version

Goshiki2 predbat.pv_energy_h0 gets its data from whatever is configured as the PV sensor in apps.yaml https://springfall2008.github.io/batpred/output-data/#today-energy-data
When I updated the documentation last and wrote about that sensor, mine aligned pretty well. It may well be that it’s such small generation today that the sampling of data over time is causing rounding issues. The Giv app and portal use the 5 minute sample points and assume that the generation is flat for that 5 minute period. It doesn’t use the inverter ‘today’ figure which is what givtcp is reporting.
But there are issues with the givtcp today figures as well, if you restart HA or GivTCP then those sensors can produce wild values.

Think its a small number rounding issue

G
#2805 Goshiki2

geoffreycoan Thanks Geoffrey. It’s been pretty much inline before today so you’re probably right.

W
#2806 Wavy Davy

geoffreycoan Thanks Geoff, but I couldn't update from select.predbat_version as that was one of the entities that was unavailable. Also it won't let me skip this version as I get the message

Even though it isn't as far as I know enabled.

G
#2807 geoffreycoan

Wavy Davy very strange, I have never seen that message. It looks like it is referring to the add-on being set to auto update because predbat’s own auto update is entirely managed by the predbat code looking for a new version when it runs, its nothing to do with HA updating at all.

An alternative way of downgrading to a specific version is to just stop the Predbat/appdaemon add-on and just copy all the python files from github for the release you want to install into the /addon_configs/nnnnnn_predbat directory. There’s about 6 or 7 files to copy, and don’t copy the apps.yaml for obvious reasons.

Just check the add-on isn’t set to auto-update. That’s the only place I know of for auto-updating. There’s no auto-update on things installed with HACS and I’ve just looked around and the only auto-update I can see is a toggle on the Predbat add-on

W
#2808 Wavy Davy

geoffreycoan In the end I just did a restore of a 4 day old backup. I did have to change the discharge to export entities etc, but didn't take long, then when everything was ok I took a backup just to be sure in case it updated again...
The add-on is definitely set to NOT auto update, but did wonder if there was somewhere else it could be set.
I even tried a restart after checking the setting just to make sure, but still get that message.
Ah well will just put up with the update flag showing in settings.

R
#2810 Rbor

I've noticed that UK nuclear energy is well down and checking we have several reactors being refused or being serviced. That may help to explain why Agile prices are so high.

All scheduled to come back in first 2 week of December.
https://www.edfenergy.com/energy/power-station/daily-statuses

@hoggy Do you know more?

Rob

#2811 hoggy

Rbor Nuclear is indeed down (as per EDF for refuelling, not much can be done about that, it is what it is)
but also compounding currently is the usual suspects: low wind (Nov 29th you may see Agile rates calm a bit.)

However we've also some interconnector constraints:
ElecLink to France - 1GW unavailable (100% loss) since Early October, currently planned to be back early December.
North Sea Link - running at 50% / 700MW owing to loss of a leg ("Failure on pole transformer 2. Cause unknown." planned to be back in a day or two but the dates can shift out depending on how they get on.

This has lead to the rather unusual phenomenon where the flow of power is reversed, such that it is being pushed up from the south and into Scotland.

R
#2812 Rbor

hoggy Thanks for responding so quickly.
Explains a lot. I have been looking at all the information at https://terravolt.co.uk
A great source of information.

Hopefully the winds will be getting back to normal soon with a nice blast this weekend.
And with interconnects coming back onstream, with more wind, Agile rates should return to 'normal'.
The North Sea link from Norway is a biggie.

Rob

R
#2813 Rbor

There are some entities that do not have a unique ID.
Is there any way of deleting these, especially if they are orphaned?
Do you know why can't these entities cannot be deleted?

Rob

R
#2814 Rbor

I am currently running predbat on a large SSD connected to a raspberry pi4.
This has run now for 10 months and seems to be running well.

I am thinking of installing HA and predbat afresh, partly to clear out any gruff that may have accumulated. I know that I can install a new instance of HA and restore into HA a predbat backup.

I have a pi5 with an NVME drive.

Questions

  1. Can I install HA and predbat, running in monitor mode on the pi5 without interfering with my current setup on the pi4?

  2. If this is OK, when I swap predbats, would I turn pi4 predbat to monitor and then start pi5 predbat?

  3. Would a new installation running in monitor mode generate historical data?

  4. For a predbat database, some folk (e.g. Smart Home Junkie) recommend replacing SQLite with MariaDB. Has anyone tried MariaDB?

  5. Finally, is this a good idea or should I just carry on as I am?

Thanks for any suggestions.

Rob

G
#2815 geoffreycoan

Rbor There are some entities that do not have a unique ID.
Is there any way of deleting these, especially if they are orphaned?
Do you know why can't these entities cannot be deleted?

Assume these are Predbat entities? As explained earlier, the way that Predbat’s Python code (from its appdaemon background) interfaces with HA and creates entities, they don’t get created with unique id’s. And without a unique id you can’t configure them in HA nor delete them via the entities list.

Are these the discharge entities that the latest release created new export named entities for? My belief is that as the HA data gets purged these will disappear after 10 days or whatever your configuration.yaml is set to.

r/e swapping to a Pi5. Unless there is something you think corrupt with your HA database the simplest way to swap from a pi4 to a pi5 is to just backup and restore the HA environment. You can do as you suggest but will lose any historical data such as solar generation, import export data, etc. Depends how important this is to you, personally I like to see historical data especially in the energy dashboard

  1. I think you will find that the recommendations to use MariaDB are at least 2+ years old. That used to be the advice for handling large HA databases that Sqlite (HA’s default database) wasn’t up to the job and MariaDB could do a better job. Since then the HA database structures have improved significantly and in particular introduction of long term statistics means you don’t need to keep as much raw data in the database - people used to change their history retention to 365 days before LTS, and Sqllite didn’t work well.
    You can still swap to MariaDB or any other database but I believe its a one-way swap, swapping back isn’t supported.
D
#2816 Daveb01

This update is a bit annoying as we all have to go and check our api to see if there is a hyphen in it 🙁

G
#2817 geoffreycoan

Daveb01 No don’t worry too much about this limitation. It’s only if you need to enter your API key or edit your solcast configuration in HA that this will be a problem. There was some validation added to the release as people often put the wrong API key in when configuring the integration for the first time, but the validation is over-zealous.
Since you have a running integration and are unlikely to need to change it, you can safely install the upgrade. Or wait for the next version that fixes the API validation bug. There’s nothing materially changed in this version anyway

R
#2818 Rbor

geoffreycoan Thanks as always for your reply. There is a lot of sense in the adage: "A little knowledge is a dangerous thing."

I will divert my thoughts to understanding what I have set up rather than to "throwing the baby away with the dishwater". One goal is to unfathom the sqlite db via the sqlite web UI.
I am looking forwards to your forthcoming advice on "how to trim down the HA db".

There are some good instructive videos in the web which carry with them various pitfalls. My biggest problem is that the HA developers keep changing things, e.g. rearranging and renaming the buttons on the HA main page. How long did I spend searching for a "Configuration" button only to find that its name is now "Settings" (at least it is today!) And what about a Supervisor menu?

The MariaDB videos were interesting but I haven't seen any of that comment on improvements to HA's sql db. Hence my thoughts about moving to MariaDB. I knew that my history would disappear. I have 10 days set in recorder.

You have commented before about the undocumented ID entities. I find them frustrating.

Just one question
If I restore my HA backup to a new HA installation on my pi5, what should I do with my pi4 setup? Should I switch it to monitor mode whilst checking that the pi5 setup is working? Will it do any harm having two installations pointing to 3rd party entities with one installation on monitor mode?

I am still a bit squeamish about doing this – it is a big step.
My pi4-64 with 4Gb and a large SSD is a mean machine.
The pi5 should be meaner.

Thanks

Rob

#2819 PianSom

Rbor
I am in a reasonably similar situation. I actually intend to split my Home Assistant into two - one for general house stuff and one for energy related stuff. My intention is driven primarily by network security - I want to firewall my energy kit away from all the cheap stuff that otherwise inhabits my IoT vlan. In addition, I intend to be more circumspect about updating my energy software base.

My main HA instance is in a Docker environment, and I have been parallel running a Pi5 for the last few months, while I think through the steps to doing what I want to do (and due to sheer indolence). I want to take my history with me when I do the split, and at the same time intend to clean up the database.

  1. In principle it is probably ok. In practice I have not done this. Two reasons - first, I don't want two versions of GivTCP running and interrogating the same inverter. I already have occasional Predbat fails to set battery mode, and having more inverter traffic is - I think - just asking for trouble. Second, I don't want to split my Solcast API calls between another instance and have less frequent updates. So I have Predbat running, but not GivTCP on my Pi5 - pretty useless, but at least I can ensure the platform is stable.

  2. Yes, but see 1.

  3. Yes

  4. I have been thinking about moving my new instance to InfluxDB, as this is probably better suited to time series management. But the benefits are very marginal.

  5. I'd carry on as you are! Spend your time cleaning out your database instead. There is little upside for you - no?

G
#2820 geoffreycoan

Rbor Recent reddit thread on mariadb vs sqlite https://www.reddit.com/r/homeassistant/comments/1ev0379/maria_db_or_sqlite/?rdt=43715

Of course reddit has its own challenges of knowing who to believe

I can’t find the thread but it was in one of the launch videos for new HA features (there is a monthly launch video (party) done by the main authors of HA) where they explained why they now believe the HA database is sufficiently performant to not need an alternative db. One of them said (and it stuck with me), that if you want to use your own db you can still do, but you have to be prepared to be the DBA for your new database.
Personally I never liked DBA tasks when I worked in IT and no desire to do more of it now.

There is a lot of optimisation you can do of the HA database all using standard HA features, and I promise I’ll finish off the article when I get back to the UK. Probably be sometime around the 13th December I get back.

There are some benefits to using Influx db for time based data storage and Grafana for more pretty graphs than you can get with Apex, but I’ve not gone there yet, HA and Sqlite does what I want now.

On your question, yes you should be able to run the two alongside one another with Predbat in monitor mode and read only to be doubly safe. There is the risk of two lots of polling of givtcp could cause problems, so maybe double check the poll frequency and drop one down a bit. Or you could swap to using the GE Cloud integration for the pi4 which works entirely off the 5 minute cloud upload data so no risk of clash with the pi5. Drop the solcast updates down to once a day on the pi4, or even once every couple of days is good enough to keep it running

V
#2821 Vestas

geoffreycoan I wouldn't touch MariaDB. Given who owns it now, monetisation will come.

YMMV of course.

R
#2822 Rbor

geoffreycoan Thanks for the suggestions. I had thought of dropping the pi4 to GE cloud to prevent two installations polling my local inverter.
It does prompt me to clear out Integrations and other stuff that I don't use .

Vestas I wouldn't touch MariaDB. Given who owns it now, monetisation will come.

I get the vibes on MariaDB and I won't need a bargepole.
Glad that I raised it as youtube videos that I have seen really promote it over HA sql DB. Responses here might scare others away from MariaDB also.

Influx db and Grafana are for another day.
I have downloaded the plotly graph card but not tried it yet. Looks highly customisable but much bigger learning curve than Apex.

Rob

V
#2823 Vestas

Rbor MariaDB was a fork of MySQL because of Oracle IIRC and private equity firms do not buy anything without a return far exceeding the initial capital expenditure. Obviously they have their corporate (banking mainly IIRC) customers but just like Oracle they'll eventually decide not to support "open source" products which were offered free of charge for non-commercial use prior to acquisition.

Again YMMV as this is my personal opinion.

D
#2824 Daveb01

We are nearly up to 3k posts, quite popular the Mr Bat 😀👍

Top 5 I can see

  1. First night live on PredBat - 2.8k
  2. Making the most of Octopus Agile - 389
  3. Heat pumps - 351
  4. All in One BMS Release 10 - 325
  5. Gen1 hybrid new “fast response” firmware - 317
D
#2825 Daveb01

Vestas

I am getting old, I had to ask ChatGPT what YMMV stands for 😀🥴

YMMV stands for “Your Mileage May Vary”. It’s a phrase often used online to mean that experiences, results, or opinions may differ from person to person. It suggests that the outcome of a situation may not be the same for everyone.

V
#2826 Vestas

Daveb01 YMMV dates from the start of the internet - and usenet groups in particular in the 1990s.

Pretty sure most people born after the millenium would have to look it up 😃

L
#2827 Leeshore

Daveb01 LOL

B
#2828 browellm

Update for the Predbat table card but I don't know how to do this:
You need to manually clear the frontend cache after updating.

Straightforward?

#2829 PianSom

browellm
It means you need to clear your browser cache.

Exact instructions depend on your platform/browser eg for me (Firefox on Mac) it's Develop/Empty caches for All Profiles. Probably easiest to google for your own - "how do I clear the cache for [Chrome] on [Windows 11]" or whatever

B
#2830 browellm

PianSom Oh np at all then. I thought there was some HA-specific cache it was referring to 🙂

R
#2831 Rbor

Daveb01 Don't worry.
I highlighted YMMV on my mac and had to select 'lookup' to find the answer.

Have you got caught by @geoffreycoan and his RTFM?
I had to look that one up as well!

Rob

R
#2832 Rbor

browellm I updated the card, didn't clear anything, and it worked OK.
This was on MacOS.

Rob

R
#2833 Rbor

geoffreycoan Assume these are Predbat entities? As explained earlier, the way that Predbat’s Python code (from its appdaemon background) interfaces with HA and creates entities, they don’t get created with unique id’s. And without a unique id you can’t configure them in HA nor delete them via the entities list.

For my car charging, I had been using a BMW integration that worked with HA really well and this made the HA setup straightforward. Last week, the integration vetoed my authorisation so I have to go back to a manual method. I had two integrations that had problems, both coinciding with updating to HA 2024.11.2.

This is my problem 'non-unique ID' entity, together with the relevant section from https://springfall2008.github.io/batpred/car-charging/#

input_number.predbat_car_charging_manual_soc_kwh which will hold the cars SoC in kWh.
You will need to manually set this to the cars current charge level before charging, Predbat will increment it during charging sessions but will not reset it automatically.
NB: input_number.predbat_car_charging_manual_soc_kwh must be set to the current kWh value of your car battery NOT a percentage SoC figure otherwise Predbat won't know how much energy there currently is in the battery.

If I charge the car, all is fine, but I can't change the value of the entity. It increments and then stops when charging session finishes. (Is this the relevance of my emboldened text above?) I can set up another charging session by adding on to my new 'starting value' left over from last time. If I input a lower value, no slots are selected. I can work like this but it is a pain. I am hoping to be able to get the BMW integration working for me again, but who knows?

Rob

G
#2834 geoffreycoan

Rbor I never do anything to clear the cache in my browser or companion app when I install front end updates and all seems to work. But as the saying goes YMMV

Vestas YMMV dates from the start of the internet - and usenet groups in particular in the 1990s.

Ooh, usenet groups, I’ve not heard them mentioned for a long long time. The early discussion groups where threaded replies were denoted by how many ‘>’ there were at the start of the text you were replying to.
Binary newsgroups for software distribution, multi-part UUE and ZIP encoded software.

Oh, the memories

Usenet is like a herd of performing elephants …

The kids here can look it up

https://en.wikipedia.org/wiki/Usenet

R
#2835 Rbor

Outgoing has become a flexible tariff!
I picked this up from a forum on Octopus R&D labs:

My outgoing tariff was up for renewal on 18th November so I have sneaked in for another 12M fixed deal. I looked on Octopus Energy site and the wording doesn't use the work 'fixed, rather:

Rob

R
#2836 Rbor

Vestas Pretty sure most people born after the millenium would have to look it up 😃

I would be delighted to qualify but I don't quite qualify (be a few decades).
I was born a Cockney though and I have plenty of rhyming language that I could use .....

Rob

#2837 PianSom

geoffreycoan
As the wiki page says, Usenet is booming, more than it ever has in the past. I haven't seen recent comparisons, but my guess it that is now a larger source of bootlegged content than torrents these days. "The kids" are probably well aware of it!

(More reading about current freeware/subscriptions infrastructure around Usenet - have a look at Radarr, Sonarr, Prowler, SABnzbd, NZBGeek, DrunkenSlug, Plex/Jellyfin, ...)

All changed a lot since the days of the Usenet Cookbook, which was the big thing when I started out using it.

Anyway WAY, WAY off topic.

G
#2838 geoffreycoan

PianSom I’ve just pulled myself out of a nostalgia trip.

Seems that google groups used to be integrated to usenet news and has a searchable archive of group content. Searching for my name found some very old email addresses for me (complete with “bang addresses” [you may need to look this up as well]) and quite a few posts to between 1991 and 1993 to comp.os.minix, comp.sys.atari.st and rec.skydiving. Obviously stuff I was interested at the time.

Gosh, reading some of them I sounded quite technical trying to get NNTP working on Minix/my Atari ST.

Happy days

V
#2839 Vestas

geoffreycoan The text groups are more or less dead these days but I have upwards of 20k posts, mainly in the os2 groups* and of course demon.tech.pc. I was one of the first 100 people who coughed up a year's cash to get connected so I pretty much go back to the very start of commercial ISP services in the UK. At that time nobody else in the UK could even supply an IPv4 address to end users, never mind a domain name and about the only way to get Windows online was using the (very) buggy Trumpet Winsock software.

*at the time I knew so much about OS/2 that IBM offered me a job based on my posts. Thankfully I didn't accept because a couple of years later IBM posted the largest (up till then) corporate loss in history ($2bn). Looks like peanuts now when you look at subsequent banking etc losses 😃

V
#2840 Vestas

Rbor Probably time to look at switching from Octopus now. Agile isn't competitive and if they're essentially binning fixed outgoing and turning that into Octopus Agile then time to move. They're clearly putting all their eggs into the heatpump "basket" with their updated Cosy tariffs so us gas users will probably be better off elsewhere.

D
#2841 Daveb01

Make the most of it while it lasts, I saw a post about in the US (California) where they got free electric if they had solar. (Export same price as Import), they then dropped export by 75%, solar instal went down, they then dropped it again and Solar companies were going out of business. They now recon there is no point having solar if your expecting Export profit (in California).

Everyone is looking at Eon Drive at the moment. But it won’t last they just want to steal people from other tariffs offering a good deal, once there 50% don’t ever bother moving or looking at there tariff.

The best option it to keep an eye on it like we all are here and move around to get the best deal at the time.

G
#2842 geoffreycoan

Interesting that the 15p export is going to a variable rate when I’m sure both export and Agile import went to being a fixed rate earlier this year, and part of the reason for this was that they were falling foul of Ofgem rules by selling above the price cap.
At the time I renewed my export onto the latest fixed export so my export tariff now expires April 2025.

Will just have to see what happens. For me the Free electricity and Power up events make quite a difference, about 10% of my overall import is on these free periods.

R
#2843 Rbor

Daveb01 Make the most of it while it lasts,

Tariffs have been introduced and changed at speed over the last 2 years. At one stage, Octopus seemed to be inventing a new tariff every few weeks.

I think the intelligent tariffs, Agile, and DFS point to where all this will go. Does the 'predbat'

In a couple of years time, I wouldn't be surprised if we have tariffs where energy is controlled for us.
National Grid is struggling to move from the old 'control' distribution from coal, gas, oil and nuclear to a more haphazard supply with renewables (including 'our' solar, batteries and exporting to grid). And interconnects are becoming more important to be a Europe wide resource. If it ever happens on a big scale, there is also use of car batteries for storing and exporting energy.

And smart meters become mandatory (although they must all work!)

Vestas Rbor Probably time to look at switching from Octopus now

I have been on Agile for 10 months and it has treated me well overall. Previously I was on '2 slot' Cosy – Agile has been far more cost effective over time. Currently, we have low winds and a substantial part of our nuclear generation being serviced (and some European interconnects reduced).
We have nuclear plants scheduled to come back on stream within the next couple of weeks and winds will return. These factors should get Agile rates down.

Other utilities have jumped on the low EV rates bandwagon. If I were to shift from Octopus, I would have a very close look at any T&C. I am staying put for now but with open eyes.

Rob

V
#2844 Vestas

Rbor If you have purely electric-powered space heating that's one thing, if you have gas-powered space heating then Octopus are looking a LOT less attractive on both Agile and Tracker (for electricity) than last year.

I don't think its anything to do with recent outages either as this has been ongoing for 6 months or so - both tariffs are more expensive on average than 2023 which isn't justified by wholesale market conditions or price caps.

Octopus have (IMHO) decided that Agile has more or less served its purpose in terms of developing/testing the systems implementation for the most complex ToU tariff in the UK & with the influx of heatpump/EV owners* they don't need to discount off-peak/excess electricity to negative rates as much.

Hard to see what benefit Agile brings to Octopus when they can clearly see customers "grid trading" quite profitably, but not at times when its beneficial for Octopus. Better (for them) if they have more Cosy slots as then they can sell more heatpumps. Or of course if you're in the same region as their windfarms then they can dump the power for free (power-ups etc) and get more customers.

We'll see what we see. No point in me doing anything in winter anyway as export isn't really a factor, we use pretty much all the PV we generate.

*the 1.5 million Bulb customers who were bulk-shifted to Octopus no doubt have an effect as well on base load, they certainly did on "customer service".

D
#2845 Daveb01

Rbor

This is from the other post a screenshot.

V
#2846 Vestas

geoffreycoan fixed rate

I think it was a fixed-term change rather than "fixed rate" as the previous Agile/Tracker contracts had no legal termination date (even though the website might have shown one) so were subject to price caps just the same as "Flexible Octopus"....

D
#2847 Daveb01

@geoffreycoan
@Rbor

Hi yah, can I just check you seeing a similar pattern please. Loads of Maintain SoC

D
#2849 Daveb01

PianSom

Just got the email as well, I am sticking with HA and Agile.

D
#2850 Daveb01

@geoffreycoan

Do you think this will be a new setting that Trevor may look at?
Hhhmmm think this maybe only in the app, I will have a look to see if it is in the Cloud.

D
#2851 Daveb01

Hhhmmmm I am not seeing the above in the app or in the Cloud. Infact I have lost loads of settings, I am on Beta for AIO parallel so not surprised. I would also be worried if something would go wrong if I signed up as well.

This is what I now see in the app and Cloud (loads missing in the cloud in Remote Control)


R
#2852 Rbor

Daveb01 Here's mine but screenshot at 16:31pm after octopus rates.

Has yours changed from the nordpool plan you posted?

Evenings and early night, Predbat is emptying batteries and using grid. Then after midnight Predbat gets some charge into batteries and 'tops them up' with any solar that appears to 50-65% SOC.
My inverter can only add about 9% to battery SOC each half hour so I need quite a while to replenish my two 8.2 kWh batteries. Yours can add far more charge in same time.
Currently, my HP is averaging about 20 kWh a day. Compare your load with mine!
Max temp today only 2.5C but at least I got over 10 kWh solar.

Rob

D
#2853 Daveb01

Rbor

Here’s mine now

G
#2854 geoffreycoan

PianSom I got the email as well. Letting Axle automate my battery alongside Predbat will mean turning Predbat off for periods of time which isn’t ideal. I’ll see what Octopus announce; with luck their saving sessions will be available to the Octopus integration and Predbat again.

Rbor Similar pattern to me, a night of charging and freeze charging. Fortunately a power up event tomorrow afternoon from 1:30-3:30 will help to fill the battery up as well.
Also using about 20kWh on the heat pump a day. Days when it drops to a few degrees above zero the consumption can skyrocket though, 64kWh on November 21st ☹️ when it averaged 1.5 degrees.

Daveb01 Its possible, worth adding it as a suggestion to Trefor although configuration will be a pain as my 5.2 and 9.5 batteries both have 4 cell temperature sensors and the three phase inverters have something like a dozen (but no BMS temp).

How much benefit will this bring though, here’s the cell temperatures for my two batteries through winter last year:

Similar picture for October and November this year, where the lowest its got so far is 12 degrees C.

R
#2855 Rbor

Daveb01 So you have lost many of your 'maintaining SOC' for 'discharging'.
And your predicted cost at Fri 06:00 has reduced from £2.20 to £1.85.

My posted plan was from 16:31 pm so based on actual rates. Predbat has made several tweaks but nothing drastic. I also didn't have many statuses of 'maintaining SOC'.
My current plan now shows £7.03 at Fri 06:00 compared with £7.31 at 16:31 pm.

Best to wait for the actual rates before making conclusions. Even then, I find that Predbat can tweak the plan quite a lot and mine will probably change further overnight.

We are hopefully getting a bit of wind, high temps this weekend – fingers crossed.
But less PV is likely to come with the deal.

Rob

R
#2856 Rbor

geoffreycoan 64kWh on November 21st ☹️ when it averaged 1.5 degrees.

Wow, that is a lot of leccy for your HP. For me:

Nov 19 28.6 kWh Mean T: –1.1C Total daily cost £5.24 Solar 1.2 kWh Mean Agile rate 19.34p
Nov 20 28.4 kWh Mean T: –1.5C Total daily cost £4.40 Solar 8.12 kWh Mean Agile rate 16.81p
Nov 21 28.4 kWh Mean T: –1.5C Total daily cost £4.57 Solar 10.9 kWh Mean Agile rate 19.34p

But so far in Nov (1st-27th), my total cost is £76 (import and export; no SC) substantially less than the 3 days above. My solar is 20% down on 2023.
Last year Nov 1-27, I was on 2 slot Cosy and my total cost was £91.70 (import + export; no SC).

Looks like some wind and higher temps are on the way this weekend, which should be good for Agile rates and on HP kWh. (But less good for Solar, after recent days for me). Solar was almost a write off for me Nov 2-9 where I was averaging 2 kWh.

For the Agile nay-sayers, I have imported 565 kWh Nov 1-27 at an average rate of 14.63p/kWh.
That is about 60% of SVR.
Predbat has done well, exporting on the few occasions that have been possible and then importing at low rates. On 24th Nov, I imported 52.18 kWh at an average rate of –0.17p/kWh.

Rob

G
#2859 geoffreycoan

Speak to the Geek video posted just now “Predbat Breaks Inverters! Extend the life of your home battery”

https://www.youtube.com/watch?v=aipVIi_bKr0

Talking about the problem of limited read/write cycles to the inverter modbus registers

B
#2860 browellm

geoffreycoan Oh. That appears to be less than optimal.

G
#2861 geoffreycoan

geoffreycoan I’ve now just watched the video and added my comments (and a thumbs down).

I think it’s a very misleading video with an unfortunately clickbait title. The particular problem Oli highlights is real but was caused by his balancing automation (that ironically was I believe originally written by Paul L at GivEnergy and shared on Facebook), it wasn’t caused by Predbat. Oli doesn’t use Predbat. His balancing software ran every 30 seconds or so I think.

Predbat checks what your inverter settings are, compares them to the plan, and only if they are different does it send commands to the inverter. So in each 5 minute run, most times it doesn’t make any inverter command changes. You can see this in the GivTCP log.

#2862 PianSom

geoffreycoan
I completely agree. Pure clickbait.

I am an IOG user, not Agile which I suspect would result in more register changes. I have Notifications set up for Discord so that I can see every time Predbat changes status, and can look back on them (eg typical day below). Over the last month I have averaged less than 10 per day.

Making the heroic assumptions that these are the only register changes and that his estimate if 1m cycles is correct then this is a LONG way from being an issue.

In any case, I wonder if this would be covered by warranty.

R
#2863 Rbor

I agree with you.
This is my Status summary over last 24 hours:

If I have read the status summary correctly, this is hardly one instruction every 30 seconds.
It looks more like 18 instructions in 24 hours (and the thin line late last night was when I upgraded from v8.7.1 to v8.7.2). That is an average of 1 instruction every 4800 seconds.
I have been on 'demand' for the last 5.5 hours, with no change.

The way that predbat runs, would there ever be the situation where an instruction is sent every 30 seconds?

Do tell me if my analysis is correct.

... and where would this place other 'solutions' such as My Energy Optimiser and Intelligent Flux?

I think the title of the video should have referred to problems with balancing batteries, not predbat – No data evidence had been provided to justify the title of the video.

Rob

V
#2864 Vestas

geoffreycoan Doesn't really matter frankly - IF the flash is rated for 10,000 cycles then that's clearly not fit for purpose when used with a battery rated for 5000 cycles as it doesn't even allow you to change the charge cycle once a day.

I agree with your clickbait comment and its simply to generate revenue IMHO.

G
#2865 geoffreycoan

Rbor PianSom

Just looking at the predbat status alone isn’t the full picture of writes to the inverter. When changing from say Demand to Charging Predbat has to change several registers on the inverter (GivEnergy controls):

  • charge start time
  • charge end time
  • charge rate (optional)
  • SoC charge target
  • enable charge schedule

And potentially during a charging period the target SoC may change (e.g. every half hour slot). But Predbat does check what the inverter settings are before it changes them, e.g. if you are in a charging slot and Predbat decides to extend the charging to the next period then it will only change the charge end time, as the charge start time is in the past it doesn’t change it.

And all this happens only every 5 minute Predbat run period.

There isn’t any case that Predbat makes changes every 30 seconds. The worst case thing it does is if you have balancing inverters turned on where it runs the balancing every minute. I had that turned on but decided I didn’t like the number of changes it was issuing to the inverter so turned it off some months ago https://github.com/springfall2008/batpred/issues/1397

T
#2866 TX200

geoffreycoan I heard that giving a video a thumbs down is the same as giving it a thumbs up, it just counts as engagement (as does watching it, commenting etc). Not sure if it’s true, but given the way the world works, I wouldn’t be surprised (e.g. where controversial content gets promoted).

So whilst it may feel good to give it a thumbs down, it may actually drive engagement up. 🤣

#2867 PianSom

geoffreycoan And potentially during a charging period the target SoC may change (e.g. every half hour slot).

Wouldn't these be a status change, and hence generate a notification by Predbat? (Thanks for pointing out that a change of status could mean multiple register settings - I hadn't thought of that.)

I do occasionally see changes of target, but counted them in my guesstimate of 10 notifications a day. eg (actually for a discharge target):

(A bigger/better question is why on earth Predbat insists on messing around like this in the middle of the night!)

T
#2869 TX200

geoffreycoan as long as you have the new firmware of course. The one with the RAM workaround?

Was it 10,000 writes without the RAM and circa one million with?

3.2 months without new firmware?

R
#2870 Rbor

geoffreycoan I see that you and Trefor have been trying to put Speak to the Geek to rights but his responses smell of stubbornness. As you say, he has a point about balancing multi-inverters but the title to the video openly criticising Predbat is obvious click-bait and misleading.
After all, what proportion of Predbat users are using more than one inverter?
In my opinion, it is misinformation.

I am disappointed as I have always rated his site. He has some excellent instructive videos especially on installing givTCP and HACS. I closely followed his video on 'How to use an SSD with a raspberry pi'.
He may have gained some clicks but he has now lost my subscription to his site.

Well done for your comments.

Rob

R
#2871 Rbor

@geoffreycoan
I am afraid that I am back to car charging and, after all this time, I think I have this set up in Predbat.
I think there is a glitch in documentation: https://springfall2008.github.io/batpred/car-charging/#car-charging-planning.

Here are the details. The SOC line that appears to be inconsistent. I have emboldened the mismatch.

If your car does not have a state of charge (SoC) sensor you can set switch.predbat_car_charging_manual_soc to True to have Predbat create input_number.predbat_car_charging_manual_soc_kwh which will hold the cars SoC in kWh.

Further down, under: Example EV and charger set up, documentation states:

Finally, for simplicity, add the below entities to your HA Dashboard so you can set them when needed:
Car Manual SoC - input_number.car_manual_soc

In my setup, I have followed the advice but have now changed the SOC line to match the original reference as a switch generates the entity.

I now finally have set up car charging successfully using the manual method.

The documentation may be fine but really needs a check.

Rob

#2872 hoggy

The system time is stored across 6 internal registers. Given Seconds increments the most, and my inverter is 4 years old it's apparently been written: 125,944,763 times. Similar with inverter power and load values, I've polled those down at 2-3second intervals and they constantly change, so those are being updated at potentially a similar rate.
This is all on "old hardware" on old firmware, so it should be on fire by now but it's not...
Therefore there is obviously more to this, and some sort of in RAM stuff is going on even in old hardware. It's just getting out of GE which ones truly commit to flash and which don't...

#2873 PianSom

Rbor He may have gained some clicks but he has now lost my subscription to his site.

I think this is the best way forward. "Don't feed the trolls" is always a good maxim, especially when said trolls get money for the food. Every time someone looks at the video, or comments, or otherwise engages he gets paid more.

Generating clicks by misguided criticism of useful open-source tools in the name of "education" is grubby and cheap. But tbf it's not atypical "influencer" behaviour.

V
#2874 Vestas

hoggy The real question is how the flash memory is managed and how many times you can write to a given row without requiring an erase. For that we'd need the memory controller microcode.

No sane design is going to write clock data to flash so its probably in SRAM/cache and is written to flash periodically or when the system loses grid power/is rebooted. The rest of it like power counters? Who knows?

Its not something I'm overly concerned about - I'd give 1-3 odds on batteries dying before the inverter becomes an issue.

It would be interesting to see what the system failure mode would be if the flash memory failed on one or both of the ARM controllers. Given the thoroughness I've seen with other China-based documentation I'm pretty sure there will be a failure analysis document covering that.

You're good at digging 😉

G
#2875 geoffreycoan

TX200 as long as you have the new firmware of course. The one with the RAM workaround?

Was it 10,000 writes without the RAM and circa one million with?

3.2 months without new firmware?

It wasn’t clear which firmware was required for the RAM caching, how far back on “old” firmware this goes, Oli from STTG has an AC coupled inverter, same as Rob.

I have to think we don’t understand the whole picture. Some element of RAM caching must always have been in place as otherwise we would have seen a lot more discussion on this forum, github and facebook about inverters (whether old or new) bricking pretty quickly if you start using automation to control them.

But as hoggy says the system time is stored in 6 registers and that changes all the time but yet when you power on the inverter you don’t have to set the clock on it each time, so how does that work?

The more recent comments on the video from Michael Smith (of GivEnergy) and Trefor seem more positive. Confirmation that modbus control is supported by GivEnergy and fair use of the inverters is covered by warranty. Talk of there being further improvements to GivTCP and to Predbat to further reduce the number of writes being done, and highlight that this is the way that the EMS works.

I don’t have Facebook so haven’t seen the posts that Oli alludes to about inverters being bricked so don’t know how prevalent this is or what “extreme tuning” is being done that might hasten the inherent write failure risk.

I feel that Oli has taken his own personal experience of balancing software that does a lot of writes to the inverter controls and made a leap of assumption that Predbat must be doing the same - without much to demonstrate that that is the case.
Inverter balancing is an edge case and is not what most people using Predbat do.

Oli has done a lot of good videos that I’ve referred to as well, with a deliberate clickbait title he’s lost his crown on this one.

G
#2876 geoffreycoan

Rbor Further down, under: Example EV and charger set up, documentation states:

Finally, for simplicity, add the below entities to your HA Dashboard so you can set them when needed:
Car Manual SoC - input_number.car_manual_soc

In my setup, I have followed the advice but have now changed the SOC line to match the original reference as a switch generates the entity.

Yes it does look wrong. I’ll need to look back at the original documentation before I changed it, but it was someone else’s example that had been cut and pasted in, and it wasn’t very clear at all so I re-wrote it. There seems to be no need to create a second helper for car_manual_soc when Predbat creates an input_number that you should use instead.
Have added it to my Predbat to-do list

#2877 hoggy

Vestas I'll admit the clock was perhaps a poor choice on my part to illustrate the point but yes, things like lifetime cumulative kWh etc are all constantly moving. It's not like you can say "Holding registers are RAM & Input registers Flash" or vice versa as both sets have constantly changing data.
I do believe the system writes to flash on power fail, you can see it hold up after removing all Power sources and the board has a super capacitor on it.

Tracking local changes in the portal recently starts making more sense now from a "warranty voiding" perspective doesn't it!

Derailing further, would not be surprised if the future becomes "want local control - you need to buy an EMS and interface through that..."

V
#2878 Vestas

hoggy I'm more cynical than that 🙂

I reckon if anything is causing financial problems regarding predbat its far more likely to be batteries than (older?) inverters' flash memory but saying that about batteries will cost them a lot more in terms of future business.

There's not a lot of encouraging news/stuff about GE right now.....

D
#2879 Daveb01

geoffreycoan

Has anyone done an AI search in the GE warranty doc or others to see if there is any mention of this, that would not be covered under the warranty of 10 or 12 years???

D
#2880 Daveb01

This maybe more of a worry?

R
#2881 Rbor

geoffreycoan I finished up linking the the entities themselves and I didn't use helpers.
I do think a helper could be useful for doing the final sum at the end of the car charging section.

Thanks for looking at this issue. I hope that my extensive trialling looking for a working solution has helped

Rob

G
#2882 geoffreycoan

I’ve been continuing to look at the comments on the STTG video. They are generally not positive about the way the video has portrays Predbat as being the villain and including it in the clickbait title.

But on the positive side, there are comments from Michael Smith of GivEnergy who confirms their position over continued support of remote API access, so if this truly were something that they were concerned about bricking inverters you’d think they’d be much more restrictive. Not clear precisely which firmware and inverter models do/do not have the RAM caching, but as I said before, given we don’t hear about bricked inverters it doesn’t sound as major as the video unfairly portrays it.

Trefor has confirmed he is working on further Predbat enhancements to reduce the number of API calls further and to count the API calls made per day/week/month. Both positive improvements

V
#2883 Vestas

geoffreycoan Worth noting that there is nothing in the GivEnergy Hybrid Inverter Limited Warranty 2021 (which is the one covering my HY3.6 - and yours) regarding any "fair usage" as Michael Smith has alluded to in those comments.

Not one word.

The only "gotcha" is the last of the warranty exclusions -

Commercial use or third party control outside of our partners

Which could mean that people now using any of the "intelligent" Octopus products are invalidating the warranty - as Octopus is no longer "a partner" insomuch as they no longer install GE products. People who had systems installed by Octopus would be OK as Octopus is the installer but for other people it could be argued either way in court.

R
#2884 Rbor

It depends on what "partner" means.

If you look on Octopus Energy website for Intelligent Flux, Givenergy batteries are stated as having the only batteries. https://octopus.energy/smart/intelligent-octopus-flux/
It is Givenergy that controls the inverter, not a third party.

Intelligent Octopus Go integrates with Car brands and charger brands.

Predbat uses givTCP API calls to instruct the inverter.

The main Givenergy site (https://givenergy.co.uk) states:

And this is also from Givenergy: https://givenergy.co.uk/octopus/, a whole page on the benefits of combining Givenergy home batteries and Octopus smart tariffs.

Rob

V
#2885 Vestas

Rbor Indeed but none of that says "partner" and its Octopus, not GE who initiate the API calls on that tariff. That means they "control" it in legal terms.

Personally I reckon a district judge would side with the end-user rather than GE on the small claims track but its arguable either way. Edit - people using other third-party apps which utilise the API endpoint rather than via local connections may be on rather dodgier ground depending on how much control they've handed over.

"Fair usage" isn't arguable in any way regarding the warranty document I mentioned.

B
#2886 browellm

Can we carve this discussion out into a separate thread? This one's unwieldy enough as it is with the search limitations of this forum software.

G
#2888 geoffreycoan

@Rbor not wanting to prolong this conversation any more, but the latest comments on the video suggest that 3 inverters have been reported as failing due to excessive writes, with some linkage/usage of Predbat. But no more details than that.

You were lurking on the Predbat facebook group, is there anything more on there or the givenergy FB group about this video/these failures? At the moment its all very thin on hard details

R
#2889 Rbor

geoffreycoan I have combed through two givTCP forums and I can find nothing linking predbat to excessive writes (although it is so difficult finding stuff on facebook).

It seems that the claim that predbat is involved is anecdotal. The only hard evidence of excessive writes is from Oli's automation. If there is a problem, it would be useful to know which inverters have been affected.

On Trefor's facebook forum, everyone has been so supportive which will have helped Trefor to get over this experience.
Trefor's response has been to improve predbat. It looks as if there will be an entity that counts the register writes over time and a tweak to minimise charge changes within a 30 min slot.
He has a dedicated gang of testers who are now on Trefor's new 'main' to test these changes.
Typical of Trefor to respond to such criticism of predbat by going for an immediate constructive solution.

I reckon we can expect a v8.2.3 to land soon and for this to receive further tweaks as we test the upgrade(s).

I will keep lurking/spying on what is happening on facebook and relay anything significant back to this forum.

It would be good if we can use the alternative thread https://community.givenergy.cloud/d/5303-for-those-of-us-thrashing-the-inverter/ for details of givTCP writes, warranties, etc.

Hope this contribution has been informative and useful.

Rob

M
#2890 matttheotter

Rbor was lucking after the double update, sounds like precautionary measures have been taken and I don’t think anyone can ask for more than that.

I’ve taken the advice put in the updated manual, all seems reasonable and the new cycle sensor will be helpful for those that want to track.

I do have one question, how do you figure out inverter loss? It’s one of those items I haven’t really understood in the manual.

G
#2891 geoffreycoan

matttheotter I do have one question, how do you figure out inverter loss? It’s one of those items I haven’t really understood in the manual.

The scientific way of doing it would be to measure the different energy conversion activities and from there work out the losses.

e.g. Take a note of the power in the battery at the start (in Watts), charge at 1kW/hour for an hour, and note the power at the end. With a known amount of power going into the battery you can then calculate the % charge loss.

Same for discharge loss.

Repeat for for the battery at different temperatures to get an average

Similar for inverter loss.

But to be honest this is all a lot of faff and hard work. You could ask this forum and you’ll get answers between about 10% and 20% round trip.

A good starting point is 5, 5, 5 for battery charge, discharge and inverter loss.

What I have done from there then is to tweak the losses so you get a plan you are happy with - in tweak up or down if the battery is charging or discharging when you think it shouldn’t be

M
#2892 matttheotter

geoffreycoan hahaha thanks Geoff, it has been zero, but feels like I should make effort.

I’ll look at starting 5, 5, 5 and see how I get on, anyway to see if it looks right?

Also gonna need to do it for my parents AIO.

R
#2893 Rbor

Take care though. 5, 5, 5 are percentages and the required settings are 0.05, 0.05, 0.05

Rob

G
#2894 geoffreycoan

Rbor spoilsport

D
#2895 Daveb01

matttheotter

Thank you for the reminder (it was on my list). Mine was set on defaults 0.03, 0.03, 0.04, now all 0.05.
I will monitor it over Christmas, and see if it needs a tweak in the new year. (If I remember) 👍🎄

B
#2897 browellm

PSA: Solcast 4.2.7 is out. I updated and it pretty much screwed up everything. Just reverted to a backup. Think I'll skip that one just as I did 4.2.6.

As a minimum would recommend taking a backup before installing.

G
#2898 geoffreycoan

browellm Solcast 4.2.7 is out. I updated and it pretty much screwed up everything

In what way did it go wrong? Do log a github ticket.

Most of the changes appeared to be small bug fixes. 4.2.6 had a bug in the API validation which was a bit of an issue if you needed to reconfigure the integration, but no major changes to the algorithm etc

B
#2899 browellm

geoffreycoan I probably don't have the technical chops to know what went wrong, but nearly every single apex chart failed. I didn't have the wherewithal to see what was causing this.

B
#2901 browellm

Sharticus take this elsewhere. There's a live thread for this crap.

B
#2903 browellm

Sharticus Would just appreciate you using the live thread that's discussing the topic. Simple manners.

#2908 Jase1703

Strong winds coinciding with a weekend and average temps should give some ultra low agile rates Friday thru Sunday. Light relief after the last few days. Just hope my inverter holds out!!
https://youtu.be/_pFVSRrhDQM?si=DxS8N8HTBJRtc7lH
Really useful 10 forecasts from the met office .

T
#2909 TX200

Got a 1.6p slot Thurs late evening. Not sure what is after that yet.

G
#2910 geoffreycoan

Jase1703 Notably cheaper agile rates tomorrow than they have been

B
#2911 browellm

Nukes coming back online too.

#2913 Jase1703

TX200 another favourite tools for predicting agile lows, Elexon is the main trading platform that all offshore wind operators submit their availability to so they are quite accurate looking 2 days ahead.
https://bmrs.elexon.co.uk/wind-generation

R
#2914 Rbor

Jase1703 Thanks for this. A really informative link.

Surely we must get some decent rates during Friday's early hours to build upon tomorrow's last gasp 1.60p (1.52p in Yorkshire 😀.
I have been looking at the interconnector flows, which clearly show that we export and import.

Rob

D
#2915 Daveb01

Hi all,

I have not looked at my apps.yaml for a while, this is because I don’t like changing/tweaking more than one thing at a time, leave it for a while (try to understand its impact if it has any)

As the conversation in the other posts have been about (Inverter/Battery Balancing as well as read/writes). I have just noticed I have this default setting in apps.yaml. As I have 2 x AIO and everything goes via the GW, Geoffrey advised to set Hybrid inverter Off, should I set this to Zero? as I don’t have multi inverters?

Or should I comment it out?

T
#2916 TX200

Daveb01 may as well set it to zero. I doubt it would do anything as it can only see one inverter (number inverters above is 1 and predbat will see the gateway and think it is an inverter I believe)

I think the gateway contains an EMS which if Giv have turned on (not sure if they have released it yet) should balance the inverters.

D
#2917 Daveb01

TX200

Thank you 👍

I also have found this setting and it is Beta and OFF

R
#2918 Rbor

Daveb01 I have checked mine (1 inverter) and I had commented out the balance inverters line.

Rob

G
#2919 geoffreycoan

Daveb01 You don’t want or need balance inverters on, its only for multi-inverter setups (like I have), and it doesn’t work all that well (see my github issue on it and the whole thread about number of inverter writes).

For a multi-AIO setup the Gateway does the balancing for you. Lucky you.

Can probably comment the balance inverters seconds line out as it’s not needed for you. Won’t do any harm leaving it in.

However you should set num_inverters to 1 as you have 1 inverter as far as Predbat is concerned, your AIO gateway. Not sure what would happen if you set it to zero. Maybe Predbat ignores that. Mine is set to 2.

And I advised to you set to hybrid to False as you don’t have a hybrid inverter, you have an AC coupled inverter. The only difference setting this True or False is that predbat doesn’t apply inverter losses in the plan when charging from solar. It only affects the plan not actual Predbat execution

#2920 PianSom

I see there's a red wind warning out for the west. The beeb reports "The winds are also expected to cause large waves, power cuts affecting mobile phone services, as well as damage to buildings and homes. Transport networks are also anticipated to be affected."

It occurs to me that if there was a red warning for me here in the East I wouldn't immediately know what to do with my Predbat to stop all discharging and move straight to grid to preserve charge until the storm had passed. What would be the best/easiest course of action?

(Looks at @geoffreycoan for advice, as always)

D
#2921 Daveb01

PianSom

I was thinking the same, I have just had a look at Mr Bat’s plan for me and it’s not good. I think I am going to put it in “read only” once the battery is at 100% and scarifice the £ I could make.

I will keep an eye on the battery and charge it manually if needed.

What’s the experts view?



G
#2922 geoffreycoan

Daveb01 I think I am going to put it in “read only” once the battery is at 100% and scarifice the £ I could make

Yep, read-only is by far the simplest thing to do. Predbat stops executing the plan and controlling the inverter, and when you turn read only on, Predbat stops any active charging or discharging and sets the inverter to Eco mode.

So if you did want to continue charging you’d need to initiate a manual charge.

On my home to-do list is to re-watch this video on GDACS the global disaster alert integration https://youtu.be/LcNo4MCQRzM and maybe consider building an automation for Predbat around its alerts.

Homework if you’re bored one day (but do it before the storm hits and the internet dies)

#2923 PianSom

geoffreycoan
But wouldn’t standard Eco mode mean possibly discharging?

R
#2924 Rbor

We are made of sterner stuff up here in Yorkshire.
Hope I am not tempting providence and with Yorkshire getting blown and washed away over the weekend

Rob

D
#2925 Daveb01

geoffreycoan

Thanks for the advice, before I go down the Read Only mode, I thought I would try Control Charge mode as well.

Looks like this one will be better, battery lasts all day and night, with a charge in the cheap period to cover Sunday.

T
#2926 TX200

Would setting a reserve of something like 90% also work?

Would predbat then run from the grid, or would it charge to 100%, discharge to 90% then run from grid?

D
#2927 Daveb01

TX200

I think the later, that’s why I did not change anything else, at least I have learned this from Using Predbat and listening to Geoffrey and you guys.

I like simple & I can see what’s changed, if I mess with settings anything could happen & I have to see for a few days, if I toggle off/on or just change the Mode it’s much easier to get back to where you were.

The advantage of read only is Predbat carries on with its plan, you can see it, it just does not act on it.
Control Charge changes the plan, you can see the new plan and you have to go back to charge and discharge for Predbat to do a new plan.

G
#2928 geoffreycoan

TX200 Would setting a reserve of something like 90% also work?

Would predbat then run from the grid, or would it charge to 100%, discharge to 90% then run from grid?

In Predbat configuration you have best_soc_keep and best_soc_min https://springfall2008.github.io/batpred/customisation/#battery-margins-and-metrics-options

best_soc_min acts like battery reserve, it’s a minimum level to keep the battery to, so yes, if you drop below this due to house load then predbat will charge the battery regardless of what the import rate is

best_soc_keep is a softer SoC limit, read the documentation but you can set this to a level you’d like predbat to keep the battery level at, eg for a power cut.

PianSom But wouldn’t standard Eco mode mean possibly discharging?

Yes it would. Depends of course on how far in advance you set Predbat to read-only mode. An alternative would be to chuck a load of ‘freeze charge’ slots in so Predbat holds the current SoC level up to the predicted storm time. Of course that would then mean grid importing.

So maybe increasing best_soc_keep and setting Predbat to Charge mode might be preferable to keep the battery topped up but allow potentially it to drop lower.

Probably no ideal solution for everyone, depends on personal views

Cheaper agile prices tonight but not mega cheap and no power up event, despite the storms. Must have turned the wind turbines off in Wales I guess :

#2929 PianSom

I think if I were over in Wales right now I would charge from the grid to 100% at pretty much any cost, and hold it there.

So "freeze charge" slots wouldn't hack it, nor would pausing Predbat and dropping to Eco. I'm still a bit unsure what the best Predbat strategy is for what I'd want to do.

Meanwhile, here in Cambridge I understand they have cancelled tomorrow's Mill Road Winter Fare because of the weather forecast - maybe they know something more than the Met Office?!

I wonder if I should just pause Predbat and do a manual charge ... nah!

EDIT - just had an invite to a 2hr Power-up tomorrow 6-8am. Mmmmm

D
#2930 Daveb01

PianSom

My worry is if I leave Predbat as is, it would discharge tonight and charge back up in the cheaper slots (as per normal), however what if there was a grid outage when it was below 10%, everyone would be taking the Micky down my road as they all know I have Solar and batteries and the lights and kettle are available if there is an extended outage. Err not in this situation 👍🙁.

I will switch it to Control Charge Mode when I go to bed and get to Sunday with the couple of charges planned in Predbat already. I have set an alarm ready to put Predbat back to normal on Sunday.

I hope everyone gets through this and has no damage or high import prices, I think I will be awake in the night a few times if the gusts rattle anything in or on the roof.

G
#2931 geoffreycoan

PianSom I’m just leaving Predbat as is and have accepted the Power Up event. We seem to be getting these notifications later than we used to do

R
#2932 Rbor

Just 98 posts to go to reach 3,000. That would be a good point for moving forwards to ‘Second year live on Predbat’

Rob

#2933 Jase1703

geoffreycoan nearly all UK offshore turbines run up to 25m/s or 56mph sustained wind speeds. Above this most will begin to pitch blade angles to capture less wind or no wind above 35m/s slowing the rotation. They will never be stopped in the full sense of the word, this would be too difficult and put even more strain on the mechanicals. The software that does this is called High Wind Ridethrough. I suspect lower prices Saturday overnight into Sunday and a chunk of Sunday.

#2934 PianSom

I updated to 8.8.2 yesterday. It’s a release to reduce register writing. However, it seems to have had an impact on algorithm. I did not have my usual charge/discharge/charge cycle last night. It may have been affected by a 6-8am Power-up - hard to know right now.

Other than a couple of random 5min discharges, last night I saw charge/pause/charge on Power-up. Tonight’s program atm is just charge.

B
#2935 browellm

PianSom My money's on the Power Up.

#2936 PianSom

browellm
Hard to fathom the logic of sitting idle rather than discharging before free power, but 🤷

G
#2937 geoffreycoan

PianSom What version were you on before? Trefor made changes to the algorithm in 8.8.0 to reduce inverter writing and he did acknowledge in the release notes that he may have broken things. So keep an eye on it and raise Github issues where you see it going obviously wrong.

We’re going to need to slow down on our comments on this thread guys if we’re to end up precisely on 3000 comments on the 1st year anniversary, 21st December so we can start the “second year” on a nice milestone

R
#2938 Robgy

@geoffreycoan
So to keep the numbers down you don't want people commenting on this thread if they have nothing to contribute.
Opps.... Like me!!!!
No need to reply to this comment 😜

L
#2940 Leeshore

Robgy Why would you post this comment?? Oops that’s another one🤦‍♂️🤣

R
#2941 Rbor

PianSom Storm Darragh has just reached Yorkshire but it has been a lot windier up here in the past. I haven't seen any fence panels blown over from neighbour's gardens.

From weather maps, it looks like the 'eye' of the storm has tracked across northern England. First thing this morning, there wasn't a breath of wind blowing up here.

My neighbour has 4 tall poplars at the bottom of their garden and I was rather hoping that Darragh with fell them 😉. From late October, they shade some sun from reaching my south-facing panels in middle of the day.

We do need to ensure that we do get up to 3,000 for 21st Dec. If we don't post, we will finish up having a 'run' of comments on 21st! This should be #2913 so 87 to go at about 6 a day. Still, we have @Leeshore and @robgy to help us out.

Rob

W
#2942 Wavy Davy

I should have learn't my lesson by now, but did Trefors latest update and all seemed ok.
Did a HA core update and get this

and this in the logs

2 or 3 restarts no different, so as I'd taken a backup before, I restored that.
NO different.
It seems that there is a attribute error.
Any ideas how to clear this?

R
#2943 Rbor

Wavy Davy I have had issues with HA updates breaking integrations.

You could try shutting down completely.
Go to Devices & Services/System.
Then select the on/off button top right.
Then Advanced Options followed by Shut down system.
It was just switching off at the main plug but the system will have fully cycled off.

No promises but worth a try.

Rob

D
#2944 Daveb01

Wavy Davy

I had the same, re-started MQTT, then GivTCP, then Predbat all good now, (however it took Predbat much longer to start and fix everything so be patient) 👍

W
#2945 Wavy Davy

Nope tried all those, no different. Last time I had to reload an older backup, which I'd rather not do, as it happens most times I do an update. I've left it over 1/2 hour to see if it clears.

G
#2946 geoffreycoan

Wavy Davy Presumably this is HA 2024.12 you loaded and now get the error?

It doesn’t help you, but I tend to wait for a few weeks before installing a HA upgrade, usually going to the .2 or even .3 patch release to let other people (often @Rbor to find the bugs first).

Can you restore the HA backup taken before the upgrade? I’m not sure there is any other way of downgrading to an older HA version.

Another power up event tomorrow morning 6-8am. Predbat is taking it in its stride, charging and discharging through the night on the low agile rates 👍

W
#2947 Wavy Davy

It's obviously a general predbat problem.

Will give it until the end of F1 qualifying then try a 4 day old backup.

#2948 PianSom

geoffreycoan
Your plan is making A LOT more sense than mine. Why the low charge targets? Why just a tiny discharge? Why no proper overnight discharge?

It's a bit hard to raise an effective GitHub issue when the plan is so far from being optimal. Think I will leave it a few days post-wind Power-ups and see if it reverts to normal.

R
#2949 Rbor

Wavy Davy
I was once in a similar fixed. Restarting HA didn't work and I just switched my pi off at the main switch and left everything for about half an hour. I then switched my pi back on and left it. After a very long gap of time, HA with predbat came back.
This is very much the 'desperation' stage.

With predbat restarts, I have always found that the apex charts take the longest to reappear.

If you look in GE app, is there any indication that predbat still working?
It is also worth looking on GE inverter porter in Inverter/Remote Control/History for GE log.

Rob

W
#2950 Wavy Davy

Rbor Thanks, I did try switching off, but only for about 5 mins or so, no different.
I have now reinstalled a 5 day old back up which seems to have worked, but it did do the predbat updates up to 8.8.2 for some reason (may have been done in the backup, not sure). But anyway ok now. Not sure what HA version I have installed, but no updates showing as available.
Just had to stop predbat discharging to grid until 16:00, and its showing its planning to discharge after 16:00 which as I only have 30% and there's no solar will have to have a look how to retain a bigger charge.

R
#2951 Rbor

Wavy Davy Anyway, you're back with us! Well done for your persistence.

You can find your HA version from Settings/About.

I am still on HA v2024.11.2

Rob

W
#2952 Wavy Davy

Rbor Me too.
It just seems every update I get similar problems, and have to reload a backup.
Luckily I take a backup every 2 days, and keep the last 6

W
#2953 Wavy Davy

Should the Octopus Agile Rates Card show the power up 0p rates? cause mine doesn't.
The Predbat plan does but not the Octopus one.

G
#2954 geoffreycoan

PianSom Your plan is making A LOT more sense than mine. Why the low charge targets? Why just a tiny discharge? Why no proper overnight discharge?

I’m still running Predbat 8.5.3 as I didn’t want to disturb anything with doing any upgrades whilst I was away in France (will be back home next week). And then some of the upgrades introduced new entities and renamed entities so that would have mucked up the database optimisation so it was another reason to not upgrade.
And then there’s all the new inverter write optimisation, again, happy to let that settle down a bit before I jump to it.

So yes, old version.

But looking at your plan, I see Predbat starts the free charging at 06:00 with SoC at 63%, target 99% and gets to that 99% precisely by the end of the charging period. Does that sound about right? If so, Predbat is only discharging enough so it can fill the battery up in the free period.

I have two inverters so can charge at about 4.8kWh and discharge at about 5.2kWh. Plus I guess different battery capacity (13.4kWh). One problem I do have is Predbat doesn’t properly account for the differing battery sizes on the two inverters so it never gets the plan quite right. It is raised and I did discuss it with Trefor and show how its still happening when he had a recent clear out of old issues.

Wavy Davy Should the Octopus Agile Rates Card show the power up 0p rates? cause mine doesn't.
The Predbat plan does but not the Octopus one.

No because the Power Up and Free Electricity events don’t come through the Octopus integration as a rate override in the normal rate attributes. Predbat only knows about these by you doing a rate override (via the apps.yaml or select.predbat_manual_api). There is a free electricity sensor on the latest Octopus integration that Predbat can use but I still don’t think this appears as a change to the base rates for your tariff

#2955 PianSom

geoffreycoan But looking at your plan, I see Predbat starts the free charging at 06:00 with SoC at 63%, target 99% and gets to that 99% precisely by the end of the charging period. Does that sound about right?

No, I'm afraid not. In a 2h window, the AIO should be able to charge at 6kW/h so 12kW (or thereabouts after losses) of a 13kW battery. So from about 10-15% to 100% at a guess.

IOG has 7p from 11.30pm to 5.30am. At this time of year I generally empty the battery in the evening. Before the last few days I usually saw a charge to 100% by about 2.30am, a discharge to about 50% by 4am, then a charge back up to close to 100% by 5.30am. (Often with odd 5min changes of direction - an issue I raised on Github with no resolution.)

Add in a Power-up 6am-8am. Logically, to maximise income I would have expected another discharge slot or a bigger overnight discharge, leaving the battery empty-ish at 5.30am to limp through 30 mins, then a full charge at Power-up.

So not even close. There is something very strange going on.

D
#2956 Daveb01

You can tell the weather is crap, so looking at HA etc. I have not been into Developer Tools before so had a Quick Look.

States was interesting as I have found an easy place to see if something is working e.g Free Octopus Electric sessions. I can see when the last one was and if it saw it etc.


Within Statistics I have found lines with a Fix Issue. It’s recommending deleting it. I was a bit worried until I looked at it. I initially set GivTCP up as default, then changed the name in config to represent my system e.g GW. I can see the correc tGW settings further down. So all these entries do not exist. I have done a back up and going to delete them all (quite a lot)

Anyone else have/found these & deleted them???



R
#2957 Rbor

I will leave the answers to this query to our residents gurus. That excludes me, although I hope that I can response to 'more straightforward level queries'.

We have a lot of queries coming in and I don't think we should worry about hitting a target of exactly 3,000 posts on 21st December. It is more important that we help each other out.

21st December is a good date to start a new '2nd year on Predbat' thread but perhaps our target should be 'getting to at least 3,000 posts by 21st December'.

BTW, is @Lofthouse still with us on this forum – I will leave the answers to this query to our residents gurus. That excludes me, although I hope that I can response to 'more straightforward level queries'.

We are having a lot of interesting queries coming in and I don't think we should worry about hitting a target of exactly 3,000 posts on 21st December. It is more important that we help each other out.
21st December is a good date to start the next '2nd year on Predbat' thread but perhaps our target should be 'getting to at least 3,000 posts by 21st December'.

BTW, is @Lofthouse still with us on this forum.
@Lofthouse deserves real credit for starting this thread on Dec 21, 2023.

Looking back to the first posts, I can see so many familiar names and you didn't have to put up with me until 28th January 2023 with post #231 where I my introduction started with:
"Some questions from the newbie on the Predbat block."

Rob

G
#2958 geoffreycoan

Rbor Repeating yourself is not going to get the message count up Rob unless you post the text twice in two different comments 😁

Daveb01 Within Statistics I have found lines with a Fix Issue

Well done, exploring new bits of HA. Statistics or Short and Long Term Statistics (LTS) are how HA collects longer term sensor data, longer than the days you configure to keep in configuration.yaml (default 10 days).
LTS is only collected for certain sensor data types (read the HA docs), things like import energy, SoC, temperature, but not things like Predbat status or Inverter mode.

It’s collected automatically, firstly every 5 minutes and then summarised to every hour after a week I think.

If you look at a sensor history in HA, say today’s import energy, or PV generation, look at it over a long time period and you’ll see the normal sensor in a dark line (the newer data) and the statistics (older data) in a paler line. Zoom in to look at say PB generation on a day a month ago and you’ll see the line is quite blocky as you’re only seeing hourly summarised data,

And that’s what LTS does, it summarises sensor data, capturing state, max, min and average sensor values every 5 minutes/hour sp uses lots less storage than full sensor data.

Read more https://data.home-assistant.io/docs/statistics/

But to answer your question, depends if there is any data of value you want to retain. You can move statistics data from one sensor to another (article on this coming), but it’s fiddly, so if there is value in the data then yes keep it.
In your case, if its a few days of givtcp sensors from when you started then no real value in retaining and you can fix the issue and delete the stats

M
#2959 matttheotter

Morning All,

Just configuring GivTCP 3.0 for my parents AIO, I can see the Gateway and the AIO listed during the config phase and a switch saying:

  • Inverter x only report battery data (for use with Gateway and EMS connected inverters)

Should I enable it on the Gateway or the AIO? There inverter is a Solax rather than a GivEnergy one.

Thanks,

Matt

G
#2960 geoffreycoan

matttheotter I don’t know, sounds like a new config option introduced in GivTCP to reduce the clutter of sensors that don’t mean anything.
If you’ve got a single AIO then the gateway isn’t used for anything so makes sense to enable it on the gateway to reduce the number of sensors. On the AIO, I assume it has a CT clamp that reads power from the Solax inverter so maybe not turn it on, unless you have a separate Solar integration to provide Solar data direct from the inverter into HA?

M
#2961 matttheotter

geoffreycoan ah okay.

So enable it on the GW only, I noted in the predbat notes that it reads from the single AIO on an install so that is the only important thing 😃

#2962 PianSom

PianSom There is something very strange going on.

On the off-chance that anyone cares ...

The issue was sorted by Trefor. My battery charge curve, although set to auto, had set itself to 0.36 from 1% to 85%. So Predbat thought that my battery was only capable of slow charging, and hence produced a very odd plan.

As to how the 'auto` calculation had produced such a bizarre curve - a mystery.

M
#2963 matttheotter

geoffreycoan got it all working, nice simple dashboard for my Dad, sorted out the IOG automation with the EVC.

R
#2964 Rbor

Wavy Davy Predbat now up to v8.2.4.
I don't think I have had issues at all upgrading Predbat and I have found it easy to downgrade if I need to.
Bearing in mind your track record, a recommend that you do a complete backup before even a Predbat upgrade.
.... and keep away from HA updates and if you do try take a full backup before doing so.

I am sticking with HA v2024.11.3 for the time being.

Rob

G
#2966 geoffreycoan

Rbor I don't think I have had issues at all upgrading Predbat and I have found it easy to downgrade if I need to.

I tend to use Predbat’s built in upograde mechanism not the HA one. Have certainly had HA / HACS zap my entire Predbat config before now, setting apps.yaml to the template one, when using the HA upgrade option.

So I use the predbat version select dropdown and that works reliably

R
#2967 Rbor

geoffreycoan Same method for me. If I upgrade HA, it is always with fingers crossed.
I don’t even like restarting HA but you have to with some integrations/addons.

Rob

#2968 PianSom

geoffreycoan
switch.predbat_set_charge_low_power has never been anything other than false

But even if it were, it should have produced a flat (or at least tapering) curve - not one that went up and down. Surely?

W
#2969 Wavy Davy

Rbor, geoffreycoan
Thanks for response, I do always take a backup before upgrading, I also have auto backup set to every 2 days, keeping 6 copies on both HA and Google. (I try to be prepared!). I also do use the predbat update were possible.
However the last twice I have had problems and as far as I could see all predbat entries were not available. This included predbat update selector. So I couldn't downgrade by that method. Also when I restored the latest backup they were still disabled. I had to restore a 4 day old backup to get it all back again. I don't understand why I get these problems. My system is not exotic it's a dell thin client formatted as per HA instructions, with a HA image on it, no other software running, so I don't think that is the problem. I do run the HA app on my MacBook and my android devices, but that is just reading the Dell HA setup.
It has made me very wary of future upgrades.
At the moment I'on Predbat V8.8.2 and
HA Core 2024.11.2
Supervisor 2024.11.4
Operating System 14.0
Frontend 20241106.2
Predbat is showing 2 updates available, to V8.8.4 but not planning to do them yet.

S
#2970 SamM

geoffreycoan In Predbat configuration you have best_soc_keep and best_soc_min https://springfall2008.github.io/batpred/customisation/#battery-margins-and-metrics-options

best_soc_min acts like battery reserve, it’s a minimum level to keep the battery to, so yes, if you drop below this due to house load then predbat will charge the battery regardless of what the import rate is

best_soc_keep is a softer SoC limit, read the documentation but you can set this to a level you’d like predbat to keep the battery level at, eg for a power cut.

I was also trying to keep some additional store in our AiO for the storm over the weekend in case of an extended power-cut. I was aware of the documented behaviour of best_soc_keep and best_soc_keep_min, however, changing either/both to a higher value (I tried 2, 6, 10 for both entities) made zero difference to my plan.

The simple solution I found was to change predbat_set_reserve_min to maintain a high reserve, which works as expected, maintaining this value as a minimum state of charge of the battery.

Has anybody else actually tried editing the value for best_soc_keep and/or best_soc_keep_min and seen a difference to the predbat plan and the behaviour of their battery?

This was using the latest versions of Predbat (8.8.2 before the weekend and the same behaviour in 8.8.4 now) and GivTCP (3.0.4)

R
#2971 Rbor

Wavy Davy This is what I am on:
Predbat v8.8.4
Core: 2024.11.2
Supervisor: 2024.11.4
Operating System: 13.2
Frontend: 20241106.2

So matches yours except for OS. The latest OS appears to be 14.0 which is what you are on, with latest Core 12.1.

Either way, I am sticking with my HA versions for now.

Rob

R
#2972 Rbor

geoffreycoan SamM

Can you clarify exactly what the defaults are advised for these settings?
The webUI defaults are best_soc_keep: 0.5 and best_soc_min: 0

I have two 8.2 kWh batteries, so 16.4 kWh in total.
If best_soc_keep is the default 0.5, that's 3% which is lower than Set Reserve Min which is 4% from GE portal readings, which is read into predbat in apps.yaml. To match 4%, I would need to change best_soc_keep to 0.7.

Documentation suggests keeping best_soc_min above 0.

So rather confusing ......

Thanks

Rob

W
#2973 Wavy Davy

To quote a familiar saying, I don't believe it.....
Just looked via the HA app and I have the problem back.
No "update_predbat_version" and no "select_predbat_update" available on the predbat dashboard.
It's also not showing any available updates, so I don't know if HA has updated it or something else. Prebat auto updates is tuned off so it's not that that's done it.
It could be if the updates not being available means it cant check what version is installed.
I'm running Predbat in standalone mode, not via appdaemon
Also it does have under status "exception raised 'attributes'"

I think I maybe have to raise an issue or something with Trefor to get to the bottom of it all.

R
#2974 Rbor

Wavy Davy Yes, raise a github issue for Trefor.
Include a copy of your predbat.log (you can download this) and itemise what is wrong including the attribute exception error.

Have you tried selecting 'automatic update' to see if this jolts predbat into updating versions?
Also, if you go into Device & Services/ entities and select Predbat update and Predbat Core update, what do you see?

There is also adding folder where you can select Predbat. What version is shown at the top under 'current version'. Mine is 1.2.1. This seems to be linked to HA.

I think you need Trefor to look at this for you. I don't know enough to really help out.

Rob

W
#2975 Wavy Davy

Rbor Have raised as an issue.
my Prebat addon is also showing 1.2.1.
Have selected auto update, but nothing so far.
I think it may be connected to the attributes being missing, but no idea otherwise.
Also mystified why or if it has updated itself.
Hopefully Trefor can shed some light on it.
I'm holding off re installing in case Trefor has some idea how to cure it.

W
#2976 Wavy Davy

Rbor Also, if you go into Device & Services/ entities and select Predbat update and Predbat Core update, what do you see?
Predbat update shows V1.2.1
predbat core update is not showing

D
#2977 Daveb01

Are we going to have a vote on who is going to start the new post on the 21st, or is a given it will be Geoffrey?

I don’t want to wake up on the 22nd and see 10 different posts as everyone has tried to do it 👍🙁🎄

Wow I have managed to do the 2,950th post

#2978 PianSom

Daveb01 Wow I have managed to do the 2,950th post

Ah - back in the good old days, no-one (much) seemed to care.

(Though now I look it up again, it seems that @Rbor beat me to it. Grrr.)

5 months for the first 1000, 4 months more to 2000, and - nearly - 3 months to 3000. It's not going to end well!

W
#2979 Wavy Davy

I pity anyone just starting to read all those posts...

Daveb01 I made your post 2963 not 2950

Getting back to my problem, just checked the logs again and it seems its still on V8.8.2 so it wasn't caused by a update.
there is an error "Error: Exception raised 'attributes' so maybe that's the cause.
Also it seems predbat is trying to start but failing.

2024-12-09 17:21:03.185537: Stopping Predbat
Web interface stop called
2024-12-09 17:21:03.400601: Info: Web socket stopping
2024-12-09 17:21:03.402830: Info: Web socket stopping
Web interface stopped
Shutdown, sleeping 20 seconds before restarting

W
#2980 Wavy Davy

on system/add-ons/predbat/configuration. should options say dummy* ?
Just grasping at straws.

L
#2981 Leeshore

Wavy Davy that’s what it is like on my system…..

R
#2982 Rbor

Wavy Davy I guess you are restarting Predbat …. Probably repeatedly.

Also, what about givTCP logs?

Rob

W
#2983 Wavy Davy

Rbor You may have something there. givTCP logs shows connection refused, repeatedly.
2024-12-09 19:59:01,800 - Inv1 - sync - [ERROR ] - Connection to (192.168.1.26, 8899) failed: [Errno 111] Connection refused

G
#2984 geoffreycoan

PianSom switch.predbat_set_charge_low_power has never been anything other than false

But even if it were, it should have produced a flat (or at least tapering) curve - not one that went up and down. Surely?

I don’t know why your curve got created so weird, maybe there is a bug in the create charge curve code or your charge history confused Predbat?
You could try setting it to auto again and see what curve it creates, to at least eliminate that as a possibility.

I used to use auto all the time but then reading the advice in the docs about low charge power mode which I do have turned on, I captured the charge curves and pasted them into my apps.yaml. They were only ever created from 0 to 20 for discharge and 90 to 100 for charge I think. Having them in my apps.yaml also means predbat starts a bit quicker as well as the curve logic can take a while to execute.

BTW I turn low power charge mode off for the duration of the power up events as I found Predbat wasn’t trying as hard as it could do with it turned on.

SamM Has anybody else actually tried editing the value for best_soc_keep and/or best_soc_keep_min and seen a difference to the predbat plan and the behaviour of their battery?

Yes definitely have seen the effects of both of these being set and what it does to the plan, albeit on older Predbat versions. best_soc_keep is advisory so it might not make much difference to the plan, but I did find that increasing it from the default 0.5 to 1kWh meant less ‘marginal benefit’ charges occurred.
Have also set best_soc_min and seen it charge regardless of import rate - so not advised and have left mine on zero.
Both of these will only have an effect when your battery is getting close to empty though.

Rbor If best_soc_keep is the default 0.5, that's 3% which is lower than Set Reserve Min which is 4% from GE portal readings, which is read into predbat in apps.yaml. To match 4%, I would need to change best_soc_keep to 0.7.

First point, yes, there is I think value in increasing best_soc_keep to be above or equal to the reserve min. I had problems and weird predbat plan behaviour some time ago with having keep below the battery reserve, but that might have been before Trefor changed the behaviour of these best_soc_ controls

Documentation suggests keeping best_soc_min above 0.

Um, no it doesn’t as general advice, it only says to do that if you want to always keep a certain amount in the battery for emergency power supply use, and does give the warning about the consequences of doing so.
https://springfall2008.github.io/batpred/customisation/#battery-margins-and-metrics-options
If you don’t have an EPS or you do and still want to use all your battery range, leave it on zero.

Wavy Davy You can manually install a predbat version by copying all the .py files from github into the appropriate folder in HA.
I am wondering if there is something corrupt with your HA setup which is why you keep getting these problems with each upgrade. How easy is it to create a fresh HA install on your Wyse box and restore a HA backup into it?

R
#2985 Rbor

Wavy Davy A list of things to find out:

  1. Are you running givTCP3? If so, did you use givTCP2 before?
  2. If you were on givTCP2, did you stop v2 and switch of all the switches BEFORE starting v3?
  3. Were you running the 'restart automation' for givTCP activity monitor with link in apps.yaml?
    https://springfall2008.github.io/batpred/output-data/#automated-monitoring-that-predbat-and-givtcp-are-running-ok

In apps.yaml, it's this section:

  # When enabled automatic restart will restart the add-on if communication fails
  # Example below is auto-restart for GivTCP add-on itself
  auto_restart:
    - shell: 'rm -rf /homeassistant/GivTCP/*.pkl'
    - service: hassio/addon_restart
      addon: 533ea71a_givtcp

533ea71a_givtcp is code for givTCP3.
For givTCP2, it is a6a2857d_givtcp

If you didn't change the slug no from v2 to v3, on restarting, givTCP2 would have been started as well as givTCP3. They DON'T work together.
See documentation:
https://springfall2008.github.io/batpred/apps-yaml/#automatic-restarts

If none of this applies, restart givTCP and go straight to logs to see what happens. Then take a screenshot (or download) the givTCP log.
Then post log on here.

You may have some leads here.

I know many of the glitches as I have real issues going from v2 to v3 of givTCP.
Rob

W
#2986 Wavy Davy

geoffreycoan Not sure Geoff, I'm not sure if I can do that via the command line. If not I think I would have to take the HD out reformat and install the new HA image.
I've managed to get it connected (changed ip address, saved and changed it back, but there is still a problem somewhere.
This is the givTCP log

logs.txt
4kB
W
#2987 Wavy Davy

Rbor I'm on givTCP v2.4.9
see above for logs

R
#2988 Rbor

geoffreycoan

@Rbor If best_soc_keep is the default 0.5, that's 3% which is lower than Set Reserve Min which is 4% from GE portal readings, which is read into predbat in apps.yaml. To match 4%, I would need to change best_soc_keep to 0.7.
Yes, there is I think value in increasing best_soc_keep to be above or equal to the reserve min. I had problems and weird predbat plan behaviour some time ago with having keep below the battery reserve, but that might have been before Trefor changed the behaviour of these best_soc_ controls

Thanks. I am going to increase best_soc_keep to 0.8, equivalent to 5.5% SOC, above 4% reserve on my total SOC of 16.4.
0.1 would give 6% and I might go there.

My battery SOCs do wander apart. The other day, I notices that my Primary got down to 5% while my secondary was down to 2%. This doesn't look good!
My best_soc_min is staying on zero.

Rob

R
#2989 Rbor

geoffreycoan I used to use auto all the time but then reading the advice in the docs about low charge power mode which I do have turned on, I captured the charge curves and pasted them into my apps.yaml.

Can you post your stat for charge and discharge curves?

I have never been convinced about mine. I did try generating my own by they hardly tailed off at all. And documentation suggests that they use historical data, I think, although that might have been auto.
In apps.yaml, there is an example on givTCP for 9.5 kWh battery but this tails right down across the 90s. Looks excessive.
My discharge curve gives me only 2 values at about 20% SOC.

Thanks

Rob

R
#2990 Rbor

Wavy Davy Thanks.
Looks like your inverter has been found and the IP address matches that in your failed predbat installation.
givTCP log shows problem may be here:
2024-12-09 20:24:56,974 - Inv1 - mqtt_client - [ERROR ] - No serial_number found in MQTT queue. MQTT Control not available.

Try this (in this order).

  1. Check MQTT in Devices and see if there are any devices being picked up.
  2. Restart MQTT
  3. Check the givTCP 2.4.9 configuration settings. Compare with Speak to the geek video:
    https://www.youtube.com/watch?v=ygD9KyciX54&t=0s
  4. Reinstall MQTT

Rob

R
#2991 Rbor

PianSom (Though now I look it up again, it seems that @Rbor beat me to it. Grrr.)

Looking back, I think I got #999. I think @Hook got #1,000.

Rob

G
#2992 geoffreycoan

Wavy Davy OK, you’ve got the ‘no serial number’ bug/feature.

Before you try the things Rbor has suggested, try these two:

  1. Stop GivTCP, delete all the PKL files from /config/GivTCP, restart GivTCP

  2. Do a ‘reset to defaults’ of your inverter on the GE portal

I’ve had this happen to me before and one of these usually cures it.

Rbor Can you post your stat for charge and discharge curves?

  battery_charge_power_curve:
  #  auto
    100 : 0.14
    99 : 0.14
    98 : 0.42
    97 : 0.42
    96 : 0.42
    95 : 0.71
    94 : 0.71
    93 : 0.71
    92 : 0.71
    91 : 0.88
    90 : 0.9

  battery_discharge_power_curve:
  #  auto
    20 : 1.0

The commented out auto lines are just for ease of putting auto back in if I ever want to

R
#2993 Rbor

Wavy Davy geoffreycoan Before you try the things Rbor has suggested, try these two:
Stop GivTCP, delete all the PKL files from /config/GivTCP, restart GivTCP
Do a ‘reset to defaults’ of your inverter on the GE portal

Well spotted. The line in the givTCP log matches the error on predbat status:
Error: Exception raised 'attributes' so it seems very likely to be the cause.

AttributeError: type object 'GiV_Settings' has no attribute 'serial_number'
2024-12-09 20:29:48,180 - Inv1 - read        -  [ERROR   ] - 10 failed inverter reads in a row so removing regCache to force update...

Let's hope this fixes it.

Rob

W
#2994 Wavy Davy

geoffreycoan Thanks Geoff, tried that and thought it maybe fixed it but no.

mqqt logs show
[21:35:12] INFO: Successfully send discovery information to Home Assistant.
[21:35:12] INFO: Successfully send service information to the Supervisor.
2024-12-09 21:35:16: New connection from 172.30.32.1:34057 on port 1883.
2024-12-09 21:35:16: New client connected from 172.30.32.1:34057 as 6DCZ0ymMFvwEb4epW1cHZk (p2, c1, k60, u'homeassistant').
2024-12-09 21:36:48: New connection from 172.30.32.1:40701 on port 1883.
2024-12-09 21:36:48: New client connected from 172.30.32.1:40701 as GivEnergy_GivTCP_1_Control (p2, c1, k60, u'addons').
2024-12-09 21:36:48: Client GivEnergy_GivTCP_1_Control closed its connection.
2024-12-09 21:36:55: New connection from 172.30.32.2:53604 on port 1883.
2024-12-09 21:36:55: Client <unknown> closed its connection.
2024-12-09 21:38:55: New connection from 172.30.32.2:40738 on port 1883.
2024-12-09 21:38:55: Client <unknown> closed its connection.

But givTCP still has no serial number error
e "/app/GivTCP_1/mqtt_client.py", line 386, in on_connect
client.subscribe(MQTT_Topic+"/control/"+GiV_Settings.serial_number+"/#")
AttributeError: type object 'GiV_Settings' has no attribute 'serial_number'

I don't know if I should try a backup reload , but that may just prove to be a temp fix again.

G
#2995 geoffreycoan

Wavy Davy I don't know if I should try a backup reload , but that may just prove to be a temp fix again.

I doubt it will fix it. If you have deleted the GivTCP cache files (PKL) then it’s the inverter not responding to the modbus commands. I had this happen to me several times and the only fix I found was to resetting the inverter to defaults. Could try shutting the inverter down and back up again.

Have a search on the givtcp issues log, several other people have had this no serial number issue. If you look in MQTT explorer you can see that the serial number isn’t in the MQTT data. I never tried deleting and reinstalling MQTT (rebooting HA and all the addons in between) but that might be worth a go as well.

W
#2996 Wavy Davy

geoffreycoan Will try re installing mqqt, but before that I have a inverter software update message to update to 3017. Do you think that might help?

R
#2997 Rbor

Wavy Davy I have an AC3.0 coupled inverter. I got a firmware update to v3017 back in August which I carried out myself. I am pretty sure that there was no calibration.

If you check here in GE knowledge base, you can see the inverter updates (I think yours is a hybrid but I don't know which generation):
https://kb.givenergy.cloud/category.php?id=23

Rob

W
#2998 Wavy Davy

Rbor The update message is in the G portal so they must be rolling it out to Hybrid inverters. Not sure if my one is a gen 1 or not. my model info says GIV-HY3.6.
Think I'll do that first, then re install mqqt if still faulty.

W
#2999 Wavy Davy

well that was a non starter, update failed. seems I may have to do a manual update, but not tonight.

G
#3000 geoffreycoan

Wavy Davy if its 3017 then that's a battery management system upgrade, not the inverter.

Personally I've decided not to upgrade my batteries, I'm happy 3015 and 3017 has introduced charging limits for low temperature - See other thread.

But can't do any harm to GivTCP

J
#3001 Josephiah

So, any clues as to what's going on here...?
I'm used to a few little oddities here and there, which usually resolve themselves as time rolls on, but this is just weird. Have switched it to 'control charge' for now and it's much more sensible, but 'control charge and discharge' consistently produces that random export at 4am...

D
#3002 Daveb01

Rbor

Just had a look at my setting and its default 0.5, as I have 2 x AIO 27 kWh what is your recommendation please?
Please take onto account I have set my reserve to 5% (as 4% was a bit low now I have 27 kWh)

R
#3003 Rbor

This was where I was having a dilemma.

In your case, 5% of 27 kWh is 1.35.
in kWh, a setting of 0.5 is less than 2% of 27, with reserve set at 4%.
Documentation: https://springfall2008.github.io/batpred/customisation/#battery-margins-and-metrics-options

input_number.predbat_best_soc_keep is the minimum battery level in kWh that Predbat will to try to keep the battery above for the Predbat plan.
The default is 0.5 but is it this based on smaller battery, matching 10 kWh?
So should you set best_soc_keep at 1.4?

This may be one for 'over to @geoffreycoan'

Rob

G
#3004 geoffreycoan

Rbor Daveb01 best_soc_keep is in kWh as it says so Rob is correct, if you want 5% of 27kWh then it would be 1.35. You can put 2 decimal places or round to 1.4 if you want.

Josephiah So, any clues as to what's going on here...?

Is the export always at 4am or is it at 4 hours ahead in the plan? If you didn’t change the mode to control charge only, did the export actually occur?

Reason for asking is Predbat plans the next 4 hours slightly differently than the rest of the plan, so you may be seeing an artefact of the two plan types intersecting and if you leave it, it won’t actually do the export.

Having said that, Trefor is fiddling with the export logic in the latest release so it may be that.

i would suggest, ensure you are using the latest version and see if it actually delivers this weird plan or not

H
#3005 Henry3rd

Hi, I'm new to this, but I'm having great fun with setting up Predbat. I just can't get ha-solcast-solar to return any values. Everything looks fine, it's polling, I can see the data if I go into Solcast for my site but zilch on the data sensors. Two days now trying to resolve but not getting anywhere it seems. Help!

R
#3006 Rbor

Henry3rd Make sure you get your API key from solcast (top right menu):

You need this api key and not your resource key (a common error).

Then follow documentation steps:
https://springfall2008.github.io/batpred/install/#solcast-install

The easiest way is the direct method.
You can set up the solcast HA integration which allows for more options.
All info in documentation, the source of most things 'predbat'

Hope this helps.

Rob

W
#3008 Wavy Davy

Have edited this so as not to use up a unnecessary post.
Have uninstalled givTCP v2 and installed V3 and it seems to be working.
Am still going through the GUI settings, will have a look to see if there's a guide to them, but so far so good.
Thanks Geoff and Rob as usual great help.

R
#3009 Rbor

Brilliant. I didn’t have to change anything on givTCP3 content config settings.
Check that all your givTCPv2 settings are off and that your apps.yaml restart settings have v3 slug nos. (If you have the auto start automation set)

Rob

W
#3010 Wavy Davy

Rbor Thanks Rob, it was your post and desperation that decided me to try it. I un-installed v2 and changed slug nos as per your post. I have put 2 api's in, givenergy api and solcast api.
I wasn't sure if I should, but I also enabled dynamic tariff as I'm on agile.
Still have one issue in that I'm getting Error: Exception raised Auto-restart triggered status messages.
I think its a predbat issue.
Here's the log

predbat-logs.txt
6kB
D
#3011 Daveb01

Wavy Davy

I am glad it worked out OK, please also have a look at my post above and Look at Developer tools/ statistics and see if there are old entities left and delete them, under fix issue. (Took me 20 mins to delete them all)

Also when I setup GivTCP the first time I did not name my devices (left as default givtcp1, givtcp2, givtcp3 etc), it got a bit confusing, so I went back and named them e/g GW, AIO1, AIO2. I then had to update the apps.yaml, but now I have done this it’s much easier to identify things, spot issues and know where the issue is.

G
#3012 geoffreycoan

Wavy Davy I have put 2 api's in, givenergy api and solcast api.

Presumably here you are talking about Predbat’s apps.yaml. The Solcast API is fine, you need that if you want Predbat to get the Solar forecasts, or you can use the Solcast integration. Either works, the solcast integration has more configurability and you can display the forecast on the energy dashboard, but if you only want the forecast for Predbat then letting Predbat get the solar forecasts is probably simplest.

You shouldn’t need to configure the givenergy API in apps.yaml. That’s only if you are using the GE Cloud integration. You’re using givtcp

I wasn't sure if I should, but I also enabled dynamic tariff as I'm on agile.

This is in givtcp? GivTCP can track costs but it’s pretty limited as it doesn’t know about complex tariffs such as Agile. Better to use Predbat or even better to use the Energy dashboard to track your agile costs.

Still have one issue in that I'm getting Error: Exception raised Auto-restart triggered status messages.

Looking at the logfile, it starts with saying Predbat fails to load your house load history, and then there’s more of the same and then Predbat declares a REST failure and that it will restart GivTCP.

I think this is probably just because you have started a new install of GivTCP and it won’t have any historical house load data. Give it an hour or so and it should clear by itself. You ought to change your days_previous in Predbat’s apps.yaml as well as this is trying to find history data that doesn’t exist. Set it to just ‘1’ for now, then ‘1 2’ tomorrow etc

R
#3013 Rbor

geoffreycoan Wavy Davy I wasn't sure if I should, but I also enabled dynamic tariff as I'm on agile.

You don’t need dynamic tariff in givTCP. I think I just switched it off in givTCP3. Predbat wil look after this for you.
I am on v3.0.4 which has worked smoothly for me for a month or so.

I am out at the moment and I will check on my settings when I get home.

Rob

H
#3014 Henry3rd

Rbor Thanks for the help, I dumped the solar forecast add-on and used the direct method. All seems to be working now

H
#3015 Henry3rd

Can I ask what I hope is a fairly simple question on monitor mode and read-only mode?
Firstly, why do you need both and, secondly why does the monitor mode revert to control charge and discharge mode, whenever you do anything to predbat?
It's a worry when my system starts charging unexpectedly.

J
#3016 Josephiah

geoffreycoan Is the export always at 4am or is it at 4 hours ahead in the plan? If you didn’t change the mode to control charge only, did the export actually occur?

Reason for asking is Predbat plans the next 4 hours slightly differently than the rest of the plan, so you may be seeing an artefact of the two plan types intersecting and if you leave it, it won’t actually do the export.

Having said that, Trefor is fiddling with the export logic in the latest release so it may be that.

i would suggest, ensure you are using the latest version and see if it actually delivers this weird plan or not

Specifically 4am in this instance. And after dotting back and forward between 'control charge' and 'control charge and discharge' to see the difference, I inadvertently left it on the latter, and yes it did carry it out.

As of 1520 (i.e. with repeat of yesterday's data and/or nordpool) it's threatening to do exactly the same again.
And as of 1610 (new Agile data), it's... planning the same again:

This time I actually will set it to 'control charge' only!

G
#3017 geoffreycoan

Henry3rd Can I ask what I hope is a fairly simple question on monitor mode and read-only mode?
Firstly, why do you need both and, secondly why does the monitor mode revert to control charge and discharge mode, whenever you do anything to predbat?

There are two different settings because they do different things…

Monitor mode is an alternative to Control charge and Control charge and Discharge mode. In the latter two modes Predbat will control your inverter charging and inverter charging and discharging respectively. Monitor mode, Predbat doesn’t control your inverter, it produces a plan based on your forecast house load and solar, and (I believe) any pre-existing charge and discharge schedules you have set on the inverter. So monitor mode predbat just shadows what it thinks will happen to your battery. At the moment, little sun, dark in the evening, it’ll probably just show your battery going flat and staying fairly flat depending on how much solar you generate each day.

Read only is quite different. Read only works in conjunction with the above predbat mode but it stops Predbat from making any changes to your inverter. So you can plan charging and discharging (depending on mode) but stop predbat from executing those tasks.

Josephiah Specifically 4am in this instance

Can you check what your export rates are set to. Your plan above only shows import rates, might there be a rate override at 4am that’s causing this jump overnight?
Otherwise, no real idea, probably one for Trefor

J
#3018 Josephiah

geoffreycoan Can you check what your export rates are set to. Your plan above only shows import rates, might there be a rate override at 4am that’s causing this jump overnight?
Otherwise, no real idea, probably one for Trefor

Export rate is constant 15p/kWh (graph looks correct). Yeah, it's an odd one, will raise an issue on GitHub.

D
#3019 Daveb01

2,991 who’s going to try for the 3000?

L
#3020 Leeshore

Daveb01 mine says 2989

L
#3021 Leeshore

Leeshore Sorry 2990 now🤣

R
#3022 Rbor

Some more questions.

  1. When do we start '2nd year live on PredBat'? (Or similar title for the thread).
    My vote goes to 21st December, the 1 year anniversary of 'First night live ….' By which time we will be well past 3,000.

  2. Who starts the new thread and makes the first post?
    My vote goes to @geoffreycoan
    We will then need a 'last post' asking folk to more to the new thread.

  3. Or is there a case for simply continuing and going for the 4,000?

I think I have just chalked up #2992.

Rob

D
#3023 Daveb01

Rbor

I agree. It no number 3

It says 2,995 now.

L
#3024 Leeshore

Daveb01 My screen has a different number of posts

H
#3025 Henry3rd

geoffreycoan Got it thanks 🙂
I have changed to control charge and discharge mode with read-only mode selected.

I noticed that the read-only mode was turning itself off. Perhaps it was conflicted with monitor mode?

H
#3026 Henry3rd

Henry3rd Can read-only mode be permanently set in apps.yaml?

G
#3027 geoffreycoan

Henry3rd I noticed that the read-only mode was turning itself off. Perhaps it was conflicted with monitor mode?

Shouldn't do. I assume you have the switch.predbat_set_read_only on a dashboard, depends how you put it on the dashboard but I did find it was quite easy to accidentally turn it on or off.

In an entities card, there's two ways of representing a switch; an example from my dashboard:

      - type: entities
        entities:
          - entity: sensor.g_sd2237g182_soc
          - entity: sensor.h_sd2237g395_soc
          - entity: predbat.cost_today
            icon: mdi:currency-gbp
          - entity: predbat.status
            name: Predbat status
          - entity: switch.predbat_set_read_only
            name: Read Only
          - type: buttons
            entities:
              - entity: switch.predbat_active
                name: Predbat Active

The switch.predbat_set_read_only is a definite toggle switch that you have to click to turn it on or off. The other switch, switch.predbat_active appears as a button and its very easy to accidentally knock it on. I used to have my read only switch as a button but had to change it back for these reasons.

You can't set read only via apps.yaml, but if you are concerned about accidentally turning it on, just don't put the switch on any dashboard. I've had read only turned on before now for a day or more without any issues.

D
#3028 Daveb01

geoffreycoan

You did it Boss 👍🎄🥂

#3029 PianSom

Daveb01
Odd - on my screen it looks like YOU did it ...

Only 500 posts to do in the next 11 days to be the GOAT:

G
#3030 geoffreycoan

And on mine it looks like this is the 3000th post !

R
#3031 Rbor

Wavy Davy I have checked the webUI for my givTCP3 configuration.
I don't think I changed anything from the options automatically set up.
I do have 'Dynamic tariffs' and Solcast API switched of within the WebUI because Predbat sorts those out for me (I use 'Dynamic Predbat but you can use the Solcast integration).

I do find that if I restart givTCP3, predbat auto restart gets triggered.
I find this a bit frustrating and I then tend to restart predbat manually from the addon page.
I like the way I can then look at the predbat logs from the start and be confident that predbat has fired up nicely.

PS, I hate to do this to you all but I think I have nabbed No 3,000

Rob

G
#3032 geoffreycoan

It looks like the count on the right hand screen varies for each of us.

I just noticed though that even though the count on my screen was saying 3000 posts, the URL for the page was actually for post 3030; presumably because deleted posts still count?

Anyway https://community.givenergy.cloud/d/3696-first-night-live-on-predbat/3000 was one of mine as well

R
#3033 Rbor

I think I was beaten to it whilst typing a post.
My previous post claimed as No 3000 looks like 3002.

Anyway, it looks like @geoffreycoan does have No 3,000, a well-deserved prize.

Rob

PS having got all that out of the way, we can now get back to helping each other with predbat.
And then over to @geoffreycoan to cut the ribbon on the 2nd year thread on 21st December.

G
#3034 geoffreycoan

Here's another bit of random insight https://github.com/springfall2008/batpred/graphs/contributors

According to Github I am the second highest (real person) contributor to Predbat with 71 commits (I think each PR from my fork must count as a commit as I've certainly done more local commits than that). An astonishing 7,600 lines added and 5,800 removed to the Predbat code and documentation.

Trefor beats me by a country mile though

W
#3035 Wavy Davy

I have just checked and I joined the conversation on 30th Dec. when I was looking for info pre-installing predbat. Post no 71 on my list.
Anyway is there any way to find out the free electricity times? I got a notification but it disappeared while I was sorting out my system. Can't find it anywhere on the octopus site.

R
#3036 Rbor

Wavy Davy No free electricity times up here in Yorkshire.

Anyway, is your system all sorted now?

Rob

W
#3037 Wavy Davy

Rbor Yes, all good (so far). Only thing I need to check is free energy automations. I don't think they were in the backup I restored, so need to redo them. Just not sure what is needed now Trefor has done some work on them.

G
#3038 geoffreycoan

Wavy Davy Only thing I need to check is free energy automations

You need to configure the Octopus integration to create the free energy sensor and add a new regular expression to pick up the sensor to apps.yaml (code to copy is in the template apps.yaml

  # Octopus free session points to the free session Sensor in the Octopus plugin
  # Note: You must enable this event sensor in the Octopus Integration in Home Assistant for it to work
  octopus_free_session: 're:(event.octopus_energy_([0-9a-z_]+|)_octoplus_free_electricity_session_events)'

See https://springfall2008.github.io/batpred/energy-rates/#octopus-free-power-up-events

J
#3039 Josephiah

Josephiah 'control charge' for now and it's much more sensible, but 'control charge and discharge' consistently produces that random export at 4am...

Another issue (I think separate, just discovered while looking into the other one) - here is the plan it came up with on 'control charge' - much more sensible. (Screengrabbed from today's plan on the pre-Nordpool repeated data, so looks identical apart from the date.)

But here is what happened - note the discharges to the house at 0030 and 0130 - as if it hasn't been able to set the freeze mode correctly, and has then had to compensate afterwards by charging again.

My log file appears to be scattered liberally with
Warn: Inverter 0 Trying to write pause_mode to Disabled didn't complete got PauseDischarge which seems to roughly fit(?). Any clues as to what's happening here and how to rectify? Thanks very much.

H
#3040 Henry3rd

geoffreycoan Thanks. I moved the set-read switch to the top of the dashboard so that I can keep an eye on it.
That seems to have stopped my butter fingers from inadvertently clicking.

G
#3041 geoffreycoan

Josephiah My log file appears to be scattered liberally with
Warn: Inverter 0 Trying to write pause_mode to Disabled didn't complete

Looks like the inverter is rejecting the command to go into Pause mode which is as you see why it’s having to charge back up again.

What do you see in your GivTCP log, do you see a pattern of other inverter write or read failures? A number of failures usually points to a comms issue with your inverter, poor wifi, etc. Rebooting GivTCP can sometimes cure such issues but if there is an underlying network problem then that’ll need to be sorted (wifi repeater, mesh network, hard wiring the inverter etc)

If you are just getting the failure on the pause command then it sounds like the inverter is playing up, A reset to defaults and shutting it down and rebooting it can clear these kind of issues.
Do you have the auto restart code in Predbat configured and the GivTCP and Predbat error automations in the Predbat documentation running - all of these can help Predbat to self-restart itself if an error is detected.

On the control charge/discharge 4am issue, you could set control charge and discharge and then swap it to control charge with an overnight automation to work around the current issue.

J
#3042 Josephiah

geoffreycoan thanks, yes, seemed to be struggling to set to freeze, was reverting to eco mode instead, then kind of catching itself and recharging to make up for the lost charge. Looks like similar happening every half hour last night, as shown here with all those little blips:

I had a similar thought on the comms, so this morning reset the inverter and did a full reboot on HA + add-ons, and, fingers crossed, seems to be behaving better so far. Today is not a day for having an empty battery over the peak 😱

Yeah, will consider that workaround - thanks for the suggestion. In the meantime I'll default to 'control charge' and just switch to both directions if I spot a promising plunge period coming up.

W
#3043 Wavy Davy

WOW,
93.72p/kW at 16:30 tonight!! Glad I will be out and not using any power.
Downside is I've just had a saving session notification for tonight 18:00 - 19:00
That's the highest I'v ever seen on agile. Roll on March- Oct.

#3044 Hook

Don’t the saving sessions automatically add themselves to predbat or am I misremembering?

#3045 PianSom

I have put in a manual export rate of 60p for 6-7pm tonight (because I don't remember how auto Saving Sessions work after all this time!). I currently have an empty battery - laundry day.

Interestingly, Predbat chose to ignore the high export pricing, and just do a normal charge tonight.

But if I put in a forced charge for 5.30pm then it starts charging now (to 17%), then charges from 5.30 to 38% and discharges fully 6-7pm. Which comes up with a plan that has a cost advantage. Deleting the forced charge reverts to the original do-nothing plan.

Can anyone replicate this?

W
#3046 Wavy Davy

My DFS detection automation did activate, but my bfs end time was wrong. said 18:30 not 19:00.
I have manually changed it, but not sure if its working correctly.
Will have to have a look for the instructions I used to set it up, and check if its ok.
Problem is as I'm out tonight I cant check if it starts on time or at all.

#3047 Hook

Just put it in manually in the end.

#3048 PianSom

PianSom it starts charging now (to 17%)

ffs it charged to 17% and is now happily discharging back to base again. And forced charging is still set for 5.30pm.

I think Geoffrey said that Trefor was working on the algorithm again. Certainly seems to need it.

S
#3049 SamM

PianSom

I was seeing similar until I disabled "Combine Charge Slots", have you got this enabled currently? Now I have a plan with a bit of hold charging up until 5pm, a half-hour charge at 17:30 and then discharge in the saving session.

I think we're both similar situations, IOG with AIO (and no solar?) and we've discussed the impact "Combine Discharge Slots" has on IOG charging/discharging during the cheap night period. Seems like these toggles are a little overpowered in the algorithm.

EDIT: Should the manual export price be 75p (as OE will pay 60p for the Saving Session and the normal 15p export price? (As you say, doesn't seem this Saving Session is using the same mechanism as last year, so not in the OE HA integration currently)

#3050 PianSom

SamM I was seeing similar until I disabled "Combine Charge Slots", have you got this enabled currently?

Yes, I have (and Combine Discharge Slots). I like the latter on, as otherwise Predbat fast-cycles within a half hour period between charging and discharging overnight - which cannot be good for the battery chemistry.

And yes - IOG plus AIO (though with solar - not that it makes much difference at the moment).

I have turned off Combine Charge Slots for now (thanks for the suggestion!), and will see how things go. It certainly seems that something is skewy in the algorithm atm.

S
#3051 SamM

PianSom

Yes I'm disabling the "Combine Charge Slots" manually just for the Saving Session. Like you I wondered why Predbat was totally ignoring the Saving Session and as I know those switches have a large impact on planning I was experimenting with toggling them to see what effect it had.

I normally have "Combine Charge Slots" enabled permanently. Then I toggle "Combine Discharge Slots" to enabled during the off-peak period if no car charging is planned, using a HA automation. I've found that combination gives the best outcome whilst not absolutely battering the battery with constant charge/discharge cycles.

T
#3052 TX200

I've set mine in apps.yaml to 70p.

On the basis that I might not get the entire amount paid for (e.g. baseline export is???)

I'm on agile outgoing, so 30-35p export, plus 60p, but take a bit off.

#3053 PianSom

SamM
I'll try turning off Combine Export Slots (as I have seen it is called now) for the next few hours.

But Predbat is not behaving well. It is supposedly in Freeze Charge mode at 15% but the battery is discharging to support the load and is now down to 13% and falling. All very strange.

S
#3054 SamM

PianSom

Similar to you, my plan now should be executing "Freeze Charging" but this doesn't seem to be any different to "Demand" mode. i.e. The battery is covering the house load. I would have expected this mode to mean that battery is "paused" to hold the SoC and load is covered by the grid (that also seems to be what the documentation suggests).

EDIT: Just put Predbat in Monitor mode and tried pausing from the GivEnergy app and that has the same outcome. The battery is not actually paused and continues to cover the house load. Seems like a GivEnergy issue

R
#3055 Rbor

It's so long ago since I have done this that I an unsure of the details.
I had forgotten that we can use these sessions for export as well. I should be able to export about 3 kW in an hour using my AC3.0 inverter. And I don't export anything at this time out of summer.

I have added this code to my apps.yaml.

Does it look OK?

Will it appear in my predbat plan?

  rates_export_override:
    - date: '2024-12-11'
    - start: '18:00:00'
      end: '19:00:00'
      rate_increment: 60

Or am I better off just doing a force export 6-7pm?

Thanks

Rob

L
#3056 Lincs_Will

Hook

PianSom

Looking at the Sensor Predbat's apps.yaml points to it looks like it doesn't forecast ahead of the current time, it just updates every few mins to see if a saving session is active. Not the smartest solution but maybe all that can be done with the Octopus API?

My Predbat isn't picking anything up either. Will see what happens at 1800.

R
#3057 Rbor

Rbor Replying to myself!
I upped the rate_increment to 70 and this is the result in my plan. So it does show up:

I will turn off my heat pump then or some of my inverter power will go to my HP.

Rob

#3058 PianSom

SamM
Even though it's not very charitable - I'm glad it's not just me!

Lincs_Will
Yes, iirc that is correct. Doesn't seem to have worked this time though? Maybe they have changed the API or something?
If I look at the event. entity in HA Developer Tools I can see all last year's sessions, but not today's.

Y
#3059 Yossarian

Seems like with the move to regional saving sessions the API no longer works to sign up which is annoying

Y
#3060 Yossarian

Rbor I thought it was 60p rather than 70p.

Is there a way to do this for just a day, similar to the holiday mode? I got annoyed with 16:00:17:00 exports which never made sense to me so always have:

rates_export_override:

  • start: '16:00:00'
    end: '19:00:00'
    rate_increment: -10

Which I've just commented out with # for now and done similar to you

Y
#3061 Yossarian

TX200 depends how often you export between 18:00-19:00 I guess. I would say rarely, but perhaps with agile outgoing it might be more frequently. I'm on fixed outgoing so never export 16:00-19:00 unless a saving session

How do you find agile outgoing and predbat? Maybe I should try it.

T
#3062 TX200

Yossarian I'm going to need to do some maths on agile outgoing vs fixed 15p.

When the price plunges I could probably earn more overnight e.g. chwrge, discharge, charge.

But days like this with bigger export payments, hard to say which method will win. I'll probably do the maths again at the end of the month.

D
#3063 Daveb01

You guys seem to be doing a lot for 60p, 😀
Plus a rate or 67p import?

I am on battery at the moment so my import is zero until a planned charge at midnight.

L
#3064 Lincs_Will


Well the binary sensor in the Octopus integration saw nothing as 1800 came and went so it's broken.

G
#3066 geoffreycoan

The saving session event is still firing but if you look at the event details, the saving session for today didn't appear either in the available or joined attributes, only last year's events:

I have put together a simple dashboard and automation script to fire the saving session into Predbat using the manual API:
https://community.givenergy.cloud/d/5359-automating-saving-session-events-into-predbat

Unfortunately the load_scaling factor doesn't seem to work via the API (raised on Github https://github.com/springfall2008/batpred/issues/1718) so I too had to put it as a rates_export_override in apps.yaml

I exported 3.2kWh, so its £2 or so which helps to offset some of the horrible Agile rates at the moment

R
#3067 Rbor

Yossarian I put today's date in my apps.yaml code but predbat seems to have added the code again for tomorrow 6-7pm.

So I have now commented out the code in apps yaml, which has removed the entry from tomorrow's apps.yaml.
I will try the automation script from @geoffreycoan for next time.

Rob

G
#3068 geoffreycoan

Rbor I put today's date in my apps.yaml code but predbat seems to have added the code again for tomorrow 6-7pm.

Weird.

My apps.yaml:

  rates_export_override:
    -  date: '2024-12-11'
       start: '18:00:00'
       end: '19:00:00'
       rate_increment: 60
       load_scaling: 0.1

And tomorrow's plan isn't showing the export rates repeating:

I wouldn't be surprised if we see another similar saving session tomorrow

Y
#3069 Yossarian

Rbor missed the date bit, thanks. Will also try geoffreycoan 's automation

T
#3070 TX200

My baseline for those slots seems quite low, either a small amount of import or a small amount of export

Might get £1.01 according to my maths.

Plus £0.58 for the export agile payments.

Now got 15% battery left and hoping it gets me to 2130hrs!

R
#3071 Rbor

Having looked back the only weird bit was that dumbo Rbor 🤯 put a hyphen before the date line AND the start line.
I have removed the hyphen before the start line, made sure that everything was aligned, and have saved again in apps.yaml with today's date. That has removed the extra entry for tomorrow.
I guess that my extra hyphen before start meant that the date was ignored.

As a footnote, my code had one space after the date hyphen whereas yours had two spaces.
My previous entries for rates_export_override has one space after the hyphen.
Is this a case where one or two spaces both work?

I have looked at your helpers, script and automation, although I may wait for bottlecapdave to sort things from January. I also need to learn about scripts (such as 'where do they go!) from smarthomejunkie.

Rob

R
#3072 Rbor

TX200 Overall, I reckon I will be £1.50-£2.00 up which would be good considering today's rates.

geoffreycoan

       rate_increment: 60
       load_scaling: 0.1

In these two lines, how do I decide the value to add to rate_increment and load_scaling?

Rob

G
#3073 geoffreycoan

Rbor As a footnote, my code had one space after the date hyphen whereas yours had two spaces.

Yeah I think that was just my apps.yaml format. I would normally put one space, for some reason the prior one I edited had two spaces, but it seems to work as you noticed.

I have looked at your helpers, script and automation, although I may wait for bottlecapdave to sort things from January. I also need to learn about scripts (such as 'where do they go!) from smarthomejunkie.

System / Automations /. then click on the Scripts tab at the top

Scripts are very similar to automations but they don’t have triggers or conditions, just a sequence of commands to execute. You can call scripts from the dashboard or as an action from another automation/script.

Scripts are useful to do things repeatedly, and you can add parameters to scripts. e.g. I have scripts to force charge or discharge or Eco mode of my inverters, and I have this script that I can use from any other automation to send a message to my mobile and ipad:

alias: Notify all devices
icon: mdi:message-alert-outline
fields:
  title:
    selector:
      text: null
    name: Title
    default: “ ”
  message:
    selector:
      text: null
    name: Message
    required: true
  critical:
    selector:
      text: null
    name: Critical
    default: "N"
  url:
    selector:
      text: null
    name: Url
    default: " "
sequence:
  - action: notify.all_devices
    data:
      title: |
        {{ title }}
      message: |
        {{now().strftime('%-d %b %H:%M')}} {{ message }}
      data:
        visibility: public
        persistent: true
        url: |
          {{ url }}
        push:
          sound:
            name: default
            critical: |
              {{ '1' if (critical == 'Y') else '0' }}
            volume: 0.8
mode: single

I use this from various alert automations such as Predbat or GivTCP failing, batteries in temperature monitors going flat, the fridge stopping drawing power, etc. Its just a useful way to do something consistently

G
#3074 geoffreycoan

Rbor
rate_increment: 60
load_scaling: 0.1

In these two lines, how do I decide the value to add to rate_increment and load_scaling?

Rob

Well its in the manual https://springfall2008.github.io/batpred/energy-rates/#manually-over-riding-energy-rates

rate_increment is how much extra or less you are getting, so in the case of today’s DFS session we got 60p for the session plus the standard 15p export rate. So you could put rate: 75 or rate_incement: 60 and Predbat adds the 60p to your existing export rate

load_scaling is how much you expect to vary your house load in the event. 0.1 says you expect to be using just 10% of your normal load during that period, e.g. you turn the heat pump off.
You probably will need to vary the load scaling or Predbat won’t bother exporting if it thinks its not worthwhile that your house is consuming your inverter capacity

R
#3075 Rbor

geoffreycoan Thanks and much appreciated.
With my recent learning session on templates, at least I could 'sort of' understand the code and start to find my way around Developer Tools.

So in HA, we get Helpers alongside Entities in Devices & Services.
And from 'Helpers', I can create a 'Template helper'.
...... and then Scripts appear alongside Automations in another part of HA. And looking, Automations also includes Scenes (whatever they are! For another day) and Blueprints.

I will get there but first I will assemble your code (although I am happy setting up for saving sessions within apps.yaml for the time being).

Just finding things in HA is a massive learning curve.

Rob

R
#3076 Rbor

It looks as if my inverter has had enough of being down to 4%. Apart from a brief succession of charge/demand/charge/demand ..... till 1 am, it is full speed ahead to get me up to 100% for 6 am.
Predbat is then hopeful about getting get me through the day till 8:30 pm.
I have tweaked my HP down a degree tomorrow to offer predbat some help. I will have to see if it gets too cold.

Surely NESO must be calling another DFS session tomorrow during some of the 99.99p slots.

Rob

G
#3077 geoffreycoan

Rbor Predbat is then hopeful about getting get me through the day till 8:30 pm.

Mine is freeze charging through the day after the overnight charge so I will grid import until the peak time. A bit more battery would help at times like this

I have tweaked my HP down a degree tomorrow to offer predbat some help. I will have to see if it gets too cold.

My heat pump controls are in the loft so it's a bit of a faff to change the heating curve. Have bought some cable and will get them relocated sometime.
Turned the house thermostat down at 6pm for the saving session and was going to turn it back up afterwards but the house is still warm enough so I've not bothered. So the DFS session has been a double benefit as I've not had the heating on for the evening.

Surely NESO must be calling another DFS session tomorrow during some of the 99.99p slots.

That's what I'm expecting too. 🤞

Today's one generated about £2 income

T
#3078 TX200

Got down to 3% battery last night, just before 11pm, so survived the worst rates.

#3079 PianSom

SamM
So -like you - I went back to my default position of combining charge and export slots last night.

Out of curiosity, do you also suffer from “flip flopping” ie short 5-15 min bursts of charging during discharging, or occasionally vice versa?

I have raised this on GitHub with Trevor in the past, but have never managed to get him to engage properly.

J
#3080 Josephiah

Josephiah Okay, I thought the second issue was sorted, but now I'm not so sure. Not getting the same comms errors as previously, but in particular Freeze charge does not seem to be having the desired effect, instead letting the battery discharge to meet demand. See 2331, 0031 and 0400, where SoC reduces instead of holding steady.

Any ideas?

Still not sure about those blips every half hour. Thinking back to yesterday, and what I actually did, I think I had actually had to manually switch Eco mode off to prevent it doing those little discharges.

logs-1.txt
24kB

Edit: caught one of the blips, at roughly 20s intervals. Discharge to meet house demand for approx 1 minute, then freezes again.



R
#3081 Rbor

If you wondered why our energy rates are so high, see below:

Gas (CCGT) is 67% with wind at 3%.
Our nukes are at 9% with more coming back on line this month. They are actually up from about 6% a couple of weeks ago! Yesterday solar barely featured all day.

Wind is forecast to be back from Saturday and then continuing with higher temperatures next week.
......Meanwhile buckle down (but not from wind) for next 2 days.

During Storm Darragh, we had more like 60% wind.

Rob

#3082 PianSom

Rbor
There was actually a good news story in the FT a couple of days ago


R
#3083 Rbor

PianSom Yes, good positive news.
Difficult to believe when you see the pie chart I posted earlier.

This weather isn't just affecting us. Over the last few hours, we have been exporting a fair whack (about 4GWh at 4 am) to the continent via the interconnects.

Rob

R
#3084 Rbor

Just when I thought the weather for energy generation couldn't get any worse:

  • 1:30 pm on Thursday afternoon up here in Yorkshire.
  • The grey gloom has been joined by persistent drizzle and hill fog.
  • I am currently generated 50W and not a breath of wind.
    No chance of getting anywhere near 1 kWh for the day.

Rob

#3085 PianSom

Rbor
If it's any consolation ...

Here in East Anglia my 22kWp of panels have today so far produced 0.8kWh, and are currently powering out 56W with under 2 hours to go to sunset.

No wind either, by the look of it out there in the murk.

G
#3086 geoffreycoan

Rbor Its been misty here today but my mega array has managed to pull in 2kWh so far

Solar forecast is much the same tomorrow and slightly better over the weekend and into early next week.

D
#3087 Daveb01

geoffreycoan

Mine similar and the prediction is only 0.6 out 👍😀

R
#3088 Rbor

Here's my stats from my 9.75 kWh array. Today and next few days.

Rob 😕

V
#3089 Vestas

The solar radiation peaked at 45W/m2 here. Foggy enough to require headlights/foglights on the car all day.

That's like 4.5% of rated PV panel output (they're based on 1000W/m2) - and that was the best today.

Not even bothering to look at inverter daily total 😃

H
#3090 Henry3rd

Well. I'm all set up on Predbat but I am going to wait a few days before coming off read-only. That way, if it all crashes and burns, then I hopefully can get some cheaper rates during the day to recover the situation.

D
#3091 Daveb01

Henry3rd

I did similar (4 days), while observing I set up and configured cards and my home/Agile/predbad/GW Control etc etc.

My only advice as a newbie is to not charge more than one setting at a time, to see the plan effect.

H
#3092 Henry3rd

Daveb01 So presumably I turn off all my invertor triggers, but do I keep eco enabled?

G
#3094 geoffreycoan

Henry3rd So presumably I turn off all my invertor triggers, but do I keep eco enabled?

Once you turn read only off, Predbat will entirely manage your inverter and batteries, setting things it needs to as and when the plan requires. Predbat runs every 5 minutes so if you make a manual change to your inverter then Predbat will change it back at the next 5 minute run. If you want to override what Predbat is doing, either use the select.predbat_manual_ controls, or put it back into read only

R
#3095 Rbor

geoffreycoan Have you seen Trefor's latest predbat update to v8.8.5.
Do you have any views on the default change and release notes for metric_min_improvement_export.
I can set this myself but a 50 times change from 0.1 to 5 is massive.
It's a big change and Trefor also describes a change to the minimum export slot size which I don't pretend to understand.

I have upgraded (smoothly).

Thanks

Rob

D
#3096 Daveb01

Hi all, there is a Predbat update.

As a Rabbit level user can I double check changing this setting as advised is correct please?


R
#3097 Rbor

Daveb01 Good to see that us rabbits think with a similar mind.

Rob

H
#3098 Henry3rd

geoffreycoan
Thanks. In for a penny. I'm going for it!! My finger will be hovering over the read only button at midnight 🙂

R
#3099 Rbor

Henry3rd When I started my predbat journey in January, I intended to monitor how it worked for a few days. But having put in the hard work installing predbat and studying the documentation repeatedly, I just 'went for it'.
That was how I learnt.

What tariff are you on? The predbat plan for tariffs with regular rate slots is reasonably predictable.
Agile is the tariff where predbat gets a real chance to show what it can do, hunting out any lower rate slots.

Rob

G
#3100 geoffreycoan

Daveb01 Rbor

I saw it and read the explanation several times, and still didn’t understand it so started writing out a message to Trefor to ask for further clarification, only when I got to the end of writing the message did I finally understand it.

It goes like this:

metric min improvement export is now 5p, so it has to be worth at least 5p over the 30 minute slot for it to be worthwhile for Predbat to export. That benefit being compared to keeping the stored energy and potentially having to recharge the battery later on if you do export.

5p in 30 minutes

If you have a 3kWh inverter discharge rate then you can export 1.5kWh in the 30 minute slot.

To make 5p in the 30 minute slot it means the export rate has to be roughly 3.3p (5p/1.5kWh) better than the import rate (when re-filling the stored charge) for it to be worthwhile exporting.

I have my metric_min_improvement_discharge (old version of Predbat) set to 4.0 already so this isn’t much of a change for me. Must have anticipated that the default 0.1 wasn’t good

H
#3101 Henry3rd

Rbor I have been monitoring for a couple of days and I took a while to eradicate the errors. Solcast stumped me for a while.
I'm on Agile and the plan looks to be very similar to what I would have set myself. Apart from setting the charge to anything other than 100%

R
#3102 Rbor

geoffreycoan the export rate has to be roughly 3.3p (5p/1.5kWh) better than the import rate

So with the fixed Octopus outgoing export rate of 15p, it would only be worth exporting if the import rate is <= 11.7p ????? And that this would take care of considering battery losses???

Or am I completely wrong?

Thanks

Rob

R
#3103 Rbor

Henry3rd And you have battery storage? Size? Heat pump?

Rob

H
#3104 Henry3rd

Rbor 7.9kW of Solar Power; GivEnergy Hybrid 5.0 Gen 3; 9.52 kWh Battery. There's enough battery to last us through the day. We are now at 39%.

R
#3105 Rbor

You should be fine with that set up. Predbat is ideal for Agile and there are quite a few of us on Agile. Ideally, you let Predbat loose and Predbat controls your inverter for you to minimise costs. You can then observe what Predbat has in mind via the plan.

Rob

H
#3106 Henry3rd

Yah, everything went exceptional well overnight. Looking back at the 'staring from scratch' post I can see I need to upgrade to an SSD. Already on order 🙂

R
#3107 Rbor

Henry3rd upgrade to an SSD

Definitely. An SD card with Predbat will die at some stage!

I used this video from Speak To The Geek to help me:
https://www.youtube.com/watch?v=WAolAvektlw

I run Predbat on a pi4 with attached ssd (one that I had lying around). I was amazed at the increase in speed compared with an SD card.

Rob

D
#3108 Daveb01

@geoffreycoan
@Rbor
@JasonF

Hi all, as we are nearing Christmas and I don’t really want to be tweaking things (just incase) soon, so thought I would like to check what I have set in Predbat is good? Especially as I have seen Geoffrey had the above setting at 4 and I had mine at default.

I am happy to be the Guinea pig and post my settings so everyone can see and advise if anything should be changed or for me to consider don’t forget I have a GW and 2 x AIO’s.

I hope this will help others and get them to a good place ready for the new post 2nd Noght on Predbat on the 21st.






L
#3109 Leeshore

Daveb01 Mine is very similar. Thanks for posting.

T
#3110 TX200

Anyone upgraded to 8.8.6

Are you seeing timed charges?

My system plans to drop to 4% overnight and then charge from solar tomorrow. Best soc keep is set to 0.7 (14.5%).

R
#3111 Rbor

TX200 Best soc keep is set to 0.7 (14.5%)

I am getting charging at lower rate slots. Is this what you mean by 'timed charges'?

Are you sure that you have best soc keep set correctly? It is in kWh and not %. (See below)
If you have this set at 0.7 and based on 14.5%, this would equate to a battery SOC of 4.8 kWh.
So 0.7 would 'correct' for a 14 kWh battery if SOC was 5% capacity, just greater than stock reserve of 4%. This would fit with an AIO. We have to be careful here in dealing with kWh and %.

This is from documentation: https://springfall2008.github.io/batpred/customisation/#battery-margins-and-metrics-options

input_number.predbat_best_soc_keep is the minimum battery level in kWh that Predbat will to try to keep the battery above for the Predbat plan.

Rob

T
#3112 TX200

Rbor not seeing any charge instructions until 0230 Sunday.

Battery gets to 4% early hours of Saturday.

Yes 4.8kWh usable.

It shouldn't get to 4% should it, it should pick a cheap slot in the early hours and charge up a bit?

R
#3113 Rbor

TX200 Sorry, I think my initial logic wasn't quite correct.
If you have set 0.7 (kWh) for best soc keep, 0.7 would be 5% of an AIO with capacity of 13.5 SOC.
I have chosen 5% as being just greater than the reserve of 4%
So if you have 4.8 kWh usable, wouldn't the correct value for best SOC keep by 5% of 4.8 = 2.4?

I should have started my screenshot earlier.

My plan is going down to 4% but overnight charging is delayed until rates drop. Predbat is judging that it is not cost-effective to charge before my rate reached 16.80p. I also think that predbat is taking notice of some anticipated PV charging tomorrow. (I have forgotten what pV generation is but solcast is forecasting me with 10.5 kWh!).

I would like someone else to check my 'advice' here to make sure that my advise if correct!

Rob

H
#3114 Henry3rd

TX200 No charging for me until 3:30 a.m. Battery drops to 4% t 1:30 a.m. My assumption is that grid power is used between these hours and Predbat waits for the cheapest slot at 3:30 for the battery charge.

T
#3115 TX200

Rbor i increased the best soc keep over the last few days due to the high agile prices. Didn't want to run out earlier than expected e.g. a soc drop.

The issue is the battery wasn't planning to charge from the grid at all on Saturday.

It would mean importing at 23-25p/kWh, for a couple of half hour periods tomorrow morning, when I could have charged overnight at 17p/kWh.

I've set a couple of force charges for now.

R
#3116 Rbor

TX200 This is my predbat plan for tomorrow (charging but from 75%):

Are you on v8.8.6. I am beginning to wonder if v8.6.6 is causing some issues.
If you are on v8.6.6, could it be worth downgrading back to v8.2.3 and see the effect on your plan.
Take a look at this GitHub issue: https://github.com/springfall2008/batpred/issues/1728
There's several responses including one from Trefor where he thinks he may have messed up Set SOC keep.

My plan looks OK but I think I would downgrade if I had your issues.
Expect v8.6.7 at some stage.

Rob

G
#3117 geoffreycoan

Rbor Your logic is correct Rob

I'm still on 7.5.3 of Predbat as I'm working my way through installing the different upgrades that arrived over the last 6 weeks (upgraded HAOS today and it just 'hung', HA never came back, had to shut the VM, reboot the PC and it all came back fine with the HAOS 14 installed OK. Weird).

On my Predbat I have a charge at 22:30 18.96p rate which is then held until the rates get to 21.27 when its released to the house. Main charge then overnight from 2:30

I see there are a few people reporting that Predbat 8.8.6 isn't charging for them https://github.com/springfall2008/batpred/issues/1728#issue-2738377152

D
#3118 Daveb01

geoffreycoan

I am on latest versions of everything and mine looks similar

H
#3119 Henry3rd

Should I allow my battery to drop to 4%? I understand it increases my chance of unplanned grid use at peak times.

R
#3120 Rbor

Daveb01
geoffreycoan
TX200
Looks like something isn't working to plan for some.
But for others, the plans look fine.

Rob

R
#3121 Rbor

Henry3rd I have regularly allowed battery to drop to 4% which is its reserve.
To my mind, I am making the most of my batteries capacity and I will continue to allow discharge down to 4% (or 5%).

But other might want to leave a larger buffer in the battery.

Rob

G
#3122 geoffreycoan

Rbor Agreed, and furthermore you are advised to let the battery completely empty and completely fill periodically to help with SoC tracking. The inverter can lose track of what the SoC actually is if the battery remains fairly full for long periods of time

D
#3123 Daveb01

Rbor

I am not convinced either now, I was happy with the plan, but Mr Bat did not follow through with it. Stopped at 54% for some reason. Now my battery is low at the start of the day.

I have only changed the one setting to 5p for export not charge.

I have also looked at the plan after this and at the moment the battery is gust going down? Anyone got an idea what’s going on?

D
#3124 Daveb01

Looking at the plan further, it’s sunny today and it’s decided to export at 15p, howerver charge at 16/17p later, but only to 70%. Hhhmmm.

I know it will change its mind again & again.

R
#3125 Rbor

Daveb01 Sunny day and look at those Nordpool predicted rates now that we are after 10am.
On this evidence, your batteries don't need to be fully charged.
A 54% SOC battery isn't 'low'.

Overnight, my batteries got up to 78%, then went down to 72% and are now charging from solar, even sneaking in a bit of export.

If the Nordpool rates had been rubbish, predbat would have charged from solar (or grid), adding to cost. Remember that predbat is boss and can change his mind as often as he wants as more evidence arises.

Rob

D
#3126 Daveb01

Rbor

Sorry I have to blame you 😀

You said early on I would not be able to not keep looking at HA & Predbat once up and running. You were right of course, so perhaps over Christmas I should try and just let it get on with it 🎄🍺🥂🤞

Errr. No chance now

G
#3127 geoffreycoan

Two new versions of Predbat released this evening, fixing a rounding error on metric_min_discharge_export so if you had it set to 0.1 still, it was rounded to zero and would be very sensitive to discharging, and reversion of the min_soc_keep logic to the original version https://github.com/springfall2008/batpred/releases/tag/v8.8.8

Recommended you upgrade if on 8.8.6 to this version

R
#3128 Rbor

Yep, I spotted this and have updated.
Hopefully the new version(s) will have sorted some of the glitches that folk have experienced.

Trefor is so reactive and wants to get his software baby working as well as possible.
As someone who is amazed how it all worsens, I am ....... speechless .....

Rob

PS First sun for a week today. I scraped 7.8 kWh, more than the last 5 days combined.
...... and 'Agile days and nights' have returned, a boon to those of use who have stuck with Agile through the 'bad days'.

R
#3129 Rbor

To think we were worried about reaching 3,000 posts by this thread's anniversary of 21st December.
And this post will be 3,100, on the way 4,000 !!!!

Looking back, I joined with post #232 on 28th January 2024 and was amazed at the supportive responses to my initial message. I let predbat loosen my setup 2 days later on 30th January 2024.
I said at the time that predbat was hypnotic and my life has not been the same since I joined the predbat journey.

Rob

G
#3130 geoffreycoan

Rbor PS First sun for a week today. I scraped 7.8 kWh, more than the last 5 days combined.
...... and 'Agile days and nights' have returned, a boon to those of use who have stuck with Agile through the 'bad days'.

8.5kWh for me today, 13.6kWh for the preceding 5 days 9-14th December

And yes some decently cheap rates overnight tonight, and last night wasn’t too awful either

R
#3131 Rbor

geoffreycoan There are some who are transferring from Agile to Cosy and back to Agile daily depending on the rates. I can see Agile stamping down on this practice and insisting on 30 days between tariffs. We'll see .....

It is looking like a 'normal or better-than-normal' agile week ahead.

Rob

W
#3132 Wavy Davy

Just gone from 8.8.6 to 8.8.8 and its made quite a difference.
Here's the 2 plans.
8.8.6

8.8.8

Much better!, Didn't understand the export when on 4%

W
#3133 Wavy Davy

Rbor Agree, tomorrow's looking much better, single figures between 02;30 to 06:30 and 08:00 to 09:30. Much better that £1.00kW it hit last week.

D
#3134 Daveb01

Wavy Davy

I have done the same and agree much better. I noticed there were quite a few 30 min slots charge/discharge/charge discharge. This will stress the battery, so have ticked the following again and it’s even things out.

H
#3135 Henry3rd

I changed the input_number.predbat_metric_min_improvement_export to 5.0 and that seemed to stop most of the nonsense.
Can I ask why charging and discharging cycles (stress) cause an issue with the battery? I always believed that you would need to fully discharge and discharge regularly to ensure the battery doesn't develop a memory. But in between times, charging and discharging is what a battery was born to do.

G
#3136 geoffreycoan

Henry3rd Its a fair question, you've bought the battery, you might as well use it, and as you say you need to exercise the battery to ensure it doesn't lose track of SoC.

The counter argument is that batteries lose capacity with the number of cycles they go through and over-zealously charging and discharging will over time reduce the life of the battery.

Counter argument to this is that is what the warranty is for.

It is a balance of course. I try to use the battery as much as possible as long as it makes financial sense to do so.

R
#3137 Rbor

Wavy Davy It looks like Trefor has sorted out the export glitches and v8.8.8 (Version Ceefax subtitles) looks like a good fix.

Rob

D
#3138 Daveb01

Another update? Trevor has been busy.

Not sure I fully understand this one, and as I don’t have a high output device will it make much difference to me?

Predheat now considers the min and max power values as the output power of your system and not the input power as previously. This means a 7kw heat pump should have a max power of 7000.

Predheat now accepts delta_correction, gas_efficiency and heat_pump_efficiency values in multiples of 1 degree. If there are gaps e.g. data in multiples of 5 then they will be interpolated.

G
#3140 geoffreycoan

Daveb01 Not sure I fully understand this one, and as I don’t have a high output device will it make much difference to me?

Predheat now considers the min and max power values as the output power of your system and not the input power as previously. This means a 7kw heat pump should have a max power of 7000.

Predheat is a separate add-on to HA, that will predict your house energy loss based on temperature and thus give a more accurate prediction of house load to Predbat. Doubt you need it.

Personally I have not bothered with it. A number of reasons, but principally it relies on a number of assumptions and configurations being made correctly so is leaning towards the ‘too hard’ camp, and secondly my heat pump when running in all bar the ‘shoulder’ mild days of late October/early March uses more than my daily battery storage, so having a more accurate prediction is a moot point.

T
#3141 TX200

I tried to skip a predbat update, but it said automatic updates are enabled so I can't skip it.

In the dashboard, the toggle for automatic updates is off.

On the addon settings, automatic updates is off.

Is this a bug or am I missing something?

G
#3142 geoffreycoan

TX200 it’s probably the way predbat is tied in to the HA update architecture that in thinks you have automatic updates on, when you haven’t. So probably yes is a bug

But just ignore the update in the list until you want to upgrade. I have 5 pending updates not applied, I ignore them

B
#3143 browellm

Can anyone tell me what Predbat or inverter setting is causing the battery to drain/charge cycle during the off-peak period like this when the car is charging. It's a recent Predbat update which seems to have caused this behaviour. Previously it would charge to 100% hold that charge and import from the grid as you would expect it to.

D
#3144 Daveb01

geoffreycoan

A quick question please - updates on HA, GivTCP, Predbat etc.

So far I have looked at the update, decided if I should do it, either waited till the next day or if posted in the morning after the auto update I have set for 09:00.

As this latest update is for Predheat:-

  1. Can I press skip, will it skip this update, but when the next one comes out will that already include this update?(which I think is the norm)

  2. Can I press skip, will it skip this update, when the next one comes out, it will not include this update?

  3. If I skip an update or loads of updates, could it then cause a potential issue going forward?

G
#3145 geoffreycoan

Daveb01 I’d forgotten that Trefor has merged predheat into Predbat now and it’s no longer a separate app so part of my previous comment in geoffreycoan is wrong

Per the comment from TX200 above you maybe can’t skip predbat updates, I don’t know for sure, I’ve never tried. I just ignore them until I want to install.

But to answer your question, whether you skip or not, all future releases will include this and any intermediate releases you skip over. They are always cumulative and you should have no issues with jumping over releases.
I’m on 8.5.3 still and I’ll go to a recent release, skipping all the intermediate releases when I upgrade, no issues.

browellm would be useful to see the plan, but looks like it’s a bug if it’s not holding the battery charge fully during the off peak period

B
#3146 browellm

geoffreycoan Plan is the same every night at the moment due to smallish battery and IOG. Only difference I have currently is that I've had to manually model car charging in apps.yaml temporarily as there is problem onboarding BMW that Octopus are working to resolve so I'm charging just in the fixed offpeak period.

R
#3147 Rubikcube

browellm The effect is caused by having a charge limit set. In the portal controls, this flag is called "Enable AC Charge Upper % Limit".
Charging to 100% is not the same as charging to full.

B
#3148 browellm

Rubikcube That's odd. Unless Predbat is setting that flag during that portion of the window then the current inverter settings don't have it enabled

G
#3149 geoffreycoan

browellm Predbat sets AC Charge Upper % Limit to the target % that it is charging the battery up to, I see this changing as Predbat plans and executes grid charges.

On my inverter ‘Enable AC Charge Upper % Limit’ is turned on and I can’t see in the log that Predbat has ever turned it off (in fact I don’t think its mapped into Predbat). Looks like it is switch.givtcp_invid_enable_charge_target in HA.

Might be worth turning this on and seeing if this now holds the charge?

B
#3150 browellm

geoffreycoan I'll give it a go. This has only started happening the last 2-3 days so if this doesn't work I'll revert to a previous version of Predbat and raise an issue on github if that appears to fix it.

D
#3151 Dpe

For reasons that I now regret I tried to create (unsuccessfully) a custom sensor that lead to me having to restore my full backup of HA. I then restored a partial from a few days ago that gave me back some extra data. Since doing both of these I an seeing the following error which I cannot get rid of
2024-12-16 10:35:41.741872: Warn: Inverter 0 set pause slot {'start': '00:00', 'finish': '23:59'} via REST failed
2024-12-16 10:35:41.781956: Warn: record_status Warn: Inverter 0 REST failed to setPauseSlot
Other commands to the inverter seem to be successful (e.g. setting charge levels)
Gen 1 AC3 inverter

Any suggestions

D
#3152 Daveb01

Dpe

If I see any errors in the logs, I either restart MQTT, GivTCP, then Predbat in that order, or restart HA then wait about 10 to 15 mins,

D
#3153 Dpe

Thanks , tried the 'restarts in order', still no joy. I have predbat in monitor mode but still see the errors in the givtcp logs:

2024-12-16 11:13:55,677 - GivTCP - transparent - [CRITICAL] - Function code 86 recieved. Gracefully handled
2024-12-16 11:13:55,711 - GivTCP - write - [ERROR ] - Setting Battery Pause Slot failed: ('KeyError', 'write.py', 610)

I may have misunderstood but monitor seems to suggest no instructions would be sent?

B
#3154 browellm

browellm confirming that toggling the Enable AC Charge Upper % limit switch made no difference to so I've reverted to an earlier version of Predbat to see if I can get back to the behaviour I used to see. Is there a straightforward way to go back to a release further back than that offered by the drop down in the Predbat control page?

T
#3155 TX200

geoffreycoan the reason I wanted to skip it was to avoid seeing the little 1 and orange symbol in the menu

I'll have to keep checking to see if it's a new new update or just the one I don't need right now!

I get that I'll need that code applying at some point, just don't see the need to accept the update now as its irrelevant for me.

D
#3156 Daveb01

Dpe

Your correct with monitor mode, Predbat is telling you what it intends to do, but is not doing it, u till you change the mode.

With regards to the other errors, I have not seen these and am not experienced enough to suggest a fix.

I hope Gefferry or Mr @Rbor might be able to help?

D
#3157 Dpe

Daveb01 "
Thanks for your help.
I am holding off the uninstall button in the hope of some inspiration! Problem is I am not really sure where or what the problem really is.

G
#3158 geoffreycoan

Dpe 2024-12-16 11:13:55,677 - GivTCP - transparent - [CRITICAL] - Function code 86 recieved. Gracefully handled
2024-12-16 11:13:55,711 - GivTCP - write - [ERROR ] - Setting Battery Pause Slot failed: ('KeyError', 'write.py', 610)

I may have misunderstood but monitor seems to suggest no instructions would be sent?

The first one, function code 86 can be safely ignored, Mark the author of GivTCP says it’s due to a bug in the inverter firmware that GivEnergy are aware of.

The second, the error on the battery pause slot. Two things here:

  1. You are correct, in Monitor mode Predbat shouldn’t be attempting to write anything to the inverter so this is a bug and should be raised on Github
  2. You said you have a Gen 1 AC3 inverter which I assume has the updated firmware with battery pause capability?
    I believe you are having the same issue @Rbor had https://github.com/springfall2008/batpred/issues/1622. - you need to comment the pause start and pause end entries out of apps.yaml as your inverter doesn’t have this capability.
    It’s on my list to add this to the documentation.

browellm Installing a specific Predbat version … also on my to-do list for the documentation ….. if you are using HACS and Appdaemon still you can manually select a version via that, if not then the only option is to copy the .py files manually from the Github release into your predbat directory. Make sure you don’t have auto-update turned on though as Predbat will just upgrade you again!

R
#3159 Rbor

Dpe 2024-12-16 11:13:55,677 - GivTCP - transparent - [CRITICAL] - Function code 86 recieved. Gracefully handled
2024-12-16 11:13:55,711 - GivTCP - write - [ERROR ] - Setting Battery Pause Slot failed: ('KeyError', 'write.py', 610)

Thanks for the query. I hope my comments below are of some use in resolving your issue here.
You stated that you have an AC3.0 inverter (same as me) but which givTCP version are you using?

It is significant that all your issues seem to relate to 'pause' and possibly givTCP configuration.

I am on givTCP v3.04, on a 2022 AC3.0 inverter.
I get these lines regularly in my givTCP log:

2024-12-16 15:00:22,665 - GivTCP - transparent -  [CRITICAL] - Function code 86 recieved. Gracefully handled
2024-12-16 15:00:22,694 - GivTCP - write       -  [INFO    ] - Setting Battery Pause Mode to PauseDischarge was a success

Apparently the 'Gracefully handled' line is a givTCP bug and I just ignore it.
I received an update my inverter firmware a while back and I was my inverter could then magically make use of 'pause'. My updated firmware is D0.205-A0.205 and I am on battery firmware 3017.
Apparently AC3.0s manufactured in 2nd half of 2022 could get newer versions of firmware and make use of pause.
There is a clue in the code for the inverter. Mine starts with CE2218 which I think means 2022 and month 8 (although I could be corrected on that.

I was on givTCP v2.4.9 and used the 'old firmware' in the configuration setting but, after the update, I was able to use new firmware.

In your apps.yaml file, you should see some lines that refer to pause.
I have these all commented out except for the initial 'pause mode'.
I have one inverter and I have commented out {geserial2} lines which are for a 2nd inverter.

If your inverter is unable to make use of pause, I would comment out all the lines.
_Having said that, I wonder whether I should uncomment the start and end times?_   **Over to @geoffreycoan** ?
**My apps.yaml code**
# Pause mode is not supported by all firmware's and will be ignored if not present
  pause_mode:
    - select.givtcp_{geserial}_battery_pause_mode
#    - select.givtcp_{geserial2}_battery_pause_mode

# Not all firmwares support pause start/end time, delete these if not supported
# to avoid spurious writes/warnings
#  pause_start_time:
#    - select.givtcp_{geserial}_battery_pause_start_time_slot
#    - select.givtcp2_{geserial2}_battery_pause_start_time_slot
#  pause_end_time:
#    - select.givtcp_{geserial}_battery_pause_end_time_slot
#    - select.givtcp2_{geserial2}_battery_pause_end_time_slot

It is certainly worth looking at the pause lines in apps.yaml.

Rob

R
#3160 Rbor

geoffreycoan
Dpe
I believe you are having the same issue @Rbor

I have just responded independently of @geoffreycoan and we both agree.

I am going to look again at my pause lines in my apps.yaml. AS my inverter can make some use of pause, I am going to experiment with uncommenting the start and end pause lines. If I get an error, I will comment them out again.

Rob

G
#3161 geoffreycoan

Rbor Mine starts with CE2218 which I think means 2022 and month 8 (although I could be corrected on that.

Be corrected then !

The serial number translates to week 18 of 2022, so May 2nd to 8th.

D
#3162 Dpe

geoffreycoan "Rbor"#p70898
Thanks for the explanation, I will try to raise the issue with commands in monitor mode on Github.
My firmware is D0.205-A0.205 and I am on battery firmware 3017. GivTCP 3.04.
Up until my foolish attempt to fiddle with HA, I had been running GivTCP 3.04 since its release with no issues. I had not seen any of the errors I now notice with the pause controls at all, all of the code 86 errors had gone as well.
When I reloaded my backup it was GivTCP 3.04 with the older version of Giv TCP deleted, so I do not think there was any chance of the older version being accidentally started, in addition I have disabled the automations checking operation of Predbat and GivTCP.
I have commented out all the pause controls in the yaml file and have got rid of the errors but I am not sure why it would have been OK before and not now?
So in looks like the uninstall armageddon has been averted - thanks to you both

R
#3163 Rbor

Dpe the uninstall armageddon

You definitely want to avoid this.

Rob

R
#3164 Rbor

geoffreycoan In apps.yaml we have this statement:

 # If not using REST then instead set the Control here (one for each inverter)
  # - you can delete this section if using REST

So, if I am using rest, does predbat ignore all the subsequent lines anyway, including those mentioning pause?

Rob

R
#3165 Rbor

Wed 11th Dec £5.51
Sun 15th Dec £0.66

With the ups and downs, my first 2 weeks of Agile have cost me £44, not including SC.
..... but that is all my energy including Heat pump (+ low mileage EV).

The delights of Agile .....

Rob

G
#3166 geoffreycoan

Rbor So, if I am using rest, does predbat ignore all the subsequent lines anyway, including those mentioning pause?

Rob

I think I saw that Trefor has spotted that this statement in apps.yaml is misleading and has updated it in a recent release. If you want to use auto battery charge/discharge calculation then there are a number of entries you have to have uncommented regardless of use of REST. I leave them all uncommented as a backup in case REST doesn’t work although Predbat’s auto-restart of GivTCP may interfere with that fallback approach.

Anyway, no harm to leave uncommented, it’s what I do.

Rbor Wed 11th Dec £5.51
Sun 15th Dec £0.66

With the ups and downs, my first 2 weeks of Agile have cost me £44, not including SC.
..... but that is all my energy including Heat pump (+ low mileage EV).

Wed 14th £13.53 less the DFS saving session income of about £2
Sun 15th £2.15

£130 so far this month but I export more in the summer so it balances out. I’m still £915 in credit from the summer and pay £1 a month direct debit. I did try but the Octopus app won’t let me change it to anything lower than £1 🥴

Based on last year’s figures I will have £200-250 monthly bills for November, December and January then about £100 for February before turning negative as the export builds up in the summer. So come the Spring I will probably request a refund of the account balance which will be nice.

R
#3167 Rbor

geoffreycoan Just checked my costs for this year from 1st Jan.
I moved to Agile from Cosy on 18th January and went live with predbat on 31st January.

I am £308 up so far. About £180 to come off for SC so still nearly £120 in profit.

Shortly after I moved to Octopus 2.5 years ago, I noticed that I was building up loads of credit over the summer from export. I phoned up and asked if my DD could match my consumption and they agreed.
So each month, I pay for my overall bill, but Octopus don't pay me for any overall ££ that they owe me. So I still build up a balance and Octopus still owe me £480.

Not much difference from your £1 per month DD.

Like you, I will request the balance owed to me to be refunded in the Spring.

Rob


R
#3168 Rbor

Dpe Following on from the pause errors you were having, I have experimented with mine.
See back to my post here: Rbor

I uncommented the two lines for pause_start_time and pause_end_time.

I then got exactly the same error as you were getting in my givTCP3 log:

2024-12-16 22:01:05,128 - GivTCP - transparent -  [CRITICAL] - Function code 86 recieved. Gracefully handled
2024-12-16 22:01:05,174 - GivTCP - write       -  [ERROR   ] - Setting Battery Pause Slot failed: ('KeyError', 'write.py', 610)

I then commented out the two pause time lines and the ERROR line disappeared.

So I am really glad that you didn't go for the uninstall solution.

Rob

B
#3169 browellm

browellm After reverting to 8.8.2 I get a normal night of charge behaviour with the house load coming directly from the grid during the off-peak period. Whether this is because I had no car charging last night, I am not sure.

D
#3170 Daveb01

Hi all, prob a bit off topic not Predbat but did not want to post another subject as it’s within HA.

I have just looked at another post as saw the solar Energy Graph with a Solar Prediction line.
I have found it and selected, whilst doing that I spotted another feature I had not seen before, so just thought I would let those know if you wanted to try it as well.

Compare Data (three dots top right)

G
#3171 geoffreycoan

👍 there’s new little changes in most HA releases, incrementally making it better and easier to use. I always watch the ‘what’s new’ videos, usually Smart Home Junkie or Everything Smart Home, and read the HA releases notes.

It looks like you have a big spike in your midnight data, is it doing that every day, you might be using the today sensors rather than total which can cause this to happen sensors https://community.givenergy.cloud/d/5384-spurious-givtcp-readings-in-ha-energy-dashboard/2

R
#3172 Rbor

geoffreycoan I have never really studied the energy dashboard closely so another learning activity for me.
Also related to HA, I have just updated to the latest versions 14.0 and 12.3.
HA update was 'Smooth'. I only needed to restart Predbat twice this time. This made a change from needing to shut down my setup entirely and praying to the HA gods, standing on my head, to give me my predbat back.

Rob

G
#3173 geoffreycoan

Rbor There is a good speak to the geek video on how to set it up. I use it all the time in preference to the GivEnergy app and portal which don’t work for me with two inverters.

Maybe start a new thread on setting it up if there is enough learning to go through.

Good to hear your upgrade went well, I’m slowly working through my list of upgrades to do, in the last week have upgraded Solcast integration, Octopus Energy integration, upgraded HAOS to v14, swapped to GivTCP 3.0.4, last night got the database size back under control as it had been creeping up again.

Predbat and HA Core are the two remaining big ones to do. I have seen some people have problems with the HA 2024.12 upgrade so 🤞 might do that next

G
#3175 geoffreycoan

geoffreycoan Predbat and HA Core are the two remaining big ones to do. I have seen some people have problems with the HA 2024.12 upgrade so 🤞 might do that next

Emboldened by Rbor upgrading HA Core, and since Predbat was going to be holding the battery for several hours until peak time so it wouldn’t be a problem if it broke for a while when upgrading, I hit the upgrade button just after lunchtime, upgrading from HA 2024.10.4 to 2024.12.3

Wow, what a non-event that was. Backup taken, copied to Google Drive, new version installed, HA rebooted itself, GivTCP just carried on running, Predbat complained a few times with websocket errors whilst HA was rebooting but it didn’t go into error status, and then when HA was fully up Predbat just continued running, re-populated all the predbat entities and carried on as if nothing had happened.

No additional reboots or anything required to Predbat or any of the add-on’s.

And earlier this morning I have bravely removed the predbat repository from HACS as it kept on reminding me that my appdaemon version of Predbat was on an old version as was the Predbat add-on version.

Just 3 more updates to apply. I’ll leave Predbat for a day or so because I’ve got a lot of versions to jump up and it’ll result in a number of entity name changes as well as the inverter write count and all those optimisations.
Getting there

R
#3176 Rbor

geoffreycoan Another HA update has appeared (2024.12.4) but I am sitting tight on 12.3.

I have been quiet recently – I have been sitting back letting predbat get on with his job.
I do grab the lowest slots for dishwasher, etc, but that's it.

What contrast with last week's doldrums.

I've also noticed an Octopus upgrade available (13.3.0) but I have not installed while I wait to see if there are any issues.

Rob

G
#3177 geoffreycoan

Rbor Yes I saw that HA upgrade as well and also decided to leave it as I’d only just gone to 2024.12.3.
I installed the Octopus upgrade and no issues. Still not upgraded Predbat though.

Certainly a big difference in the Agile rates this week, we’re currently on -72p electricity cost today with a midnight forecast of -17p. Feels like summer again!
Helped by cheap overnight agile rates and a 2 1/2 hour Power up event this morning, and we’ve another 2 hour event tomorrow afternoon so probably a similar outcome as well.

5kWh of generated solar today, beating the PV50 forecast by a noticeable margin. It really must be summer !

#3178 PianSom

geoffreycoan Helped by cheap overnight agile rates and a 2 1/2 hour Power up event this morning, and we’ve another 2 hour event tomorrow afternoon so probably a similar outcome as well.

I had today's, but nothing for me tomorrow. I wonder what the algorithm is.

Given the weather, I'm guessing that you are closer to some wind generation than me, and it's only when there are LOTS of spare electrons that some come my way. But that's just baseless supposition.

R
#3179 Rbor

PianSom Ah, you Power up merchants......... Grrrr.
Still, without any power ups, Predbat predicts £0.03 for me at midnight following £0.66, £0.81 and £1.58
A bit different from £5.51 last Wednesday, just a week ago.

I also managed 4.26 kWh PV today. In the 8 days since 11th December, I have had 6 days with <1 kWh! I had given up on PV generation.

Looks like the winds will keep going until start of next week.

Rob

W
#3180 Wavy Davy

I'm same power-ups as Geoff, 2 ½ yesterday with another between 14:00 and 16:00 today.
As far as I know no wind generation that near to me, I'm in Bracknell.
I'm at -26p now and -68p midnight.
Predbat has just run the batteries down ready for charging.
Just done an update and had the same problems I usually get. Predbat not running due to (i think) some attribute problem.
What is strange is that reloading the last saved backup which was just before the updates didn't cure it, but reloading a 4 day old one and then doing the updates did. So now up to date and running.
I have raised a issue with Trefor, as it keeps occurring every time I do a update.

#3181 PianSom

I read the update notes on 8.8.10 several times and am still rather unclear on switch.predbat_calculate_import_low_export and switch.predbat_calculate_export_low_import.

As a reminder, the notes say

switch.predbat_calculate_secondary_order_slots is replaced by two new options:

switch.calculate_import_low_export

Defaults to Enabled, for multiple same priced import slots then export rate will be taken into acount

calculate_export_low_import

Defaults to Disabled, for multiple same priced export slots then then they will be sorted only by time (latest possible export).

I am on IOG. I can't understand what impact the export rate would ever have on the import slots - am I missing something obvious?

And surely it is better to have the second enabled? I would much prefer later export slots to be used over earlier. Who wouldn't?

G
#3182 geoffreycoan

PianSom The release notes are a bit brief, yes.

There’s more details of the new switches in the documentation explaining how the switches control the sorting of slots by rate in order to determine when to export https://springfall2008.github.io/batpred/customisation/#calculation-options

switch.calculate_import_low_export (expert_mode) When True import slots of the same value are sorted by export price. When False they are sorted just by price and then time. The default is True.

By default with this option enabled if there are multiple charge slots of the same price Predbat will try to charge when the export rates are lowest thus leaving the higher export slots available.

switch.calculate_export_low_import (expert_mode) When True export slots of the same value are sorted by import price. When False they are sorted just by price and then time. The default is False.

By default with this option disabled the latest export slot of the same value will be picked, this is useful for fixed price export tariffs where you want to export as late in the day as you can.

With IOG you probably want to set calculate_export_low_import on, and also set input_number.predbat_charge_low_power_margin to a small value (default is 10 minutes) so that your export finishes just before the cheap period starts https://springfall2008.github.io/batpred/customisation/#inverter-control-options

It’s always worth reading the actual release differences to gain a better understanding of what has changed in the code and the documentation. The release notes are not always that comprehensive !

G
#3183 geoffreycoan

Wavy Davy Woo, woo, maximising the free electricity power up session today, tumble dryer, dishwasher, charging the batteries and son’s having a shower.

Drawing 17.4kW of grid import at the moment, good job I’ve got a 100A master fuse !

R
#3184 Rbor

geoffreycoan My poor mind gets befuddled just reading through this logic!

What would you suggest for these two new settings when running Agile import with fixed export?

My only 'secondary order slots' was set as True (the default)

I haven't upgraded to v8.8.10 yet.

Rob

R
#3185 Rbor

geoffreycoan At least with no power ups in Yorkshire, I won't get in a situation where my horse shed and horse (if I had them) might go up in flames from the power.

Still yesterday, I got my first 'profit day' since October with –£0.03p

Rob

R
#3186 Rbor

Wavy Davy I think you are now on givTCP v3.
I have looked at your log on GitHub and the slug_id shown is for v2 and not v3.

Check your apps.yaml file and see this section from documentation:
https://springfall2008.github.io/batpred/apps-yaml/#automatic-restarts

If running v3, the slug_id must be 533ea71a_givtcp
Your log shows the slug_id for v2:

**** Starting Standalone Predbat ****
2024-12-18 13:55:00.643430: Loading apps.yaml
2024-12-18 13:55:00.729337: Info: Connected to Home Assistant at http://supervisor/core
2024-12-18 13:55:00.734902: Info: Add-on slug is 6adb4f0d_predbat

If you are on v3, check your add ons and make sure that you don't have v2 running.
Change your apps.yaml to make sure that you have the correct slug_id for v3.
It may be safest to comment out the restart lines before you save apps.yaml.
Then go back to add ons and start v3.
Then restart predbat.

If all runs OK, uncomment the restart lines in apps.yaml and save.

... very belt and braces but trying to eliminate you going into a potential doom loop here.

If I have made any errors here, I daresay that @geoffreycoan will correct then and send me back to my rabbit hole.

Rob

G
#3187 geoffreycoan

Rbor What would you suggest for these two new settings when running Agile import with fixed export?

I would think the defaults would be fine for your Agile with fixed export.
And PianSom I wrote too quickly without re-reading the documentation carefully, the defaults for both switches are probably the best for you as well.

The defaults leave export occurring as late as possible

Rbor The horse shed is where my wife keeps her horse gear including saddles. It was her parents shed that I took down, moved to our house, knocked down and dug out the plinth where our oil tank was, built a new base, insulated and rebuilt it. Apparently the horse leathers are not supposed to freeze so we have an oil radiator in there on a HA automation to keep the temperature up on cold nights. At the moment the saddles are basking in 21 degrees of heat courtesy of the free electricity

R
#3188 Rbor

geoffreycoan This reminds me of heated car seats. First time I have come across a heated horse seat!

I will update to v8.8.10 and see how the defaults work.

Rob

W
#3189 Wavy Davy

Rbor My apps yaml seems to have the correct lines:-
auto_restart:
- shell: 'rm -rf /homeassistant/GivTCP/*.pkl'
- service: hassio/addon_restart
addon: 533ea71a_givtcp
So not sure why the log is showing V2 unless there is something else to change.
V2 was uninstalled so not able to be running.

R
#3190 Rbor

Wavy Davy Try restarting givTCP3 and check out the log.
Then try restarting predbat and check out the log.

There is definitely something strange going on here when the old v2 slug_id appears.

Rob

#3191 PianSom

geoffreycoan And PianSom I wrote too quickly without re-reading the documentation carefully, the defaults for both switches are probably the best for you as well.

The defaults leave export occurring as late as possible

Having re-read the notes and the manual several times I think @Rbor 's brain freeze must be catching, as I find the explanations not understandable. Take the second: "When True export slots of the same value are sorted by import price. When False they are sorted just by price and then time." - it's the "just" that gets me first. Is the second "price" referring to import or export price? Well confused!

However, using Trefor's defaults is my default position, so I will just go with that and get on with my life.

R
#3192 Rbor

PianSom
I 'just' don't get it!
There are too many variables and I can't follow the logic or how it works.
'They' is confusing. What does it refer to?

As @PianSom has stated, we have 'export price' and then 'price'. Is the 2nd 'price' import or export?

Should the first statement be:
When True, export slots of the same value are just sorted by import price.
When False, **export slots of the same value ** are sorted just by export price and then time.

Brain needs a rest and I need to cook some dinner.
I have upgraded to v8.8.10 and have now handed this over to Predbat to sort. Defaults set.

Rob

G
#3193 geoffreycoan

PianSom I may well expand on the current documentation....

@Wavy Davy All the stuff about slug id that @"Rbor"#p71183highlights is I think a Poisson Rouge

The logging of the slug id in the predbat logfile is part of the code I added to determine what the Predbat slug id is so that the correct pathnames to the logfile and dashboard can be reported in the logfile. It's detecting the predbat add on slug id not the GivTCP restart slug id

Back in the rabbit hole Rob

W
#3195 Wavy Davy

Well just done a HA restart and back to the problems again. No updating nothing, just a standard restart. Log shows
attributes = item["attributes"]
KeyError: 'attributes'
2024-12-19 17:17:34.808233: Stopping Predbat
Web interface stop called
Web interface stopped
2024-12-19 17:17:36.289007: Info: Web socket stopping
2024-12-19 17:17:36.291135: Info: Web socket stopping
Shutdown, sleeping 20 seconds before restarting

so no predbat at the moment, and don't have time to do a reload again at the moment as I'm going out.

R
#3196 Rbor

I am tentatively sticking my head out from my rabbit hole.
I have noticed that there is a new extra column in Trefor's Predbat Plan, headed by 'XLoad'

Does anyone know what this is?
I can't see anything about the column in Predbat plan documentation.

Thanks

Rob

#3197 PianSom

Rbor
No sign of an XLoad here ...

However, I do have

  • an export earlier in the evening than is optimal
  • no charge-discharge-charge cycle tonight


EDIT - ah, the new switch 2 (which I thought I had set back to default) was not in a default state. But changing it to default did not change the plan

R
#3198 Rbor

PianSom This is my 'Trefor predbat plan' using expert HTML debug switch set to True in v8.8.10:

And if I set HTML debug switch set to False, the extra column disappears.

Edit I have found the culprit.
This is from the release notes for v8.8.10. I have predAI running.

Rob

G
#3199 geoffreycoan

Wavy Davy Well just done a HA restart and back to the problems again. No updating nothing, just a standard restart

Wondering if something is corrupt in your HAOS?

How are you running HA? Can you do a clean install and restore a backup into that, might clear the websocket issues you keep getting.

I have weird issues with my install as well, some messages in the ha core, supervisor and host logfiles from 2/2/2025. It's weird as if the clock got stuck to a future date. Solcast integration crashes badly. Can't work out when or why it happened, and I can't get rid of the logfile messages from next year.
At least it's only 6 weeks away so I'm just leaving it and hopefully it'll sort itself out next February. Meanwhile predbat etc is all running fine

R
#3200 Rbor

Wavy Davy > geoffreycoan Wondering if something is corrupt in your HAOS?

How are you running HA? Can you do a clean install and restore a backup into that, might clear the websocket issues you keep getting.

You have had issues for ages. In the same situation, I would resort to Geoffrey's suggestion above after first taking a fresh backup.

Rob

R
#3201 Rbor

PianSom Right, I have bailed out of v8.8.10 and I have downgraded back to v8.8.9.

I looked at the other Predbat Table card and I saw 2 columns, one stating 'Importing', the other stating 'Exporting'.
I think there is something wrong here and I am not trusting v8.8.10 at the moment.

Rob

W
#3202 Wavy Davy

geoffreycoan Will do that tomorrow, and see what happens.
Does restoring a backup not overwrite the HAOS then? I just assumed it backed everything up.

G
#3203 geoffreycoan

Wavy Davy No the backup is just of Home Assistant and the add-on’s, its not of the HAOS host and supervisor
The corruption you have might of course be in HA but worth trying to eliminate things. I upgraded to HA 2024.12.3 and absolutely no issues as reported above

T
#3204 TX200

Rbor I'm on 8.8.10

What is it you're not sure about?

I've not noticed any issues yet.

Although I'm not running PredAI or PredHeat.

R
#3205 Rbor

TX200 As in the v8.8.10 release notes, the extra loadX column shows data imported from outside predbat (e.g. Predai, Predheat). I clearly didn't read this bit!

I have changed my apps.yaml to use HA historical rather than predai.
I have then installed v8.8.10 again and there is now no extra load column.

I am going to revert back to HA historical for a while. Too many changes ......

Rob

L
#3206 Leeshore

Hi Rbor Were you using Predai with
load_forecast_only: True
or did you have it as:
load_forecast_only: False
??

#3207 PianSom

Rbor
On 8.8.10 I seem to have lost my valuable overnight charge-discharge-charge regime. I have tried reverting to previous versions but - for reasons which escape me - the resulting plan does not recreate them.

Github issue raised, and I am sticking with 8.8.10 for now.

EDIT - PEBCAK error - switch.predbat_calculate_export_oncharge was not set for some reason

R
#3208 Rbor

Leeshore I used load_forecast_only: True

See addons/predai/documentation.
Then scroll all the way to the bottom.

In my apps.yaml, I have now commented the predai lines.
I still have predai running.

There are so many changes being made to predbat in the recent version updates that I wanted to get back more to a 'vanilla' setup.
It is easy to get predbat to pick up predai anyway just by commenting and uncommenting the apps.yaml lines.

predai seems to have worked well for me in predbat, even if I don't really understand what it is doing.

Rob

R
#3209 Rbor

PianSom I can smell v8.8.11 over the Trefor horizon.
I lurk on Trefor's facebook page and there is a lot of confusion between the v8.8.10 new entities, especially which way round True and False go.

I find the logic in the release notes and documentation very confusing.
There is an entity for export which changes import and vice versa, and then time comes in .....
So I use the defaults for now.

Your within issue is different but has it been caused by the new v8.8.10 entities?

Rob

#3210 PianSom

Rbor
Yes, the notes around this release were especially gnomic. Certainly too obscure for the likes of you and me!

I don't know whether my issue was caused by the update, or by my own stupidity. Either way, once spotted easily resolved.

L
#3211 Leeshore

Rbor Yes I have used

load_forecast_only: True

for about a month now and have found that it works well

D
#3212 Daveb01

Rbor

I am so glad you guys have posted your thoughts and what setting to use, I was going to say the same but you lot beat me to it. I am leaving the default settings at the moment until we understand Trevor’s thoughts.

That reminds me of the saying I use with the misses, when we don’t understand each other “what colour is the sky on your planet”

J
#3213 Jellybaby

So for those on Agile, how toasty did your battery temps get.

I manually charged/discharged then charged again got up to 40c

R
#3214 Rbor

Jellybaby I am on Agile which is pretty busy at the moment!
I have two 8.2 kWh batteries connected to AC3.0 inverter.
Batteries sited in porch at 19-20C. Battery temperatures 23.7C and 25.2C.

Rob

V
#3215 Vestas

Rbor Not trying hard enough 😛

Cells 1, 2, 3 and 4 on a 9.5kWh battery are all over 30C in a garage at 15C.

If we're talking BMS temp then 52C was the peak.

G
#3216 geoffreycoan

Jellybaby The inverter temperature was kept at around 40 degrees with the fans coming on and off quite a lot through the night.

I am pretty sure that GivTCP 3.0.4 labels the BMS and Battery temperatures the wrong way round https://github.com/britkat1980/ha-addons/issues/39

Battery cell temperatures comfortably over 30 for most of the night

R
#3217 Rbor

Vestas Ah, but if we are looking at inverter temperature over the last 24 hours:

Mine is currently at 40.5C but will increase from my plan with charging and exporting getting into action once the 4-7pm period is over.

Rob

V
#3218 Vestas

Rbor Mine has a fan under it so usually stays at 35C.

NB - I don't use predbat, just GivTCP/HA so I'm undoubtably doing longer continuous charge/discharge than you guys so probably higher temps on BMS/cells as a result. Gets very toasty when the battery is discharging at 2884W (G1 inverter)....

J
#3219 Jellybaby

geoffreycoan just checked mine and wow, guess it got quite warm in cupboard lol


G
#3220 geoffreycoan

Jellybaby Rbor Its worth looking at getting some cooling fans underneath the inverter. Several solutions on this forum.

Mine are computer CPU cooling fans (60mm square) in a frame, mounted underneath and powered with a 12V mains adapter. Shelly smart switch configured as a climate control in HA so the fans come on automatically once the inverter temperature reaches 40 degrees.

#3221 PianSom

Rbor
I'm glad it wasn't just us being dim!

J
#3222 Jellybaby

geoffreycoan I do, I have 2 on top of inverter pulling out and not seen it hit 60 since before I got them, I guess 6kw for 6-8 hours will push it up, 2x120mm fans on 100%

Batteries are usually 20-30 as well.

Edit
This is last two days temp, I got a govee thermometer/hygrometer in the cupboard

and the past 7 days

R
#3223 Rbor

PianSom Very much so.
I have upgraded and both new entities are set as True as default, rather than one False and the other True, mirroring the default setting for the old single entity.

Previously, the plan was hopping all over the place, often with import and export in same slots.
With v8.8.11, the pan looks far better in my eyes and matches nicely with the rate slots. Far less jumping all over the place (and adding register writes like crazy). Remember that I am on Agile import using predbat and rates tonight really are all over the place, nearly all plunge below 0p/unit.

Overall I am happier withe 4th change although I don't understand quite what iOS going on.
Now to see how it works overnight. Now to get as much as I can charging overnight. From forecast, one more day of winds so need to make the most of this – such are the delights of Agile.

J
#3224 Jellybaby

@geoffreycoan I put the fans underneath the unit this time, I will do the same as what I did last night to see how much that effects things.

T
#3225 TX200


So should both of those values be true (the new import/export calculations)?

Any other recommendations on these settings?

G
#3226 geoffreycoan

Jellybaby I put the fans underneath the unit this time, I will do the same as what I did last night to see how much that effects things.

I have my fans at the bottom to push the air up the back of the inverter. I’m sure some people said it was more efficient like that. Maybe if the fans are at the top sucking up then they can suck air in from the sides rather than all the hot air from the back of the inverter. Dunno

TX200 So should both of those values be true (the new import/export calculations)?

Any other recommendations on these settings?

Yes that’s my understanding that the default both true is recommended.

Personally I have calculate discharge on charge slots turned off, this means predbat will tend to alternate between charging and discharging in different slots rather than doing charging and discharging in the same slot. Means less stress on the inverter and probably slightly less £ benefit to me, but I can live with it.

M
#3228 matttheotter

Morning All,

Looking for a bit of guidance, I have been reviewing the config of my AIO in Predbat using GivTCPv3 and wanted to check I had the right flags.

Set the following recently to report the right battery size:
battery_scaling:
- 0.85

Turned off Hybrid Inverter.

Spotted this in the log recently:
Warn: REST data reports Battery Capacity kWh as 14.008 but nominal indicates 16.48 - using nominal

Nominal flag is set to false, wondering where I have gone wrong...

D
#3229 Daveb01

matttheotter

Hi Matt, can you post this question again in the new post as per the link above please 👍