Smart Motorized Shades for Under $100 with Home Assistant

I’ve wanted to have motorized shades for a while now, and have not found an ‘off-the-shelf’ product that has the features I need, while remaining at an affordable price. The closest product that I’ve found is the IKEA ‘Fyrtur’ smart blinds. However, when pricing out my bedroom window which is almost 96″ wide, it would require two of the largest sizes available, costing over $500 CAD. Not wanting to spend that much, I set out to DIY the project.

The following tutorial is meant as a guide. I’d recommend reading through, and taking ideas from it that can fit with your requirements. I’ve done this project twice now and have modified it each time so clearly there are different ways to accomplish this!

Smart Roller Shade Components

Below, I’ve listed the components that I purchased for the project. If you have some of these products, or alternatives, than you may not need all of the parts. In total, these purchases cost me around $80 CAD, or about $60 USD. The most expensive component was the roller shade motor at around $45 CAD or about $33 USD.

Note: I cannot vouch for any of sellers given by the Aliexpress links. I purchased the 12V motor through that seller but as always check the seller ratings. I am only providing links for reference.

A roller shade motor is needed to drive the shade up and down. This component is something that (at least in Canada), I have had trouble sourcing. Therefore, I purchased mine off of AliExpress:

There are several different types of roller shade motors that you can purchase:

  1. A 12V motor only. This is the model I purchased and will be using for the guide. Going this route will require you to purchase a motor controller and a power supply, at a minimum
  2. A 120V motor and remote control. This model can be plugged directly into the wall and uses its own remote. This will limit your ability to integrate the motor control with other smart home products but does provide an easy method to get smart blinds.
  3. A 120V motor with control and Tuya integration. Again, this model can be plugged directly into the wall for power. This model can be integrated with Tuya which has native Google Home and Amazon Alexa integration. However, this model is more expensive than the others.
  4. A battery and solar panel powered motor. This model does not require any external power, and can be controlled through an RF remote. Integration with smart home products is limited however, as an RF bridge is required to control the shades and the signal is one directional, meaning that you won’t have any state history if the shades are opened or closed. This motor configuration is also the most expensive (almost 3x that of the simple 12V motor option).

I’d recommend checking out the video by “The Hook Up” that goes over a lot of the pro’s and con’s of these types of roller shade motors! If you want to follow my guide completely, then I went with the 12V motor. Its the cheapest, does not require mains power which is much easier to hide small wires, and since it uses a 12V power supply for the control, the integration possibilities are the most open.

To drive the 12V motor, we need a motor driver.

The motor will change its rotation depending on the direction of current. Simply put, using the motor driver will allow us to control the direction of current which will allow us to raise and lower the shades. Additionally, this type of motor controller driver uses a 12V supply and provides a 5V output, perfect to power the Wifi chip we will be using. Furthermore, as a bonus, this motor drive can independently control two of the roller shade motors, perfect if you have two windows together.

I’d like to thank “Dr.Zzs” for the inspiration to use this motor driver for my project. You can find more about it through his video here

For my project I am using a ESP8266 based chip, the D1 Mini. These are cheap boards that are 5V powered, have on board Wifi, and will easily integrate with the Motor Controller Driver.

Note: the D1 Mini’s I’ve linked do not come with the pins pre-soldered onto the board. The soldering is relatively easy for these pins and there are many tutorials available online. If you’re reading about DIY smart blinds and haven’t tried soldering onto a circuit board like this yet, these boards are cheap enough that they might be a good place to start!

If you’re comfortable soldering wires from the D1 Mini boards to the motor controller drivers, then these aren’t necessary. But they are handy to have in projects like this, and reduce the need for soldering.

Finally, we need a 12V power supply to drive the roller shade motor and power the motor+wifi controllers. If you are going to be purchasing one, grabbing one with a female terminal connector (like the one I’ve linked) is handy to reduce the need to cut and solder wires!

Roller Shade Options

As far as I can tell, there are 3 main options when choosing a roller shade, varying from completely purchased with little to zero DIY, or to requiring almost complete DIY:

The roller shade motors are designed to integrate with existing shades which use a 36-38mm diameter tube.

If you can find a shade which uses this size of tube, than the roller shade motor should work with minimal to zero modifications. I had trouble finding shades that are low cost which use this design.

If you can source these 38mm roller shade tubes, then you can combine your own shade material with the tube. In Canada, I had a lot of trouble sourcing these tubes, often with shipping costing 20-30x the actual tube cost. As such, I have not personally purchased tubes from sites such as this one, but these tubes look like a cheap option.

