Skip to content

Engine Settings

Engine settings control how frequently Hanergy evaluates surplus, how it protects equipment from rapid cycling, and how aggressively it reacts to power fluctuations.

All settings have sensible defaults. Most users will not need to change them during initial setup — but fine-tuning them can improve performance for specific environments.


SettingDefaultDescription
Evaluation Interval10 sHow often the engine checks surplus
Min On Time120 sMinimum time a device stays on after activation
Min Off Time180 sMinimum time a device stays off before reactivation
Grid Import Limit0 W (disabled)Maximum allowed grid draw
Surplus Buffer100 WReserved headroom subtracted from surplus
Setpoint Interval30 sMinimum time between setpoint changes
Smoothing Alpha0.3EMA smoothing factor (0 = smooth, 1 = reactive)

Default: 10 seconds

How often the engine’s main evaluation loop runs. On each tick the engine reads all sensor values, recalculates surplus, and decides whether to activate, shed, or adjust any devices.

A lower value makes the system more responsive to sudden changes in production (e.g., cloud shadows) but increases the number of Home Assistant API calls. For most residential setups, 10 seconds is a good balance.


Default: 120 seconds (2 minutes)

The minimum time a device must remain on after being activated. Even if surplus drops below the required level, the engine will not shed the device until this time has elapsed.

This setting primarily protects compressor-based equipment — air conditioners, heat pumps, refrigeration units — from short-cycling, which causes mechanical wear and can trigger thermal protection faults. For purely resistive loads like water heaters, the protection is less critical but still prevents unnecessary relay chatter.


Default: 180 seconds (3 minutes)

The minimum time a device must remain off before it can be activated again. This is the companion to Min On Time and ensures equipment has time to recover between cycles.

For heat pumps and air conditioners, the off-time allows refrigerant pressure to equalize before the next start. Setting this too low can cause repeated failed starts and compressor damage.


Default: 0 W (disabled)

A hard ceiling on how much power the engine allows to be drawn from the grid. When grid import approaches this limit, the engine begins shedding devices — even if they have not yet reached their priority thresholds.

Set this to 0 to disable the limit entirely.


Default: 100 W

A safety margin subtracted from the calculated surplus before the engine decides whether to activate new devices. If the engine calculates 500 W of surplus and the buffer is 100 W, only 400 W is considered available for new devices.

This buffer exists because sensor readings have measurement lag and the engine runs on a fixed interval. Without a buffer, a device might be activated based on a momentary surplus reading, only for the next tick to reveal that grid import has begun.


Default: 30 seconds

The minimum time between consecutive setpoint changes for dynamic devices. Even if the engine calculates a different optimal setpoint on every tick, it only sends a new command once this interval has elapsed.

This prevents excessive writes to Home Assistant entities and avoids oscillation in the setpoint value. Most modulating loads (EV chargers, inverters) also have their own internal rate-limiting, so sending commands more often than every 30 seconds typically has no practical effect.


Default: 0.3

The alpha factor for the Exponential Moving Average (EMA) applied to raw sensor readings before surplus is calculated. The formula is:

smoothed = alpha x current_reading + (1 - alpha) x previous_smoothed
Alpha RangeBehaviorBest For
0.1 - 0.2Heavily weighted toward history — very stable, slow to reactNoisy sensors, wind turbines, highly variable conditions
0.3 - 0.5Moderate — filters spikes without significant lagMost residential solar setups (default range)
0.7 - 0.9Heavily weighted toward current reading — fast reactionsReliable sensors, stable production, maximum responsiveness

For most residential solar setups, the defaults work well. Here is a summary of recommended starting values:

SettingValueRationale
Evaluation Interval10 sGood balance of responsiveness and API load
Min On Time120 sSafe for compressor equipment
Min Off Time180 sAllows pressure equalization
Grid Import Limit0 WDisabled until needed
Surplus Buffer100 WAbsorbs measurement lag
Setpoint Interval30 sPrevents command flooding
Smoothing Alpha0.3Moderate smoothing