
The Shelly H&T is a battery-powered (CR123A) Wi-Fi temperature and humidity sensor from the Shelly Gen1 product line. TapHome communicates with the device over MQTT — the recommended protocol for battery-operated Shelly sensors, since the device sleeps between readings and publishes data only on wake-up.
The template creates a single Temperature Sensor device with a Humidity service attribute, tracking both ambient temperature and relative humidity from one Shelly H&T unit.
Configuration
Device ID
The Shelly H&T uses an MQTT Device ID in the format shellyht-<MAC6>, where <MAC6> is the last 6 characters of the MAC address in lowercase hex (e.g., shellyht-112233).
The Device ID can be found:
- On the device label (MAC address)
- In the Shelly web UI: Settings → Device Info
- Via API:
GET http://<device-ip>/settings→mqtt.idfield
Template setup
After importing the template in TapHome:
- Open the Shelly H&T MQTT module
- Set the MQTT Broker IP and Port (default
1883) - Set the
deviceIdcustom variable to the Device ID of your Shelly H&T (e.g.,112233— the last 6 hex characters of the MAC address)
The module subscribes to shellies/# and the listener script filters messages by the configured Device ID.
On Gen1 Shelly devices, enabling MQTT disables Shelly Cloud — the two cannot coexist. Enable MQTT in the Shelly web UI under Internet & Security → Advanced - Developer Settings.
The default sleep period is 60 seconds. For more frequent updates, an optional USB adapter is available — when externally powered, sleep mode is disabled and the sensor reports continuously.
Device capabilities
Temperature and humidity monitoring
The template provides a single Temperature Sensor device that reads ambient temperature from the shellies/shellyht-{deviceId}/sensor/temperature MQTT topic. Values are published as float in degrees Celsius.
A Humidity service attribute reads relative humidity from shellies/shellyht-{deviceId}/sensor/humidity. The MQTT payload is published as 0–100% but the template converts this to a 0–1 range internally (e.g., MQTT value 45.2 is stored as 0.452 in TapHome).
Both readings update whenever the sensor wakes up from sleep mode — by default every 60 seconds, or continuously when USB-powered.
Additional capabilities
The Shelly H&T also publishes battery level (0–100%, CR123A), an online/offline status via MQTT Last Will and Testament, and a device announcement message with model, MAC, IP and firmware version (firmware >=1.6.0). These capabilities can be added in a future template update.
Troubleshooting
Sensor not reporting data
- Verify the Shelly H&T is connected to Wi-Fi and MQTT is enabled in the device settings (Internet & Security → Advanced - Developer Settings)
- Check that the MQTT broker address and port are correct in both the Shelly web UI and TapHome module settings
- Confirm the
deviceIdcustom variable matches the Device ID exactly (last 6 hex chars of MAC, e.g.,112233) - Use an MQTT client (e.g., MQTT Explorer) to subscribe to
shellies/shellyht-#and verify the sensor publishes messages on wake-up
Humidity reading appears wrong
The template divides the MQTT humidity value by 100 — a humidity of 45.2% is stored as 0.452 in TapHome. This is expected behavior, as TapHome uses a 0–1 range for humidity values. The TapHome UI displays the value correctly as a percentage.
Battery draining quickly
- The Shelly H&T is designed for up to 18 months of battery life with the default 60-second sleep period
- Frequent Wi-Fi reconnections (weak signal, channel hopping) increase power consumption significantly
- Ensure strong Wi-Fi signal at the sensor location — the device has approximately 30 m indoor range
Gen1 Shelly devices do not support MQTT over TLS. Communication between the sensor and the MQTT broker is unencrypted (plain MQTT, port 1883). Ensure the MQTT broker is on a trusted local network.