For the complete documentation index, see llms.txt. This page is also available as Markdown.

SDM01 G2X & Combo Gen2 — Balcony Solar & Micro-Storage Export Limiting Integration Guide

Status: Active| Applies to: SDM01 G2X and SDM01 Combo Gen2 | Firmware: Pro V3.1.11+ | Audience: Balcony Solar PV & Micro-Storage Product Managers and Firmware Engineers | Last Updated: 2026-08-11

TL;DR — Quick Decision Card

Recommended communication channel for export limiting
└── Raw UDP push  ← Primary channel
    Push-based, no connection overhead, configurable interval 0.2–0.5 s
    See Section 5.1

Fallback channel
└── Modbus TCP polling
    Use if your inverter/storage MCU already has a Modbus stack
    ⚠️ Single TCP connection; open → read → close per cycle, ≥ 150 ms gap
    See Section 5.2

Configuration and diagnostics (not for real-time control)
├── HTTP GET         ← Read current power data
├── HTTP POST        ← Write configuration (UDP target IP, etc.)
└── BLE              ← Local provisioning via BT Powerlink app or custom app

Security compliance required (EN 18031 / RED)?
└── UDP AES (encrypted push, same low latency as Raw UDP)
    Pre-shared key is shared with BLE broadcast key
    See Section 5.3

Want to build your own communication stack?
└── Contact Bituo for custom firmware support on ESP32-C6
    See Section 9

Typical end-to-end system response: 2–5 seconds
(varies by country, DNO, and inverter/storage design — see Section 3.2)

1. Purpose & Scope

This guide helps balcony solar and micro-storage product managers and firmware/embedded engineers integrate the SDM01 Gen2 Combo or SDM01 G2X smart energy meter into a system over a local Wi-Fi/LAN network to implement Export Limiting — also known as zero feed-in control or anti-backflow.

What Export Limiting does: By continuously monitoring the total grid power (PgridP_{grid}) at the home's main incomer, the balcony inverter or micro-storage unit dynamically adjusts its output so that net power exported to the grid stays within the regulatory limit (e.g. 0 W zero-feed-in, or within the 800 W cap under the 2024 German Balkonkraftwerk regulation).

📌 Bituo Technik's role in this system: The SDM01 Gen2 Combo / SDM01 G2X is the real-time electrical monitoring and communication node — it measures PgridP_{grid} and delivers that data to your inverter or storage controller over Wi-Fi. The closed-loop control logic lives in your device. This guide focuses on getting accurate, low-latency power data from the meter to your system reliably.

The integration approach, control algorithm, fail-safe behavior, and grid-code compliance described in this guide are provided as reference examples only. Export limiting control, output ramping, and regulatory compliance are implemented and validated by the inverter or storage system manufacturer.

What this guide covers:

  • Supported products and selection guide

  • System architecture and control flow

  • Typical system-level response time

  • Electrical installation and CT wiring

  • Wi-Fi provisioning and device discovery

  • Communication protocols (Raw UDP, Modbus TCP, HTTP, UDP AES)

  • Export limiting control logic reference example

  • Fail-safe and reconnection design

  • Testing and validation checklist

  • Custom firmware / open integration options

Out of scope: RS-485 / Modbus RTU integration — use the SDM01 Modbus RTU Map for that use case.


2. Supported Products

Both products below support this export limiting integration over Wi-Fi. Select based on your installation environment.

Measurement Update Rate

≤ 200ms (Power RMS value)

≤ 200ms (Power RMS value)

Wi-Fi SoC

ESP32-C6

ESP32-C6

Antenna

Built-in PCB antenna

External (SMA connector, antenna routable outside enclosure)

Best fit

Adequate Wi-Fi signal

Metal cabinets and weak Wi-Fi environments where adding WiFi AP is not feasible

💡 Architecture note: Both products use a dual-chip architecture — a dedicated metering MCU handles all energy measurement to ensure accuracy and isolation, while a separate ESP32-C6 Wi-Fi SoC manages connectivity and protocol handling. The two chips communicate internally via UART. Developers familiar with the ESP32 ecosystem can leverage this open interface for custom firmware or proprietary communication stacks.


