MQTT2 in openHAB 2.4, Rollershutter / MAP


can someone point me on the right direction how I would set up a MQTT thing in the new MQTT binding when having a Rollershutter item that used to work the following way:

Rollershutter Rollladen_EG_Kueche_Tuer "Rollladen Küchentür [%d %%]" <rollershutter> (gRolllaedenKueche) {mqtt=">[mosquitto:shellies/shellyswitch-135267/roller/0/command:command:*:MAP(], <[mosquitto:shellies/shellyswitch-135267/roller/0/pos:state:default]"}

I can’t seem to find an example of how to use a map file in a new MQTT thing. If it matters at all, the looks like this (only some of the entries are relevant for the rollershutter though):

stop=? (0 or 100?) :) 

Thanks in advance.

I believe you can use the transformationPattern within the thing file for this.


Type switch : RollerShutter "RollerShutter" [ stateTopic="tele/sonoff/SENSOR", transformationPattern=""]

And I would actually use a Type switch? What about the position the device returns in the stateTopic?

I tried the following:

Thing mqtt:topic:shelly1_rollladen_kuechentuer_topics "Shelly 1 Rollladen Küchentür" {
            Type switch : rollershutter [ stateTopic="shellies/shellyswitch-135267/roller/0/pos", commandTopic="shellies/shellyswitch-135267/roller/0/command", transformationPattern="" ]
Rollershutter Rollladen_EG_Kueche_Tuer "Rollladen Küchentür [%d %%]" <rollershutter> (gRolllaedenKueche) { channel="mqtt:topic:shelly1_rollladen_kuechentuer_topics:rollershutter" }

I can’t control the shutters that way. Log says:

2018-12-27 19:01:56.740 [WARN ] [nal.handler.AbstractMQTTThingHandler] - Channel rollershutter not supported

Typo, sorry about that. It should be Rollershutter not switch.

Not sure on that part, I’m still using the 1.x binding, but I can help search for an answer.

@sirpreis found something regarding Rollershutters and mqtt 2.4 that might interest you.

And this:

Looks like you may have to wait until after the holidays for some things to work properly.:expressionless:

Sorry I couldn’t help more.


Thank you very much, that helped! :slight_smile:

You can use a Number channel for a Rollershutter item
You can use a tranformation ONLY on the inbound topic
Transformation outbound are not yet supported

A workaround is to use the MQTT action
or stick with v1 for some items.
I have some items with v2 and others with v1 because of this

Ok, thanks. Guess we have to wait for the new binding to become more “mature”.

From my point of view it seems a little “premature” to release something that can’t replace the old one. openHAB even disables the old binding when upgrading from 2.3 to 2.4, which makes it even more irritating.

Go to PaperUI and turn on legacy bindings. After that you should be able to install the old 1.x mqtt.

Yea, I did that, but I had to look for it. Unneccessary, from my point of view, to make it so complicated.

Yes, it’s a lesson learned for the next big upgrade. It has been acknowledged that this was a mistake and will be taken into account.

Just a question. On v1 i had a map that transformed 1 to ON and 0 to OFF. Can it be done on MQTT v2 if not how would i do that

1 Like