Creating HomeKit Blinds | From Scratch

A journey through thread and wire :: AKA the coolest thing you could’ve had in the 90s.

Image for post
Image for post
Custom Homekit Enabled Blinds

I built roman blinds from scratch for my home office last year. These blinds sit behind my two computer monitors and while I got a custom aesthetic out of it, the position and mechanism left much to be desired in terms of usability. It sounds like a whine but I would just leave the blinds up all the time to save the hassle of climbing behind my monitors to reach the drawcord.

  1. The Blinds
  2. The Hardware
  3. The Software
  4. Retro-fitting
  5. Final Thoughts

The Blinds

Image for post
Image for post

I bought fabric from Fabricland that went with the general feel of the room. It’s an old-timey fabric used in a minimalist roman-blind shape to bring it into this century; it also has a warmth to it that is well needed in my otherwise black, white and gray office.

Measuring the fabric to the window size with an extra 2 inches I sewed the edges over and behind the blinds fabric. I then divided the blinds into 4 sections and sewed/glued dowel rods on those lines; this is where I would attach the strings later on. I added more dowels in between those areas to help create even folds and stringing three lines of cord from the bottom through the main dowels to the top bar I had the main structure complete. When I had first built these blinds I installed a standard cord-lock but for the motorized version I would undo that mechanism to this point.

The Hardware

  • Raspberry PI 3 Model B
  • Double Relay
  • 12V/2A transformer PSU
  • 12V High-Torque Electric Motor
  • Wire

Now, early on I had been using a digital servo because of the relative hardware simplicity compared to what I perceived the relay+motor setup to be; I wouldn’t suggest that if you’re looking to lift/lower any blinds other than those extremely light cloth blinds.

For the analog motor setup I chose to use a double-relay because relays (while they’re not solid state and thus potentially susceptible to mechanical failure) are able to withstand much higher voltage for longer than a transistor or switch, etc..

Image for post
Image for post

The two relays receive the same voltage power but switch the polarity given to the motor by which side of the motor’s lead is getting power which allows for directional control over the motor depending on which relay circuit is closed by the Raspberry PI. I used jumper wires and soldered some telephone wire for the motor-to-relay and power-to-relay connections.

The Software

Image for post
Image for post

Part of the reason I knew I could complete this project is that there is already pretty darn good, unofficial, HomeKit support for linux devices such as Raspberry PI and Arduino. It comes in a Node module from Nick Farina (and contributors) called homebridge which is open source and has plenty of community implementations around Github. The other great part is that it is a NodeJS server, a technology I’m all too familiar with. Installation was a breeze and there is great documentation in the repo if you’re interested.

When I was proving the concept for these blinds, there was no homebridge implementation for servo-powered blinds so I wrote my own. Once I realized my $3 servo or any other servo wasn’t going to be as efficient, capable or quiet as the 12V motor I resorted to, I stumbled on an open-source homebridge plugin that was written to enable HomeKit Support on already-motorized “dumb-blinds” from Radosław Sporny. He too was using relays to control his analog motors so with only a little of my own tweaking to his code, I now had control of the motor.

Retro-fitting

The drawstring mechanism I had before wasn’t going to cut it. Even if I had simply wound the usually hand-pulled drawstring around a wheel I would be losing too much torque from the string buildup around the wheel. I removed the mechanism and grabbed another dowel this time drilling holes to feed the three lines through. After some shimming and fitting I had the motor installed on one end of the dowel-shaft and a ring-guide holding the other teflon-wrapped end. This ring actually broke and so I replaced it with a holder drilled out of MDF.

Image for post
Image for post
The retro-fitted dowel-joiner!

At this point, I re-installed the blinds to my window and simply adjusted the timings for the lifting and lowering of the blinds and was finally done!

One of the biggest benefits of the mechanism being housed behind the topmost section of the blind is that it’s hidden from view with only a white lead running down the side of the window for power to the motor.

Final Thoughts

I always relish seeing a project through from start to finish. This one in particular was a unique opportunity for me to do just that and I would do it again. Now I’m looking for other things to automate 😎.

I would recommend this DIY project to anyone with basic node experience

Written by

Canadian developer with a passion for good work and tasty integrations. Philosophy/Music Major turned Entrepreneur/Software Developer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store