Stepper motor (roller blinds) and reed switches as end points

Hi Everyone,
I am hoping with help of all clever community guys to make my project to work.

Got Nema 17 stepper motor and A4988 driver (with 4:1 gear). Starting from basic info in ESPhome, got it working with the slider input.
Once it works, the stepper sometimes slips and loose the position (very heavy blinds).
The idea is to add reed switches on top and bottom of blinds, to determinate, when stepper should stop.
As I am very newbie to coding in yaml (mainly copy paste with little adaptation), I need your help guys.
What I want to achieve:

  • stepper motor running continuously once triggered from home assistant
  • once got to any of reed switches should stop, change direction and be ready for next trigger

How I can achieve this action using ESPhome and yaml, anyone can help, point me out into right direction, please?
Can show my code (and automation) but as said, its just same what on official esphome page.

TIA

Did you take a look at covers? For example the endstop cover?

Havent notice that, will check it out. Thank you

1 Like