# SPM/SDM Open Wi-Fi mDNS Discovery

{% hint style="info" %}
**Status**: Stable | **Applies to:** SPM / SDM Open Wi-Fi (ESP32-H2 8685 / C6) | **Updated**: 2026-05-26
{% endhint %}

***

### 1. Overview

Bituo smart meters utilize **mDNS (Multicast DNS)** to enable zero-configuration device discovery on local networks. This allows automation gateways, energy management systems (EMS), and mobile apps to automatically detect the meter's IP address and capabilities without manual scanning or static IP assignment.

***

### 2. Applied Product Models

<details>

<summary><strong>Single-Phase (SPM01-xxEW)</strong></summary>

<table><thead><tr><th width="64">#</th><th width="220">Ordering Number</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td><strong>SPM01-D2EW</strong></td><td>SPM01 1PN FLEX/63A Wi-Fi (ESP32-8685)</td></tr><tr><td>2</td><td><strong>SPM01-D1EW</strong></td><td>SPM01 1PN MCBM-DM/63A Wi-Fi (ESP32-8685)</td></tr><tr><td>3</td><td><strong>SPM01-U1EW</strong></td><td>SPM01 1PN MCBM-UM/63A Wi-Fi (ESP32-8685)</td></tr></tbody></table>

</details>

<details>

<summary><strong>Split-Phase (SDM02-EW-*)</strong></summary>

<table><thead><tr><th width="64">#</th><th width="220">Ordering Number</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td><strong>SDM02-EW-12</strong></td><td>SDM02 Split-Phase SCTA-2×120A/Φ16 Wi-Fi (ESP32-8685)</td></tr><tr><td>2</td><td><strong>SDM02-EW-20</strong></td><td>SDM02 Split-Phase SCTA-2×200A/Φ20 Wi-Fi (ESP32-8685)</td></tr><tr><td>3</td><td><strong>SDM02-EW-10U</strong></td><td>SDM02 Split-Phase SCTA-2×100A/Φ12 Wi-Fi(ESP32-8685)</td></tr></tbody></table>

</details>

<details>

<summary><strong>Three-Phase (SPM02-xxEW / SDM01-EWM-*)</strong></summary>

<table><thead><tr><th width="64">#</th><th width="220">Ordering Number</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td><strong>SPM02-D2EW</strong></td><td>SPM02 3PN FLEX/63A Wi-Fi (ESP32-8685)</td></tr><tr><td>2</td><td><strong>SPM02-D1EW</strong></td><td>SPM02 3PN MCBM-DM/63A Wi-Fi (ESP32-8685)</td></tr><tr><td>3</td><td><strong>SPM02-U1EW</strong></td><td>SPM02 3PN MCBM-UM/63A Wi-Fi (ESP32-8685)</td></tr><tr><td>4</td><td><strong>SDM01-EWM-12</strong></td><td>SDM01 SCTA-3×120A/Φ16 Wi-Fi (ESP32-8685) + RS485</td></tr><tr><td>5</td><td><strong>SDM01-EWM-20</strong></td><td>SDM01 SCTA-3×200A/Φ20 Wi-Fi (ESP32-8685) + RS485</td></tr></tbody></table>

</details>

***

### 3. Service Specification

Devices broadcast their presence via mDNS on the local subnet using the following parameters:

<table><thead><tr><th width="220">Parameter</th><th>Value / Format</th></tr></thead><tbody><tr><td><strong>Service Type</strong></td><td><code>_http._tcp.local.</code></td></tr><tr><td><strong>Hostname</strong></td><td><code>EnergySensor-[MODEL]-[VARIANT]-[MAC_UID].local.</code></td></tr><tr><td><strong>Port</strong></td><td><code>80</code> (Web UI / API)</td></tr><tr><td><strong>MAC UID Format</strong></td><td><code>[MAC_ADDRESS_UPPERCASE_NO_SEPARATOR]</code></td></tr></tbody></table>

#### Hostname Field Breakdown

<table><thead><tr><th width="134">Field</th><th width="163">Example</th><th>Description</th></tr></thead><tbody><tr><td><code>MODEL</code></td><td><code>SDM01_3PN</code></td><td>Product model identifier</td></tr><tr><td><code>VARIANT</code></td><td><code>01</code></td><td>Firmware variant code, reflecting differences in HTTP protocol implementation. Includes both Bituo standard versions and customer-customized builds.</td></tr><tr><td><code>MAC_UID</code></td><td><code>45705E597760</code></td><td>Device MAC address, uppercase, no separators</td></tr></tbody></table>

> 💡 **Hostname Example:** `EnergySensor-SDM01_3PN_01-45705E597760.local.`

> ⚠️ **Integration Note:** When filtering discovered devices, match on the `EnergySensor-` prefix, model name, and variant field. The variant identifies the firmware build and HTTP protocol implementation — only connect to variants that have been validated against your integration. Devices with an unrecognized variant should be flagged rather than assumed compatible.

***

### 3. Integration Patterns

mDNS serves as the entry point for various integration protocols. Once the device is discovered, the integration system can establish communication via the following interfaces:

* **Modbus TCP:** Standard port `502` for real-time electrical data polling (ideal for PLCs and industrial gateways).
* **HTTP / REST API:** For system configuration, firmware updates, and status monitoring.
* **WebSocket:** For low-latency, real-time data streaming and event-driven notifications.
* **UDP:** For high-frequency telemetry broadcast in specialized industrial control scenarios.

***

### 4. Typical Use Cases

mDNS discovery is essential for automated energy management systems, particularly when the meter acts as the primary data source for the entire site:

* **Dynamic Load Balancing (DLB):** EV chargers and heat pumps query the meter via mDNS to monitor total household consumption and adjust charging power in real-time to prevent grid overload.
* **Export Limiting:** Solar inverters detect the grid-tie meter via mDNS to monitor real-time import/export power and throttle inverter output to comply with grid feed-in regulations.
* **Energy Gateway Integration:** Local energy gateways discover all meters on the network via mDNS — including main incoming meters, sub-meters, and circuit-level sensors — and automatically map them during commissioning, eliminating the need for manual IP configuration across complex multi-meter sites.

***

### 5. Verification

The simplest way to verify mDNS is working is with a phone app on the same Wi-Fi network.

**Recommended App:** *Service Browser* (Android) — search and install from the Play Store.

**Steps:**

1. Connect your phone to the **same Wi-Fi network** as the meter.
2. Open Service Browser and browse to **World Wide Web HTTP** (`_http._tcp`).
3. Look for a device named `EnergySensor-{Model}_{VariantCode}-{MAC}`.
4. Tap the entry — you should see the resolved **IPv4 address and port 80** (e.g., `192.168.50.135:80`).

If the device appears with a valid IP, mDNS is functioning correctly.

> Other verification methods are also available, including command-line tools (`ping <hostname>.local`, `dns-sd -B _http._tcp` on macOS/Linux) and desktop packet capture tools such as Wireshark (filter: `mdns`). Refer to the Troubleshooting section for details.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bituo-technik.com/device-api/spm-sdm-open-wi-fi-mdns-discovery.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
