Hello,
I’m using HomeAssistant for several years and I also created a bunch of IoT devices with raspberry Pi and Arduino. I want to give the ESPhome integration a try and need some help on how to get started.
Description of the project:
I’m building a roman shades controller. The curtain will be opend with a tubular motor with mechanical stops. The motor can turn up and down and will stop at a predefined point. Power to the motor does not need to be interupted when the curtain is opened or closed. To control the motor I’m using 2 relays:
- first relay will turn on/off power to the motor. (to stop the motor during opening or closing)
- second relay will decide the direction of the motor (up or down)
This will be controlled with a Wemos D1 mini with relay1 on PIN D3 and relay2 on PIN D2.
The curtain will be controlled with 2 push buttons hooked up to another ESPhome device (input controller) 1 button for UP and the other for DOWN. I should also be able to control the curtain from HomeAssistant as well. The input controller is simple and I already got it working controlling lights in home assistant.
When the up button is pushed the curtain needs to turn on relay1 and put relay2 in the off (up) position.
If the up button is pushed again when in the open state the curtain needs to stop by disabling relay1. If the curtain is already fully opened this will not have any result but during the opening it will stop the curtain at the current position.
Same goes for the down button. when pushed the curtain needs to turn on relay1 and put relay2 in the on (down) position. If the down button is pushed again when in the closed state the curtain needs to stop by disabling relay1. If the curtain is already fully closed this will not have any result but during the closing it will stop the curtain at the current position.
How should I configure this in ESPhome? what kind of components do I need to configure?
Can somebody help me to get started?
Thank you.