Contact Node101_Door "Debug Door [%s]" <door> { mqtt="<[mosquitto:debug/door:state:MAP(door.map)]" }
door.map transformation:
0=CLOSED
1=OPEN
NULL=unknown
sitemap:
Text item=Node101_Door
But this doesn’t seem to work at all. I’m sending either a 0 or 1 in the MQTT topic. If I try sending OPEN and CLOSED in the topic, this works (removing the MAP in the item definition and changing it to default), but with 0 and 1, nothing. There’s no event in the event log either.
I’m not sure if that’s quite relevant. That’s when the value in the MQTT topic might not be formatted correctly for a number. But I don’t use a number but a Contact which should have values OPEN/CLOSED. And I’m trying to map 0 and 1 to OPEN/CLOSED.
The command I’m using to test this with mosquitto is: