Hi, I’m trying to configure a cover template to control a rolling shutter connected to a sonoff dual r2.
With my existing wall buttons i simply push the up button one time to open totally the rolling shutter, and if i want to stop it i have to push again one time the same button. If i push the down button while the rolling shutter is opening then it starts to close. And so on…
I would like to replicate the wall buttons behavior using the cover template.
open_cover works but stop_cover doesn’t. When I push the up arrow on the HA interface I need that it remains active since the shutter is open 100%.
The set position slider doesn’t work.
Anyone can help me? Or can explain me how to use the cover template?
data_template replaces data. If you intend to use regular data with a data template, put all the attributes under the data_template. Having both of them may ignore one or the other.
If the shutter is opening i stop it pushing the open button so the topic is cmnd/tapparelleStudio/power1
if it’s closing cmnd/tapparelleStudio/power2 that is close button
i already tried using only data_template but it’s the same
If that’s the case, then the syntax alone isn’t correct if the state is “closed” when you are opening it. It’s sending it to the wrong topic. But aside from that, it doesn’t sound like the topic is actually be honored. When you press a button, does it move?
Sounds like you need to create a sensor that has 4 states, open, opening, close, closing. Then post to the correct topic based on those 4 states. If you don’t have that ability, the device can never work the way you want in Home Assistant. You could make that sensor based on the position of shudder.
No, i have to calculate the position percentage based on the time needed by the shutter to fully open.
The set_cover_position in my cover configuration in the first post is only for testing it.
For example:
if the shutter needs 24 second to fully open i have to send to the sonoff this command:
Backlog Power1 TOGGLE;Delay 120;Power1 TOGGLE
that simulate the first button press and the second after 12 sec to stop the shutter at 50% of opening
why?
for set_cover_position the topic should be always this cmnd/tapparellaStudio/backlog
and the payload cannot be a string like “Power1 TOGGLE;Delay 120;Power1 TOGGLE”?
if this worked, then the problem would be get the value 50% from the HA interface…
How can i read that value from the input slider of the cover?
You need to know your starting position. From close → to open, from open → to close. Without feedback, this is painful.
What happens when you actually use the stop? Is the cover now open? If that’s the case, your cover.tapparelle_studio state won’t know that, because you stopped. Now you gotta handle that.
So clicked open, waited 18 seconds, now you clicked close. Gotta handle that.