MQTT Binding & Shelly 2.5 (Rollershutter)

Hello, i have question, How can i convert button (100 - 0) to (open - close)

    Thing topic kitchen_roller_shutter "Kitchen Roller Shutter" @ "Kitchen" {
Channels:
    Type rollershutter : power       "Power"         [ stateTopic="shellies/shellyswitch25-004326/roller/0, commandTopic="shellies/shellyswitch25-004326/roller/0/command"]
}

And .items:

Switch Kitchen_Roller_Shutter "Kitchen Roller Shutter" <rollershutter> [ "Switchable" ] { channel="mqtt:topic:openhab:kitchen_roller_shutter:power"  }

Now i have:
shellies/shellyswitch25-0003FD/roller/0 -> 100
And i need:
shellies/shellyswitch25-0003FD/roller/0 -> close

Your question does not make sense. A button has 2 states. If it can have values 0-100 it isn’t a button but a dimmer type (or “slider” in sidemap).
A roller shutter has a closure percentage state, that’s a 0-100 value and not a binary state (open/closed) and therefore cannot be converted.
If what you want is to display the word “open” or “close” in the UI use range transformations.

Shelly need to get command open/close/stop to work (MQTT)

You need to do the rollercalibration (rc) according to the manual. Once this is done you can use the rollershutter item and send 0-100 commands to shellies/shellyswitch-/roller/0/command/pos and receive the status from shellies/shellyswitch-/roller/0/pos
Have a look at the api section of shelly, it’s really helpful
https://shelly-api-docs.shelly.cloud/#shelly2-5-mqtt
Best regards Johannes

1 Like

That did the trick:

Switch item=Rolo_Arbeitszimmer mappings=[0=“AUF”,80=“80%”,100=“ZU”] icon=“rollershutter”

This will end up in three buttons: [AUF] [80%] [ZU]

Switch item=Rolo_Arbeitszimmer mappings=[0=“ARGGH”,80=“HMMM”,100=“UHH”] icon=“rollershutter”

The text in “” can be everything. [ARGGH] [HMMM] [UHH]