# Shelly H&T mit MQTT

**URL:** <https://discourse.nodered.org/t/shelly-h-t-mit-mqtt/79548>\
**Category:** General\
**Tags:** mqtt\
**Created:** [2 July 2023 21:45 UTC](https://discourse.nodered.org/t/shelly-h-t-mit-mqtt/79548 "2023-07-02T21:45:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nussi](https://avatars.discourse-cdn.com/v4/letter/n/e495f1/32.png) [@Nussi](https://discourse.nodered.org/u/Nussi)\
**Post date:** [2 July 2023 21:45 UTC](https://discourse.nodered.org/t/shelly-h-t-mit-mqtt/79548/1 "2023-07-02T21:45:50Z")

</div>

Hallo zusammen  
Ich habe ein Problem, bezüglich dem Shelly H&T in Node-Red einbinden. Den Shelly H&T habe ich normal in Betrieb genommen und die Einstellungen auf MQTT bezogen. Weiter habe ich einen folgenden Flow erstellt.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/b/fb06305831e6a3e2bf80cc7be82bf679a1beec35.png)

Anhand von diesem Bild ist für mich klar, dass die Verbindung mit dem MQTT-Broker Mosquitto stimmt. Die mqtt-Nodes habe ich folgend eingestellt:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/8/f842686f8c8a27dd44d92ac004475175f4834199.png)  
Jetzt wäre das Ziel von diesem Flow, dass die Temperatur mit dem Debug-Node angezeigt wird. Jedoch erhalte ich folgende Ausgabe im Debug-Node:

2.7.2023, 23:27:40[node: debug 8](http://127.0.0.1:1880/#)shellies/shellyht-227AF1/sensor/temperature : msg.payload : number

1688333260566

Kann mir jemand helfen, wo genau das Problem liegt, dass keine Temperatur angezeigt wird?  
Vielen Dank schon im voraus für die Hilfe!

---

<div class="post-metadata">

**Author:** ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)\
**Post date:** [3 July 2023 12:19 UTC](https://discourse.nodered.org/t/shelly-h-t-mit-mqtt/79548/2 "2023-07-03T12:19:31Z")

</div>

Ja, das ist der aktuelle Timestamp, der vom Inject Node kommt. Es macht ja auch keinen Sinn, dem Shelly eine Temperatur zu SETZEN!  
Ansonsten scheint es nach der [API Reference](https://shelly-api-docs.shelly.cloud/gen1/#shelly-h-amp-t-overview) der richtige Wert zu sein, den Du als Topic eingesetzt hast.  
Lass also den MQTT-Out Node und den Inject Node weg und warte, ob im Debug-Node von allein die richtige Temperatur erscheint.

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [3 July 2023 12:59 UTC](https://discourse.nodered.org/t/shelly-h-t-mit-mqtt/79548/3 "2023-07-03T12:59:00Z")

</div>

Es kommt sehr selten!

---

<div class="post-metadata">

**Author:** ![cameo69](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cameo69/32/66593_2.png) [@cameo69](https://discourse.nodered.org/u/cameo69)\
**Post date:** [3 July 2023 13:27 UTC](https://discourse.nodered.org/t/shelly-h-t-mit-mqtt/79548/4 "2023-07-03T13:27:17Z")

</div>

I do not have a Shelly H&T, but the Internet says to publish `shellies/shellyht-227AF1/update`, which should trigger the latest status to be returned by the shelly.  
Source [API Reference](https://shelly-api-docs.shelly.cloud/gen1/#availability-and-announces)

What I do with my Shellies is I use RPC. Activate these 2 settings on Shelly H&T:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/4/b4e394576bc9348f91887c8b0dc06cfb3b2e0c90.png)

Then publish to `shellyht-227AF1/rpc`a json like this:

```auto
{
  "id": 123,
  "src": "shellyht",
  "method": "Shelly.GetStatus"
}

```

You should get a response on `shellyht/rpc`.

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [3 July 2023 14:28 UTC](https://discourse.nodered.org/t/shelly-h-t-mit-mqtt/79548/5 "2023-07-03T14:28:14Z")

</div>

Maybe so

But if you run the H&T on battery, it is in sleep mode most of the time and just wakes up sporadically and reports humidity and temperature. During the sleep period it does not recognise any api calls

---

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [5 July 2023 13:54 UTC](https://discourse.nodered.org/t/shelly-h-t-mit-mqtt/79548/6 "2023-07-05T13:54:38Z")

</div>

Have you set the debug node to display the complete msg?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [3 September 2023 13:55 UTC](https://discourse.nodered.org/t/shelly-h-t-mit-mqtt/79548/7 "2023-09-03T13:55:19Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
