---
title: "Shelly 1 Gen3 Garage Door (Relay, Reed Contact on SW)"
description: "Shelly 1 Gen3 over local HTTP as a garage door controller: open/closed from a reed contact on SW, opener pulse from the relay. Password off, mode Detached."
url: "https://taphome.com/en/compatibility/shelly-1-gen3-http/"
language: en
lastmod: 2026-11-10
generator: hugo
ai:
  topics: ["http","wifi","garage-door","relay","reed-contact","door-sensor","i/o-module","sensor"]
  questions: ["How to integrate a Shelly 1 Gen3 garage door controller with TapHome?","What does the Shelly 1 Gen3 garage door TapHome template control and read?","How to connect a garage door opener and a reed contact to Shelly 1 Gen3?","Is the SW input of Shelly 1 Gen3 potential-free?","Which Shelly settings are needed for TapHome: password, input mode and Detached mode?","Why does the garage door show Open while the door is closed in TapHome?","How to change the relay pulse length for the garage door opener?","Why does TapHome show \"Shelly asks for a password (HTTP 401)\"?"]
---

# Shelly 1 Gen3 Garage Door (Relay, Reed Contact on SW)

Communication: Packet Parser → HTTP

> Network address
> 
> TapHome reaches this device at the address entered on import. Give the device a fixed address — an IP reservation in the router, or its mDNS name if it supports one — otherwise the integration stops working when the router changes the address.
> 
> [Network Preparation](https://taphome.com/en/docs/setup/network-preparation/)

## Integration guide

The Shelly 1 Gen3 (model S3SW-001X16EU) is a compact one-channel Wi-Fi relay with a potential-free relay contact (terminals **I** and **O**) and one switch input (**SW**). It runs from 110–240 V~, 24–48 V⎓ or a stabilised 12 V⎓ supply and fits into a standard wall box. TapHome reads and controls it over HTTP on the local network with the Shelly Gen2+ RPC API (components `switch:0` and `input:0`), without the Shelly cloud.

This community template is made for a garage door: a reed contact on SW reports whether the door is open or closed, and the relay gives the push-button input of the door opener a short pulse. It provides three devices:

- **Relay** — the relay as an ordinary on/off switch.
- **SW input** — the state of the SW input (on = the contact on SW is closed).
- **Garage door** — the door state from the reed contact; a tap sends one relay pulse to the opener, but only when the door is not already in the requested state.

> [!NOTE]
> Relay and Garage door control the same relay. Use one of them and hide or delete the other.

## Hardware connection

> [!WARNING]
> Installation must be performed by a certified electrician. Switch off the circuit breaker and check with a suitable tester that there is no voltage on the terminals before connecting or changing any wires. Shelly requires a circuit breaker with B or C characteristic, max. 16 A.

### Wiring diagrams

Shelly gives one wiring diagram for each supply. In all three the load is connected through the potential-free relay terminals **O** and **I**, and the switch is connected between **SW** and the supply line.

110–240 V~ supply: L and N powered, the switch between SW and L.

![Shelly 1 Gen3 wiring diagram for 110-240 V AC supply: L and N terminals powered, switch between SW and L, load wired through potential-free O and I terminals.](https://taphome.com/images/compatibility/shelly-1-gen3-http/wiring-ac_hu_d66b4612c062a05b.jpg)

24–48 V⎓ supply: plus to N, GND to L, the switch between SW and GND.

![Shelly 1 Gen3 wiring diagram for 24-48 V DC supply: plus to N, GND to L, switch between SW and GND, load wired through potential-free O and I terminals.](https://taphome.com/images/compatibility/shelly-1-gen3-http/wiring-dc-24-48v_hu_9d7ec3968564d1b0.jpg)

Stabilised 12 V⎓ supply: plus to the 12V terminal, GND to L, the switch between SW and GND.

![Shelly 1 Gen3 wiring diagram for stabilised 12 V DC supply: plus to 12V terminal, GND to L, switch between SW and GND, load wired through O and I terminals.](https://taphome.com/images/compatibility/shelly-1-gen3-http/wiring-dc-12v_hu_bb0aaf79a96be915.jpg)

### Garage door opener on I and O

Connect the push-button terminals of the garage door opener to the relay terminals **I** and **O** — in the diagrams, in place of the lamp. The relay contact is potential-free, so it switches the opener input like a push button, independently of the Shelly supply. The contact is rated for max. 240 V~ / 16 A and max. 30 V⎓ / 10 A.

### Reed contact on SW

Connect the reed contact to the **SW** input in the same place as the switch in the wiring diagram for your supply. The template expects a normally open reed contact with the magnet at the closed door (contact closed = door closed); a different arrangement is handled by the `Invert` variable (see Configuration).

> [!WARNING]
> SW is **not** a potential-free input. In the Shelly wiring diagrams the switch on SW is connected to the supply: with the 110–240 V~ supply the reed contact and its cable switch **mains voltage** (SW to L). Use a contact and cable rated for mains voltage, or power the Shelly from 12 V⎓ or 24–48 V⎓, where the contact switches SW to GND. Always follow the wiring diagram in the Shelly user guide.

Screw terminals take conductors from 0.2 to 2.5 mm² (solid, stranded or with bootlace ferrules), stripped 6–7 mm. The Shelly is for indoor use only, at –20 °C to 40 °C.

## Configuration

### Connecting the Shelly to Wi-Fi

The Shelly 1 Gen3 has a built-in web interface. After the first power-up it opens its own access point `Shelly1G3-XXXXXXXXXXXX`:

1. Connect a phone or computer to the `Shelly1G3-XXXXXXXXXXXX` Wi-Fi network (open by default).
2. Open `http://192.168.33.1/` in a browser.
3. Go to **Settings → Wi-Fi**, select or enter your Wi-Fi network and its password, and save. The Shelly works in the 2.4 GHz band, so use a 2.4 GHz network.
4. Find the IP address the Shelly received in your router and open the web interface at `http://<IP address>/`.

The access point is an open network by default. Once the Shelly is on your Wi-Fi, it can be switched off under **Settings → Access point and Range Extender**.

The Shelly can also be added to your Wi-Fi with the Shelly Smart Control app. TapHome does not need the Shelly cloud.

### Shelly settings for TapHome

Set these in the Shelly web interface (`http://<IP address>/`) before importing the template:

| Setting | Where in the Shelly web interface | Value | Why |
|---|---|---|---|
| Password protection | **Settings → Device settings → Authentication** | Off | TapHome does not support HTTP Digest authentication. With a password every device shows the error "Shelly asks for a password (HTTP 401)". |
| Input type | **Input/output settings → input mode** | **Switch** | The reed contact has a state; with the type Button the Shelly reports no state and SW input and Garage door show an error. |
| Input/Output mode | **Input/output settings → output type** | **Detached Switch** | In the other modes the reed contact switches the relay by itself every time the door moves. Garage door shows a warning until the mode is Detached. |
| Fixed IP address | **Settings → Wi-Fi** (static IP) or a DHCP reservation in the router | — | The template addresses the Shelly by its IP address; it must not change. |

> [!TIP]
> Leave the Shelly's own **Invert** input option off and use the template variable `Invert` instead. The Shelly option inverts the input state that TapHome reads, so it would flip SW input and Garage door together.

### Importing the template

In TapHome, import the template and enter the fixed IP address of the Shelly as the IP address parameter (the default `192.168.0.1` is only a placeholder).

### Garage door variables

| Variable | Default | Meaning |
|---|---|---|
| `Invert` | `0` | `0`: contact closed = door **Closed** (normally open reed contact with the magnet at the closed door). Set `1` when the contact is open with the door closed. |
| `PulseSeconds` | `1` | Length of the relay pulse in seconds. The Shelly switches the relay back by itself (`toggle_after`). |

## Device capabilities

### Garage door

The door state comes from the SW input (`Input.GetStatus?id=0`), polled every 2.5 s, and is shown as **Open** or **Closed**. A tap on Open or Closed reads the input first and sends `Switch.Set?id=0&on=true&toggle_after=<PulseSeconds>` only when the door is not already in that state. A second tap on the same state, or a tap after the door was moved by the remote control, sends nothing. If the Shelly does not answer the input read, no pulse is sent either.

After a restart of the control unit, Garage door reads its state from the Shelly and sends nothing (`StartupValueSource` = read from device). Without this, a door moved during the restart would be moved back.

The device also reads the Shelly switch settings (`Switch.GetConfig?id=0`) and shows a warning while the input mode is not Detached.

One input gives only two states. "Opening" and "closing" cannot be shown: the door shows Open as soon as it leaves the closed position.

### Relay

The relay as an on/off switch: the state is read from `Switch.GetStatus?id=0` (`output`) every 2.5 s and switched by `Switch.Set?id=0&on=true` or `on=false`. After a restart of the control unit the Relay also reads its state from the Shelly instead of sending one.

### SW input

The state of `input:0` from `Input.GetStatus?id=0`, polled every 2.5 s — on when the contact on SW is closed. Before each read the template checks the input type (`Input.GetConfig?id=0`) and shows an error when it is not Switch.

### Module diagnostics and service actions

The module is polled every 15 s (`Sys.GetStatus`, `WiFi.GetStatus`, `Switch.GetStatus`) and shows these service attributes:

- **Wi-Fi** — name of the connected network
- **IP address** — current IP address of the Shelly
- **Signal strength** — Wi-Fi signal strength (RSSI)
- **MAC** — MAC address
- **Temperature** — internal temperature of the Shelly in °C

It shows a warning when a new stable firmware is available and when the Shelly needs a restart. Two service actions are available: **firmware update** to the stable version (`Shelly.Update`) and **reboot** (`Shelly.Reboot`).

The Shelly 1 Gen3 has no power meter.

## Troubleshooting

### "Shelly asks for a password (HTTP 401)" on all devices

Password protection is on in the Shelly. Turn it off under **Settings → Device settings → Authentication** in the Shelly web interface.

### Devices do not respond, or "Shelly answered HTTP …"

1. Check that the IP address in TapHome is the current IP address of the Shelly and that the Shelly is on the network.
2. Check that the Shelly has a fixed IP address (static IP or DHCP reservation), so the address does not change after a restart of the router.
3. Open `http://<IP address>/rpc/Sys.GetStatus` in a browser on the same network — if the Shelly answers with JSON, it is reachable.

### "SW input is not of type switch in Shelly" or "SW input has no state"

The input mode is Button (or another type). Set the input mode to **Switch** in the Shelly input/output settings.

### Warning "Shelly input mode is not Detached" on Garage door

The reed contact switches the relay by itself. Set the output type to **Detached Switch** in the Shelly input/output settings.

### Garage door shows Open while the door is closed

The reed contact is open with the door closed. Set the variable `Invert` to `1`.

### The opener does not react to the pulse

The pulse is too short for the opener. Increase `PulseSeconds`. Also check that the opener push-button terminals are connected to I and O.

### A tap on Garage door does nothing

The template sends a pulse only when the door is not already in the requested state according to the reed contact. Check the SW input device: if it does not change when the door moves, check the reed contact wiring and the position of the magnet.

### Warnings "New firmware update is available" or "Restart required"

Use the service action **firmware update** or **reboot** on the module.

## How to install in TapHome

### Prerequisites

- Shelly device installed and powered on
- Local Wi-Fi network (2.4 GHz)
- TapHome CCU on the same network

### Step 1 — Connect Shelly to Wi-Fi

**Option A — Shelly app (recommended):**

1. Download the [Shelly app](https://www.shelly.com/en/support/shelly-app) (iOS / Android)
2. Tap **+** → **Add Device** and follow the Bluetooth pairing wizard
3. Enter your Wi-Fi credentials when prompted

**Option B — AP mode (no app):**

1. On first power-up the device creates a hotspot: `ShellyXXX-AABBCCDDEE`
2. Connect your phone/PC to that hotspot
3. Open `http://192.168.33.1` → **Internet & Security** → **Wi-Fi Mode - Client**
4. Enter SSID and password → **Save**

> [!NOTE]
> Shelly only supports **2.4 GHz** networks. 5 GHz networks will not appear in the scan.

### Step 2 — Find the device address

Shelly Gen1 devices support **mDNS** (Zeroconf). You can reach the device using a hostname instead of an IP address:

```
shelly<model>-<MAC>.local
```

For example: `shelly1pm-AABBCCDDEE.local` (MAC address in uppercase hex, no colons).

> [!TIP]
> **Recommended: use the TapHome IP Scanner.** Open the TapHome app and use the **IP Scanner** (Settings → Network → Scan). The scanner will discover devices on your network and show both the IP address and the mDNS hostname. Use the **hostname** instead of the IP address for a more reliable connection — it stays the same even if the device's IP changes after a router reboot.

**Alternative methods** to find the IP address:

- **Shelly app:** Device detail → **Device info** → IP address
- **Shelly web UI:** Connect to the device AP before Wi-Fi setup — the IP is shown after saving
- **Router DHCP table:** Look for a hostname like `shelly1pm-AABBCCDDEE`

### Step 3 — Configure in TapHome

1. In TapHome, add a new **Packet Parser (HTTP)** module
2. **Address:** enter the mDNS hostname (e.g., `shelly1pm-AABBCCDDEE.local`) or IP address from Step 2
3. **Port:** `80` (default, no change needed)
4. Import the template — TapHome will poll `/status` to read device state

> [!NOTE]
> HTTP authentication is disabled by default on Shelly devices. If you have enabled login protection, TapHome does not support HTTP Basic Auth at this time — keep auth disabled for TapHome integration.

## Available devices 3

These devices appear in TapHome after import.

Shelly 1 Gen3 Module

Service Attributes

|                                |
|--------------------------------|
| Wi-Fi                          |
| ${ipAddress}                   |
| ${xml\_signal\_strength} \[dB] |
| MAC                            |
| ${temperature} \[°C]           |

Service Actions

|                    |
|--------------------|
| ${xml\_update\_fw} |
| Reboot             |

Custom Variables

|                         |
|-------------------------|
| `SysStatus` (string)    |
| `WiFiStatus` (string)   |
| `SwitchStatus` (string) |

Read (module)

```taphome
VAR r := SENDHTTPREQUEST("/rpc/Sys.GetStatus");
IF r.IsSuccess
    SysStatus := r.Content;
ELSE
    IF r.StatusCode = 401
        ADDERROR(401, "Shelly asks for a password (HTTP 401). Turn off password protection in the Shelly web interface, TapHome does not support HTTP Digest.");
    ELSE
        ADDERROR(1, "Shelly answered HTTP " + TOSTRING(r.StatusCode));
    END
    RETURN(0);
END
r := SENDHTTPREQUEST("/rpc/WiFi.GetStatus");
IF r.IsSuccess
    WiFiStatus := r.Content;
END
r := SENDHTTPREQUEST("/rpc/Switch.GetStatus?id=0");
IF r.IsSuccess
    SwitchStatus := r.Content;
END
IF ! ISNULL(PARSEJSON(SysStatus, "available_updates.stable", true))
    ADDWARNING(2, "New firmware update is available");
END
IF PARSEJSON(SysStatus, "restart_required", true)
    ADDWARNING(3, "Restart required");
END
```

Service Attributes

Wi-Fi

```taphome
PARSEJSON(WiFiStatus, "ssid", true)
```

${ipAddress}

```taphome
PARSEJSON(WiFiStatus, "sta_ip", true)
```

${xml\_signal\_strength} \[dB]

```taphome
PARSEJSON(WiFiStatus, "rssi", true)
```

MAC

```taphome
PARSEJSON(SysStatus, "mac", true)
```

${temperature} \[°C]

```taphome
PARSEJSON(SwitchStatus, "temperature.tC", true)
```

Service Actions

${xml\_update\_fw}

```taphome
VAR r := SENDHTTPREQUEST("/rpc/Shelly.Update?stage=\"stable\"");
IF r.IsSuccess
    RETURN("OK");
ELSE
    RETURN("Error " + TOSTRING(r.StatusCode));
END
```

Reboot

```taphome
VAR r := SENDHTTPREQUEST("/rpc/Shelly.Reboot");
IF r.IsSuccess
    RETURN("OK");
ELSE
    RETURN("Error " + TOSTRING(r.StatusCode));
END
```

Relay Switch

Values / States: ON · OFF

Read switch state

```taphome
VAR r := SENDHTTPREQUEST("/rpc/Switch.GetStatus?id=0");
IF r.IsSuccess
    RETURN(PARSEJSON(r.Content, "$.output"));
END
IF r.StatusCode = 401
    ADDERROR(401, "Shelly asks for a password (HTTP 401). Turn off password protection in the Shelly web interface, TapHome does not support HTTP Digest.");
ELSE
    ADDERROR(1, "Shelly answered HTTP " + TOSTRING(r.StatusCode));
END
RETURN(NaN);
```

Write switch state

```taphome
SENDHTTPREQUEST("/rpc/Switch.Set?id=0&on=" + IF(St, "true", "false"));
```

SW input Reed Contact

Read

```taphome
VAR r := SENDHTTPREQUEST("/rpc/Input.GetConfig?id=0");
IF r.IsSuccess
    IF PARSEJSON(r.Content, "$.type", true) != "switch"
        ADDERROR(2, "SW input is not of type switch in Shelly (Input settings: Input mode = Switch)");
        RETURN(NaN);
    END
ELSE
    IF r.StatusCode = 401
        ADDERROR(401, "Shelly asks for a password (HTTP 401). Turn off password protection in the Shelly web interface, TapHome does not support HTTP Digest.");
    ELSE
        ADDERROR(1, "Shelly answered HTTP " + TOSTRING(r.StatusCode));
    END
    RETURN(NaN);
END
r := SENDHTTPREQUEST("/rpc/Input.GetStatus?id=0");
IF r.IsSuccess
    RETURN(PARSEJSON(r.Content, "$.state"));
END
IF r.StatusCode = 401
    ADDERROR(401, "Shelly asks for a password (HTTP 401). Turn off password protection in the Shelly web interface, TapHome does not support HTTP Digest.");
ELSE
    ADDERROR(1, "Shelly answered HTTP " + TOSTRING(r.StatusCode));
END
RETURN(NaN);
```

Garage door Switch

Values / States: Open · Closed

Variable: `Invert`, Variable: `PulseSeconds`

Read switch state

```taphome
VAR r := SENDHTTPREQUEST("/rpc/Input.GetStatus?id=0");
IF r.IsSuccess = false
    IF r.StatusCode = 401
        ADDERROR(401, "Shelly asks for a password (HTTP 401). Turn off password protection in the Shelly web interface, TapHome does not support HTTP Digest.");
    ELSE
        ADDERROR(1, "Shelly answered HTTP " + TOSTRING(r.StatusCode));
    END
    RETURN(NaN);
END
VAR s := PARSEJSON(r.Content, "$.state", true);
IF ISNULL(s)
    ADDERROR(2, "SW input has no state - set it to type switch in Shelly");
    RETURN(NaN);
END
IF Invert = 1
    RETURN(s);
END
RETURN(! s);
```

Write switch state

```taphome
VAR r := SENDHTTPREQUEST("/rpc/Input.GetStatus?id=0");
IF r.IsSuccess = false
    RETURN(0);
END
VAR open := IF(PARSEJSON(r.Content, "$.state", true), 0, 1);
IF Invert = 1
    open := 1 - open;
END
IF IF(St, 1, 0) != open
    SENDHTTPREQUEST("/rpc/Switch.Set?id=0&on=true&toggle_after=" + TOSTRING(PulseSeconds));
END
```

Read (module)

```taphome
VAR r := SENDHTTPREQUEST("/rpc/Switch.GetConfig?id=0");
IF r.IsSuccess
    IF PARSEJSON(r.Content, "$.in_mode", true) != "detached"
        ADDWARNING(3, "Shelly input mode is not Detached - the reed contact on SW switches the relay by itself. Set Input/Output settings to Detached.");
    END
END
```

**Connection:** Packet Parser → HTTP

## Import parameters

Enter these values when you import the XML.

| Asked in the app | Default       |
|------------------|---------------|
| IP address       | `192.168.0.1` |

## Related Documentation

- [Packet Parser Integration](https://taphome.com/en/compatibility/packet-parser-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/)

