Rollershutter from OH2 to OH4

Due to a problem with OH2 I restarted with OH4.
I have a rollershutter-device with two interlocked relays, commanded via MQTT. This is the item I have in OH2 (file based) :

Rollershutter   Veranda   "Rolluik Veranda"   <rollershutter> {mqtt=">[mosq:cmnd/sonoff01/POWER2:command:DOWN:ON],>[mosq:cmnd/sonoff01/POWER2:command:STOP:OFF],>[mosq:cmnd/sonoff01/POWER1:command:UP:ON],>[mosq:cmnd/sonoff01/POWER1:command:STOP:OFF]"}

mosq is the MQTT-broker.
I tried to replicate this in OH4 (gui), but there I seem unable to find something to send commands to two different topics in one go.
Any help ?
Thanks.

As this is a roller shutter, I would recommend to change the configuration in Tasmota (roller shutter option is available since tasamota 7.12, I think).
This is:
go to Tasmota command line and send commands…

SetOption80 1
Backlog PulseTime1 0; PulseTime2 0
Interlock 1,2
Interlock ON
ShutterInvert 1

First command is to switch on roller shutter support
the next three commands are to set pulse time to 0 for both channels and to interlock (to ensure that it’s not possible to switch on both motor coils at once)

Last command is to invert direction, this is due to the fact, that Tasmota will interpret 100 as “OPEN” and 0 as “CLOSED”, which is opposite to openHAB.

Additional setup is ShutterOpenDuration and ShutterCloseDuration.
With correct setup you’ll get a slider in Tasmota and one button for UP and one Button for DOWN

To control this shutter, you’ll only need one Channel in openHAB.
Another thing is, your configuration is very old (mqtt1 Binding) and you have to setup the broker via Things rather than services/mqtt.cfg.
So a file for the Things (e.g. things/mqtt.things)

Bridge mqtt:broker:mosq "Mosquitto OH4 Bridge" [
    host="localhost", // data from services/mqtt.cfg
    port=1883,
    username="xxxx",
    password="yyyy" ]
   {
    Thing topic sonoff01 "Sonoff 01" {
        Channels:
        Type rollershutter : ch1 "Rolluik Veranda" [commandTopic="cmnd/sonoff01/shutterposition1", stateTopic= "stat/sonoff01/SHUTTER1" ]
    }
}

And the new Item:

Rollershutter Veranda "Rolluik Veranda" <rollershutter> {channel="mqtt:topic:mosq:sonoff01:ch1"}

cmnd/<devicename>/shutterposition1 topic is able to process commands UP/STOP/DOWN and 0 to 100 for direct positioning.
stat/<devicename>/SHUTTER1 will always contain a number 0 to 100. So, this setting is 100% compatible to openHAB.

1 Like

Sorry, I expected an email when someone responded.
I came to the same conclusion, upgrade to the latest tasmota (13.2.0) and configured the devices as rollershutters.
I didn’t know about Shutterinvert, but I managed to get it working by changing the up-value to 100 and the down-value to 0.
I will try Shutterinvert tomorrow.
Anyhow, thanks.