Adventures in Home Automation with a Windows Insider

Daniel Schnabel de Barros in front of his computer.

Daniel Schnabel de Barros is a Windows Insider and software developer by day. By night, he channels Tony Stark by tricking out his home with automation. Read on for more about his projects and how you can also get started “adding smarts” to your home.

As a kid, Daniel was inspired by a neighbour who was ahead of his time. “One of the very first inventions that impressed me was his toilet,” Daniel recalled, writing over email. “He had the toilet flush electronically with a little push button similar to a door bell. He also had a rudimentary, yet sophisticated, system of pulleys, ropes, and weights that let you open and shut the house gates without leaving the car — just  by pulling down on a hanging rope.”

Daniel’s first opportunity to tinker with IoT arrived shortly after he purchased his first home with his partner. The house came with one garage door opener, and after just a week, his partner lost it.

“Not very keen to spend the money on a new set of openers, I decided to look into the garage door circuit and found out that it had an input connection for a push button that would open and close the garage door,” Daniel said.  “I thought I could use this as a starting point. From there I realized that I could just add a relay to the port and by connecting to an Arduino board, I could have it on WIFI and control the door with my mobile phone.”

In fact, Daniel first joined the Windows Insider Program to be able to get the latest images of Windows IoT. “By doing so, I was always able to obtain firsthand the new improvements and features released.”

“Also, having the power to provide feedback and being heard is amazing. I believe this helps Microsoft get a feeling about what people are working on and how to improve the OS to assist people with their goals.”

Daniel’s first prototype for his smart garage door worked marvellously, but one aspect continued to annoy him. Commuting daily to work on a motorbike, Daniel still had to take several steps to open the garage door when he got home: take gloves off, find mobile in backpack, wait for mobile app to open, and finally open the door.

“It was not great fun on raining days,” Daniel said. “So, I decided to upgrade the module to a Raspberry Pi which allowed me to improve the application and include voice recognition. This time now, when approaching my home, I could easily from my helmet Bluetooth activate the garage door. Happy days!”

From there, Daniel embarked on other handy projects, like:

Voice-controlled Lighting

Daniel installed mics around the house, enabling him and his partner to turn all the house lights off by shouting “Good night.” What about dimming the dining room lights? Just say, “romantic dinner.”

Automated BBQ

“I had been given an outdoor rotisserie type BBQ from my father in law and after a few months of use, I managed to burn the power supply that makes the engine to rotate the spits. Instead of buying a new one, I decided to replace the module that makes the motor run with an Arduino board and used the output pins to generate a Pulse With Modulation (PWM), which would allow for control of the speed of the rotation.”

“Barney,” the automated BBQ.

Image: “Barney,” the automated BBQ

“To ‘beef-it up’ 😊 I also added a touch screen that allows us to graphically check the temperature, as well as control the exhaust fan and lights along with the rotation. Barney, my dog was honoured when we baptized this project with his name. Some improvements are yet to come such as connecting to a WIFI module so this can be also be operated by mobile, in addition to voice commands.”

“Barney,” the automated BBQ.

Image: A close-up of Barney the BBQ’s touch screen

Touchscreen and Voice Commands for the Home

“Inside the house, I mounted a 7′ LCD screen on the wall, which would allow us to control the items at home without using the mobile. It all started with a small web app with a not so great interface.”

A close-up of Barney the BBQ’s touch screen.

“Which slowly got new functionalities such as the forecast…”

7’’ LCD screen on the wall.

“Once I started to learn more about the .NET SignalR, the design improved with responsive buttons so the icon would be updated even if lights were switched on and off from the mobile app or using the wall switch itself.”

“Further improvements included an interface to select audio streams such as YouTube and Spotify API’s. So now, either using voice commands or the touch screen, we can also listen to music around the house via the ceiling speakers. It is still far away from complete but each feature I add in keeps getting it closer to what Tony Stark had. 😊”

Different versions of smart screen.

For Daniel, implementing voice commands is one of the most exciting aspects of his adventures in creating his own smart home. “As a developer, most of the time I only get so see pieces of code and unit tests. Being able to control real devices with home automation feels like bringing lines of code to life,” Daniel said.

Most challenging so far, “but also great fun,” has been figuring out how to automate light switches. “Basically, I purchased the cheapest smart light switches I could find on eBay, which not surprisingly came with a not so great application with limited operations.”

“To figure out how the vendor’s application controlled them, I used a network package capturing tool on my LAN, intercepting the communications between the app and the light switches. I was then able to identify the message format used to control the lights. Just a few lines of code later, I was able to send the same message using my own application, which then opened a door for limitless possibilities.”

What’s next on the IoT front for Daniel? He’s curious about “adding some smarts” to his car to create remote access to features like lights, windows, and the horn. He also thinks it would be exciting to add a real-time tracking mechanism or perhaps a bump sensor that would alert him in the case of someone hitting the car.

For anyone with an interest in getting started with IoT, Daniel noted that luckily there are many resources online with tutorials for all levels. “One place I found very interesting as a source of inspiration is where people are kind enough to share their hardware list and app source so you can easily modify a project to suit your needs,” he said. “Likewise, forums such as the Windows IOT MSDN forum is a great source of knowledge with very helpful people.”

“The best project to start with, in my opinion, would be something that would allow you to resolve some problem that you encounter on a daily basis, that could be sorted with some sort of automation. This would keep you focused on finishing the project, and along the way every single improvement or feature addition will be very rewarding.”

Editor’s note: Daniel was a winner of the Insiders2Campus Contest in 2018, which brought some our biggest fans to Microsoft Headquarters for an exclusive Insider experience. Follow us on Twitter for breaking news on future opportunities like Insiders2Campus and the chance to be featured on our homepage