If you can find the tube, then you should be able to purchase the shade or shade material and transfer it to the proper shade tube.

If you CAN’T source the shades which use 38mm roller shade tubes, nor the tubes themselves, than the full DIY solution is to use ABS or PVC pipes. This is the method I went with.

1.5″ inch, schedule 40, ABS tube, happens to have an internal diameter of approximately 41mm. While a bit too large for our roller shade motors, we can 3D print (I did say this was full DIY) adapters to fit the motor to the tube.

I’ve done the hard work of creating the adapters and have linked them on Thingiverse. I’ll discuss this method and provide the link in the next step of the guide. If you don’t have a 3D printer, maybe now would be time to get one? They’re fantastic for DIY projects like this!

Thingiverse link for adapters here

If you’re in Canada, I may be able to print the adapters and ship them to you if you can pay for shipping. However, unfortunately, the cost of shipping here in Canada is quite expensive.

Hardware Assembly

There are three main components required for the roller shade motor system:

  1. The rotation sensor: This connects to the end of the roller shade motor and rotates while the roller shade tube rotates. This is what lets us set the limit positions to stop the motor when the blind is raised and lowered to the full positions.
  2. The motor driver: If using the slotted 38mm roller shade tube, this motor driver will interface with the slot and provide the rotation to the tube. In the above image, the adapter I 3D printed for the ABS tube is currently covering the motor driver.
  3. The end cap wheel: Again, if using the slotted 38mm roller shade tube, this end cap will interface with the slot. It is free spinning in the bracket (provided in the roller shade kit). As well, in the above image, the adapter I printed on this end cap.
If you were able to source the proper roller shades or roller shades tube, then you will not need to purchase the ABS tubes, nor create the roller shade motor adapters. You can likely skip some of these steps

For my window setup, I will be using a 36″ roller shade. I purchased a simple blackout roller shade from one of the big box hardware stores.

It uses is a small cardboard tube which is too small for the roller shade, hence I will be cutting the shade material off of the tube, and taping it to an ABS tube. The ABS tube is 1.5″ diameter, Schedule 40, and also 36″ long. When selecting the ABS tube, double check that it is not warped. I had to check a few difference pieces to find one that was not bowed like this:

Next, print off the roller shade adapters. The Thingiverse link is where you can also find the print settings I used.

The adapter should all hand press fit onto the roller shade components (rotation sensor, motor driver, and end cap wheel). Lightly sand them if they do not quite fit. As you can see, since the ABS tube inner diameter is not constant, I had to lightly sand the motor driver adapter. Once everything fits, I like to apply a small drop of superglue to the motor driver to ensure that the adapter does not detach. Depending on how tight the fit is between the other adapters, you may need to lightly glue them as well.

Next, measure the length from the end of the tube to the hole located in the motor driver adapter. This is where we will need to place either a pin or a screw to lock the motor driver to the tube:

As you can see, I originally mis-measured and had to re-drill. While lining up with the hole on the motor driver adapter would be ideal, I’ve found that as long as you pre-drill, then the 3D printed adapter should be okay if you screw into it from any position. Make sure you get the screw as flush as possible with the ABS tube. If it sticks out, then you may create a slight notch in the shade fabric when it is rolled around the tube.

Afterwards, we need to remove the shade material from the original shades and attach it to our ABS tube. This is likely the most tedious part of the entire project because if the shade or shade material is not attached level, then when you roll up the shade, it will telescope to one end:

The method I use to eliminate the telescoping is as follows:

  • Attach the shade brackets and the shade motor (inside the ABS tube) without the shade material on it. Make sure this setup is level.
  • Remove the shade material from the old shades. If there is glue (or in my case, cardboard) residue left over, make a straight cut across to remove that material. Anything caught in the shades as they roll up will cause telescoping.
  • Using two pieces of tape, attach the roller shade to the ABS tube at each end. Make sure it is completely unrolled. It helps to have a second person to look to make sure that the bottom of the shade is hanging completely level. Adjust as necessary to make sure the shade material hangs level.
  • If you purchased a 12V power supply with the connector terminals, you can then attach it to the wires on the shade motor to begin winding up the shades. Watch for any telescoping and be prepared to disconnect power if they start to telescope to avoid damaging the shade material.
  • If it telescopes, reverse polarity of the motor to unroll and try to realign the shades by raising and lowering the tape. Repeat this and the previous step until the shades can fully raise and lower.

Once the shades roll up completely with only minimal telescoping, you can tape across the entire length of the tube if you feel they should be further secured.

