Created At

Dec 24, 2024

Last Update

Oct 16, 2025

Platforms

HC 3 Lite, HC 3

Views

1596

Download

36

Type Quick App

Shelly Plus T&H ↔ Fibaro QuickApp v1.0.1

Update:

V1.0.1

Bug fixes

Extended manual

Added manual link to Fibaro UI

Added autoreconnect attempts on network loss

 


 

What this plugin does

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.

 


 

How MQTT fits in (very short)

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

 


 

Requirements

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

 


 

Mosquitto: what you need to know

1) Basic install (summary)

  • Windows: Install via installer; run as service.

Linux (Debian/Ubuntu):

sudo apt update

sudo apt install mosquitto mosquitto-clients

sudo systemctl enable --now mosquitto

2) Create a user/password

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

3) Test from a PC

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

 


 

Shelly Plus H&T settings (device web UI)

  1. Open your Shelly’s web interface (http://device-ip).

  2. MQTT → Enable.

  3. Server: 192.168.100.36:1883 (replace with your Mosquitto IP:port).

  4. User/Password: <broker username> / <broker password> (from your broker).

  5. Client ID: any stable string (Shelly default is fine).

  6. Status reporting: Ensure MQTT status is enabled (Shelly Gen2 exposes /status/... topics).

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

 


 

Installing the QuickApp

  1. Import the QuickApp into HC3.

  2. Start it once so variables appear.

  3. Fill in the QuickApp variables (see next section).

  4. Restart the QuickApp.

 


 

QuickApp variables (as shown in your screenshot)

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

 


 

What you’ll see in Fibaro

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

 


 

Topic → Field mapping (for reference)

  • MAIN_TOPIC/onlineOnline (“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

 


 

How reconnection works

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

 


 

Security & reliability tips

  • 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!)

 


 

Troubleshooting

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.

 


 

FAQ

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.

 

 

 


4 Comments,  Want to add comment please login
728dc35f0bfa00f236c1bf889dec7e4d

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.

4c0c6783cded7fe855da14d55b8cdee6

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

728dc35f0bfa00f236c1bf889dec7e4d

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

465e0c757004b81c324342c3c96cccb7

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?

Load more comments
© 2024. Nice-Polska Sp. z o.o.Privacy policyTerms & ConditionsFeedback