3. System Architecture Overview

3.1 Control Flow

Step
Actor
Action

① Provision

User / Installer

Configure meter Wi-Fi via BLE (BT Powerlink app or custom app via BLE API)

② Discover

Inverter / Storage MCU

Auto-discover meter IP on LAN via mDNS, or use DHCP-reserved static IP

③ Communicate

Inverter / Storage MCU

Receive UDP pushes from meter (or poll via Modbus TCP)

④ Control

Inverter / Storage MCU

Run export limiting control algorithm, adjust PV/storage output

⑤ Fail-Safe

Inverter / Storage MCU

On comms timeout, ramp output down to safe level

💡 Configuring the UDP target address: The meter needs to know which IP:Port to push UDP data to. This can be configured via any of the following channels:

  • LAN HTTPPOST http://<meter-ip>/save-config with {"cmd":"udp","IpAddress":"<inverter-ip>","localUdpPort":<port>} from the inverter MCU or any LAN client

  • BLE — via BT Powerlink app or your own app using the BLE Secured API (local, no internet required)

  • Cloud MQTT — via your app → cloud MQTT broker → meter (requires meter to be online)

3.2 Typical System-Level Response Time

The total time from a change in grid power to the inverter completing its output adjustment depends on multiple stages across the system. A typical well-designed system can achieve 2–5 seconds end-to-end.

⚠️ The applicable response time requirement varies by country, region, DNO, and grid connection type. Always verify with the local grid code and connection agreement for your target market. The figures below are reference budgets only.

Stage
Reference Budget
Notes

① Metering IC — valid power value

≤ 200 ms

The metering IC produces a valid, stable active power reading within 200 ms after a load change. This is the fundamental measurement latency floor.

② MCU reads metering IC + Wi-Fi SoC transmits over network

+ 50–100 ms

The MCU reads data from the metering IC, packages it, and the Wi-Fi SoC transmits the UDP packet over the LAN. Typical LAN UDP delivery adds 5–50 ms.

③ Inverter / storage MCU receive & process

10–100 ms

Parsing UDP packet, running control algorithm, issuing new power setpoint. Implemented by customer.

④ Power electronics ramp / settling

100–1000 ms

The inverter or storage unit physically ramps output to the new setpoint. Dominant factor; fully determined by inverter/storage design.

End-to-end system response

Typically 2–5 s

Must be validated by the system manufacturer on the final product.

UDP push interval recommendation:

The meter's UDP push interval is configurable. 0.5 s is recommended for most balcony PV applications, balancing control responsiveness with MCU and network load. For systems with fast power electronics (ramp time < 200 ms) and capable inverter MCUs, the interval can be reduced to 0.2 s to improve control responsiveness.

💡 Since the metering IC produces a valid power reading within ~200 ms, a 0.2 s push interval ensures every UDP packet carries a freshly computed measurement. At 0.5 s, each packet is still well within one measurement cycle. Both settings are appropriate depending on your system design.

3.3 Key Parameters and Sign Convention

Symbol
Description

PgridP_{grid}

Real-time total grid power at main incomer. Unit: kW in UDP/HTTP. Multiply by 1000 for W.

Pexport,maxP_{export,max}

Maximum allowed export power, defined as a positive number (e.g. 0 W or 800 W)

PmarginP_{margin}

Optional safety margin (e.g. 30–50 W)

PtargetP_{target}

Controller target: Pexport,max+Pmargin-P_{export,max} + P_{margin}

ΔP\Delta P

Control dead band (e.g. ±30–±50 W)

TtimeoutT_{timeout}

Comms timeout before fail-safe triggers (configurable, e.g. 2–5 s)

Sign convention (applies to all active power fields):

Value
Meaning

Pgrid>0P_{grid} > 0

Household is importing power from the grid

Pgrid=0P_{grid} = 0

Net-zero grid exchange

Pgrid<0P_{grid} < 0

Household is exporting power to the grid → trigger export limiting


4. Electrical Installation

