[SOLVED] MQTT inbound items and MAP

mqtt
mapping
inbound
Tags: #<Tag:0x00007fe0634bb928> #<Tag:0x00007fe0634bb7e8> #<Tag:0x00007fe0634bb6a8>

(troll mar) #1

Hi,

I could’t figure out how to map mqtt inbound values to Sitemap Item states.

For example:
My MQTT vaules are:
7, 14, 18, 22, and 24

that are fix Values from another mqtt device.
When one of these values comes in via mqtt I would like to map these to sitemap items.

Here my mqtt item

String	Gaestezimmer_Solltemp "Gästezimmer Solltemperatur"	{mqtt=">[mosquitto:edomi/in/set/Gaestezimmer/Temp/Soll-Temp:command:*:default], <[mosquitto:edomi/out/status/Gaestezimmer/Temp/Soll-Temp:state:MAP(heiz.map)]", autoupdate="false" }

Here my heiz.map


7=Frost
14=Nacht
18=Standby
22=Komfort
24=Warm

here my sitemap

Switch item=Gaestezimmer_Solltemp mappings=[7=Frost,14=Nacht,18=Standby,22=Komfort,24=Warm]

I could send the Values via mqtt but when I receive these Values my states in the ui dosent’t change.
So the outbound works as aspected.

Any idear about the inbound?


[CLOSED] MQTT binding version 2.4 (Pre-release !)
(Vincent Regaud) #2

Please use the code fences

Have tried WITHOUT the map transform inbound?

String Gaestezimmer_Solltemp "Gästezimmer Solltemperatur" {mqtt=">[mosquitto:edomi/in/set/Gaestezimmer/Temp/Soll-Temp:command:*:default], <[mosquitto:edomi/out/status/Gaestezimmer/Temp/Soll-Temp:state:default]", autoupdate="false" }

(troll mar) #3

That was to simple :wink:
I don’t get it but it works

THX!!