Skip to content

v1.0.9

Choose a tag to compare

@github-actions github-actions released this 10 Nov 19:39
· 85 commits to main since this release
9f5ff97

Highlights

  • Max. age of kWh reworked: BattMind now follows the age of the energy in the battery, so only energy that is really too old is used or sold
  • What-if simulator grows up: compare battery sizes, rules and extra battery modules, with monthly tables and an electricity bill graph
  • Smarter selling: the reserve for the house, solar refill and held-back hours are handled more carefully
  • Safer data: a corrupt database file is restored from an automatic daily copy

⚠️ Before you update

  • Max. age of kWh (Max. age of kWh in home battery): the plan can change after the update if you use this rule.
    • The limit is now 12 to 72 hours (default still 48). An older stored or imported value outside this range is moved into it.
    • Old energy is no longer held back for a later, more expensive hour. While old energy is left, the battery is used for the house.
    • Old energy is not sold by force. It is only sold when selling it in the most expensive periods pays more than using it, under the normal profit requirements. Such a sale is shown as 🕰️ Selling old energy.
    • Energy with no charging history is never treated as old.
  • Min. total profit is now checked against the profit shown in the plan (sell price minus what the kWh cost in the battery, incl. loss and wear) for Maximise profit, like for the other selling rules. Check the value if you use it above 0.
  • Reserve for the house (usage_reserve): it now holds for every selling rule, including Buy to sell. A sale is not planned in an hour where the battery is expected to end under the reserve. With a reserve, selling rules also leave hours alone that another rule holds back (Profit only, Prioritise). Check your plan if you use a reserve.
  • Forecast prices: a forecast sell price is now lowered by the forecast adder, so selling on forecast days looks a little worse than at a known price. With a fixed solar sell price the hourly sell price is raised instead.
  • Edited dashboards: a dashboard you have edited in the UI is not changed. Press Reset dashboard to get the new overview.

✨ New

  • Sidebar icon (Configure → General, field Sidebar icon): choose the dashboard's icon in the sidebar, e.g. mdi:solar-power, to tell several instances apart. Default mdi:home-battery; leave empty for the default. You also set it when adding an instance.
  • What-if simulator:
    • Compare a selected battery capacity, or a range of capacities, with the current setup. A summary shows current profit, scenario profit and the difference.
    • Rules and settings in the scenario: a collapsible section where you change rule switches and numbers for the scenario only. Switches your inverter can't support are disabled.
    • Module comparison: give a module's capacity and price to see historical gain, an annual estimate and simple payback for each extra module, plus graphs of cumulative gain and of the cumulative electricity bill with and without a battery.
    • Monthly tables and bar charts for periods longer than three months.
    • The latest successful calculation is saved per instance and reloaded when you return, also after a restart. A failed or stopped run does not replace it, and a Stop simulation button cancels a run.
    • The battmind.what_if action has new fields: capacity range (range_start, range_end, range_step) and module comparison (module_capacity, module_price, module_count).
    • Results are historical estimates, not a forecast or a guaranteed saving.
  • Overview: key figures of the period (the gain, charging from the grid and from solar, sales) with the full bill one click away, the hours of each day as coloured squares, and the battery level at the end of every row. Today and tomorrow are shown; later days are behind Show all days.
  • Database fail-safe: before a database is saved, BattMind copies the current good file to /config/battmind_backups/storage/ (one copy a day, the newest 3 are kept). A corrupt file is moved aside as ….corrupt.<time> and the newest good copy is restored.
  • Battery size can be set to 0.

🔧 Improvements

  • Max. age of kWh works with both the optimiser and the rules, and follows the age of every kWh. The what-if simulator does the same when it replays past days. The hours that use old energy are in the attribute force_powerwall_max_hours_old_discharge_timestamps.
  • Sell before the sun fills the battery (🌄) also covers a sale after sunrise when the sun fills the battery later (within 24 hours) and nothing is charged from the grid in between. Selling in a solar hour stops solar charging in that hour, so enough later solar must remain to refill it.
  • Hours with a sale are discharge hours: a hold from Profit only or Prioritise is dropped in that hour.
  • Grid charging with 15 minute prices never exceeds the charge power, and the battery level forecast adds up every charge session in an hour.
  • Optimiser is more reliable: it converges more often and handles negative prices better. If it can't settle, the rules take over.
  • Startup: errors at startup are reported more clearly in the log and in a notification.

🐛 Fixes

  • A battery level of nan or inf is handled like an unavailable sensor: the last recorded number is used if the sensor stopped giving numbers less than 2 hours ago, otherwise 100 % with a warning. It used to stop the job.
  • Prices that are not usable numbers (text, NaN, infinity), and sell prices whose tariffs aren't numbers, are ignored. The hour gets its price from the price history, or none, and is never planned with an invented price.
  • The planned-hours attributes no longer list an unsupported action: with solar only charging unsupported, the leftover hours are listed as discharge hours.

What's Changed

  • Add release workflow for drafting release notes and version validation by @dezito in #83
  • Implement fail-safe mechanism for database corruption by @dezito in #84
  • Add funding section and "Buy Me A Coffee" link to README by @dezito in #85
  • Add 'Show all days' functionality and improve overview by @dezito in #86
  • Refactor month iteration and formatting in charging history by @dezito in #87
  • Implement max age for battery energy management by @dezito in #88
  • Add customizable sidebar icon for BattMind dashboard by @dezito in #89
  • Enhance startup error handling and notifications by @dezito in #90
  • Enhance pricing and forecasting logic in BattMind component by @dezito in #91
  • Enhance optimizer logic for convergence and control rules by @dezito in #92
  • Implement reserve logic for selling rules by @dezito in #93
  • Enhance charging logic for 15-minute price periods by @dezito in #94
  • Add validation for finite prices and update documentation by @dezito in #95
  • Update discharging rules for solar refill logic by @dezito in #96
  • Enhance optimizer and planner logic for charging sessions by @dezito in #97
  • Implement max age energy tracking and discharge rules by @dezito in #98
  • Handle NaN and infinity battery levels as unavailable sensors by @dezito in #99
  • Update optimizer to handle negative prices by @dezito in #100
  • Implement discharge logic for sale hours by @dezito in #101
  • Enhance discharge rules for optimized solar usage by @dezito in #102
  • Add reserve handling to selling logic by @dezito in #103
  • Refactor comments for clarity on energy usage in optimizer and tests by @dezito in #104
  • Enhance battery level retrieval with recent sensor checks by @dezito in #105
  • Implement sale blocking logic for held hours by @dezito in #106
  • Update AGENTS.md with reserve handling details and enhance tests for sale blocking logic by @dezito in #107
  • Allow battery size to be set to zero by @dezito in #108
  • Add persistence tests for what-if service by @dezito in #109
  • Enhance documentation and tests for dashboard analysis and what-if simulator by @dezito in #110
  • Enhance what-if simulator with monthly breakdown and bill analysis by @dezito in #111
  • Add current battery label and update bill notes in what-if module by @dezito in #112
  • Update what-if card charts to reflect current battery costs by @dezito in #113
  • Update what-if module bill notes for clarity by @dezito in #114

Full Changelog: v1.0.8...v1.0.9