SolarSmart Plugin

User avatar
GlennNZ
Posts: 1872
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

SolarSmart Plugin

Post by GlennNZ »

New Plugin

SolarSmart
Image

See here:
https://github.com/Ghawken/SolarSmartPlugin/releases

Longer Readme on github (gave up converting to bbcode....)

Purpose:
To allow Power loads to turn on and turn off as excess Solar energy generated allows.

Harness your surplus solar energy automatically. SolarSmart monitors your photovoltaic (PV) production, site consumption, battery power, and/or net grid flow to calculate “headroom” (excess power) and then starts or sheds discretionary loads in a priority order so you use more of your own clean energy and import less from the grid.

---
Table of Contents
  • What SolarSmart Does
  • Headroom: How it’s Calculated
  • Operating Modes
  • Devices Provided by the Plugin
  • Quick Start
  • Configuration
---
What SolarSmart Does

SolarSmart is an Indigo Domotics plugin that:
  • Calculates “headroom” in watts: the spare power available to run discretionary loads.
  • Starts loads (pool pump, EV charger, water heater, dehumidifier, etc.) when sufficient headroom exists.
  • Sheds loads gracefully when headroom drops, prioritizing lower-impact loads first.
  • Supports simple, robust control via Indigo devices or Action Groups.
  • Works with either a single net grid meter or a combination of PV, site consumption, and battery power sources.
  • Provides a test device to simulate conditions and validate your automations before going live.
---
Headroom: How it’s Calculated

Headroom is the amount of excess power you can safely use right now.
  • Positive headroom → you have spare power available to start or keep running loads.
  • Negative headroom → you’re short on power and importing from the grid; loads should be avoided or shed.
Depending on your metering, SolarSmart can compute headroom from:
  • A single, accurate net grid meter (preferred when available).
  • Separate inputs for PV output, site consumption, and battery charge/discharge.
Sign conventions (typical, but verify your meters):
  • Net grid:
    • Negative watts = exporting to the grid (good; spare power).
    • Positive watts = importing from the grid (no spare power).
  • Battery:
    • Negative watts = discharging (adds to available power).
    • Positive watts = charging (consumes power).
---
Devices Provided by the Plugin
  • SolarSmart Main Device (Controller)
    • Holds configuration, reads meters, computes headroom, runs the scheduler.
    • Exposes states such as current headroom, mode, last scheduler run, etc.
    Image
  • SolarSmart Load Device
    • Represents a discretionary load you want SolarSmart to start/stop.
    • Assigned a tier (priority) and control method: direct device control or Action Groups.
    Image
  • SolarSmart Test Device (optional)
    • Lets you simulate PV, consumption, battery, and grid values.
    • Ideal for validating behavior before connecting real meters and loads.
    Image




    ---
    Quick Start

    1) Install the plugin
    • Double-click SolarSmart.indigoPlugin.
    • Enable it in Indigo.
    2) Create the Main Device
    • Choose your operating mode.
    • Select the meter/source states for PV, consumption, battery and/or net grid.
    • Set the scheduler check frequency.
    3) Create one or more Load Devices
    • Assign each load a tier (1 = highest priority).
    • Choose how the load should be controlled (device on/off or action groups).
    • Optionally set runtime quotas and allowed time windows.
    4) Watch it run
    • As headroom rises, SolarSmart starts loads beginning with Tier 1.
    • As headroom falls, SolarSmart sheds loads starting from the highest tier.

    Modify the test device to stimulate solar production and headroom. Once happy all is working.
    DISABLE or delete the test device otherwise no real readings will be USED


    Extensive logging available.


    Code: Select all

    ════════════════════════════════════════════════════════════════════════════════
    🔍 DBG7 Device: SolarSmart Load Pool 2000W No Heater  (id=127719016)  Tier 1
    ════════════════════════════════════════════════════════════════════════════════
    🧠 Decision
        Status: OFF   Action: SKIP (quota)   Skip: quota
        Headroom Now: -111 W   StartsThisTick: 0   RunningNow: 0
    ⏱️ Preferred Window Runtime
        Served (internal): 240 min   Window Run (state): 240 min
        Remaining (state): 0 min   Remaining (shown row): 0 min
        Used (state RuntimeQuotaMins): 240 min   Percent: 100%
        Anchor Start (ts): 1755149613.112328 (15:33:33)
    🛟 Catch-up / Fallback
        Active: state=False / mem=None   Catch-up Str Col: Met
        Target: 120 min   Remaining: 0 min
        Run Today (state): 0 min   Run (active secs mem): 0 s
        Window: 00:00 - 06:00   Enabled: True
    🔌 External / Control
        External Device On: False   IsRunning(state): False
        Start Ts: None (—)   Cooldown Start: None (—)
        Control Mode: device   Cooldown Mins: 10
    ⚡ Power & Thresholds
        Rated: 2000 W   Needed (start threshold est): 2200 W
        Surge Mult: 1.00   Start Margin %: 10   Keep Margin %: 5
        Min Runtime: 30 min   Max Runtime (per start run): 240 min   Max Pref Window: 240 min
        Quota Window Config: 1d
    📦 Concurrency Snapshot
        Running Now: 0   Starts This Tick: 0
    🗂️ Raw Internal st[] Keys
        IsRunning: False
        catchup_run_secs: 0
        quota_anchor_ts: 1755149613.112328
        run_today_secs: 0.0
        served_quota_mins: 240
        start_ts: None
        today_key: '2025-08-14'
    ────────────────────────────────────────────────────────────────────────────────
    
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: SolarSmart Plugin

Post by jay (support) »

Great plugin - makes me wish I had solar... :D

Thanks for yet another great plugin!
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
User avatar
durosity
Posts: 4810
Joined: Thu May 10, 2012 3:21 pm
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: SolarSmart Plugin

Post by durosity »

jay (support) wrote: Sat Aug 23, 2025 12:01 pm Great plugin - makes me wish I had solar... :D
Me too. Annoyingly I live in a house with a roof at a really good pitch and angle to make the best of the sun we get here in the NE of England.... but there two massive poplar trees that have protection orders on them blocking the roof from being able to be used. It's very frustrating. :(
Computer says no.
User avatar
Different Computers
Posts: 2730
Joined: Sat Jan 02, 2016 10:07 am
Location: East Coast
Contact:

Re: SolarSmart Plugin

Post by Different Computers »

Do I understand correctly that the meter source is platform agnostic as long as it can be added to Indigo?

I have an Enphase system.
Sonoma on a Mac Mini M1 running Airfoil Pro, Bond Home, Camect, Roku Network Remote, Hue Lights, DomoPad, Adapters, Home Assistant Agent, HomeKitLinkSiri, EPS Smart Dimmer, Fantastic Weather, Nanoleaf, LED Simple Effects, Grafana, Yamaha RX Receiver.
User avatar
GlennNZ
Posts: 1872
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

SolarSmart Plugin

Post by GlennNZ »

Yes. Data can come from anywhere provided it is in indigo.

Have option of :
3 fields:
Home usage
Battery usage
Solar generation

Headroom calculated from the above

Or one Grid field: (if available)

Grid Usage field
Negative or positive
With headroom basically being the excess grid usage that is occurring

Whatever makes most sense for system

The test device (as per the instructions) allows multiple readings to be tested and impact on running devices tested

Glenn
Post Reply

Return to “Solar Smart”