TapHome
Community Beta Sensors

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

Shelly 1 Gen3 Wi-Fi relay as a garage door controller in TapHome over local HTTP (Gen2+ RPC API). A reed contact on the SW input shows the door as open or closed, and the potential-free relay on I and O gives the opener a short pulse only when the door is not already in the requested state. Also a plain relay switch, the SW input state and Wi-Fi diagnostics.

ShellyPacket Parser → HTTP3 devicesRevision 1.0 Last updated: November 10, 2026

Submitted by Lukáš Štěpán

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

Import into the TapHome appHardware › Packet Parser › Add from template

Download Template
On this page

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

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.

Relay and Garage door control the same relay. Use one of them and hide or delete the other.

Hardware connection

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.

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.

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.

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).

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:

SettingWhere in the Shelly web interfaceValueWhy
Password protectionSettings → Device settings → AuthenticationOffTapHome does not support HTTP Digest authentication. With a password every device shows the error “Shelly asks for a password (HTTP 401)”.
Input typeInput/output settings → input modeSwitchThe 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 modeInput/output settings → output typeDetached SwitchIn 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 addressSettings → Wi-Fi (static IP) or a DHCP reservation in the router—The template addresses the Shelly by its IP address; it must not change.

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

VariableDefaultMeaning
Invert00: 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.
PulseSeconds1Length 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 (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

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:

1
shelly<model>-<MAC>.local

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

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

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)

Shelly 1 Gen3

Read (module)
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
PARSEJSON(WiFiStatus, "ssid", true)
${ipAddress}
PARSEJSON(WiFiStatus, "sta_ip", true)
${xml_signal_strength} [dB]
PARSEJSON(WiFiStatus, "rssi", true)
MAC
PARSEJSON(SysStatus, "mac", true)
${temperature} [°C]
PARSEJSON(SwitchStatus, "temperature.tC", true)
Service Actions
${xml_update_fw}
VAR r := SENDHTTPREQUEST("/rpc/Shelly.Update?stage=\"stable\"");
IF r.IsSuccess
    RETURN("OK");
ELSE
    RETURN("Error " + TOSTRING(r.StatusCode));
END
Reboot
VAR r := SENDHTTPREQUEST("/rpc/Shelly.Reboot");
IF r.IsSuccess
    RETURN("OK");
ELSE
    RETURN("Error " + TOSTRING(r.StatusCode));
END
Relay Switch
Values / States: ON · OFF

Relay

Read switch state
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
SENDHTTPREQUEST("/rpc/Switch.Set?id=0&on=" + IF(St, "true", "false"));
SW input Reed Contact

SW input

Read
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

Garage door

Read switch state
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
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)
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 appDefault
IP address192.168.0.1

Found a problem with this device template?

Tell us what's wrong, what's missing, or how the template should behave. We rely on your feedback to keep the catalog accurate.

Template · TapHome portal Shelly 1 Gen3 Garage Door (Relay, Reed Contact on SW) Open this template in the Customer Portal to apply it to one of your homes, or to draft a refinement and submit it back to the catalog. Packet Parser → HTTP View in TapHome portal