Skip to content

Installation

Home Assistant Add-on

sbam is available as an App (add-on) for Home Assistant OS (HAOS).

HAOS must be able to reach the Fronius inverter on its LAN IP.

Official Home assistant guide: Install a third-party Home Assistant app repository

Add Repository

  1. In Home Assistant, go to Settings → Apps → Install app
  2. Click the three-dot menu → Repositories
  3. Click Add
  4. Add the repository URL: https://github.com/atbore-phx/sbam
  5. Click Add to confirm

Screenshot 2026-06-17 142128

Install

  1. If the app is not visible, refresh the page
  2. Click the sbam app
  3. Click Install

SBAM app

Install

Configure

Before starting, open the Configuration tab and set options as needed. See the Configuration page for a complete reference of all options.

For scheduler_mode: optimize, the add-on needs no Home Assistant URL or token: it uses the Supervisor API automatically. Start with optimizer.dry_run on (the default); see Cost-optimized Dispatch.

Screenshot 2026-06-17 154313

Start

  1. Enable Start on boot and Watchdog
  2. Click Start
  3. Check add-on logs for startup and runtime details.

Watchdog

Start

Standalone Binary

Download the latest binary from GitHub Releases and run:

./sbam schedule --apikey "your-key" --url "https://api.solcast.com.au/..." --fronius_ip "192.168.1.100"

Configuration values are resolved with this precedence (highest first):

  1. CLI flag (e.g., --url http://example/)
  2. Environment variable (e.g., URL=http://example/)
  3. config.yaml in the working directory
  4. Built-in default

For scheduler_mode: optimize outside the add-on, set HA_URL and a long-lived access token in HA_TOKEN (environment variable preferred):

export HA_URL=http://homeassistant.local:8123
export HA_TOKEN=<long-lived-token>
./sbam optimize -c 11000 --opt_price_entity sensor.nordpool_kwh_dk2_dkk_3_10_025 --opt_consumption_entity sensor.solarnet_power_load_consumed ...

For a full list of commands and flags, see the CLI Reference.