SunHarvest

Rules

A rule reads as a sentence: when something happens, only if some conditions hold, then do these things. Rules are free on every account. Find them under Control › Rules and press + New rule.

When: the trigger

There are four kinds of trigger:

  • A value crosses a threshold. Pick a signal, whether it rises above or falls below, and the value. Optionally add "sustained for N minutes" so a blip does not fire it.
  • A state changes, such as grid status or operation mode changing from one state to another.
  • The clock reaches a time, with a day-of-week picker.
  • The sun rises or sets: sunrise or sunset, plus or minus a number of minutes, on chosen days.

Fires: how often

  • The moment it happens. The rule fires once, as the trigger occurs.
  • Any time it is true. The rule fires as soon as the trigger and conditions are all true together, including if you create it mid-window.
  • And keep it that way. The rule re-applies its settings if anything else changes them, at most once per cooldown. That is how you stop the Tesla app or a smart-home hub undoing you.

Only if: the conditions

Conditions can be on:

  • a value (above, below or between)
  • a state (is or is not)
  • the time of day on chosen days
  • the month

All conditions must hold for the rule to fire.

Then: the actions

Actions run in order. A rule can:

  • set the backup reserve, the operation mode, Storm Watch, grid charging or the export rule
  • apply a tariff preset
  • push real prices to the Powerwall
  • force export until a time

Force export writes a huge sell price over your real tariff so the battery exports flat out. At the time you choose, it puts the tariff and every changed setting back automatically.

Signals

You can trigger on or check these signals, grouped as they appear:

  • Live values: battery %, each power flow, rate of charge, minutes until full or until the reserve, grid status, Storm Watch, and generator or Wall Connector power where you have them.
  • Current settings of the Powerwall.
  • Energy today and yesterday.
  • Tariff prices: now, averages, how the current price ranks against the rest of today, and the cheapest and dearest import and best export in the next N hours.
  • Weather now.
  • The forecast: solar remaining today, tomorrow and in the next N hours, plus cloud, rain, wind and temperatures.
  • Expected use, learned from your own history.
  • The sun: elevation, minutes since sunrise and until sunset, and day length.
  • EV charging, once a charger is linked.

Each signal shows how often it updates.

Priority and cooldown

Drag rules to order them: when two fire together, the higher one wins. Cooldown is the minimum gap between fires of the same rule. A rule that fails five times running switches itself off, and its row says so.

While an AI plan is driving, your rules pause and keep their settings. They resume the moment AI mode is switched off.

Some rules people write

RuleWhat it is for
When the import price falls below 10p, then grid charging on and reserve 100 %.Filling up on cheap slots, e.g. on Agile or Go.
When the clock reaches 06:00 on weekdays, only if solar tomorrow is above 20 kWh, then reserve 20 %.Leaving room in the battery for a sunny day.
When solar remaining today falls below 5 kWh, only if battery % is below 40, then reserve 60 %.Keeping an evening cushion when the afternoon will not fill the battery.
When the clock reaches 16:00, then force export until 19:00.Selling the battery into a peak export window (Flux-style tariffs).
When EV charging changes to charging, then reserve 100 %. (With the reverse rule to put it back.)Stopping the Powerwall from draining into the car.

Tips for rules that behave

  • Pair every "on" with an "off". A rule that turns grid charging on at a cheap price needs a partner that turns it off afterwards, or a later rule that sets it back.
  • Use "sustained for" on power signals. A kettle or an oven can spike the house load for a minute. Ten minutes sustained ignores it.
  • Check the change log. Control › Powerwall › Changes names the rule behind every settings change, so you can see exactly what fired and when.
  • Start small. One or two rules you understand beat ten that argue with each other. Priority decides who wins, but fewer rules means fewer surprises.