I replaced a mechanical light switch with a SwitchMote in my lab today. Quite exciting. The video shows the gist of how this worked out and how another synch-ed SwitchMote can control it!
I put together a quick video to show the progress of SwitchMote and a simple demonstration of how it works and how it can be used in home automation. My goal is to offer a smart wireless light switch controller that allows syncronization with other units independently (without the need of a gateway/coordinator) to create light scenes, and increase the usability of a regular light switch.
Here’s a peek at another project I’ve been working on lately, SwitchMote. It’s a compact shield for Moteino that has a mains switching power supply and a solid state relay to drive a mains load. I’ve designed this to work for lights. The idea is to replace a single regular light switch with this so that I could control lights from the home-automation controller, while allowing it to be operated manually as well. An LED indicates the status of the light/load (LED on when light off).
In the previous part of this post I described the conceptual high altitude picture of a secured, realtime home automation gateway. In this part I will go into more detail and show some of the issues I’ve faced and and solutions to address them.
First, the webserver had to be put behind a mandatory SSL connection. All incoming HTTP port 80 traffic would be permanently redirected to secure sockets layer port 443. That was pretty easy with a self signed SSL certificate and some webserver configuration. Then HTTP basic authentication was put in place so that users would first need to be authenticated before web access would be granted. Again, not too complicated, using a .htaccess file and some changes in the webserver config file. Custom authentication can also be implemented, but for the purpose of this tutorial basic auth is good enough.
Now to the harder part. I wanted the websocket server as a separate entity from the main webserver. Several reasons for that, but mainly because of scaling and I like to keep separation of concerns and have a modular design. That exposes several issues. Continue reading
The title is actually incomplete but didn’t want to make it too long. What I’m about to describe is an initiative on how to put together an encrypted, authenticated, realtime, RaspberryPi powered home automation gateway. It will be a few separate posts that will go from concept to implementation, using a real world example of how to control something in the house. I’ll break it down and explain the big picture and each part that needs to be addressed. But first, a little more background and reasoning behind this effort.
Above you can see my temporary gateway setup. It’s very simple – I have a RaspberryPi powered through an ATXRaspi, and a Moteino which acts as the gateway to my wirelessly controlled house. It’s hard wired to my home router because the wireless adapters are simply junk, not reliable. Also hooked up to a monitor and keyboard.
I’ve seen tons of blogging and articles on how to make something blink, turn a servo or LED on, even do more real things like turn ON lights, change the thermostat or control some household appliance, from your smart phone. All cool and dandy. But almost everyone seems to completely skip security. The blog posts end when the LED or light turns on, and everyone seems to be super excited about the cool thing they just did. But I’m left there with a raised eyebrow wondering if those people know what they are doing. Security is of major concern to me because if I hook up my garage doors, lights and perhaps other appliances to the interwebs, I don’t want unauthorized access. Is that a nobrainer or am I paranoid? Continue reading