You may have noticed that when you run the roller shade, the position that the shade stops at does not correspond to the top nor bottom of the window. This can be adjusted and is where the yellow adjustment key is used. On the motor is two screws. Each one corresponds to the up and down limit of the shade.

Rotating these adjustments will raise or lower the endpoints of the roller shade. There are provided instructions when you purchase the motor on how to perform the adjustment.

Controller Assembly

To program the D1 Mini controller, I will be using ESPHome and Home Assistant. I can’t cover how to setup Home Assistant in this tutorial, however, I can briefly talk about setting up ESPHome if you already have Home Assistant Installed.

First, follow the instructions on the ESPHome page for Installing ESPHome.

Next, plug you D1 Mini into the computer that is running Home Assistant. You may need to restart the ESPHome add-on in Home Assistant for it recognize the D1 Mini USB. Now, click the plus button located at the top right of the page to create our ESPHome module. The configuration will walk you through setup.

Create a unique name for your shades controller
Device type is D1 Mini
Add in your Wifi credentials (2.4GHz only). Access password can be left blank

After finishing, you should see a large circle asking you to select the upload port. In the drop-down, you should be able to select the USB port corresponding to the D1 Mini you connected:

However, first, lets update the code on the newly created node. In my example I called mine “shades_test”. Click the edit button and you should see the default configuration as follows:

Below the last line, you can copy this code pasted below.

  - platform: gpio
    id: 'shade1_a'
    pin: D3
  - platform: gpio
    id: 'shade1_b'
    pin: D4

  - platform: output
    output: 'shade1_a'
    id: shade1a
  - platform: output
    output: 'shade1_b'
    id: shade1b

  - platform: template
    name: "Motorized Shade"
    id: livingroom_window
    optimistic: true
      - switch.turn_off: shade1b
      - switch.turn_on: shade1a
      - delay: 30s
      - switch.turn_off: shade1a
      - switch.turn_on: shade1b
      - switch.turn_off: shade1a
      - delay: 30s
      - switch.turn_off: shade1b
      - switch.turn_off: shade1a
      - switch.turn_off: shade1b
I used the code from Dr.Zzs video as a starting point and modified it for my setup. Thanks again to him for this work!

This will create a “cover” (in our case, a shade), that can be integrated into Home Assistant. Click SAVE than CLOSE. Double check that the correct upload port is selected, then click UPLOAD. Once that finishes, you should be able to see that the newly created Node is showing Online in the ESPHome Dashboard. If it is, you can unplug the D1 Mini from the computer. You shouldn’t have to plug the D1 Mini back into the computer after this point, as you can upload any changes to the code over Wifi.

The wiring diagram for this setup is relatively simple. The 12V power supply will power the roller shade motor, and the motor controller circuit will output 5V power which can be used to power our D1 Mini.

You can only power the motor controller board with 12V. Any more without removing a jumper pin will damage the onboard chip, as well as the D1 mini.

You can use the dupont connectors to connect the circuit. Afterwards, you can package this all up into a small hobby box. There’s lots available on Amazon or you can 3D print one yourself. Just keep in mind that the motor controller can get warm so make sure it has adequate ventilation.

My circuit has 2 extra wires (and is not connected to the roller shade motor in this image). The motor controller can independently control two motors, and I wired up the D1 Mini in case I want to control a second motor in the future. Once tested, I like to add a bit of hot glue to prevent any wires from disconnecting.

After connecting the wiring and powering on the D1 mini, we can integrate it into Home Assistant. In the Integrations page, you can add an ESPHome node. The host name can be found if you look at the logs of the node in the ESPHome dashboard page. For example, in my previous example, the host name would likely be shades_test.local.

Once added, the shades should appear in Home Assistant that let you raise and lower the shade:

If you find that the directions are reverse (i.e clicking up lowers the shade), you can reverse the connection to the shade motor from the motor controller.

In a future tutorial I will show some integration possibilities, such as raising and lowering the shade based on time of day, sun angle, and if the TV is on or off.

Conclusion and Finishing Touches

Since I built my shade from scratch, it did not include any housing which left the roller tube exposed. While it didn’t look that bad, I prefer the shade to be covered. I found that the IKEA picture holder shelves are about the right size to cover the entire setup, and provide a clean look. I used the shade brackets that I had left over from the blinds that were in place before this project.



And thats it! If you decide to take on this project, let me know! And as always, if you have any questions or run into any problems, let me know, I’m happy to help.

Leave a Comment