Fully central ESPHome based modular wired smart home | Meet the feudal project!

Hi everyone,

Today I want to share with you my biggest ESPHome project yet. It even inspired me to create a logo, but more on that another time :wink:. I worked on it for more than a year, and as far as I can say, it has worked flawlessly for almost half a year now! The system controls lights, blinds, garage doors and even the infloor heating system. It can sense if a window is opened, a button gets pressed as well as the water level of the cistern. And all of this is implemented by a single ESPHome configuration as well as many in and outputs. Before I talk about all the other perks of this system, let me explain the background of this project.

In 2023 I had the opportunity to work on a smart home for a currently being built house. The owner is a big fan of Home Assistant and the general concepts of the local smart home as well as open source soft- and hardware. We discussed many possibilities. Simple WiFi and Zigbee relays (like shelly and others), as well as wired approaches (like KNX) were taken into consideration. We agreed, that a wireless setup would not make use of the potential a newly built home has. Wired bus based solutions like KNX, would lock him in forever and a truly ā€œdumb homeā€ would from there on not be possible as you have to rely on the bus routed throughout your home. The only typ of solution which came close, was to use a lot of shelly pros (din rail mountable shellies) and wire all lights/blinds/etc. back to the control cabinet. While calculating the cost of using shellies, I came up with the idea of creating an ESPhome based solution. Basically an ESP32 on steroids making use of dozens of IOs. We settled on using ESPHome not only because of the price difference but also because I always wanted to create such a behemoth of a system.

The result can be seen in the pictures. A DIN Rails mountable ESP32 POE based system capable of controlling dozens of relays. This approach fulfilled all our requirements, and I had a lot of fun along the way creating it! But what exactly does it do?

It drives any form of a relais which is controlled by an 24V signal. Low Power consumers using less then 2W can be wired directly to the low side output (like radiator valves for example). Inputwise, any 24V signal will work. Switches, Buttons, Window sensors as well as any other type of simple on/off will work. With ESPHome being as powerful as it is today, the wide range of configuration options allow for many possibilities. Any Switch in the house could therefore be used to control any output on the controller. Creating simple scenes even without Home Assistant or even a working network is only possible because of the huge number of IOs wired to a single ESP32. A double button press therefore could be scripted to turn down the blinds, turn on the light, while also turning up the heat.

In my opinion the best part about the system is its modular approach. Currently only a controller module and an IO Module exist, but it can be expanded later on (with for example an energy measurement module). Separating the tasks of the whole system into discrete components allows for great repairability. A relay is broken, and now the light does not work? Just swap it for a new one from the local hardware store. The system does not function any more or regularly drops out? Swap the ESP32 POE or the power supply for a new one. Using 24V for as much as possible increases safety as well as provides the ability to repair/swap parts by oneself (at least in my country). Anything connected to mains voltage is intentionally kept simple, so no electrician would fear to work on it.

So what comes next? With the system already performing without a flaw for almost 6 months, I am currently writing documentation and creating a GitHub repo for all information regarding this project. I am planning to make the PCBs available to the public but am unsure how exactly at the moment. I will create a new post as soon as I have finished writing the docs!

PS: Notable mention goes to ā€œSmart Solutions for Homeā€ (https://youtu.be/Qy9irfpRmUs) for already creating a similar but not same setup on his YouTube channel!

EDIT: I created a Github account for the project for you all to follow along. Just star it and stay in touch! :slight_smile:




6 Likes

Thatā€™s a massive project and very commendable. Nicely finished too.

How did the price comparison with the Shellys end up?

Is there provision for light dimmers or only light switches?

How many ip and op per controller?

And one point of safety, it isnā€™t really clear from the photo but it looks like there isnā€™t a lot of clearance between the ELV and LV wiring around the relays. Did you have an electrician certify it?

Anyway Iā€™m looking forward to seeing the design files as I was going to redesign my ELV ESPHome I/O board this year. It is used primarily for security sensors and outputs but has been through a few iterations. Originally it used the i/o from two raspberry piā€™s and is now one Ethernet ESP32 with some I/O expander modules from Adafruit. It currently has 3 layers of daughter boards :roll_eyes: in desperate need of simplification.

In terms of pricing, one module with the relays in use is around 190ā‚¬. For 16 Inputs and 16 Outputs, shelly does not stand a chance :smiley: But I should say, it really depends on the price of the relays. The electronics alone only make up around 30ā‚¬. I will provide an in depth calculation in the docs later on.

Currently there isnā€™t any dimmer variant planned. Mainly because it would break my rule to only work with low voltage levels. Secondly I think, if there is a need for a dimmed light, A smart bulb would be cheaper and more feature rich (or an led strip with one of the quinled boards).

Per Controller, you can use up to 4 IO Modules. That makes 64 inputs and 64 outputs. More would not be beneficial, because of the DIN rail length (and also not possible because of the IO chip in use).

The wiring for mains was completely performed by a local electrician. The ELV wiring was done by me beforehand and communicated to him. So I guess it is fine. Of course this kind of setup should always be treated with a bit of caution. But all cables are rated for an isolation of up to 600V.

Happy to hear you are interested! Currently, the project is planned as a DIY project, so you should be able to create your own modules if a basic level of soldering is at hand. The modules themselves are basically only IO chips, which is why there should be no way to make them even simpler. :slight_smile:

Electronics is my profession, so shouldnā€™t be an issue :smile:

Any protection on the inputs?

Are the outputs open collector?

I have mostly 12V PIRs with voltage free contacts but some 5V stuff as well.

All in- an output rows implement optocouplers for galvanic isolation towards the control electronics (3.3V and 5V). Sadly, I was not able to implement protection on the inputs because of size constrains. The PCB is filled to top with routing :smiley:

Yes the outputs are open collector (using darlington arrays).

I most likely will also create a 5 and 12V version of those modules. The only thing which needs to be sized accordingly are the input resistors. So not much work is needed to convert them :slight_smile:

1 Like