⚠️ Safety Notice: Installation must be performed by a qualified electrician. Always de-energize the circuit before wiring.

4.1 Installation Position

The meter must be installed at the main incomer (grid entry point) of the consumer unit, upstream of all loads including the balcony inverter connection point. This ensures PgridP_{grid} reflects the true net household power balance.

4.2 CT Orientation and Phase Matching

  • The arrow on the CT must point toward the load (away from the grid supply).

  • CT(L1) must be clamped on the L1 phase conductor, CT(L2) on L2, CT(L3) on L3.

  • Mismatch between voltage measurement phase and CT phase will cause incorrect power sign and completely defeat export limiting logic.

⚠️ Most common field issue: Reversed CT orientation. If PgridP_{grid} reads negative when the household is clearly importing (PV off), reverse the affected CT.

4.3 Wiring Check — Verify Before Going Live

After installation, use the BT Powerlink app or HTTP GET /data to verify:

  1. All phase voltages read ~230 V (for 3P4W systems).

  2. PgridP_{grid} (TotalActivePower) is positive when household is consuming with no PV active.

  3. Per-phase power signs are consistent — no phase reads opposite sign to the others under balanced load.

  4. Phase power factor check: With PV off and normal household loads running, each phase power factor (PowerFactorX/Y/Z) should read between 0.7 and 1.0. A reading outside this range or a negative power factor on one phase while others are normal typically indicates a CT orientation or phase matching error.


5. Network Provisioning and Device Discovery

5.1 Wi-Fi Provisioning via BLE

Use the BT Powerlink app (Android / iOS) to provision the meter onto the same 2.4 GHz Wi-Fi network as the balcony inverter or storage unit:

  1. Open BT Powerlink app → tap Add Device.

  2. App scans for nearby meter via BLE.

  3. Enter your Wi-Fi SSID and password → confirm.

  4. Meter connects; ACT LED changes to slow blink (connected).

💡 2.4 GHz only. The meter connects to 2.4 GHz Wi-Fi only. If your router broadcasts a combined 2.4/5 GHz SSID, ensure the meter associates to the 2.4 GHz band, or use a dedicated 2.4 GHz SSID.

5.2 Fixed IP — Recommended Primary Discovery

Assign a DHCP reservation in the router for the meter's MAC address (find it in BT Powerlink app → Device Info). This gives the meter a stable IP across reboots and simplifies inverter-side configuration.

5.3 mDNS Auto-Discovery — Recommended Fallback

Integration pattern:

  1. Browse for _http._tcp.local. on the LAN.

  2. Filter for hostnames starting with EnergySensor-SDM01.

  3. Resolve to IP and proceed with UDP or Modbus TCP.

⚠️ Some consumer routers block mDNS multicast between Wi-Fi clients. If discovery fails, check that multicast/IGMP snooping is enabled, or fall back to local network scan + HTTP probe.

5.4 Local Network Scan + HTTP Probe — Last-Resort Discovery

When fixed IP and mDNS both fail, scan the local network (e.g. via ARP scan or router client-list lookup) and probe each candidate:

Response includes model, mac, and firmware fields. Match ProductModel against SDM01_3PN to confirm identity.


6. Communication Protocols

6.1 Raw UDP Push — Primary Channel ✅ Recommended

Push-based, no connection overhead. The meter actively pushes data to a configured target IP:Port at a configurable interval.

Configure UDP target (via BT Powerlink app or HTTP POST):

Or configure via BLE using the BLE Secured API, or via Cloud MQTT.

Recommended push interval: 0.5 s for most applications; 0.2 s for fast-response systems.

Actual UDP message payload (example from a live device):

⚠️ Important implementation notes:

  • All power and energy field values are strings — parse to float before use.

  • TotalActivePower, ActivePowerX/Y/Z unit is kW. Multiply by 1000 to get W.

  • Use Time field for freshness checking. Discard packets where Time is stale (> 10 s behind current time).

  • UDP is connectionless — implement a watchdog timer. If no packet is received for the configured timeout (e.g. 2–5 s), trigger fail-safe (see Section 8).

