Skip to content
All articles

Smart Domotik, part 1: Building my first home automation controller

My house is still under construction, so I have a chance to build in the home automation I want. The list is fairly short. I want to control the lights and shutters, check the cameras and eventually manage the heating. The commercial options I looked at cost around €10,000–€15,000 for a house this size. Once I saw those numbers, I started looking at what I could build myself. Explaining that plan to a skeptical electrician was a separate job.

Starting with a board I already knew

My father and I had already used a board from Futura Elettronica to switch off lights that had been left on at our workshop. It’s the E4I4O, designed by Roberto Prestianni. Its built-in interface is basic, but it supports expansion modules on a bus. That gives me more inputs and outputs than I can fit on a single board.

I’ve ended up with eight boards in total, including the controller and seven expansions. My father and I put together the first version of the cabinet. Roberto helped me understand the board well enough to modify its firmware and make its interface usable with the extra modules.

The prototype with controller and expansion boards mounted on an open panel
The first controller panel. My father and I assembled it and tested the boards before moving on to the frontend.

A floor plan as the control surface

I wanted the same interface to work on a computer and a phone, so I built it in the browser with HTML, JavaScript and PHP. I had already made 3D renderings while designing the house. I used them as the starting point for the controls, with a jQuery carousel to switch views. Easydom NEXT was an inspiration for the interface, and my friend madhacker helped me get through the parts of web development I was learning from scratch.

An early 3D floor-plan rendering used as the basis for the Smart Domotik web interface
An early version of the floor-plan interface. I use the rendered rooms as the places where the controls go.

The frontend runs on a separate web server. It sends individual commands to the board over the local network and reads its inputs every five seconds. That gives the browser the current state without making the controller serve the full interface.

So far I can manage the lights, shutters and access controls, and view four motorized IP cameras. I can put a feed on the floor plan or see them all in a dedicated view. Heating is still on the list. Next I want to group a whole set of actions under one button.

The first recorded test of the hardware and interface. Watch on YouTube.

Smart Domotik series · Part 1 · Part 2 — Wiring and manual controls · Part 3 — Scenes · Part 4 — Inside the cabinet