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¶
- In Home Assistant, go to Settings → Apps → Install app
- Click the three-dot menu → Repositories
- Click Add
- Add the repository URL:
https://github.com/atbore-phx/sbam - Click Add to confirm
Install¶
- If the app is not visible, refresh the page
- Click the sbam app
- Click 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.
Start¶
- Enable Start on boot and Watchdog
- Click Start
- Check add-on logs for startup and runtime details.
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):
- CLI flag (e.g.,
--url http://example/) - Environment variable (e.g.,
URL=http://example/) config.yamlin the working directory- 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.