notify mqtt publish mit Variable in Hochkomma

Begonnen von appi, 17 März 2025, 19:56:44

Vorheriges Thema - Nächstes Thema

appi

Hallo
nach längerer Suche wäre ich um einen weiteren Tip sehr dankbar.

in eine notify will ich eine mqtt message  publischen
set my_extern_Broker publish -r hasp/plate_2/command/p1b81.jsonl {"text":$EVTPART1}
im Broker kommt dann
p1b81.jsonl = {"text":7891.000}

Ich brauche aber :

p1b81.jsonl = {"text":"7891.000"}
Also die Variabel in Hochkomma. Allerdings wenn ich Hochkomma im notify setze wird die Variable nicht als soche erkannt......

Bitte um einen Tipp

danke und gruss


rudolfkoenig

ZitatAllerdings wenn ich Hochkomma im notify setze wird die Variable nicht als soche erkannt......

Bei mir scheint es zu funktionieren:
fhem> defmod n notify n set myBroker publish topic { "text":"$EVENT" }
fhem> trigger n myText
liefert
topic { "text":"myText" }

appi

Besten Dank Rudi

ja, es funktioniert.......  sorry.

Auch nach geschätzten 15 Jahren mit FHEM immer noch glücklich mit der SW, danke Rudi