PoC, Ideas, Chat : "Wired solutions for SmartHome (ESP32based)"

Greetings to community !

It seems that our long-standing plans to build a house for our family will become a reality (at least from bank perspective…).
Since my profession is related to IT + I’m long therm HA user (but till now not equally with ESPHome) i decided to go my own way in “SmartHome question”.
I’ve been through a lot of brainstorming over the last year, with lot of questions, failures, etc…

I’ve set some principles that I don’t want to change and I won’t:

  • Devices based/created on ESP32-S3 LAN PoE
    Call me old fashioned, but even all my ESP32 devices are ROCK solid over WiFi i prefer the hardwired solutions. FTP/STP cables are cheap enough, versatile, and i would install them just “everywhere”…, in case of some future changes. PoE can solve need for additional power source. ESP can work as an independent device and doesn’t need in any cases some “middleware/device” to operate.
  • Thermostat should be based on ESP32 (cDIY made/custom frame)
  • Light switches would be only momentary switches.

PRIMARY CONCEPT/Idea:
Because of upper mentioned benefits, my primary idea was to wire the house from electrical-high voltage perspective in old style, like a DUMB house. Put under thermostats/switches (use this two devices as examples) ESP32, SSR Relays and have a Smart solution, which easily allows to “convert” the house back to dumb in case of some horrific scenario. This concept is sadly not possible, because of space issues under “in wall” moountings. I’ve tried long enough to find somebody to project PCB based on ESP32-S3 PoE with custom dimensions and needed additional devices (sensors, relays…) to fit. I’m not able to do that by my own and I’m also shipwrecked finding someone. Of course within a reasonable budget and timeframe. This concept was cancelled.

SECOND CONCEPT/Idea:
Wire the house from electrical-high voltage perspective in a modern way. Everything (wires, relays, contactors) should be located in technical room. Under thermostats/switches should be ESP32 (without any additional components as in Primary concept) which should send via GPiOs signal to relays in technical room. Here comes another issue, wires lenght. I spent enough time reading issues about long wires, interference, voltage drops. This is again too huge risk of failure and such setup is not the right path. This concept was cancelled.

THIRD/FINAL CONCEPT/Idea with options:
This concept is based on second idea, so everything from switching and high voltage side is located in technical room, including one/multiple ESP32s connected to relay boards. From this point of view should be those ESP32s acting as “receivers”. They should receive command to “switch” some relay ON/OFF based on input from ESP32 located under thermostat/light switches. This is (from my perspective) very easy, straightforward, and incredible versatile solution. BUT it needs “middleware” to operate. To avoid this:
- option1: wire ESP32s around house and technical room via ModBus = honestly i hate this option. Maybe because i dont have enough experiences, im unfamiliar with code, and i think this protocol is obsolete. From the coding perspective, it would be also pain for me, to send/get values, responses. I did some ESPHome base ModBus TCP converters already, don’t like this.
- option2: wire ESP32s around house and technical room via CanBus = absolutely no experience.
- option3: HTTP requests. Again, from coding perspective should be this something new, but not unmanageable. ESP32s don’t like so much WebServers, and honestly except HTTP requests, i don’t need them. I find this again risky for long therm usage. Maybe it will work couple of days, maybe weeks, but as documentation mention, HTTP requests/WebServer is generating huge load to ESP
- option4: This option is just a cosmetic thing, not a “real” wire = Using additional (but call it primary) MQTT outside of HA, only for “this” devices. Integrating to HA should be done via most native way = ESPHome API, but the devices should “talk” to each-other via MQTT. The broker would be outside HA (eliminating at least one possible failure option). This should also prevent to have the same device duplicated in HA. Second MQTT broker should be running in HA as addon, for devices which needs direct HA integration for easier handling (tasmota, shelly mqtt etc…).
- option5: using different software “firmware” on ESP32s with better direct-interconnection options. Not idea which, how…

I’m sure that even though I don’t consider myself a newcomer, there are plenty of better informed and more knowledgeable users out there. If any of them would be willing to give their opinion on my knowledge, thinking, I would be very grateful !
Thank you for reading this far !

Whatever you do. Consider supportability…

What I mean is we all get excited about our setups, You know what you like but who will move in after you? What if you’re laid up and need to get an electrician? How do they maintain it. (hint stick as close to ‘normal’ for your install as possible)

Make sure whatever you do is easy to maintain for a normal electrician who’s not you. (home run wiring is done but not usual and hi/lol volt in single box is likely prohibited in your jurisdiction)

I can understand your preference for wired. And esp32. But if you’re IT also consider most common, best use and build for purpose

Most jurisdiction have issues with high voltage and low voltage in same box. (why you don’t see a lot of this) so network instantly becomes an issue. If you use something like a Shelly you get built for purpose optocouplers isolating the hivolt from the lovolt sides and you still get your esp32.

