Hi,
Finally i managed it that it runs Thanks all for your help!!
Now it looks so easy when its running
If someone having a similar request, this is my solution:
i have just each a button for “down”, “home” (meaning open the slat), and “up”.
When pressing “home”, the blinds must go down and about for about 2% again.
Items:
I created a group for each group of raffstores - here you see the Raffstore from groundfloor (gRaffstoresEG). Additionally one for the positioning control (gRaffstoresPosEG). And for sure the 2 items for my shelly.
Switch vRaffEGHOME "raff home"
Group:Rollershutter gRaffstoresEG
Group:Dimmer gRaffstoresPosEG
Rollershutter RaffstoreEZ "RaffstoreEZ" (gRaffstoresEG) {channel="shelly:shelly25-roller:xxxx:roller#control"}
Dimmer RaffstoreEZPos "RaffstoreEZPos" (gRaffstoresPosEG) {channel="shelly:shelly25-roller:e4e2dd:roller#rollerpos"}
For up and down my buttons just send 100 or 0 to the group. this is going to send command to all the items. done.
For the “home” part, a dummy item “vRaffEGHome” is switched to “ON”. Then I check if every blind is either down or already at 98% and just switch it to this percentage. If its any other value, i have first to move them to closed (100%).
And the last rule is triggering on positionchange, so for the shellys just once after its done. Here i just have to check if the virtual switch for “home” is on, otherwise i just might want to close it. So when its on, and the blind reached 0 (meaning 100%closed) i move them back up to 2% (meaning 98%closed)
Rules:
rule "to go up or down"
when Item gRaffstoresEG received command
then
vRaffEGHOME.sendCommand(OFF)
gRaffstoresEG.members.forEach[ i | i.sendCommand(receivedCommand) ]
end
rule "to go home position"
when Item vRaffEGHOME received command ON
then
gRaffstoresEG.members.forEach[ i |
if(i.state == 100 || i.state == 98)
{
i.sendCommand(98)}
else
{
i.sendCommand(100)
}
]
end
rule "set homeposition"
when Member of gRaffstoresPosEG changed
then
if(triggeringItem.state == 0 && vRaffEGHOME.state == ON)
{
triggeringItem.sendCommand(2)
}
end
The code might not be perfect for sure, but it looks quite ok for me and my current learning curve in openhab.
however, I might need to check if I really need the “positioningItem” or if i can also use the control item of the shelly - I think i had some problems before when trying with that item.
And another point might be that i have also other groups of venetian blinds and i would have to copy paste all of them. So another change might be useful to avoid copy pasting for all of my further groups (but anyhow there will be onls 3-4 groups at the end…)
If you see any issue or something completely wrong/to improve, please let me know;)