Controlling the shutters with Shelly 2.5 y Home Assistant

In this post we will see how to control the shutters of our home or office, We start with a traditional PVC shutters (in my case) to which we want to put an engine for domotizar something else and make a Smart Home. It will be super simple, we will do everything with Shelly 2.5 to control the rise or fall wirelessly, and all integrated with Home Assistant!

I said, if we put a small tubular motor will do our blinds in a jiffy, We need an engine having much strength to lift our blinds and all depend on the material we have, They are made of wood, PVC, aluminum… so, when buying the engine assure you can lift that weight, I leave a conversion table that may be able to guide you (If you continue to doubt this piece website You have a calculator). And also important is to know the shaft diameter of our blind, which it is usually 40mm or 60mm. I looking online I found this website that are dedicated to the sale of engines for blinds, which just over 30 euros we have a shutter motor wiring in our house. And it is clear that this applies for both blinds, the blinds awnings!

Shelly also need to purchase a 2.5, which it is a double relay based wireless as the ESP8266, so, we can change the firmware if we are interested and put Tasmota or Espurna among others, but go, honestly you will not need to flash it, since the latest firmwares that brings Shelly are already compatible with MQTT and can remotely manage our Broker Mosquitto we have installed on Home Assistant or Hassio. It really is very easy, you will see!

The first is the connection with power sockets that we draw a junction box and leave as nice as possible. Do we need to push wall? It does not have, but if we can have a switch to raise or lower the blind connected to Shelly 2.5. Otherwise the image you see clear, after feeding the Shelly 2.5 tubular motor and connect the two steering cables to Shelly, Now we do not worry about what direction to go, raising or lowering each, We can change that later with code 🙂

Setting Shelly 2.5

I said, is sucked, how complicated is the physical part, because what is the configuration… you'll see… First, when you feed the Shelly 2.5, when you can get current reset when you want with the tip of a pen, etc… You will see that after 8-9 change the flashing seconds, it's time to find a wireless network with our laptop or mobile. We will see that creates an AP with the name of our Shelly, we connect to it, no password.

Open a browser and go to the IP Shelly will normally be http://192.168.33.1 without credentials, We're on our Shelly! Let's configure four tidbits, the first, Shelly indicate to you connect to the WiFi network that we have at 2.4GHz, for it, we are going to “Internet & Security” > “WIFI MODE – CLIENT” > indicate the name of the wireless network and its password, and if we assign a static IP address to this Shelly 2.5. click on “CONNECT”.

And our Shelly will be connected to our Wifi, we agree again with a browser to the IP address you caught our wireless network and continue, in “Internet & Security” > “ADVANCED – DEVELOPER SETTINGS” we can make “Enable action execution via MQTT” to connect to our Broker MQTT, as we saw in a previous post it costs 2 minutes leave it enabled on the Hassio own or Assistant Home. Indicate the IP address of the Broker and the user and password MQTT, just as we look at the topic and copy it 😉 Click on “SAVE”.

By the way, If you do not see this option in your Shelly 2.5, firmware updates, you can do on this same web console in a jiffy.

By the way, in “Settings” > “DEVICE TYPE” we can tell it does not behave like a double relay if not as a blind, mark option “Roller Shutter”.

Right now we already have the Shelly 2.5 It would set the time to make sure and leave the installation of the physical part made. You see it's not very difficult to remove a blind and have thousands of videos on Youtube, With the fully lowered blind you can open the box to remove the shaft, fit the tubular motor following the manufacturer's instructions and placing it back in the box and the blind. Then he remembers gauge the overall rise and fall of the motor by small accessory that comes with the engine, I really do not cost anything. When you have everything assembled, you must tell Shelly how much time it takes to raise or lower the blind completely, to stop the engines after that time maximum, advisable to leave a couple of seconds. All this in “Settings” > “OPEN/CLOSE WORKING TIME”.

And finally we can tell Shelly to use position controls, so we can open the shutter to the percentage % we are interested, for it, in “Settings” > “POSITIONING CONTROLS” mark “Enable positioning controls” and press in “CALIBRATE”, the blind will go up and down a few times to know what a 0% and a 100%, and then we can take advantage of this in Home Assistant.

Setup Assistant at Home

To give this high Shelly 2.5 Assistant in our home and is recognized as a blind or estore, It is as simple as adding the following code to our file “configuration.yaml” of Hassio.

cover:
 - platform: mqtt
 name: "Persiana Cocina"
 state_topic: "shellies/shellyswitch25-000091/roller/0"
 command_topic: "shellies/shellyswitch25-000091/roller/0/command"
 position_topic: "shellies/shellyswitch25-000091/roller/0/pos"
 set_position_topic: "shellies/shellyswitch25-000091/roller/0/command/pos"
 #availability_topic: "shellies/shellyswitch25-000091/online"
 payload_available: "true"
 payload_not_available: "false"
 qos: 1
 retain: false
 payload_open: "open"
 payload_close: "close"
 payload_stop: "stop"
 position_open: 100
 position_closed: 0
 optimistic: false

As usual, we recorded the configuration file and restart Home Assistant. after that, and we can add the new device to our view and control, we can raise and lower the blinds easily with the mouse or pressing the shutter indicated, setting the % wanted. And of course we can create automations for automatic actions, as if the blinds day climb, with lower heat, etc…

Hector Herrero