ESPeasy - plugin for Shutters and Blinds

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

ESPeasy - plugin for Shutters and Blinds

#1 Post by jgrad » 11 Apr 2021, 16:47

Hi,

just asking if there is any plugin in ESPeasy to offer functionality for controlling Shutters and Blinds like such module in Tasmota.

BR.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESPeasy - plugin for Shutters and Blinds

#2 Post by TD-er » 11 Apr 2021, 20:52

How are the shutters and blinds controlled?
Via a stepper motor? Or a servo? DC motor with limit switches?

jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: ESPeasy - plugin for Shutters and Blinds

#3 Post by jgrad » 12 Apr 2021, 09:03

shutters are controlled by relay (one relay for UP, one for DOWN), motors are AC, motors have build in end switches.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESPeasy - plugin for Shutters and Blinds

#4 Post by TD-er » 12 Apr 2021, 09:19

Sounds like something you can do in rules.
Something like an event to move up or down.
- Check variable to see if some action is already active (if active generate event as if the limit switch of that action was triggered)
- Set a variable to know we're waiting for the opposite limit switch
- Start monitoring on opposite limit switch
- Toggle GPIO to trigger relay for desired direction

On the event trigged by the opposite limit switch:
- Stop motor
- Stop monitoring the GPIO
- Clear variable

jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: ESPeasy - plugin for Shutters and Blinds

#5 Post by jgrad » 12 Apr 2021, 13:59

limit switches are not "available" for ESPeasy - they just protect roller shutter to prevent physical damage if power supply on motor is connected to motor to long. Implementation shall be based on "roller shutter travel times".

I tried to implement logic in rules and actually implemented logic. It is basically functioning but there are drawbacks:
* it is impossible to store current position of shutter (for case of power supply outage) - recalibration is needed at every boot
* timings for tracking current position of shutter are not granular enough within rules (1000ms timer is not always 1000ms)
* implementation within rules takes a lot of code which consumes resources and this impact resources which impact that timer is not accutate (eventhough most criticalr routine for 1000ms timer is at the beginning of ruleset1)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESPeasy - plugin for Shutters and Blinds

#6 Post by TD-er » 12 Apr 2021, 14:58

I do agree with the timing issues in rules parsing.
However even when you act on the GPIO pin directly you do not have a guaranteed response time on an action as some plugins temporary disable interrupts to get proper readings.
Also WiFi related code may operate on a higher interrupt level which also can cause issues where response time is critical.

So I guess you should have some logic in hardware to immediately stop the motor when a limit switch is reached.
You could (should) then still allow for activating the motor in the other direction to be able to get away from the limit switch again.

This can be done with a simple "AND" switch config, by setting a normal closed switch in series with the control pin of an H-bridge.
So you cannot rotate the motor in the direction where the limit switch would stop it, but you can use it in the other direction.

Really timing critical things cannot be done with an ESP, unless you create a really dedicated task for it and disable everything else (even WiFi).

Patou
Normal user
Posts: 106
Joined: 21 May 2018, 10:33

Re: ESPeasy - plugin for Shutters and Blinds

#7 Post by Patou » 12 Apr 2021, 20:29

Hello
I realise an application for shutter with limit switch shutter closed, limit switch windows open and 2 buttons up and down
Please had a look at this post
viewtopic.php?f=4&t=8145
Have a nice evening
Patou

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests