milo
(M)
1
Hello,
i try to transform a contact sensor message to another value
Type contact : balkontuer "balkontuer" [ commandTopic="statusdisplay/status/door/balkontuer", 1="open", 0="close"]
But it’s not doing anything I still see 1 and 0 in the mqtt mesage whats wrong?
Shouldn’t a contact type only have a state topic?
1 Like
H102
(CM6.5 H102)
3
Correct!
You may want to try MAP transformation if you are wanting to see something other than a 1 or 0.
[ commandTopic=“statusdisplay/status/door/balkontuer”, transformationPattern=“MAP:ONOFF.map” ]
rossko57
(Rossko57)
4
Like they say, there is no commandTopic
for a Contact Item because there can be no command.
Meantime,
there are no 1=
or 0=
parameters for the MQTT binding. You cannot just make up syntax.
The docs tell you that on= off=
are what you are looking for Contact type.
milo
(M)
5
Hello I would like to send a mqtt message if the contact says “open” or “closed”.
How can I do this??
@rossko57 @H102 @Sascha_Billian
rossko57
(Rossko57)
6
Why not change your openHAB Item type to a switch, so that you can send it commands from rule or UI?
milo
(M)
7
Ok done a switch now working everything thanks