Home Assistant

Custom Motorized Roller Shades

Recently we had a pavilion built in our back yard but the in the late afternoon prevented us from enjoying it. We decided to purchase roller shades but I knew, like everything else, we needed to control it from our phones. Looking into motorized shades, they are extremely expensive and we are too froogle to buy them. After doing some research I felt confident that I could build them myself.

Home Depot sells Coolaroo roller shades that were perfect. https://www.homedepot.com/p/Coolaroo-Stone-Cordless-UV-Blocking-Fade-Resistant-Fabric-Exterior-Roller-Shade-96-in-W-x-96-in-L-471309/315637152 We purchased a 10′ and 8′ for our needs.

There are many roller shade motors available on the internet. We found the motors from Rollerhouse https://amzn.to/3lxhaFp which had a many options, rechargable battery motors, 120v, 12v DC and 24v DC. Originally I measured the tubing on the Coolaroo shade and purchased one that I thought would fit, knowing that the tube didn’t look like the ones on Amazon. Unfortunately, it didn’t work because the channel where the fabric is held is just big enough that it prevents the motor from sliding in.

Coolaroo roller shade tube 1″ 1/16
Coolaroo roller shade tube fabric channel

I was dissapointed but encouraged to build my own with the Coolaroo fabric. I purchased 1 1/4″ EMT tubing from Lowes (Home Depot didn’t have 1 1/4″ in stock. https://low.es/3sRQ148. I purchased two 10′ sections as I had a 10′ and 8′ need.

I also purchased two of these 1 1/2′ roller shade motors from Rollerhouse on Amazon. (DC24V remote control and bracket). I also purchased one of these 24V DC power supply to control both roller shade motors.

When you get the roller shade motors, you’ll notice the rubberized circle piece will be too large to get into the tube. Use a dremel to remove the rubber only until you reveal the aluminum inside it. Keep testing the piece as you want it to enter easily but not have much or any play in it. Try to keep it uniform while you’re using the dremel. This is the wheel that makes contact with the inside of the EMT tubing and rolls the shade.

Original rubberized wheel before modification
Modified wheel showing the aluminum revealed
Modified wheel showing uniform adjustment

Next, use a razor blade and remove the small strip of rubber on the end piece. This will allow it to slide into the EMT tubing.

Small strip of rubber that needs to be removed on all sides.

Now confirm the motor can slide into the EMT tubing with minimimal movement. Next, measure from the black rubber piece towards the wire on the motor (where the EMT tubing makes contact) to the rubber wheel you used the dremel tool on. Record the measurement in the middle of the rubber wheel. This is to identify where we will put screws in to hold the wheel in place and ultimately turn the EMT tubing.

Measuring 10.5″

Measure your existing tubing and cut the EMT tubing to size with a cut off wheel. If you don’t have an existing tubing, measure your fabric layed down (without stretching) and add 1/4-1/2″ to each side. This will allow the shade material some room in case its not hung perfectly level or you don’t apply it to the tube perfectly.

Next, use a Sharpie marker and draw a perfectly straight line down the EMT tubing. I used aluminum angle from Home Depot to get a perfectly straight line. https://thd.co/3yYEc01. Next, I used carpet doubled sided tape from home depot and ran it down the EMT tubing, about 1/8″ away from the line I drew. Unfortunately, I couldn’t find this on Home Depot’s web site, but it was in the paint section and said it was for carpet. It’s about 1-1.5″ and had mesh inside it, and very sticky. Gorilla also makes ones but I didn’t try it.

Next, take your current shade and unravel it from the tube and remove it from the channel. You can also use your own fabric. With the black line facing up on the EMT tubing, take the fabric and place it on the doubled sided tape with the fabric just touching the black line. Be cautious if your fabric stretches, you do not want to pull/stretch the fabric when applying it to the double sided tape. Press the fabric firmly into the doubled sided tape.

Arrows indicating the black line and fabric following it perfectly leaving gap on both sides between end of tubing and fabric.

Next, take your measurement of the motor to the rubberized circle and make two dots on your tubing. Mark one dot right near the line (not through the fabric) and another one directly on the opposite side. Insert your roller shade motor into the tubing and use #8 x 1/2″ self tapping screws and insert them into the two dots. This will secure the rubberized circle in the EMT tubing and allow is to all work.

Showing the self tapping screw near the fabric
Showing both screws, directly opposite of each other.

Now follow the directions on mounting, pairing the remote and setting the up/down limit. Lastly, I purchased the BroadLink RM4 PRO IR/RF universal remote. The roller shade motors come with RF remotes that work on 433Mhz and the BroadLink allows me to learn the RF commands and integrate them into Home Assistant.

Lastly, Home Assistant already has an integration with BroadLink. Follow the instructions to learn the commands through Home Assistant. I then used a template cover to create the roller shade entity.

cover:
  - platform: template
    covers:
      pool_pavilion_shade_front: #Your Entity Name
        friendly_name: "Pavilion Front Shade" #Friendly Entity Name
        unique_id: "PavillionFrontShade" #UniqueID so you can edit it within the UI and assign to an area
        device_class: shade
        position_template: 50 #work around so both up and down buttons are always enabled
        open_cover:
          service: remote.send_command #service to leverage to raise the shade up
          data:
            device: PoolShadeFront #device name used when learning the RF command
            command: Up #command name when learning the RF command
            hold_secs: 2
            num_repeats: 2
            delay_secs: 0.4  
          target:
            entity_id: remote.broadlink_pro_remote #entity name of BroadLink RM4 Pro
        close_cover:
          service: remote.send_command  #service to leverage to lowerthe shade down
          data:
            device: PoolShadeFront #device name used when learning the RF command
            command: Down #command name when learning the RF command
            hold_secs: 2
            num_repeats: 2
            delay_secs: 0.4
          target:
            entity_id: remote.broadlink_pro_remote #entity name of BroadLink RM4 Pro
        stop_cover:
          service: remote.send_command  #service to leverage to stop the shade
          data:
            device: PoolShadeFront #device name used when learning the RF command
            command: Stop #command name when learning the RF command
            hold_secs: 2
            num_repeats: 2
            delay_secs: 0.4
          target:
            entity_id: remote.broadlink_pro_remote #entity name of BroadLink RM4 Pro
      #####If you have a second shade#######
      pool_pavilion_shade_side: 
        friendly_name: 
        unique_id: "PavillionSideShade"
        device_class: shade
        position_template: 50
        open_cover:
          service: remote.send_command
          data:
            device: PoolShadeSide #device name used when learning the RF command
            command: Up #command name when learning the RF command
            hold_secs: 2
            num_repeats: 2
            delay_secs: 0.4  
          target:
            entity_id: remote.broadlink_pro_remote
        close_cover:
          service: remote.send_command
          data:
            device: PoolShadeSide #device name used when learning the RF command
            command: Down #command name when learning the RF command
            hold_secs: 2
            num_repeats: 2
            delay_secs: 0.4
          target:
            entity_id: remote.broadlink_pro_remote
        stop_cover:
          service: remote.send_command
          data:
            device: PoolShadeSide #device name used when learning the RF command
            command: Stop #command name when learning the RF command
            hold_secs: 2
            num_repeats: 2
            delay_secs: 0.4
          target:
            entity_id: remote.broadlink_pro_remote
  

Custom Motorized Roller Shades Read More »

Pool Automation with ESP32 and Arduino

During the COVID pandemic in 2020 we decided to purchase a pool. With my love for technology I wanted a way to fully automate all pool functions through our phones using Home Assistant, HomeKit, Alexa, MQTT and NodeRed. Pool automation is not something the local pool builders are used to in our area and I wasn’t willing to spend big money on one of the big brands; Jandy (iAquaLink), Hayward, Pentair – especially without having knowledge of installing them. I have never worked with microcontrollers before but have had years of experience with programming and integration. This was enough to give me a project through the winter while we were spending our time isolating.

I did my research and purchased a few ESP8266 and ESP32 development boards from Amazon. I ultimately went with the ESP32 due to the increased memory and GPIOs available. Next was to determine which IDE to use and because I have knowledge of c# I felt Arduino would be the easiest to work with. I did get the Visual Micro plugin for Visual Studio as it just streamlined the development process.

ESP8266 – https://www.amazon.com/dp/B081CSJV2V/ref=cm_sw_em_r_mt_dp_8VXX29SDKAKVQHX2BZG7?_encoding=UTF8&psc=1

ESP32 – https://www.amazon.com/gp/product/B086MLNH7N/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

I’ve installed remote starters, car stereos, soldering and other various things but I had never worked with electronics to this level. I really need to create a proof of concept to make sure I could actually do this. I also purchased an eight channel relay board from Amazon, miscellaneous jumpers, LED’s, momentary buttons, resistors and diodes.

I was able to prove out the basics of what I would need. Next I wanted to have a touch panel interface and came across Nextion screens. These screens are very easy to use, full support for Arduino and has a GUI builder. I used a Photoshop to mock up some screens and continued the proof of concept.

Now the next challenge was figuring out how to make it all work with my pool equipment. I had various voltage requirements that were necessary to control everything and I wanted a simplified design that looked professional and was reliable. As you can see from the circuit diagram I drew below, I needed:

  • 5V DC for the ESP32 and Nextion screen
  • 12V DC for the momentary LED switches
  • 24V AC for the valve actuators, to control deck jets and waterfall
  • 110V AC to control the pump, pool lights and landscape lights

I headed over to Fiverr and spoke to a few people that specialized in electrical design with microcontrollers and Arduino. One gentlemen I came across, Mithira Udugama, seemed to be newer to Fiverr but we really connected and he seemed genuinely interested and confident in helping me build an electrical circuit and PCB.
https://www.fiverr.com/mithiraudugama/design-and-develop-electronic-circuits-for-your-requirements

After a lot of conversation back and forth understanding the requirements, he built a full electrical schematic, provided a BOM (build of materials), designed the PCB and even helped me print it. Mithira is extremely talented and did such an amazing job that I asked him to put his name on the PCB as well. I HIGHLY recommend him to anyone looking for electrical or PCB design.

Since this was going to be outside I needed to make sure that it could handle the elements and found a NEMA IP67 enclosure with a clean front panel so I could see the touch screen panel and LED buttons.

I started to assemble and wire everything in the enclosure, attempting to keep a clean and professional appearance. I’m happy to report that has been running for a few months now without any issues.

Pool Automation with ESP32 and Arduino Read More »