Control Your Windows & Shades with Voice

A guest blog post by Laurent Chervet

While at home sick one day, I thought that I’d try out some new components for my Project Alice home assistant module, so I started doing some research.

I needed to capture voice commands, transform those voice commands into text, and interact with multiple Raspberry Pi devices scattered all around my house. After researching voice recognition and finding different existing systems — some deprecated, some very difficult to onboard — I found Snips while researching on Stack Overflow.

After a quick recon on their site I decided to give Snips a shot. I uninstalled the previous voice recognition solution on my main dev Raspberry Pi and installed Snips. Following the documentation to install the Voice Platform was pretty seamless, so I arrived quickly at a basic working state where Snips was able to listen and understand me. My connected home module design was already using MQTT to communicate between devices, so I was happy to learn that Snips actually uses MQTT as well! The last bit of installing I did was to sub a ReSpeaker Mic in for the mini usb mic that I was using to test.

I started rewriting my current home module to integrate Snips as a working assistant in my house. Some actions were already designed from a previous solution, such as lamp controllers and a weather station, so I needed to identify another need to put Snips to use. I finally landed on controlling my Velux roof windows and shades, using my voice.

At this point, I had two possible approaches. I could try to hack into the IO home control radio protocol by sniffing the 868mhz radio band used by Velux for their controllers to communicate with the windows. Or I could hack an already available hardware. To be clear, sniffing the radio signal and demux was way out of my knowledge range, and I couldn’t find anybody on the web who had done it previously. So the hardware route was the one I took!

After searching in some forums, I found someone who had modified very simple Velux wall remotes with 3 buttons. But that was not exactly what I wanted. I was looking to entirely control my windows with my voice, including choosing which window(s) to open, how much to open them, etc. So I decided to sacrifice one of the remotes that came with my Velux shades years ago, the KLR 100 (note: for new windows these days, you’d get the digital remote, KLR 200).

The idea was simple. The remote could communicate with the windows, but it needed someone to press the buttons. Why not let that someone be a Raspberry Pi Zero W? So off I went, opening the remote and soldering on the buttons, adding a grove mechanical relay to some of them. The relay simply closes the buttons, when I put there respective gpios to high. The basic test script was receiving keyboard inputs and using the buttons according to the user typed number.

And it was working! So well in fact, that I decided to replace the heavy mechanical prototype grove relays with some tiny electronic reed relays that function on 3 volts. I made a little board for these tiny reed relays in order to connect almost all the buttons, including the Reset button. I filmed a quick video showing my first attempt with reed relays (video below).

I was finally able to fully control the remote from my Raspberry Pi Zero! Now it all depended on the program and my ability to make it possible to navigate the menus automatically. It took me a while, but I came up with a solution using arrays as command, numbering the buttons, and calculating wait times. I then added the remote 5 volt powering to the Raspi so as to programmatically reset the remote in case I needed.

So there we go — I’m now controlling my windows & shades with my voice!

My programmed commands can accept 3 variables: Room, Percentage to Open, Time before Closing Again

If you are interested in building yours, or just interested in what I used, here are some useful links:

If you don’t have any hardware components, I’d suggest the all-in-one Maker Kit from Snips, a complete DIY smart speaker that consists of a Raspberry Pi, speaker, mounting board, and other key parts — everything you’d need to enable voice control with the Snips Voice Platform. I’m currently testing one out, you can get yours right here: https://makers.snips.ai/kit/

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

A version of this blog post originally appears on Laurent Chervet’s personal blog, available here. To learn about Project Alice and other hacks from Laurent, follow his blog.