So sure stay esp32s but instead, you may consider built for purpose wifi network that carries just that workload. I’m sure you could make that nearly bulletproof… It would be WAY cheaper and It would work and look like most other electrical setups in your country (also important for people to help we need to know your locale) and ping nearly all your requirements.

Option 6: Forget about building your own and buy a Shelly pro.

Pros:

  • Covers your requirement of being hardwired.
  • Has power monitoring (on the 4PM version) and protection built in.
  • Comes with a 5 year manufacturer warranty
  • Native HA integration + the ability to use built-in scripting.

Cons:

  • More expensive than a DIY solution, but still cheap at around €25 per circuit.
  • Only 16A load per circuit. This means that circuits for sockets or appliances will need a separate contactor and you probably won’t be able to use the power monitoring feature. For these circuits, you might as well use the Shelly Pro 3.

Hi Nathan !

Thank you very much for you reply !

Im unsure, if we have such regulations but anyways, boxes will be separate. This is work for electrician and i don’t feel any responsibility for it. He knows what is possible and what isn’t. This is more about high-voltage infrastructure, as for the my “Smart” part. The scheme of “switching” in technical room/box and inputs from “buttons” is these days standard solution in such setups, so i don’t think from the perspective of maintenance is this something unusual. Im in touch during all steps with specific electrician (who will personally do the installation), so he can confirm or decline my theory. This was the way i came here. But the mentioned “smart” part is on me. Using WiFi is something what doesn’t bring for me any benefits in this case. I can save some FTP/STPs, but i need power supply for each device and the theory (what i try to solve) of interconnecting two devices remains the same (but via WiFi…). The WiFi would make sense from infrastructure and savings perspective maybe for additional devices (window sensors, leakage sensors, smoke sensors). This would be the next step to solve, but since we are talking here about life/property “guarding” devices, it is even more-MOST important for me, to have them wired :confused: As i mentioned, im old fashioned, but todays is everything harder with wires. Incredible times :slight_smile:

Hi ShadowFist!

Thank you for your feedback !
Shelly Pro isn’t option6, it is the replacement for relay boards/switching in technical room, mentioned in option3/4. I can use them instead of ESP32 relay boards (actually, those Shellys are ESP32s with relay boards), but this has nothing to do with the question im facing. Also needs middleware for capturing requests from “switches”. HA via Shelly, MQTT, or separate MQTT broker.

There’s the difference. The smart is not life safety… Ever an any install i do.

Smart is additive. Lighting is must work and automatic at the fixtures for life safety. And works with or without network so a wifi outage is no issue. Just inconvenience.

1 Like

Maybe we have different opinions here (and this is absolutely not bad), but for me is having alert on my phone in case if water leakage and turning off the main water inlet a beneficial “smart” feature. Konnected.io, custom product is very famous, and is considered as “Smart” security system, built on ESP32. But again, we are talking about mentioned uses cases, operating heating & lights, without usage of middleware. Im no so far with plannings, that i can consider which and how much security systems to use. For such reasons needs to be additional persons, company involved.

It doesn’t look like you need any middleware at all based on their wiring diagram. You simply hook it up to a dumb switch and it will know the switch state.

Thank you for providing the diagram. First problem is with “DUMB” switches. I’m not going to have them. I would like to avoid the classic rocker switches (the light can be OFF by software, the switch remains in ON position, confusing, etc…). The switch-input for Shelly has to be also high voltage, as diagram shows :confused: But “i have” ESP32 GPiO or Momentary Switch. Both of them are not constructed for high voltage, what Shelly Pro as input needs. From other perspective - i can use Shelly wall switches with Shelly PM relay at their back. This can provide/route high-voltage/switch input to Shelly PRO. So another-additional relay/device under switches, 2x switching for one device, need for high-voltage wiring for lights in every room.High-voltage wiring is not a problem, but i think this route is not the right way from my perspective. And sadly it “solves” only the less important, light part. But it is not applicable for heating.

Please research Shelly and how it all works. You absolutely can set the software to recognise momentary switches, even on the most basic of their devices.

There’s no need at all to have low voltage ESP switches inside your rooms, nor do you need to add additional devices behind your switches. The ESP is already inside the Shelly device.
Any common momentary dumb switch which can handle high voltages will work perfectly fine and will allow you to wire up your switches in the traditional way without sacrificing any of your requirements.

As for heating, the above is still applicable. All you need to factor in is what I said earlier:

Thank you.
But i think there is misunderstanding between us. Im familiar with Shelly devices… For instance Shelly Momentary switches:
ELECTRICAL
Maximum switching voltage: 12 VDC / 18 VAC
Maximum switching current: 50 mA
You have to use PM behind them for high-voltage. Yes, this is ESP32, but Wireless ! The reason i created the question is exactly about wired setup. Maybe my explanation or english were not the best, but this point is crucial. But yes, there are (probably) lot of dumb momentary switches on the market, i can search for them. The high-voltage would be required for every single room/switch, but this is not a problem. The amount of PROs will be, but i have to deal with it, in case of this setup. The heating is still not clear. If you imagine, that a thermostat (based on ESP32) will be on wall. If heating is needed, a “relay” has to be switched in order to switch contactor. If the “relay” would be in this case again Shelly PRO, how should i control it from ESP32 via wire ?

