24H Systems Logo
Tel. 926531113 - M-F: 9:00 to 14:00 and from 16:30 to 19:00
Tel. 926531113 - M-F: 9:00 to 14:00 and from 16:30 to 19:00

How to control blinds with Sonoff

Last updated:
14 March, 2024
Reading time: 3 minutes

In today's tutorial, we are going to show you how to control roller shutters with SonoffThis brand has an extensive catalogue of devices and their cost is quite affordable. You can control everything with just your mobile phone, thanks to the eWeLink app. By the way, Sonoff products are compatible with Alexa, Google Home and Siri. So... Let's get to work!

For this mission, you will first need to shutter motors.

BEFORE GETTING STARTED: Materials to control blinds with Sonoff

You must make use of a roller shutter already automaticwith two push buttons. We explain how to motorise a roller shutter in another post. Once you have it, you will be able to control it with Sonoff Dual. Optionally, you can use 2 x 4K7 resistors and 2 x 33 pf capacitors.

As you can see, it's not much, as a Sonoff Dual is powered by 220. However, if you decide to use a NodeMCU, it would be more complex (and more expensive): several relays, power supply, box, etc. would be needed. 

STEP ONE: Installing the Tasmota fork of Stefanbode

Sonoff Duals cannot be integrated into Home Assistant as such, so you must replace your Sonoff Dual with a new Sonoff Dual. firmware by Tasmota. When you have the Tasmota fork of Stefanbode running, go to the device page with its IP. In the interface, set the module as a Sonoff Dual R2 and click save.

Then, access the "Console" menu to activate these commands:

  • SetOption14 1: this code will provide the interlock function of the pushbuttons, so they cannot be activated at the same time.
  • SetOption80 1 and SetOption81 1: enable the handling of the venetian blinds (don't forget to restart the Sonoff Dual when finished). 

Now it is time to configure the times for opening and closing the shutter. This is done by entering the following codes, again, in the console:

  • SHUTTEROPENDURATION *: the asterisk is replaced by the seconds to raise the blind all the way. 
  • SHUTTERCLOSEDURATION *: the asterisk is replaced by the seconds to lower the blind completely. 
  • PowerRetain 1: to retain the position after restarting Home Assistant.

And you would control the position of your blinds.

STEP 2: Hardware configuration

At this point, you should add resistors and capacitors. This will help prevent false activation of the switch. It is also essential when you are going to have wired physical pushbuttons. If you don't know how to do it, you can check this video by DrZzs:

To physically connect the switches to the Sonoff Dual, check that switch 1 corresponds to open and switch 2 to close.. If negative, swap the cables of motors 1 and 2.

STEP 3: Calibration

When calibrating the security shuttersIf the Sonoff Dual is set to "SHUTTER50PERCENT *", tell the Sonoff Dual what time corresponds to half of its opening (the command is "SHUTTER50PERCENT *") and restart.

Afterwards, configures the shutter buttons. On the console, enter the following codes:

  • SwitchMode1 2: mode 2 the button 1.
  • SwitchMode2 2: mode 2 of push-button 2.

In case they turn on when switched offUse these codes instead of the previous ones: "SwitchMode1 1" and "SwitchMode2 1".

STEP 4: Home Assistant configuration

To set up Home Assistant, use the Cover component:

#################################################################

### configuration.yaml

#################################################################

cover: !include covers.yaml

#################################################################

### covers.yaml

#################################################################

- platform: mqtt

  name: "Domology blind

  availability_topic: "tele/persiana_domology/LWT".

  payload_available: "Online".

  payload_not_available: "Offline".

  position_topic: stat/persiana_domology/SHUTTER1

  position_open: 100

  position_closed: 0

  set_position_topic: "cmnd/persiana_domology/shutterposition".

  value_template: "{{ value | int }}"

  command_topic: "cmnd/persiana_domology/backlog".

  payload_open: "SHUTTEROPEN".

  payload_close: "SHUTTERCLOSE"

  payload_stop: "SHUTTERSTOP".

  retain: false

  optimistic: false

  qos: 1

Restart Home Assistant and incorporate it into the interface. 

EXTRA STEP: Domotising blinds with Sonoff and Alexa

If you want Alexa to identify the blinds directly and can indicate their position, you only have to activate "Hue Bridge" modein the settings section. We advise you to change the name to "Friendly Name 1", which is the name that Alexa will recognise immediately.

Then, in the Alexa app, go to the devices section. After a while, you will see 2 (one per switch). Simply select the first one.

Conclusion

Now you know how to control roller shutters with Sonoffstep by step. We hope this post has helped you. If you read the advantages and disadvantages of home automationAfter this installation, you will know that your quality of life at home will be greatly enhanced!

Newsletter
Be among the first to receive our promotions by e-mail

Written by: Javier Marquez Barneto

Contents

Leave a Reply

Your email address will not be published. Required fields are marked with *

CONTACT US
If you need us to help you choose the product that best suits your needs, or if you have any questions, please contact us.
CONTACT US
SAFE PURCHASE
Online Trust is the leading quality seal for the internet in Spain. It is a distinctive seal displayed by companies that guarantee maximum transparency, security, and trust when buying and browsing their websites.
PAYMENT METHODS
SHIPPING
24H Manufacturing
Shipping 24/48h
SAFE PURCHASE
Online Trust is the leading quality seal for the internet in Spain. It is a distinctive seal displayed by companies that guarantee maximum transparency, security, and trust when buying and browsing their websites.
CONTACT US
If you need us to help you choose the product that best suits your needs, or if you have any questions, please contact us.
CONTACT US
PAYMENT METHODS
SHIPPING
24H Manufacturing
Shipping 24/48h
selectcrosschevron-leftchevron-right
    0
    MY CART
    Empty TrolleyBack to the Shop
      Calcular envío