6.2 Modbus TCP — Fallback Channel

Use as a reliable fallback, or as primary if your MCU already has a Modbus stack.

⚠️ Single-connection limit: Firmware supports only one concurrent TCP connection. Open → read → close per cycle. Allow ≥ 150 ms between consecutive reads.

Key registers for export limiting (Native Mode — ABCD byte order):

Register (Dec)
Register (Hex)
Description
Format
Notes

1012

0x03F4

Active Power A

FLOAT32

Per-phase, signed. Use as control input for single-phase inverters — read the phase the inverter is connected to.

1014

0x03F6

Active Power B

FLOAT32

Per-phase, signed. Use as control input for single-phase inverters — read the phase the inverter is connected to.

1016

0x03F8

Active Power C

FLOAT32

Per-phase, signed. Use as control input for single-phase inverters — read the phase the inverter is connected to.

1044

0x0414

Total Active Power

FLOAT32

Primary control input for 3-phase inverters/storage systems.

Function codes 0x03 or 0x04 both supported. Recommended polling interval: 0.5–1 s.

📌 For the full Modbus register map, see the SDM01 Documentation Center.

6.3 HTTP GET /data — Diagnostics and Low-Frequency Reads

HTTP is not recommended as the primary real-time channel for export limiting due to connection setup overhead. Use it for:

  • Wiring verification during installation

  • Low-frequency energy logging (> 5 s interval)

  • Device discovery and health checks

Request:

Example response (from a live device at 192.168.3.23):

The HTTP /data response uses the same field names and units as the UDP push payload.

6.4 UDP AES — Encrypted Push

For products requiring wireless security compliance (EN 18031, EU RED Directive), use UDP AES encrypted push:

  • Same message structure and field names as Raw UDP

  • Payload is AES-encrypted

  • No latency penalty vs Raw UDP

  • The AES pre-shared key is the same key used for BLE electrical data broadcast encryption — configure once via BT Powerlink app or BLE Secured API


7. Export Limiting Control Logic (Reference Example)

📌 This section is provided as a simplified reference example only. The meter provides real-time grid power measurement; the actual closed-loop control algorithm, output ramping behavior, and grid-code compliance logic are implemented inside the inverter or storage controller. The approach described here is one common method — adapt it to your system's specific requirements.

7.1 Power Sign Convention

The control input field depends on your inverter topology:

Inverter Type
Recommended Control Input
Field (UDP/HTTP)

3-phase inverter / 3-phase storage

Total Active Power

TotalActivePower

Single-phase micro-inverter (e.g. balcony PV)

Active Power of the connected phase

ActivePowerX/Y/Z

DNO requires per-phase zero export

Monitor all 3 phases independently; trigger limiting when any phase goes negative

All three ActivePowerX/Y/Z

⚠️ For single-phase micro-inverters: using TotalActivePower may mask per-phase export — e.g. the connected phase exports −500 W while the other two phases import +600 W total, making the sum appear positive. Always verify with your target DNO's metering and compliance requirements.

7.2 Define the Export Limit Clearly

To avoid sign mistakes, define the export limit as a positive number and derive the controller target:

Symbol
Description
Example

Pexport,maxP_{export,max}

Maximum allowed export power, expressed as a positive number

0 W (zero-feed-in) or 800 W

PmarginP_{margin}

Optional safety margin

30–50 W

PtargetP_{target}

Target grid power for the controller

Pexport,max+Pmargin-P_{export,max} + P_{margin}

Note: The formula above applies when using TotalActivePower as the control input (3-phase inverter scenario). For single-phase control, substitute the per-phase power reading accordingly.

Examples:

  • Zero-feed-in (Pexport,max=0 WP_{export,max}=0\text{ W}, Pmargin=30 WP_{margin}=30\text{ W}):Ptarget=+30 WP_{target} = +30\text{ W}The system keeps a small import margin to avoid crossing zero.

  • 800 W export cap (Pexport,max=800 WP_{export,max}=800\text{ W}, Pmargin=50 WP_{margin}=50\text{ W}):Ptarget=750 WP_{target} = -750\text{ W}The system allows export up to 750 W, keeping 50 W safety margin.

