Best way to connect 40-50 physical binary/reed switches to Home Assistant?

I am building a new home and I plan to have as many devices in my home as possible as wired connections, including all of my window and door sensors, and possibly a few others. I run home assistant on an Intel Nuc.

What type of device can I buy to connect all of these physical sensors to my Home Assistant setup? Would Konnected.io be my best bet, or is there a generic device/board that can accept these sensors as connections/inputs and then connect to the system via USB?

I do not have an answer to your question, but maybe a suggestion to help reduce the number of sensors, or rather connections.

I have a total of about 18 doors/windows on the first floor of my house. Yet, the number of wires going into my security system is like 10 at most. Upon digging a bit to understand that, I found that for example, my office has 3 windows and each has a sensor. But, all those sensors are connected in series. It seems the connections to the security system are grouped by room and not individually. When you think of it, it makes sense.

The alternative is to wire each of the reed sensors individually, and that quickly adds up.

Thoughts?

1 Like

Iā€™m mostly of the camp ā€œIā€™d rather have it and not need it, than need it and not have itā€. I saw a post earlier this evening, actually, also saying they wired theirs in a series because they didnā€™t care which door of a room was openā€“just that if any one of the doors opened to turn the lights on.

I canā€™t say I have a reason right now but I donā€™t know that I wonā€™t have a reason in the future. Also, itā€™s so negligible to run the wire when the walls are wide open versus later.

Thoughts?

Wire them to an ESP based board of your choosing and run ESPhome on it.

Agree fully, itā€™s much easier to wire everything now while you can. Not many of us have that luxury.
I based my feedback on what I saw in my home, and I believe it was wired (by ADT) when it was built as well. I say that because the way many of the motion sensors and other devices are wired would be ā€˜impossibleā€™ to do after all the dry-walls are installed.

I guess another way to look at this is explore commercially available systems out there and see how many can handle 40-50 switches. Iā€™m tempted to say not many ā€¦ unless one has a mansion with that many roomsā€¦ And that would require a more specialized system.

One thing I would do is call the various providers in your area (Comcast/ADT/Wyze/ā€¦) and ask whatā€™s the most number of switches their system can handle.

If you wire up all the switches individually and run wires to the basement, you can always connect those switches in series in the basement, but thatā€™s a lot of wire, and youā€™d see voltage drop (high resistance) that might ā€˜confuseā€™ the digital logic.

Search-Up ADT SafeWatch Pro 3000. Itā€™s a common system out there, and many security companies use it. There is plenty of information (and schematics) online, and that might tell you the typical max number of channels.

PS. I like very much the idea of doing wired sensors. Many modern systems (such as Wyze) offer battery-powered switches and those are more maintenance than many of us are willing to invest and get caught in.

@Sparkydave Would you then need an ESP board per switch or are there ESP boards that can handle multiple switches?

Demux inputs and send that to some device like RasPi or esp. this could allow you redux inputs to number manageable by those devices and still individually know which is tripped.

RasPi are cheap also.
Connect inputs to Multiple RasPi running HA and send data from all RasPi to single main instance that you use as interface

Although this would work, I believe running that many different control boards would be to cumbersome from a maintenance perspective. It would probably be best to come up with a solution that allows all sensors to be connected to a single control unit.

Iā€™m wondering if @sparkydave has the right idea.

@sparkydave how would you recommend connecting so many devices to a single ESP-based board?

You could use multiple devices to minimise wiring requirements or a single centralised device. Up to you.

If you use an ESP32 you can then connect to your network via wifi or use the ethernet component.

To handle the I/O requirements you can then use an I/O expander such as this. Using multiples with different I2C addresses will give you plenty of expansion capacity.

Iā€™m of the KISS camp (keep it simple stpd). With many devices/boards talking to one another and Wifi dependence, the chances of something going wrong do increase substantially. Everything is fine when the system works, but if there is a hiccup with your ISP or LAN ā€¦ and your system is totally useless. Again, weā€™re discussing options here so, and there are as many of those as opinions and personal experiences (bias too).

