Rollers shutter control with tasmota sonoff 4ch pro r2

Hi All,

I’m new to this community and to openHAB in general. I joined because I’d like to know more about the framework and how to properly configure it to implement some automation in my house. Maybe I started with a challenging task, but I think that it is one of the most useful automations to implement: automatically close roller shutters in the evening. For this purpose I bought a sonoff 4CH PRO R2 and I reflashed it with tasmota firmware. After some trial and error I was able to control it from openHAB as 4 independent switches, but I’d like to setup a more specific control to move the roller shutters up and down for a fixed amount of time, since there are end of run switches to stop the motor when the shutter is fully opened or closed (later on I’ll try to implement more fine grained control to open/close only at a given percentage of the total run). One thing I’m stucked is how to specify channels for a Rollershutter item. I think I should have at least two channels, one to lift up and one to tear down the shutter. Here is my mqtt.thinkgs

Bridge mqtt:broker:mosquitto "Mosquitto Bridge" [
    host="192.168.1.100", secure=false, 
    username="openhabian", password="openhabian", 
    clientID="openhabClient"] {
    Thing topic sonoff4chpro1 "Dning Shutters" {
    Channels:
        Type switch : PowerSwitch_1 [ 
            stateTopic="sonoff4chpro1/stat/POWER1", 
            transformationPattern="JSONPATH:$.POWER1", 
            commandTopic="sonoff4chpro1/cmnd/POWER1", 
            on="ON", off="OFF" 
        ]
        Type switch : PowerSwitch_2 [ 
            stateTopic="sonoff4chpro1/stat/POWER2", 
            transformationPattern="JSONPATH:$.POWER2", 
            commandTopic="sonoff4chpro1/cmnd/POWER2", 
            on="ON", off="OFF" 
        ]
        Type switch : PowerSwitch_3 [ 
            stateTopic="sonoff4chpro1/stat/POWER3", 
            transformationPattern="JSONPATH:$.POWER3", 
            commandTopic="sonoff4chpro1/cmnd/POWER3", 
            on="ON", off="OFF" 
        ]
        Type switch : PowerSwitch_4 [
            stateTopic="sonoff4chpro1/stat/POWER4", 
            transformationPattern="JSONPATH:$.POWER4", 
            commandTopic="sonoff4chpro1/cmnd/POWER4", 
            on="ON", off="OFF"
        ]
    }
}

and here is how I configured the switch items:

Switch PowerSwitch_1 "Balcony Down"   { channel="mqtt:topic:mosquitto:sonoff4chpro1:PowerSwitch_1" }
Switch PowerSwitch_2 "Balcony Up"     { channel="mqtt:topic:mosquitto:sonoff4chpro1:PowerSwitch_2" }
Switch PowerSwitch_3 "Garden Up"    { channel="mqtt:topic:mosquitto:sonoff4chpro1:PowerSwitch_3" }
Switch PowerSwitch_4 "Garden Down"  { channel="mqtt:topic:mosquitto:sonoff4chpro1:PowerSwitch_4" }

Using the home builder I created this item for

Rollershutter   Dining_GardenShutter          "Garden Shutter"     <rollershutter>   (Dining, gShutter)   ["Rollershutter"]   {channel="mqtt:topic:mosquitto:sonoff4chpro1:PowerSwitch_1"}
Group:Rollershutter:OR(UP, DOWN)   gShutter   "Garden Shutter"     <rollershutter>   (Home)               ["Rollershutter"]

but it dosn’t work, neither for the single channel I linked to the item. Do you have any suggestion about how to link multiple channels to a Rolleshutter item type ? Thanks a lot for

Hi @optimusprime and welcome to the community.:smiley:

If your looking for some working examples of rollershutter items just do a search on the forum using the key word rollershutter and you’ll find several.

Also, I would like to say thanks for giving some detail about your setup and what your wanting to achieve. This helps others on the forum understand how to help you. I would also like to provide a link that’s a good read for anyone new to the community.