Converted my home automation to ESPeasy

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
johndoe39274
Normal user
Posts: 14
Joined: 28 Nov 2021, 21:05
Location: Belgium

Converted my home automation to ESPeasy

#1 Post by johndoe39274 » 07 Mar 2022, 16:40

Hi fellow ESP'ers,

Allow me to introduce myself: I am John and I live in the north of Belgium. Over the past few months I have converted my home automation to ESPeasy. All lights and (switched) power outlets in my house are now under control of ESPeasy and OpenHAB. I thought I'd share it here, perhaps you get a little kick out of it.

I designed 2 custom PCB's to interface my light switches, their built-in LEDs and the teleruptors that switch the 230V lights and power sockets. These PCBs are installed in a rack in my technical space. I have 8pcs ESP32 boards that each interface with 3pcs MCP23017 expansion boards through I²C. Each MCP board has 6 inputs to read a Niko 6-way push button switch, 6 outputs to control the 6 built-in LEDs (through a ULN2003A driver), and 4 outputs to drive Eltako 4-way teleruptors to switch 230V lights and power sockets (through a ULN2003A driver). There's a total of 20 MCP boards and 8 ESP boards in my rack.
boards in rack.jpg
boards in rack.jpg (426.98 KiB) Viewed 7700 times
The ESP32 board has a power supply section with some reverse polarity protection and some filtering, and holds an ESP-WROOM-32D module on the bottom. An 8-way Hirshmann connector connects 6V input power and I²C bus. A pinheader breaks out most of the I/O pins so I can connect special purpose boards (Arduino shield-style). The board also holds a prototyping area where I can mount permanent odds and ends like sensors and their supporting circuitry. This way the module is flexible and can be used in multiple use cases, such as driving the MCP boards, or stand-alone to interface with sensors in locations I need them.
ESP top.jpg
ESP top.jpg (423.81 KiB) Viewed 7700 times
ESP bottom.jpg
ESP bottom.jpg (399.92 KiB) Viewed 7700 times
I also made a programming board to flash the ESP's. It's quite straight-forward; it has 2 buttons for BOOT and ENABLE and a serial TTL-to-USB converter. It mates with the ESP module's pinheader and screw standoffs so that it can be mounted on top of an ESP board to flash it, or to troubleshoot it over serial terminal.
programming top.jpg
programming top.jpg (137.2 KiB) Viewed 7700 times
programming edge.jpg
programming edge.jpg (120.32 KiB) Viewed 7700 times
Each MCP board has a single MCP23017 port expander that talks I²C with the ESP board. The I/O pins of the MCP chip are broken out into 3 groups, each of which can be used as either 6 inputs or 6 outputs by populating the correct components on the PCB. In the picture, the first 6 pins are inputs (components for an RC filter for each pin + the correct pull-up have been installed). The next 6 pins are outputs since they have an ULN2003A output driver (+pull-ups) installed. The last group of pins are also outputs, but only 4 pins of the ULN2003A are used to bring the total up to the 16 pins supported by the MCP chip. There's 8-way Hirshmann connectors to connect to the ESP board, and also to the inputs and outputs. I typically use these boards in a 6 input (push buttons), 6 outputs (button LEDs) and 4 outputs (teleruptors) configuration.

The board has solder bridge pads to allow for I²C address selection, and solder pads to enable I²C pull-up resistors (I use 2k2). It also has a similar power section as the ESP boards.
MCP.jpg
MCP.jpg (373.66 KiB) Viewed 7700 times
All boards were designed in Eagle PCB CAD, produced by JLCPCB, and populated by myself with components from Farnell. It's all open source so PCB design files and BOM are available on request in case you want to take a more detailed look.

The whole system connects to my wifi network throughout the house, and talks MQTT to an OpenHAB server running on a Raspberry Pi 4 8GB. I can control it through the OpenHAB Android app. The input and outputs to the MCP boards are strategically grouped together so that it can run local Rules to monitor the push buttons and switch the corresponding teleruptor outputs. This way I'm sure that the lights in my house will still work even when the wifi is down. All boards are on a 6V power supply (a recycled alarm system PSU with a lead acid battery as backup). The server, wifi access points, router and network switch are behind a UPS.

Even though it's only been a few days, the system runs well so far. I am currently ironing out some minor kinks (mainly due to cabling or configuration errors) and am getting to know ESPeasy and OpenHAB a bit better. So far I'm happy!

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Converted my home automation to ESPeasy

#2 Post by TD-er » 08 Mar 2022, 20:39

Cool!
Looking good those boards you made.

Just a tip:
PCB manufacturers like JLCPCB can also mount the components for you (on 1 side) including the ESP32 WROOM module.
This is very likely less expensive than ordering the parts separately and you don't need to solder them yourself.

I also include the 2 transistors (see NodeMCU schematic on how to wire them) and the same 6 pin header pads.
This makes flashing a lot simpler to do as it helps to toggle GPIO-0 and RST in the right order.

oaotto
New user
Posts: 4
Joined: 10 Feb 2019, 17:09

Re: Converted my home automation to ESPeasy

#3 Post by oaotto » 02 Oct 2022, 17:50

Hello,
what did you use to describe the ESP(ESPEasy), I don't put any images on it?
I asked (ESP32 DevKitC V4 with ESP32 WROOM 32D) in the other subforum but unfortunately didn't get an answer(viewtopic.php?p=59942&hilit=ESP32+WROOM+32D#p59942)


Greetings Otto

j2k3000
New user
Posts: 3
Joined: 25 Oct 2022, 20:05

Re: Converted my home automation to ESPeasy

#4 Post by j2k3000 » 06 Nov 2022, 12:56

Hi, great work! this is exactly what I was looking for. How can I get in touch with you for more details? (I'm not able to pm you due to the fact I'm new here)

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests