About

What is TerraLync?

A local-first control plane for GivEnergy solar inverters — real-time monitoring, automation and data ownership without a cloud in sight.

The short version

TerraLync is software you run on a small device — an ESP32-S3 board or a Raspberry Pi — that sits on your home network and talks directly to your GivEnergy inverter. It gives you a polished web dashboard, a full REST API, time-series data recording, scheduling, MQTT integration and OTA updates.

Because everything happens on your LAN, it keeps working when your internet drops, when the vendor cloud has an outage, and when you'd simply rather not hand your home's energy data to a third party.

Architecture

How it works

One device on your network becomes the hub for everything — polling the inverter, serving the dashboard, recording history and feeding your smart home.

GivEnergy Inverter

Modbus TCP :8899 or USB serial. Heartbeats answered automatically.

TerraLync Device

ESP32-S3 or Raspberry Pi. Polls registers, runs services, serves the API.

Your Browser

Dashboard + REST API on terralync.local or the device IP.

SD / Local Storage

Historian, schedules, config — all persisted on-device.

TerraLync Device

Also publishes telemetry to MQTT for home automation.

Home Assistant

Auto-discovered sensors, no YAML required.

Why local?

The cloud is optional. Your data shouldn't be.

Vendor clouds are convenient — until they're down, discontinued, or quietly throttling your polling rate. TerraLync reads the same registers the cloud does, but over your own network:

  • Privacy: energy patterns reveal when you're home. Yours stays yours.
  • Speed: second-scale polling, not minute-scale cloud sync.
  • Resilience: works with no internet at all — permanently.
  • Longevity: no service to be shut down, no subscription to lapse.
Solar panels
Feature deep dive

Everything under the hood

Real-time Dashboard

Live solar, battery, grid and load values with flow visualisation, gauges, system info and per-inverter tabs. Polls every ~2 s on the hub build — gently paced on ESP32 to keep the event loop responsive.

Historian

Append-only telemetry recorder writing CSV + hourly byte-offset indexes to SD. PSRAM ring-buffer cache for fast queries, RAM fallback with no card. Query, chart, export CSV, backup and restore over the API.

Scheduler

Per-day schedules of typed blocks — charge, discharge, eco, pause — persisted to JSON and capability-gated per inverter model. Import/export, execution log, and manual activation override.

Quick Settings

One-tap Charge Now / Discharge Now / Pause / Resume. TerraLync snapshots your current settings first, applies the action, and restores state on resume — with timed auto-resume as a safety net.

MQTT & Home Assistant

A fully asynchronous MQTT publisher (vendored mqtt_as) that can never stall the device — a sleeping broker costs a dropped publish, not a frozen controller. Retained state + HA discovery topics included.

SD Card Manager

Board-aware SD mount on both MicroPython forks, hot-swap monitoring, safe eject, format, file browser and a non-blocking diagnostic stress test.

OTA Updates

Two layers: app-bundle OTA swaps the application atomically with automatic rollback; firmware OTA writes the inactive partition with bootloader fallback. Stable and development channels.

On-device UI

LVGL touch dashboard on the Guition 480×480 panel — home, data, battery, charts, scheduler and settings — plus an ST7789 status screen on the Waveshare GEEK. Headless boards still serve the full web UI.

Plant Auto-detection

detect_plant() discovers your topology on first connection: three-phase inverters, EMS controllers, the GivEnergy Gateway, HV BCU/BMU stacks, LV batteries and CT meters — polling adapts automatically.

First-boot WiFi Setup

No serial terminal needed: with no credentials saved the device hosts an open TerraLync-Setup hotspot whose config page pops up automatically via captive-portal detection, then joins your network and announces itself over mDNS.

Plugin System (Pi edition)

Installable plugins with a permission model, sandboxed settings, a documented SDK and one-click registry installs — extend the dashboard without forking it.

Self-healing

Software watchdog with heartbeat + TCP-fallback liveness checks, automatic inverter reconnect, GC self-tuning on PSRAM heaps, and boot-retry counters that roll back a failed OTA on their own.

Comparison

TerraLync vs the alternatives

TerraLync GivEnergy Cloud GivTCP / HA add-on
Works without internet Always No Yes
Polling rate Seconds ~5 minutes Seconds
Data stored locally On-device historian Vendor cloud In HA database
Write control (charge/discharge) Full, verified Via app Yes
Scheduling Typed blocks, per-day Basic presets DIY automations
Home Assistant integration MQTT auto-discovery Cloud API only Native
Runs without a server/NAS ESP32-S3, £10-class board — Needs HA host
OTA updates with rollback Dual-layer — Manual
Touchscreen option LVGL 480×480
Subscription None, ever Free tier limits None
Use cases

What people do with it

Watch the plant live

Wall tablet, phone, laptop — the dashboard shows every watt as it moves.

Squeeze the tariff

Schedule overnight charging on cheap rates and discharge through the evening peak.

Feed the smart home

MQTT discovery drops battery, solar and grid sensors straight into Home Assistant.

Babysit the battery

Per-cell voltage and temperature history spots a tired module years early.