I agree there is a misunderstanding between us.

I never mentioned to use Shelly switches in your individual rooms. In fact, I made it pretty clear when I said:

The Shelly Pro (or whatever smart option you decide to go for) is sited inside your consumer unit, or “technical room” as you called it. This would work in your advantage in 2 ways:

  • It allows you to use standard (high voltage) wiring & switches to your switch runs. This makes falling back to dumb functionality in case of hardware failure (or eventually selling the house) extremely smooth. It also reduces the complexity and expense of running cat5/6 cable and the regulatory restrictions and interference issues that come with having low & high voltage wiring within the same switch.
  • It gives you a greater choice of switches, even if you ‘restrict’ yourself to only momentary ones (most conventional switch suppliers have momentary versions of their product). This not only comes into play when your significant other decides they don’t like the switches - it also ensures that any switch choice you make will be much cheaper than a smart switch.

Please don’t get me wrong - I am no Shelly fanboy. In fact, I have a total of two of their devices, none of which are currently in use (moved everything to zigbee, so not Shelly’s fault). I just happen to think that what they offer is a solid product when considering the price and the warranty, and that it seems to fit your needs perfectly.

Thank you. I have also the actual home equipped with Zigbee and ESP32 devices. Therefore comes the choice to use ESPs, which in fact Shelly-s also are. So the PROs are option, but honestly i don’t se advantage over some ready made RelayBoards based on ESP32s, with LAN and High-voltage in/output. Absolutely right, i forgot about them (was always looking for low voltage devices), you opened my eyes. Thanks for that. My choices for lights are now extended. Options for heating and then the additional devices (windows, smoke, flood sensors…) has to be still solved. Everything would be straightforward with a “ESP-NOW” via LAN option for ESPHome :confused:

How about “wiring” each room or area with conduit, each conduit ending in a control box for that area? Totally future proof.

That’s what I’m doing. This may help:
https://www.aaroncake.net/house/automation

Depends what these “some” relay boards are… They need to be certified products, otherwise your electrician refuse to install them, or at least should… And I’m not talking about some “aliexpress tuya device certifications”, but the real ones. Obviously you can find them, but not cheaper than Shellys.

Avoid using low voltage signal wiring, it’s too sensitive for interferences, even if you use shielded cables. 20meters long wire at 3.3V for switching a light is going to offer you a lot of “fun”…

Hi Karosm ! Thank you for your reply !
Yes, the certification is from my perspective the only thing. Not question how important it is, but it this case the question is different. As i wrote, the 3.3V signal wiring “plan” was canceled in “second concept”, since i would like to avoid such “funny” scenarios… :confused:

Hi Aaron !
Thank you for your contribution. Ill check your documentations !

THINK AHEAD.

The house will outlive you. You will either grow old and downsize, or die. Whomever buys the house later will likely resent your smart home choices and depreciate the home value accordingly.

Let the electrician wire your house to code (Electrical Code) but add Ethernet everywhere to a central closet. Since the house is built and wired to code, the wiring can easily be reverted back to code later. (Much later). Your Ethernet wires can be terminated in cheap orange low-voltage boxes. If you sheetrock over some of the LV boxes because they are for future use, take photos before the sheetrock goes up. This way you will know where the boxes are located.

I would run some electrical PVC from the doors to your wiring closet. Future-proofing.

Take a LOT of notes. I’ve been in this house for 15 years and when I want to make any changes or repairs, I have to reverse-engineer what I did in the first place. A notebook would have helped.

My wife is not technically inclined, and if I die first, she has already said that she will sell the house and move near her daughter in another state. The notebook will be valuable to the next occupant; they can either revert to dumb or continue with smart. Oh, make sure your login criteria for cloud or other supporting components is included in the notebook.

You absoluty want to have switches in the future realy, you will remember this advice. If HA is down for whatever reason then you are in the dark, litterly. Okay i get that you don’t want rocker switches but instead you can go for zigbee or zwave touch switches. They will always reflect the state of the light. In HA and in the room . They have additioneel entities such as power measuring and monitoring, child lock, last power state. You have also the option for 1 or more additional usb ports. You got the powerline already there so no reason for an extra low power network.

1 Like

Thanks for ideas stevemann. The reason i try to find the best solution is, that i try to think ahead. BUT… not always the “old” solution is the best for presence and “near” future. I think, such setup can serve “us” pretty much. In 15+ years will be the technology different again (FTP/STP cables and goosenecks should handle this till some point). Whoever will be the owner in 30 years will most likely remodel the entire property. I try to find the best compromise. Wiring the house is of course option which would be reconsidered after i find some solutions for my questions.