Smart Ass Home

For a long time I’ve been interested in smart homes and doing such project myself calling it the smart ass home. This project is going to a joint adventure of electronics and programming, but I will focus on the electronics part on this blog and only touch on the programming side of this project briefly and in very high level.

The first phase is to create skeleton for sensor reading and controllable things in the house which can be controlled with Android  app. If everything works out and I am happy with the results I will releases everything as open source. When it comes to code I am very strict about what I release because I do not want to put out some half assed piece of shit code that will set up a bad example for those who want to learn from it.

Here is the overall plan of this entire project which I will do in small steps:

PlantUML Syntax:<br />
participant Sensor<br />
participant RF<br />
participant Arduino<br />
participant Server<br />
participant Android<br />
Arduino -> Sensor : Read sensor value<br />
Arduino -> RF : Commands and queries (if possible)<br />
RF -> Arduino : Response (if querying possible)<br />
Server -> Arduino : Commands and queries<br />
Arduino -> Server : Notifications, response<br />
Server -> Server : Run business logic<br />
Android -> Server : Queries and commands<br />
Server -> Android : Responses<br />

The first step is the Arduino part. I have ordered RF modules for Arduino which work on the 433.92MHz range which is specified in the remote controller power plugs. First I need to make the Arduino to control them and after that I will try to figure out if I can query their states.

Next step would be to setup Linux server at home and to setup a Java project that will provide REST API available to LAN, The WAN part comes later. This will enable two way communication so we can tell the Arduino to do stuff or ask it to give sensor readings. Also the possibility to push sensor data from Arduino so that the server, which is essentially the business logic, can react to data for example motion sensor data or humidity data.

Next I need to get WiFi shield to work on Arduino, make it connect to my home network and talk to the server. Some sort of IP sniffing could be nice because we could use it to query a service from port X on every IP and who ever answers will be the server to communicate with. Some form of encryption could be utilized here just in case. If someone some how gain access to your LAN you would end up with blinking lights little later that sooner.

The last piece of this puzzle is the Android part. The plan is to create Android app with simple UI that can be used to control power plugs and read some sensor data. Emphasis will be heavily on security side of things when communicating with the server. The plan is to publish an API for WAN which can be used to communicate with the Arduino. As you can imagine this part should have strong authentication and authorization implementation.

As a super extra bonus I will utilize AI which can control and monitor the smart ass home. I will give it the name Hallikainen 9000 after this Finish artist Joel Hallikainen who lives in Raisio, the same city I lived in during the 90s. I will give it a face, this black rectangular shaped thing with pulsating red light. And well you know how it goes from here on you might have seen the documentary…

Leave a Reply

Your email address will not be published. Required fields are marked *