Stopping tasmota rollershutter

Hi,
I’m using openhab 4.2.1. I have some tasmotized sonoff devices to control my rollershutters.
Those are working fine when fully opening and closing them. I used this to configure them.
But I would like to stop the shutter when I want to. In other words, when I open or close a rollershutter via the dashboard, I would like to stop it on my command. In a rollershutter widget there is an icon to open the shutter, to close it and also to stop it. However I can’t find a way to send an mqtt-command to stop the shutter. The stop-command of the shutter-channel just sends the configured value to the topic, not to another topic.
Tasmota has different mqtt-commands to control a shutter : ShutterPosition takes a value between 0 and 100. But there are also ShutterOpen, ShutterClose and ShutterStop topics, each with a value of 1. The problem is, I don’t know how to use those with one item per shutter, maybe I can with three different channels/items for one shutter, but I find that too complex. But if this is the only way, so be it. But then, how to configure the shutter-widget ?

Any suggestions ?
Thanks.

Because they are on separate topics you’ll need separate Channels which means you’ll probably need separate Items as well.

Alternatively you can use a rule and the publishMQTT Action to send the right message to the right topic based on the command to the Item. In this configuration you’d remove the commandTopic stuff from the channel and just have the stateTopic config to get updates from the device. Then a rule that triggers on commands to the Item and translates the command to the proper message on the proper topic.

There are additional (advanced) parameters for rollershutter channels in generic mqtt things, these are:

  • stop (for stop command)
  • on (for up command)
  • off (for down command)

As I’ve defined my mqtt shutters through a *.things file, it looks like this:

     Thing topic sonoffT1_9 "sonoff T1 9" @ "mqtt" [
         availabilityTopic="sonoff_t9/tele/LWT",
         payloadNotAvailable="Offline",
         payloadAvailable= "Online"
      ]{
        Channels:
            Type rollershutter : ch1 "Shutter" [commandTopic="sonoff_t9/cmnd/shutterposition1", stateTopic= "sonoff_t9/stat/SHUTTER1", stop="STOP", off="DOWN", on="UP"]
            Type string : tele "Tele" [ stateTopic= "sonoff_t9/tele/STATE" ]
            Type switch : lwt "LWT" [ stateTopic="sonoff_t9/tele/LWT",on="Online",off="Offline" ]
      }

or as Main UI code:

UID: mqtt:topic:mymqtt:sonoffT1_9
label: sonoff T1 9
thingTypeUID: mqtt:topic
configuration:
  payloadNotAvailable: Offline
  availabilityTopic: sonoff_t9/tele/LWT
  payloadAvailable: Online
bridgeUID: mqtt:broker:mymqtt
location: mqtt
channels:
  - id: ch1
    channelTypeUID: mqtt:rollershutter
    label: Shutter
    configuration:
      retained: false
      postCommand: false
      stop: STOP
      formatBeforePublish: "%s"
      invert: false
      commandTopic: sonoff_t9/cmnd/shutterposition1
      transformExtentsToString: false
      stateTopic: sonoff_t9/stat/SHUTTER1
      off: DOWN
      on: UP
  - id: tele
    channelTypeUID: mqtt:string
    label: Tele
    configuration:
      retained: false
      postCommand: false
      formatBeforePublish: "%s"
      stateTopic: sonoff_t9/tele/STATE
  - id: lwt
    channelTypeUID: mqtt:switch
    label: LWT
    configuration:
      retained: false
      postCommand: false
      formatBeforePublish: "%s"
      stateTopic: sonoff_t9/tele/LWT
      off: Offline
      on: Online

Please be aware that I prefer %topic%/%prefix%/ for full topic, so it looks a little bit different.
It’s a tasmotized Sonoff T1 dual channel wall switch (not that it’s important…)
It’s better to use the native state topic instead of .../RESULT