Skip to content

Battery Custom Controller

bolagnaise edited this page Oct 15, 2026 · 1 revision

Custom / External Controller

Battery connections · Connection methods and sensors · Configuration index

Choose the battery during initial setup. Later, use Settings > Devices & Services > PowerSync > Configure > Battery connection method & sensors to choose its telemetry/control route. Edit connection details under Configure > Custom external controller.

Connection choices

Connection method What this route provides
Selected Home Assistant entities — monitoring only Monitoring and planning only; this route does not enable battery dispatch.

Select one route for PowerSync. A second integration using the same device connection can cause conflicts; the companion-integration route is appropriate when that integration should own communications. See source discovery and switching.

Use this when your battery system is already managed by another integration, Node-RED flow, MQTT bridge, vendor controller, or custom automation, and you want PowerSync to calculate and publish Smart Optimization decisions without taking over the hardware.

This is selected during the Battery system setup stage. It is not an optimizer-specific option. PowerSync asks you to choose the Home Assistant entities you already have for the site:

Entity Expected value
Battery level sensor Battery state of charge as a percentage
Battery power sensor Power in W or kW. Positive means discharging; negative means charging
Grid power sensor Power in W or kW. Positive means importing; negative means exporting
Solar power sensor Current solar production in W or kW
Home load sensor Current whole-home/site load in W or kW

PowerSync also asks for planner limits:

Setting Purpose
Battery capacity Usable battery capacity for the LP model
Maximum charge power Highest charge rate the planner may schedule
Maximum discharge power Highest discharge/export rate the planner may schedule
Maximum grid import Optional total site import cap for optimizer planning. Set to 0 for no cap
Minimum discharge level Minimum for intentional battery export; self-consumption and hardware limits are separate
Allow grid charging Whether the plan may include grid-charging windows

Behaviour

  • PowerSync forces Smart Optimization on in monitoring mode for custom systems.
  • It reads the selected HA entities, normalizes W/kW values, and feeds them into the optimizer, cost tracking, and forecast sensors.
  • It does not create a brand-specific hardware coordinator.
  • This battery route does not send force charge, force discharge, reserve or restore commands. An independently configured curtailment route can still operate if its monitoring-mode permission and control route allow it.
  • The optimizer action sensors expose the planned decisions. Your existing controller or automations decide how, or whether, to act on them.

This is the right setup for multi-inverter or mixed-brand systems where PowerSync cannot own every device directly, such as a GoodWe hybrid plus separately controlled AC batteries.


Check the result

After saving connection changes, allow the integration reload to complete. Check fresh battery SOC, grid/solar/battery power and home-load readings for the selected site. Compare signs and totals with the vendor/upstream readings. Planning sensors can update on a monitoring route; that does not establish dispatch capability. Verify any permitted control separately using readback and measured power.

Field reference

The tables use the current form labels and help text. They list the conditional field union: a field can be hidden for a different battery, provider, route or available integration. The instructions above explain those conditions. Existing saved/discovered values take precedence over fresh fallbacks. Rate units follow the provider; check the displayed currency/energy unit.

Custom external controller — initial setup

Field Meaning / input Fallback / limits
Battery level sensor State of charge as a percentage. Saved/detected value or the form’s shown fallback
Battery power sensor Battery power. Positive means discharging; negative means charging. Saved/detected value or the form’s shown fallback
Grid power sensor Grid power. Positive means importing; negative means exporting. Saved/detected value or the form’s shown fallback
Solar power sensor Current solar production. Saved/detected value or the form’s shown fallback
Home load sensor Current total home/site load. Saved/detected value or the form’s shown fallback
Minimum discharge level The optimizer will never plan discharge below this percentage. 0–100 %; step 1
Battery capacity Total usable battery capacity in kWh for the external battery system. 1–200 kWh; step 0.1
Maximum charge power Maximum charge power in kW that the planner may schedule. 0.1–50 kW; step 0.1
Maximum discharge power Maximum battery/inverter discharge power in kW that the planner may schedule for loads and export. 0.1–50 kW; step 0.1
Maximum grid export Site/DNSP export cap in kW. Auto-detected only when your inverter reports its own export limit; otherwise Profit Max solar export stays off until you set this. Set 0 for zero-export sites. This does not limit battery power used by house loads. 0–100 kW; step 0.1
Maximum grid import Maximum site grid import in kW. Set 0 for no site import cap. Fallback 0; 0–100 kW; step 0.1
Allow grid charging When disabled, the planner will not schedule forced grid charging. Fallback On

Custom external controller — existing installation

Field Meaning / input Fallback / limits
Battery level sensor Use the value or available choice shown in this form; existing saved/detected values take precedence. Saved/detected value or the form’s shown fallback
Battery power sensor Use the value or available choice shown in this form; existing saved/detected values take precedence. Saved/detected value or the form’s shown fallback
Grid power sensor Use the value or available choice shown in this form; existing saved/detected values take precedence. Saved/detected value or the form’s shown fallback
Solar power sensor Use the value or available choice shown in this form; existing saved/detected values take precedence. Saved/detected value or the form’s shown fallback
Home load sensor Use the value or available choice shown in this form; existing saved/detected values take precedence. Saved/detected value or the form’s shown fallback
Minimum discharge level Use the value or available choice shown in this form; existing saved/detected values take precedence. 0–100 %; step 1
Battery capacity Use the value or available choice shown in this form; existing saved/detected values take precedence. 1–200 kWh; step 0.1
Maximum charge power Use the value or available choice shown in this form; existing saved/detected values take precedence. 0.1–50 kW; step 0.1
Maximum discharge power Use the value or available choice shown in this form; existing saved/detected values take precedence. 0.1–50 kW; step 0.1
Maximum grid export Use the value or available choice shown in this form; existing saved/detected values take precedence. 0–100 kW; step 0.1
Maximum grid import Use the value or available choice shown in this form; existing saved/detected values take precedence. 0–100 kW; step 0.1
Allow grid charging Use the value or available choice shown in this form; existing saved/detected values take precedence. Saved/detected value or the form’s shown fallback

Clone this wiki locally