
The Shelly Gas (model SHGS-1) is a mains-powered Wi-Fi gas detector available in two variants — CNG (natural gas / methane) and LPG (propane / butane). Both variants use the same API and the same TapHome template. The device plugs directly into a power socket and monitors gas concentration continuously, triggering a sound and light alarm when thresholds are exceeded.
TapHome communicates with the device over HTTP on the local network — no cloud connection is required. The template polls the /status endpoint for alarm state and gas concentration, and provides controls for muting the alarm and running a sensor self-test.
An MQTT variant of this template is also available (Shelly GAS MQTT). Use the MQTT template if the device is configured to communicate via an MQTT broker instead of HTTP.
Configuration
The Shelly Gas connects over Wi-Fi. During TapHome template import, enter the device’s IP address (default placeholder 192.168.0.1).
Both CNG and LPG variants are configured identically — the physical sensor differs, but the API and template are the same.
Device capabilities
Gas alarm monitoring
The template exposes a multi-value switch that reads the current alarm state from the /status response (gas_sensor.alarm_state). The device reports one of the following states:
| State | Meaning |
|---|---|
| No alarm | Normal operation — no gas detected |
| Mild gas leak | Gas concentration >= 1800 ppm |
| Heavy gas leak | Gas concentration >= 3000 ppm |
| Self Test | Sensor self-diagnostic in progress |
| Alarm state is unknown | Unrecognized state (fallback) |
The alarm thresholds are fixed at the device level and cannot be changed via TapHome or the API.
Gas concentration
A sensor device reads the current gas concentration in parts per million (ppm) from the /status response (concentration.ppm). The value updates every 15 seconds. During sensor warm-up after power-on, the reading may be invalid.
Mute active alarm
A push button device sends a GET /mute request to silence the alarm buzzer without clearing the alarm state. The alarm state remains active until the gas concentration drops below the threshold.
Service diagnostics
The template exposes 9 service attributes for device monitoring:
- Device info — hostname, MAC address, device time, uptime, RAM usage
- Connectivity — cloud enabled/connected, MQTT connected, firmware update available
Service actions
Two service actions are available:
- Set Volume — adjusts the alarm buzzer volume (1 = quietest, 11 = loudest) via
/settings?set_volume={value} - Self test — initiates a sensor self-diagnostic (~30 seconds) via
/self_test
Additional capabilities
The Shelly Gas also exposes sensor operational state (normal / warmup / fault), self-test progress, concentration validity flag, WiFi signal strength, and external valve manipulator control (11–13V, 500mA jack output) in its /status response. An unmute endpoint (/unmute) is available to re-enable the alarm buzzer after muting. These capabilities can be added in a future template update.
Troubleshooting
Device not responding
- Verify the Shelly is connected to Wi-Fi and has a valid IP address
- Try using the mDNS hostname (
shellygas-AABBCCDDEE.local) instead of the IP address — the IP may have changed after a DHCP renewal - Open
http://{device-ip}/shellyin a browser — if it responds with device typeSHGS-1, the device is reachable - Check that TapHome CCU and Shelly are on the same network / VLAN
Gas concentration always reads zero
- Confirm the sensor is not in warm-up mode — after power-on, the sensor needs time to stabilize before reporting valid readings
- Check
concentration.is_validin the/statusresponse — iffalse, the sensor is still warming up - Ensure the device is positioned correctly (CNG variant near the ceiling, LPG variant near the floor — gas rises or sinks depending on density)
Alarm not triggering
- The alarm thresholds are fixed: mild >= 1800 ppm, heavy >= 3000 ppm — low concentrations below these levels will not trigger an alarm
- Run a self-test from TapHome (service action) to verify sensor and buzzer functionality
- Check the
gas_sensor.sensor_statefield in/status— if it readsfault, the sensor may need replacement
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.