Created At
Dec 24, 2024
Created By Neo Andresson
Shelly Plus H&T Tempreature and Humidity sensor - UPDATE v1.0.1
Created At
Dec 24, 2024
Last Update
Oct 16, 2025
Platforms
HC 3 Lite, HC 3
Views
1596
Download
36
Update:
V1.0.1
Bug fixes
Extended manual
Added manual link to Fibaro UI
Added autoreconnect attempts on network loss
This QuickApp connects your Shelly Plus H&T (Gen2) to Fibaro HC3 over MQTT. It:
Subscribes to the Shelly’s status topics via your Mosquitto broker.
Updates two child devices in Fibaro:
Temperature (°C)
Humidity (%)
Shows a live status table (Wi-Fi RSSI, Cloud/WS status, Battery, Online, etc.).
Shows the latest received value in a label called Last message.
Automatically reconnects to the broker after errors/outages.
Battery devices (like Plus H&T) sleep. You may see “N/A” until the device next wakes and publishes.
Broker (Mosquitto) is the hub. Devices publish messages to topics; clients subscribe to topics.
This QuickApp subscribes to all topics under your device’s prefix:
MAIN_TOPIC/#
When the device publishes a new value (e.g., temperature), the QuickApp receives it and updates the UI & child devices.
Shelly Plus H&T (Gen2) connected to your local Wi-Fi.
A Mosquitto MQTT broker running on your network (e.g., on a mini-PC, NAS, or Home Server).
Fibaro HC3 with this QuickApp installed.
Windows: Install via installer; run as service.
Linux (Debian/Ubuntu):
sudo apt update
sudo apt install mosquitto mosquitto-clients
sudo systemctl enable --now mosquitto
# Linux example
sudo mosquitto_passwd -c /etc/mosquitto/passwd minipc
# Enter password (match QuickApp variable BROKER_PASSWORD)
Add to /etc/mosquitto/mosquitto.conf (Linux) or the Mosquitto config on Windows:
listener 1883
allow_anonymous false
password_file /etc/mosquitto/passwd
persistence true
Restart Mosquitto after changes.
# Subscribe
mosquitto_sub -h 192.168.100.36 -p 1883 -u <your brokername>-P <your broker password> -t "#" -v
If you see messages when the Shelly publishes, you’re good.
Tip: Keep the broker on your LAN so your system keeps working even if the internet goes down.
Open your Shelly’s web interface (http://device-ip).
MQTT → Enable.
Server: 192.168.100.36:1883 (replace with your Mosquitto IP:port).
User/Password: <broker username> / <broker password> (from your broker).
Client ID: any stable string (Shelly default is fine).
Status reporting: Ensure MQTT status is enabled (Shelly Gen2 exposes /status/... topics).
Save & reboot the device if prompted.
The device publishes under a base topic (your MAIN_TOPIC). Use the one you configured on the device or in the QuickApp.
Import the QuickApp into HC3.
Start it once so variables appear.
Fill in the QuickApp variables (see next section).
Restart the QuickApp.
MAIN_TOPIC: Base topic for your Shelly device.
Example (yours): ShellyPlusHT_Office
The QuickApp subscribes to ShellyPlusHT_Office/#.
USERTONOTIF: (Optional) Fibaro user ID(s) for push alerts.
Put a single ID (e.g., 2711) or a list like "2711" (the app parses digits).
BROKER_IP: IP and port of your Mosquitto broker.
Example: 192.168.100.36:1883
CLIENT_ID: Client ID Fibaro uses to connect to Mosquitto.
Example: SHELLY SENSOR (keep it stable).
BROKER_USERNAME: Your Mosquitto username.
Example: <your broker name>
BROKER_PASSWORD: Your Mosquitto password.
Example: <your broker password>
After editing variables, restart the QuickApp.
Two child devices:
ShellyTH_Temp (temperature sensor)
ShellyTH_Hum (humidity sensor)
A status table with:
Temperature, Humidity, Battery %, Wi-Fi RSSI (dBm),
Cloud connection, WebSocket (WS) connection,
Online/Offline flag, Updates availability, MQTT status.
A Last message label, e.g.:
Last message: 2025.03.01 14:27 temperature: 25.6 °C
Fields start as N/A and update the first time a value arrives after startup or reconnection.
MAIN_TOPIC/online → Online (“Online/Offline”)
MAIN_TOPIC/status/temperature:0 (JSON { tC = ... }) → Temperature (°C)
MAIN_TOPIC/status/humidity:0 (JSON { rh = ... }) → Humidity (%)
MAIN_TOPIC/status/devicepower:0 (JSON { battery = { percent = ... }}) → Battery (%)
MAIN_TOPIC/status/wifi (JSON { rssi = ... }) → WIFI (dBm)
MAIN_TOPIC/status/cloud (JSON { connected = true/false }) → Cloud
MAIN_TOPIC/status/ws (JSON { connected = true/false }) → WS
MAIN_TOPIC/status/sys (JSON contains available_updates) → Updates
If the broker/Wi-Fi drops, the QuickApp logs an error, marks MQTT: Disconnected, and auto-retries with exponential backoff (5s → 10s → … capped).
On success it resets the backoff, re-subscribes to all topics, and continues updating.
Missed messages while offline are not backfilled unless your broker queues them (persistent session). In practice, values refresh the next time the device publishes.
Keep Mosquitto on the LAN; use authentication.
Assign static DHCP leases to HC3, Mosquitto host, and Shelly.
Use a stable Client ID in both Shelly (optional) and QuickApp (required for persistent sessions).
If you need immediate state after HC3 restarts, you can shorten the Shelly’s reporting interval. (Battery impact!)
No values / still N/A
Check Mosquitto logs: did Fibaro connect?
Confirm topics exist with mosquitto_sub -t 'ShellyPlusHT_Office/#' -v.
Battery device may be sleeping—wait for its next publish (or wake it by pressing its button if available).
“Authorization error”
Username/password mismatch between QuickApp and Mosquitto. Update BROKER_USERNAME / BROKER_PASSWORD.
Disconnect/reconnect loop
Wrong broker IP/port or firewall blocking port 1883.
Wi-Fi signal too weak; check the WIFI (rssi) value when it appears.
Push notifications not arriving
Ensure USERTONOTIF contains a valid Fibaro user ID and that push is enabled for that user.
Q: Why does temperature/humidity sometimes update only every few minutes?
A: The Shelly Plus H&T sleeps to save battery and only publishes on wake or certain events.

co jest nie tak? jakie mają być dane, nie działa MAIN_TOPIC Zmienna tekstowa ShellyPlusHT_Office USERTONOTIF Zmienna tekstowa e4b3232fb7e4 BROKER_IP Zmienna tekstowa 192.168.1.155:1883 CLIENT_ID Zmienna tekstowa SHELLY SENSOR

Hello, I dont know the gen 3 version, but I assume it will be compatible.

Hallo, ist die Quick app auch mit dem shelly h&t gen 3 kompatibel? Hello, is the Quick app also compatible with the Shelly H&T Gen 3?
Marek, hello Write in english You must set the topic name in your device settings. Manually. MAIN_TOPIC must be set in your devcie to ShellyPlusHT_Office, or whatever u use.