RasPi 40 channel IO expander

@drjb

If I have physical sensors connected to an ESP device, would it be possible to connect that ESP device via USB to my machine running Home Assistant rather than having the sensors connected over wifi?

@jtviolet

Iā€™d go with an ESP32 and 3 of the I/O expanders I linked to, giving you 48 I/O in total, which you can expand later if you need more. The ESP32 will handle that without any trouble and can be connected using Ethernet for more stability as I mentioned.

The beauty of running ESPhome is the native Home Assistant API. The feedback from I/O is super fast. I use it on a number of devices around my home including my home-made irrigation controller.

2 Likes

@sparkydave re: the I/O boards, great! That will cover my connection of all the sensors to a single controller.

I guess when I was referring to wifi in my last post, I was really referring to networking. If at all possible, Iā€™d like to avoid as many devices on the computer network as possible. With that said, is it at all possible to connect the ESP device directly to a RPi (or in my case, an Intel NUC) via USB or otherwise?

This is done for the initial flash of the ESP but not for ongoing use. 1 more device on your network should hopefully not be an issueā€¦

Itā€™s not so much having one more device on the network as Iā€™m hoping to keep as much of my smart home as possible of the network and isolate them to physical connections or Z-wave. Iā€™d like to reduce the number of possible attack vectors as much as possible so I can focus my security efforts on a smaller footprint.

With that said, I suppose I have forgotten that Konnected.io is also a network-connected sensor.

I suppose I will have to keep doing some digging to find a way to connect the sensors physically, preferably via USB.

In my experience an ethernet connectiom is way more reliable than Z-Wave. Also Z-Wave is a wireless technology, which is easier to jam than ethernet connections.
With ethernet, an attacker needs to have physical access to your network inside your house, whereas with WiFi/Z-Wave they could do an attack from outside your house.

Only thing about those I/O expanders is that they are not galvanically isolated. If you run wires to all corners of the house, which could easily be 100 feet long, expect them to become great antennae which will pick up all sorts of interference. A/C switches on beside wire run or door/window monitored, and you will register a state change on that window or a spike will travel down the wire locking the whole mess up. A nearby lightning strike would certainly fry something.

The wire runs need to be isolated and this is typically done via an optocoupler. Your sensors w/wire runs connect to the LED side of the coupler, powered by a completely separate power supply that does not have a shared ground with the rest of the circuit, and your I/O expander reads the output of the other side of the optocoupler.

Youā€™ll find this is how commercial alarm panels work on the basic end, though mostly they have moved to dedicated buffer chips to allow things like zone doubling, EOL resistors, etc.

We built our house last year and I used 9 Konnected v1 boards. Every door and window has a wired sensor, shower fans have DHT22 humidity and temperature sensors, 2 sirens, and a few motion sensors. The only windows I wired in series were ones that were immediately adjacent (we have 5 individually opening windows that make up 1 large window area). All done with Konnected and I have had 0 issues in over a year.

To address the comments about network reliability: Konnected Pro now has ethernet. Your network should be designed with proper steps taken to mitigate those risks. Properly sized UPS for all network equipment, POE switch, wired access points properly spaced and configured (wireless is not plug in and go, donā€™t use wireless routers combos, avoid mesh access points if you can run wires), dedicated firewall\router separate from internet modem.

To address the comments about attacks: Information security is about assessing risk. Yes, wireless DoS attacks are easy but consider your threat model. Who would have the technical knowledge, knowledge of your system, and want to gain access to your home? Chances are you are using the technology for convenience and security from common threats in your area, which are most likely unsophisticated.

1 Like

Iā€™d use the same methodology as a DCS (Distributed Control System). Break the house down into logic areas and put one remote I/O point at each logic area. This way you can utilise a wardrobe to house an electronics panel and the wiring from your sensors to the I/O board is minimal.

Use something like RS-485 to get the data back to your NUC. Better yet, use a PoE Arduino or similar in lieu of RS-485.