Russian version available here.
Hi there!
The project is dedictated to control of motorized blinds’ operation and its integration into home automation systems (f.ex. Home Assistant and OpenHab).
The project developing consists of 2 major areas:
A bit details below...
I'm trying to keep compatibility with both platforms. Main differences between them:
If you would to connect 1 or 2 steppers only, use cheaper ESP8266 based controller (like Wemos D1 mini, NodeMCU, etc).
Control blinds:
Set end-points:
You'll be redirected to Captive portal after connecting to "esp-xxxx" WiFi network:
Fill pins for needed Steppers divided by comma and check pins for your mechanical buttons Up/Down (or disable it).
Just do not setup MQTT details at Captive Portal, if you don't want to use MQTT.
MQTT details:
ESP_Blinds/<chip_id>/in
(JSON)ESP_Blinds/<chip_id>/out
(JSON)/outN
) are disabled for MQTT messaging optimization, but you can enable it if needed for your automation flow.There is MQTT auto-discovery implemented for HomeAssistant with default MQTT prefix (requires HA v2021.11 at least). It assists you to create objects with correct configuration.
In case it does not work for you, you can add blinds manually. See examples below.
Config example for 2 roller blinds (replace "_chipId" with Chip id of your controller, watch it at registration topic - /ESP_Blinds/register
):
cover:
- platform: mqtt
name: "Blind 1"
device_class: "blind"
command_topic: "ESP_Blinds/_chip_Id_/in"
set_position_topic: "ESP_Blinds/_chip_Id_/in"
set_position_template: '{"num": 1, "action": "auto", "value": {{ 100 - position }} }'
position_topic: "ESP_Blinds/_chip_Id_/out"
position_template: '{{ value_json.position1 }}'
payload_open: '{"num": 1, "action": "auto", "value": 0}'
payload_close: '{"num": 1, "action": "auto", "value": 100}'
payload_stop: '{"num": 1, "action": "stop", "value": 0}'
position_open: 0
position_closed: 100
optimistic: false
- platform: mqtt
name: "Blind 2"
device_class: "blind"
command_topic: "ESP_Blinds/_chip_Id_/in"
set_position_topic: "ESP_Blinds/_chip_Id_/in"
set_position_template: '{"num": 2, "action": "auto", "value": {{ 100 - position }} }'
position_topic: "ESP_Blinds/_chip_Id_/out"
position_template: '{{ value_json.position2 }}'
payload_open: '{"num": 2, "action": "auto", "value": 0}'
payload_close: '{"num": 2, "action": "auto", "value": 100}'
payload_stop: '{"num": 2, "action": "stop", "value": 0}'
position_open: 0
position_closed: 100
optimistic: false
Use same approach for other your blinds.
The most popular option uses cheap 28BYJ-48 steppers, but in fact you can use any 4-pin stepper motors (dual winding steppers). 28BYJ-48 is most often used with the ULN2003 driver (better to use 12 volt version, it gives more torque).
I have developed 2 models for converting Leroy Merlin' roller blinds into motorized ones:
3 printing models are available at 3d_parts
directory or at Thingiverse directly with some instructions.
This project appeared as fork of @nidayand repository originally.
Unfortunately, the project supported ESP8266 and 1 stepper only, plus it had not been updated for a long time. I added support for Platformio (for easier development), multiple steppers, and ESP32 later (so more than 2 steppers can be connected to single controller). It was published as v1.4.x.
Soon I wanted a more convenient motor control, a simple controller configuration without firmware re-build, but the original code was of little messy to maintain, although it worked. As a result, a large refactoring of the firmware took place - new classes and areas of responsibility were allocated.
In fact, it became clear that almost nothing remained of the old project (only the Web UI almost unchanged). This project was detached and now developing on its own tree.