TapHome

Shelly Plug S

Packet Parser → HTTP
Submitted by
Last updated: 03. 2026
Shelly Plug S

The Shelly Plug S is a compact Wi-Fi smart plug with built-in power metering. It plugs directly into a wall outlet and can switch loads up to 10 A (2300 W at 230 V). TapHome communicates with the device over HTTP on the local network — no cloud connection is required.

The template provides on/off relay control, an energy meter that reads real-time power consumption and cumulative energy usage, and internal temperature monitoring.

Configuration

The Shelly Plug S communicates over HTTP on port 80. No special protocol setup is required — enter the device’s IP address as the connection endpoint in TapHome.

This device supports mDNS discovery. You can use the hostname shellyplug-s-{MAC}.local instead of an IP address when configuring TapHome. Replace {MAC} with the last 6 characters of the device’s MAC address (uppercase hex, no colons). Using a hostname prevents connectivity issues when the device’s IP address changes.

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 (e.g., shellyplug-s-AABBCC.local). Use the hostname instead of the IP address for a more reliable connection.

Device capabilities

Relay control

The template exposes the plug relay as a switch device. The relay state is read from /settings/relay/0 (ison field) and controlled via the /relay/0 endpoint with turn=on or turn=off. The poll interval for the switch is 1 second.

The template reads the switch state from /settings/relay/0 (persistent configuration) rather than /status (live state). Both return the same value under normal conditions, but /settings may have slightly stale data after rapid toggling.

Power metering

The built-in energy meter reads two values from the /meter/0 endpoint:

  • Real-time powerpower field reported in watts, converted to kW by the template
  • Total consumptiontotal field reported in watt-minutes, converted to kWh by the template

The meter is read-only and updates every 15 seconds (configurable poll interval).

Temperature monitoring

The Switch device includes a service attribute that reads the internal temperature of the plug from the /status endpoint. This allows monitoring the device temperature directly in TapHome without additional configuration.

Additional capabilities

The Shelly Plug S API also exposes an overtemperature flag (automatic relay shutdown at ~95 °C), LED control, configurable overpower protection threshold (default 2300 W), auto-off timer, WiFi signal strength (RSSI), and a device reboot endpoint. These can be added in a future template update.

Troubleshooting

Device not responding
  1. Verify the Shelly is connected to Wi-Fi and has a valid IP address
  2. Try using the mDNS hostname (shellyplug-s-AABBCCDDEE.local) instead of the IP address — the IP may have changed after a DHCP renewal
  3. Open http://{device-ip}/shelly in a browser — if it responds, the device is reachable
  4. Check that TapHome CCU and Shelly are on the same network / VLAN
Power readings show zero
  1. Confirm the appliance plugged into the Shelly Plug S is turned on
  2. Check that the relay is switched on — the meter only reads when current flows
  3. Poll /meter/0 manually and verify the power field returns a non-zero value
Overtemperature shutdown

The Shelly Plug S has internal thermal protection. If the device temperature exceeds ~95 C, the relay automatically shuts off. Ensure adequate ventilation around the plug, especially when switching high-wattage appliances.

Gen1 Shelly devices support only 2 concurrent HTTP connections. If TapHome and another system (e.g., Home Assistant) poll the same device simultaneously, communication may become unreliable. Use a poll interval of 10-30 seconds to reduce connection contention.

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.1Internet & SecurityWi-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

Shelly Plug S Module
Electric Meter Electricity Meter Read-only

Power consumption and energy metering — instantaneous power (kW) and cumulative energy (kWh)

numeric Unit: kW / kWh

Electric Meter

Read total consumption
# Simple HTTP Request:
VAR response := SENDHTTPREQUEST("/meter/0");
IF response.IsSuccess
 VAR content := response.Content;
 VAR responseHeaders := response.Headers;
 return(PARSEJSON(content,"total")/60000);
ELSE
 ADDERROR(response.StatusCode + " (" + response.ReasonPhrase + ")");
 RETURN(NaN);
END
#
# Set Http request method, body and headers
# VAR response := SENDHTTPREQUEST("/example/getValue", "GET", "some data", "header1:value1", "header2:value2", ...);
# OR
# VAR request := HTTPREQUEST("/example/getValue", "POST", "some data");
# request.headers := { "header1:value1", "header2:value2", ...};
# request.method := "GET";
# request.data := null;
# VAR response := SENDHTTPREQUEST(request);
#
#
# Send TCP, UDP data:
# VAR data1 := BYTECOLLECTION("0a bb ea df 01");
# SENDDATA(data1);
# VAR data2 := "{\"name\":\"John\", \"age\":32}";
# SENDDATA(data2);
# VAR data3 := TOBYTES("{\"name\":\"John\", \"age\":32}", "iso-8859-1");
# SENDDATA(data3);
# Process received TCP or UDP data and set device values in the Listener script
#
#
# Download data from FTP:
# FTPDOWNLOAD("filePath");
Read demand
VAR response := SENDHTTPREQUEST("/meter/0");
IF response.IsSuccess
 VAR content := response.Content;
 VAR responseHeaders := response.Headers;
 RETURN(PARSEJSON(content, "power")/1000);
