---
title: "Moes Smart Switch"
description: "Moes Zigbee smart wall switch (ZTS-EU series) integrated with TapHome via MQTT through a Zigbee2Tasmota gateway. Glass touch panel with on/off control."
url: "https://taphome.com/en/compatibility/zigbee2tasmota-moes-smart-switch/"
language: en
lastmod: 2026-03-29
generator: hugo
ai:
  topics: ["mqtt","zigbee","smart-plug","tasmota","switch","wall-switch"]
  questions: ["How to integrate Moes Zigbee switch with TapHome?","How to control a Moes wall switch from TapHome?","How to pair Moes smart switch with Zigbee2Tasmota?","Can TapHome control Tuya Zigbee wall switches?","What is the difference between Moes and Aqara Zigbee switches?","How to set up a Moes glass touch switch in TapHome?"]
---

# Moes Smart Switch

Communication: Packet Parser → MQTT

- [Moes ZTS-EU — Zigbee2MQTT](https://www.zigbee2mqtt.io/devices/ZTS-EU_1gang.html)
- [Moes ZTS-EU1-W — Blakadder Zigbee Database](https://zigbee.blakadder.com/Moes_ZTS-EU1-W.html)

> Network address
> 
> With the MQTT broker built into TapHome, it is one broker reached from two places. The template runs directly in the TapHome Core, so in TapHome the broker address is `127.0.0.1` (this computer). The device runs elsewhere in the network, so in the device enter the IP address of the TapHome Core and give the Core an IP reservation in the router — if the Core’s address changes, the device can no longer reach the broker.
> 
> [Network Preparation](https://taphome.com/en/docs/setup/network-preparation/)

## Integration guide

> [!IMPORTANT]
> This device communicates via **Zigbee** through a Tasmota gateway. Make sure you have the [Zigbee2Tasmota Gateway](https://taphome.com/en/compatibility/zigbee2tasmota-gateway/) template imported and your device paired before proceeding.

The Moes Smart Switch (ZTS-EU series) is a Zigbee wall-mounted touch switch with a glass panel, designed for EU-style installation. TapHome controls it over MQTT through the Zigbee2Tasmota gateway, providing on/off switching for connected loads.

Moes is part of the Tuya ecosystem — the switch uses a Tuya TS0601 chipset and is available from moeshouse.com and Aliexpress. The ZTS-EU series comes in 1, 2, and 3 gang variants; this template supports the 1-gang model.

As a mains-powered device, the switch acts as a **Zigbee router** — it strengthens the Zigbee mesh network and extends range for nearby battery-powered devices.

## Configuration

### Pairing the switch

1. Ensure the [Zigbee2Tasmota Gateway](https://taphome.com/en/compatibility/zigbee2tasmota-gateway/) is set up and the **Permit Join** switch is ON in TapHome
2. **Hold the touch button for 10+ seconds** (or toggle the physical switch 5 times quickly) until the indicator LED blinks rapidly
3. The switch enters pairing mode — the LED blinks to confirm
4. Note the **Device ID** (e.g., `0x1234`) from the gateway's service attributes

### Template import parameters

The device template requires 4 parameters:

| Parameter | Description | Example |
|-----------|-------------|---------|
| **MQTT Broker IP Address** | IP of your MQTT broker | `192.168.1.10` |
| **MQTT Broker Port** | Broker port (default 1883) | `1883` |
| **Gateway name** | Tasmota MQTT topic (same as gateway template) | `tasmota_XXXXX` |
| **Device ID** | Zigbee short address from pairing | `0x1234` |

After import, a single Switch device appears in TapHome for on/off control.

## Device capabilities

### Switch control

The template creates one Switch device that reads and writes the `Power` field:

- **Read:** The module listens on the `tele/{GWname}/SENSOR` topic for `ZbReceived.{ID}.Power` messages. When you press the physical touch button, the switch publishes its new state.
- **Write:** TapHome sends a `ZbSend` command with `Power: true` (ON) or `Power: false` (OFF) to control the relay remotely.

The switch responds to both physical touches and TapHome commands, and TapHome always reflects the current state — regardless of how the switch was toggled.

### Service attributes

The module exposes diagnostic information via service attributes:

- **IEEE Address** — Zigbee IEEE address (64-bit unique identifier)
- **Model ID** — Zigbee model identifier (typically `TS0601`)
- **Manufacturer** — Zigbee manufacturer string
- **Endpoints** — active Zigbee endpoints
- **Config** — device configuration string

### Additional capabilities

The Moes ZTS-EU also supports indicator light mode control (off, follows switch state, shows position, freeze) and power-on behavior configuration (off, on, previous state). These features are available in Zigbee2MQTT but are not currently mapped in the TapHome template.

## Troubleshooting

### Switch not responding to TapHome commands

1. Verify the Device ID in the template matches the Zigbee short address assigned during pairing
2. Check that the gateway name matches between the gateway template and this device template
3. Test the physical touch button — if it toggles the relay but TapHome does not update, the read path (SENSOR topic) may have an issue
4. Check the Tasmota console for `ZbReceived` messages when toggling the switch

### Switch state out of sync

1. If the switch shows a different state in TapHome than the actual relay position, press the physical button to trigger a state report
2. The template does not actively poll the switch state — it relies on the device reporting changes. If the switch loses connectivity briefly, the state may become stale until the next physical toggle

### Indicator LED behavior

The indicator LED on the switch panel is controlled by the Tuya firmware. By default, it may follow the switch state or stay off. The TapHome template does not control the indicator — use Zigbee2MQTT or the Tuya app to change the indicator mode if needed.

## How to install in TapHome

### Prerequisites

- Zigbee gateway with Tasmota firmware (e.g., Sonoff ZBBridge, eWeLink ZB-GW03)
- MQTT broker running on your local network (TapHome built-in broker or external)
- TapHome CCU on the same network

> [!TIP]
> TapHome has a built-in MQTT broker — enable it in **Settings** → **Hardware** → **MQTT Broker**. No additional software is needed.

### Step 1 — Set Up the Tasmota Zigbee Gateway

1. Flash [Tasmota firmware](https://tasmota.github.io/docs/Getting-Started/) on a supported Zigbee coordinator (e.g., Sonoff ZBBridge, eWeLink ZB-GW03)
2. Connect the gateway to your Wi-Fi network via the Tasmota web UI
3. Navigate to **Configuration** → **Configure MQTT** and set:
   - **Host:** the IP address of the TapHome Core for the built-in broker (with an IP reservation in the router → [Network Preparation](https://taphome.com/en/docs/setup/network-preparation/)), or your broker IP (e.g., `192.168.1.10`)
   - **Port:** `1883`
   - **Topic:** note down the topic name (e.g., `tasmota_XXXXX`) — you will need it during template import

For detailed instructions, see the [Tasmota Zigbee documentation](https://tasmota.github.io/docs/Zigbee/).

### Step 2 — Import the Gateway Template in TapHome

1. Download the gateway template from the [Zigbee2Tasmota Gateway](https://taphome.com/en/compatibility/zigbee2tasmota-gateway/) compatibility page
2. In TapHome, go to **Settings** → **Hardware** → **Packet Parser** → **Import**
3. Import the template with these parameters:
   - **MQTT Broker IP Address:** `127.0.0.1` for the TapHome built-in broker, otherwise your broker IP (e.g., `192.168.1.10`)
   - **MQTT Broker Port:** `1883`
   - **Gateway name:** the Tasmota MQTT topic from Step 1 (e.g., `tasmota_XXXXX`)

After import, you will see two devices: **Permit Join** (switch) and **Devices Found** (counter).

### Step 3 — Pair a Zigbee Device

1. In TapHome, turn on the **Permit Join** switch — this opens a 60-second pairing window
2. On the Zigbee device, start the pairing procedure (typically hold the reset button for 5 seconds until the LED blinks)
3. Watch the **Devices Found** counter — it increments when a new device joins
4. Check the **Service Attributes** of the gateway to see the new device's ID (e.g., `0x1234`), manufacturer, and model
5. The pairing mode deactivates automatically after the timeout

### Step 4 — Import the Device Template

1. Download the device-specific template from the corresponding compatibility page
2. Import the template with these parameters:
   - **MQTT Broker IP Address:** same as the gateway
   - **MQTT Broker Port:** `1883`
   - **Gateway name:** same Tasmota MQTT topic as above
   - **Device ID:** the short address from pairing (e.g., `0x1234`)

## Available devices 1

These devices appear in TapHome after import.

Moes Smart Switch Module

Service Attributes

|              |                                                   |
|--------------|---------------------------------------------------|
| IEEE Address | Zigbee IEEE address (64-bit unique identifier)    |
| Model ID     | Zigbee model identifier reported by the device    |
| Manufacturer | Zigbee manufacturer string reported by the device |
| Endpoints    | Active Zigbee endpoints on the device             |
| Config       | Zigbee device configuration string                |

Custom Variables

`GWname` (string) Tasmota MQTT topic name of the Zigbee gateway (found in Configuration → MQTT → Topic) 

`ID` (string) Zigbee short address of the Moes Smart Switch (assigned during pairing)

After pairing the device via Permit Join, find the device short address in the gateway's Devices Found service attribute or via Tasmota console command ZbStatus

Listener

```taphome
if INDEXOF(RECEIVEDMSG.Topic, "SENSOR") > 0
	var ZbReceived := PARSEJSON(TOSTRING(RECEIVEDMSG.Payload), "ZbReceived." + ID, true);
    var val := PARSEJSON(ZbReceived, ".LinkQuality", true);
    if(!ISNULL(val), LinkQuality := val);
    
    var deviceInfo := PARSEJSON(TOSTRING(RECEIVEDMSG.Payload), "ZbInfo." + ID, true);
    if !ISNULL(deviceInfo)
        COMPLETESERVICEATTRIBUTE("IEEEAddr", PARSEJSON(deviceInfo, "IEEEAddr"));
        COMPLETESERVICEATTRIBUTE("ModelId", PARSEJSON(deviceInfo, "ModelId"));
        COMPLETESERVICEATTRIBUTE("Manufacturer", PARSEJSON(deviceInfo, "Manufacturer"));
        COMPLETESERVICEATTRIBUTE("Endpoints", PARSEJSON(deviceInfo, "Endpoints"));
        COMPLETESERVICEATTRIBUTE("Config", PARSEJSON(deviceInfo, "Config"));
    end
end
```

Service Attributes

IEEEAddr

```taphome
MQTTPUBLISH("cmnd/" + GWname+ "/ZbInfo", ID)
```

ModelId

```

```

Manufacturer

```

```

Endpoints

```

```

Config

```

```

Switch Switch Read and write

On/off relay controlled via ZbSend Power command

boolean

Values / States: ON · OFF

Write switch state

```taphome
MQTTPUBLISH("cmnd/" + GWname+ "/ZbSend", 
    "{\"device\":\" " + ID + 
    "\",\"send\":{\"Power\":" + St + "}}")
```

Listener

```taphome
VAR json := tostring(RECEIVEDMSG.Payload);
VAR topic := RECEIVEDMSG.Topic;

if INDEXOF(topic, "SENSOR") > 0
    var val := PARSEJSON(json, "ZbReceived." + ID + ".Power", true);
    if(!ISNULL(val), St := val);
end
```

**Connection:** Packet Parser → MQTT

Possible improvements (2)

- Indicator Light — Controls LED indicator mode: off, switch (follows switch state), position (shows position), freeze
- Power On Behavior — Controls state after power outage: off, on, previous

## Import parameters

Enter these values when you import the XML.

| Asked in the app                                            | Default         |
|-------------------------------------------------------------|-----------------|
| Mqtt Broker IP address                                      | `192.168.0.1`   |
| Mqtt Broker port                                            | `1883`          |
| Gateway name (Tasmota-&gt;Configuration-&gt;MQTT-&gt;Topic) | `tasmota_XXXXX` |
| Device ID                                                   | `0xFFFF`        |

## Sources

- Tasmota Zigbee Documentation
  
  [tasmota.github.io](https://tasmota.github.io/docs/Zigbee/)
- Zigbee Compatible Devices Database
- Moes ZTS-EU1-W — Blakadder Zigbee Database
  
  [zigbee.blakadder.com](https://zigbee.blakadder.com/Moes_ZTS-EU1-W.html) 2026-03-29
- Moes ZTS-EU\_1gang — Zigbee2MQTT Device Page
  
  [www.zigbee2mqtt.io](https://www.zigbee2mqtt.io/devices/ZTS-EU_1gang.html) 2026-03-29

## Related Documentation

- [MQTT Integration](https://taphome.com/en/compatibility/mqtt-guide/)
- [Packet Parser (HTTP, TCP, UDP, FTP, MQTT)](https://taphome.com/en/docs/integration/packet-parser/)
- [Packet parser functions](https://taphome.com/en/docs/script/packet-parser/)
- [Parsing functions](https://taphome.com/en/docs/script/parsing-functions/)
- [MQTT Broker](https://taphome.com/en/docs/integration/packet-parser/mqtt-broker/)
- [Listener scripts](https://taphome.com/en/docs/script/listener-scripts/)