7.3 Incremental PI Control Example

Error signal:

e(t)=Pgrid(t)Ptargete(t) = P_{grid}(t) - P_{target}

  • e(t)>0e(t) > 0: grid power is above target (household importing) → control output increases

  • e(t)<0e(t) < 0: grid power is below target (household exporting beyond limit) → control output decreases

Incremental PI correction:

ΔPout(t)=Kpe(t)+Kie(t)dt\Delta P_{out}(t) = K_p \cdot e(t) + K_i \cdot \int e(t)\,dt

New output setpoint:

Pout,new=Pout,current+ΔPoutP_{out,new} = P_{out,current} + \Delta P_{out}

Output clamping:

Pout,new=clamp(Pout,new,  0 W,  Prated)P_{out,new} = \text{clamp}(P_{out,new},\; 0\text{ W},\; P_{rated})

7.4 Example Starting Parameters

These are starting points only. Tune according to your power electronics ramp rate, communication interval, and grid-code requirements.

Parameter
Example Value
Notes

KpK_p

0.2–0.6

Reduce if oscillation is observed

KiK_i

0.1–0.3 s⁻¹

Too high may cause overshoot

Dead band ΔP\Delta P

±30–±50 W

Prevents micro-adjustments

UDP push interval

0.5 s (or 0.2 s for fast systems)

See Section 3.2

Control update trigger

On each valid new meter sample

Do not reuse stale data as new measurements

Output ramp limit

Device-dependent

Implement inside inverter/storage controller

7.5 Dead Band

For zero-feed-in systems, a small positive import margin (30–50 W) is usually more stable than targeting exactly 0 W.

7.6 Anti-Windup

When the output is clamped at 0 W or PratedP_{rated}, freeze the integral term to prevent accumulation:

This prevents slow recovery, overshoot, and oscillation after output saturation or communication recovery.


8. Fail-Safe and Reconnection

⚠️ A robust fail-safe design is mandatory. Network instability must never result in uncontrolled grid export.

📌 Note: Communication timeout and export limiting response time are different concepts. Response time describes how quickly the system adjusts output under normal operation. Timeout describes when the controller should enter fail-safe after losing valid meter data. The timeout value should be selected by the system manufacturer based on safety strategy and grid-code requirements.

8.1 Timeout Detection

Condition
Recommended Action

No valid UDP packet received for configurable timeout (e.g. 2–5 s)

Ramp PV/storage output to configured safe level

Modbus TCP read fails for configurable consecutive cycles

Ramp PV/storage output to configured safe level

Packet Time field is stale (> 10 s old)

Treat as timeout, increment timeout counter

8.2 Last Valid Data Cache

Cache the last valid PgridP_{grid} reading. Use it to ride through transient single-packet losses rather than triggering full fail-safe immediately. Only trigger fail-safe on sustained loss beyond the configured timeout.

8.3 Reconnection

After fail-safe triggers:

  1. Continue attempting UDP reception / Modbus TCP connection in the background.

  2. Once valid data resumes, gradually ramp output back up — do not step directly to full power.

  3. Example ramp rate: increase by no more than Prated/10P_{rated} / 10 per control cycle (e.g. per 0.5 s) until steady state.


9. Testing and Validation Checklist

📌 The following checklist is provided as a reference only. The system integrator and inverter/storage manufacturer are responsible for defining and executing their own validation procedures.


10. Custom Firmware / Open Integration (SDM01 G2X & Combo Gen2)

The SDM01 G2X & Combo Gen2's communication module is based on an ESP32-C6 SoC. For manufacturers requiring a proprietary communication stack or custom cloud integration, Bituo Technik can provide firmware customization support, flashing access, and metering interface documentation.

💡 Important: The ESP32-C6 handles communication only. Measurement accuracy is handled by a dedicated metering IC and is not affected by custom firmware on the ESP32-C6.

For custom firmware resources, flashing guides, and metering IC interface documentation, please contact support@bituo-technik.com or visit the Documentation Center.


最后更新于