END;


# Simple HTTP Request:
# VAR response := SENDHTTPREQUEST("/example/getValue");
# IF response.IsSuccess
#  VAR content := response.Content;
#  VAR responseHeaders := response.Headers;
#  RETURN(PARSEXML(content, "//element1/value1"));
# ELSE
#  ADDERROR(response.StatusCode + " (" + response.ReasonPhrase + ")");
#  RETURN(NaN);
# END
#
# Set Http request method, body and headers
# VAR response := SENDHTTPREQUEST("/example/getValue", "GET", "some data", "header1:value1", "header2:value2", ...);
# OR
# VAR request := HTTPREQUEST("/example/getValue", "POST", "some data");
# request.headers := { "header1:value1", "header2:value2", ...};
# request.method := "GET";
# request.data := null;
# VAR response := SENDHTTPREQUEST(request);
#
#
# Send TCP, UDP data:
# VAR data1 := BYTECOLLECTION("0a bb ea df 01");
# SENDDATA(data1);
# VAR data2 := "{\"name\":\"John\", \"age\":32}";
# SENDDATA(data2);
# VAR data3 := TOBYTES("{\"name\":\"John\", \"age\":32}", "iso-8859-1");
# SENDDATA(data3);
# Process received TCP or UDP data and set device values in the Listener script
#
#
# Download data from FTP:
# FTPDOWNLOAD("filePath");
Switch Switch
boolean
Service Attributes
Temperature

Switch

Read switch state
VAR response := SENDHTTPREQUEST("/settings/relay/0");
IF response.IsSuccess
 VAR content := response.Content;
 VAR responseHeaders := response.Headers;
 return(PARSEJSON(content,"ison"));
ELSE
 ADDERROR(response.StatusCode + " (" + response.ReasonPhrase + ")");
 RETURN(NaN);
END
#
# Set Http request method, body and headers
# VAR response := SENDHTTPREQUEST("/example/getValue", "GET", "some data", "header1:value1", "header2:value2", ...);
# OR
# VAR request := HTTPREQUEST("/example/getValue", "POST", "some data");
# request.headers := { "header1:value1", "header2:value2", ...};
# request.method := "GET";
# request.data := null;
# VAR response := SENDHTTPREQUEST(request);
#
#
# Send TCP, UDP data:
# VAR data1 := BYTECOLLECTION("0a bb ea df 01");
# SENDDATA(data1);
# VAR data2 := "{\"name\":\"John\", \"age\":32}";
# SENDDATA(data2);
# VAR data3 := TOBYTES("{\"name\":\"John\", \"age\":32}", "iso-8859-1");
# SENDDATA(data3);
# Process received TCP or UDP data and set device values in the Listener script
#
#
# Download data from FTP:
# FTPDOWNLOAD("filePath");
Write switch state
# Simple HTTP Request:
#VAR response := SENDHTTPREQUEST("/relay/0?turn=toggle");
VAR response := SENDHTTPREQUEST("/relay/0?turn="+ if(St = 1, "on","off"));
IF response.IsSuccess = false
 ADDERROR(response.StatusCode);
END
# Set Http request method, body and headers
# VAR response := SENDHTTPREQUEST("/example/setValue", "GET", "value=" + St, "header1:value1", "header2:value2", ...);\r
# Or VAR request := HTTPREQUEST("/example/setValue");
# request.Method := "PUT";
# VAR response := SENDHTTPREQUEST(request);
#r
#
# Send TCP, UDP data:
# VAR data1 := "{\"name\":\"John\", \"age\":" + St + "}";
# SENDDATA(data1);
# VAR data2 := TOBYTES("{\"name\":\"John\", \"age\":" + St + "}", "iso-8859-1");
# SENDDATA(data2);
# You can process received TCP or UDP data in the Listener script
#
#
# Upload data to FTP:
# FTPUPLOAD("filePath", "somedata=" + St, "write"); # use "append" mode to append data to existing file
Service Attributes
Temperature
VAR response := SENDHTTPREQUEST("/status");
IF response.IsSuccess
 VAR content := response.Content;
 VAR responseHeaders := response.Headers;
 RETURN(PARSEJSON(content, "temperature"));
END;
Connection: Packet Parser → HTTP
Possible improvements (7)
  • Live relay state — Template reads from /settings/relay/0 instead of /status — /status has real-time state
  • Overtemperature flag — Boolean flag in /status, triggers automatic relay shutdown at ~95°C
  • LED control — Enable/disable status LED via settings endpoint
  • Overpower protection threshold — Configurable maximum power limit (default 2300W), could be a service action
  • Auto-off timer — Auto-off timer in seconds, could be added as switch parameter
  • WiFi signal strength — WiFi RSSI in dBm, available in /status response
  • Reboot — Device reboot endpoint, could be added as service action

Sources