ESPHome to ESPHome direct communication?

I was looking at this and it looks interesting and could be useful to me. UART definitely isn’t a strong area for me so, i’ve been doing a little reading up on it. I didn’t see the max distance mentioned in your repo and looking online i’m seeing wildly different max distances from a couple of meters to 15 meters. What are the longest distances you have used? Also, I have quite a lot of shielded 6 conductor wire. Would shielded be better for longer distances or is interference not a big concern?

Thanks.

Twisted pair would be better.

I dont recall asking which is better, twisted or shielded. You know why. The 6 conductor are in twisted pairs with shielding. I was asking about distance and the risk factor of interference since im not using it in a commercial setting where its primarily used these days and interference is a factor in those settings. Thanks though, super duper helpful there bud.

@Fallingaway24
I have used it only with short distances max ~0.5m.
Which distances you need? Maybe I can test it if I have a cable that is long enough. :smiley:

There are off-the-shelf RS485 converters though which will handle long-distance and noise better: https://www.aliexpress.com/i/4001264234543.html

They should be pretty close to plug and play: connect your TTL UART to one side, RS485 cabling to the other.

Ive got the benefits of having 3 brothers that are all union electricians so i have all sorts of wire and can request it if not. I dont have any specific distances at the moment, I was more asking just to get an idea of the limitations. Just my personal opinion but, I think that would be useful information in your repo.

That’s very kind of you to offer to test it for me. I appreciate that but, i have the stuff to do it and cant ask you to do that for me or waste your materials. My hands arent broke and my Google-foo is strong, so i think i can handle it.

Ill have to double check my garage but, ive got some boxes of cat5 or cat6 and i dont recall the purpose of the other one but, i believe it was used for commercial automation/PLC’s its a 6 conductor with 3 twisted pairs of 24-26AWG with aluminum shielding and I think ill try both and report back what kind of information I find.

Thank you.

1 Like

This may be a dumb question so i apologize but, like i said initially, direct communication has never been something ive needed or thought i would and never bothered diving into it. Im pushing 45-50 esphome nodes so im wanting to eliminate some that are in close proximity or can be wired. So, what would be the pros and cons or use cases where something like this, uart would be preferred over something llike CAN bus? Or any other type of direct connection?

Looking at your original problem statement, it sounds like you don’t need ESPHome → ESPHome communication at all - you’re just trying to have a remote switch from the relay it controls.

So your only actual problem is pulling a wire from wherever the relay is back to where the switch is, and it can just be a dumb switch.

In my house I do this with athom mini-relay switches, the Sonoff equivalent would be this: MINIR4 - SONOFF Official

CAN bus make sense if you have multiple devices that need to connect each other. All devices have access to each message. But you need additional hardware. UART is great for direct communication between 2 devices that are not far away and you don’t need additional hardware.

I use that to control my solar battery system with 3 esphome devices there are side by side. One of them is connected to the others. Works because the esp32 has 3 UARTs. The master needs some values from the other ones and I wan’t to prevent failures if the wifi connection lost.