[SOLVED] Rollershutter

use timers, count how many seconds it takes to have full down full up and then use it as “percentage” intervals

Thanks Kriznik, but in this case it is possible to solve as you mentioned, but the problem that I see is in the sitemap, I will have a lot of buttons (on for up 25%, on for down 25%… etc) isn’t it? there are any solution easiest than this?

You can make a dummy Rollershutter Item, unconnected to any hardware, and put that on your sitemap.
Rules can then listen to commands from UI (or other rules) and make the actions.

Thanks for your response, but I don’t know how to do this. Can you show me an exemple.

Thanks

Item DummyRoller

sitemap

Rollershutter item=DummyRoller

^^ selection will be probably better idea if you wanna have fixed values eg 10, 25, 50, etc

rule

when
item dummyroller changed
then
var percent = (dummyroller.state as number).intvalue

if(percent == 25) {
actualcontrollerforshutters.sendcommand(ON)
createtimer(xy) // seconds
actualcontrollerforshutters.sendcommand(OFF)
}
end

something like that.
you have to remap actual input from dummy to seconds which timer will be active

How do you create Items now, PaperUI?

PaperUI > Configuration > Items > +

“category” is a funny name for icon filename, if you want one.

Thinks: doesn’t Tasmota have a rollershutter mode that can manage this position timing for you?

I have exactly this version of Tasmota but I didn’t know how to create apercentatges. I will tri to understant the link that you mentioned to do the same and check if it works.
also, I am working with Visual studio format, not with Paper Ui

I checked this page and I thing that they did the % because T1 is with only one relay not two, can be?

Finally I achieve to put Tasmota Stefan in the sonoff dual and I configured the items, things and rules, but I have a problem with sitemap. I have % and fully open or fully close de blinds, but I don’t know how to put in sitemap STOP. Somebody can help me, please??

What are you using in your sitemap now?

Frame label="Habitación Suki Dave" {
        Text label="Persiana Suki Dave" icon="blinds" {
            Slider item=perSukiDaveUpDown icon="rollershutter"
            Switch item=perSukiDaveUpDown mappings=[0="Cerrado ", 25="25%",50="50%",  75="75%" , 100=" Abierto "]
            Switch item=perSukiDaveUpDown mappings=[0="Cerrar ", stop="Stop" , 100=" Abrir "]
        }

Have you tried a switch widget without mappings? And/or default?

Switch item=perSukiDaveUpDown
Default item=perSukiDaveUpDown

It doesn’t works. The arrows up and down and X (for Stop) appears, but works wrong. If I press arrow up, blind goes down and if I press X, goes down. Dont Stop.

Okay, so your Sonoff relays are wired wrong way round? Or translation in your channel is wrong? Or you need to set invert in your Sonoff?

openHAB uses 0% to represent “up” position.
I think the stefanbode firmware uses 0% as “open” by default.

What version of MQTT binding are you using? There have been changes. What MQTT message gets published for STOP? What does the Sonoff expect?

I don’t know if are wired wrong, because with the open and close of my sitemap goes well.

Switch item=perSukiDaveUpDown mappings=[0="Close “, 25=“25%”,50=“50%”, 75=“75%” , 100=” Open "]

In Things:

Thing topic perpeques “Persiana habitación peques” @ “Habitación peques” {
Channels:
Type rollershutter : SubirBajarperpeques “UpDown persiana peques” [ stateTopic=“stat/perpeques/POWER1”, commandTopic=“cmnd/perpeques/SHUTTERPOSITION1”, UP=“SHUTTEROPEN”, DOWN=“SHUTTERCLOSE” , STOP=“SHUTTERSTOP” ]

The version of MQTT binding is 2.4.0. When I press Stop, in OH Log, says something as: STOP is not a command for rollershuter.(I’m not in front of computer)

Thanks in advance.

But in openHAB, 0% for a rollershutter represents “open”

Yes, MQTT binding 2.4 had poor support for rollershutter types. It’s been improved for 2.5 - though I believe it is still a bit quirky.

If it were me, I think I would code around this for now, until the binding gets sorted.
I’d remove the commandTopic from the MQTT thing, and make a rule triggered from UI command that directly sent what you want as MQTT Actions.

Unrelated, isn’t there a position state reporting topic you could listen for, instead of Power1?

Thanks for your reply.
I will try to do as you mentioned, but I thought that with the fork of Tasmota it was easy than make a rules for this. With the inconvenient that I am beginner.:grinning: and costs me a lot do this things.

This is a lot less complicated than trying to use motor runtime to work out positions in openHAB.

The rule you need here is pretty simple, this might help for starters

That actually uses a proxy Item/channel instead of MQTT publish action, but its the same principle.

Finally, I tried to put Tasmota again and I solved. Now I have the roller shutters working.

rule "Persiana derecha Ático subir"
when
    Time cron "0 30 09 1/1 * ? *"
then
    AticodchaUpDown.sendCommand(100)

end

rule "Persiana derecha Ático bajar"
when
    Time cron "0 00 20 1/1 * ? *"
then
    AticodchaUpDown.sendCommand(0)

end