# Home Batteries

The Home Battery product consists of the following APIs:

- Home Battery Make `/home_battery_makes`: list and retrieve manufacturers we support.
- Home Battery Model `/home_battery_models`: list and retrieve models, optionally filtered by make.
- Home Battery Onboarding `/home_battery_onboarding`: kick off the OAuth flow that connects a user's home battery account to ev.energy.


The typical flow for connecting a user's home battery is:

1. Use the `/home_battery_makes` endpoint to discover supported manufacturers.
  - Each make exposes an `onboarding_url` when a `preferred_integration_provider` is configured. Use this URL to send the user straight into the onboarding flow primed to that make.
  - Makes whose `preferred_integration_provider` is null cannot be onboarded automatically and return `onboarding_url: null`.
2. Optionally use the `/home_battery_models` endpoint with `?make_id=...` to look up a specific model.
  - Each model also exposes an `onboarding_url` for finer-grained priming via `model_id`.
3. Direct the user to the resolved `onboarding_url`.
  - When using Client Credentials, append a `user_id=...` query parameter so the home battery is created for the correct user — otherwise the request returns a `400`.


Once onboarding completes successfully the user's connected home battery becomes visible to the rest of the ev.energy platform and is taken into account during smart charging.