Home Assistant Community

More than one Arduino

#21

Nice project you got, and as @nickrout said, it’s envious that u can wire you house.

In my opinion wiring your entire house from a central location for all sensors isn’t the best. Except you want to use voltage balancing in signal transmission coupled with STP cabling.

If you don’t it will only input noise into your system, especially if u have stuffs like washing machine, dryers, HVAC or other high inductive loads on in the house. In short any strong EMC generator.

The desire to avoid WiFi is legit as I will do same, but instead of trying to have all the twisted pair cables run to the center, I would follow the advice of @nickrout and use the ESP chips over Twisted pair Ethernet cables using MQTT. Besides, the idea of using USB is a lot of work. There is a possibility the allocated name might change when the Pi reboots, or the connection being flaky over time. USB is not as rugged as Ethernet that is properly crimped or punched down.

What you can do is run a single network cable to each location, and connect an ESP chip to that cable to manage that location. Like each location having its own ESP chip over the network. Ethernet will help you manage the long runs, and this will ensure your signals are legit and less prone to interference.

This to me is not only better but more reliable and robust. I get Its not the cheapest, but could be depending on how u allocate the chip to the locations. You don’t want a system that just works, you need a system that is robust and future prove. With the Ethernet cable, u can easily expand over time as more things come up by simply changing the chip that manages that location.

You said it might be hard software wise, but there are tons of code out there based on ESP MQTT that u can modify for your use case. You got time, so why the rush? Better you build something robust now and safe you a headache in the future, than just rush it and u potentially regret it later on.

Regards

0 Likes

#22

Are there esp chips that do this? I was only aware of wifi versions.

0 Likes

#23

Strictly speaking, wifi is a form of ethernet…

But yeah I think all esp chips are wireless ethernet, aka wifi.

0 Likes

#24

With the shield I meant sorry for the misinformation

0 Likes

#25

Well I meant Ethernet cable :slight_smile:

0 Likes

#26

Thank you for advice @Odianosen25 I want to achieve best results so I will consider your idea. Please tell me is there some scheme / sketch to show how to build this kind of installation? I have some experience in Home Assistant but I still don’t choose the best way to build whole installation. The idea of ESP looks good because when technology change - you can just change hardware and system will be up to date. Question is, shoud I use ESP in every room in light + electricity slot and how to connect them in reality?

0 Likes

#27

Hello @Michal_Nowakowski, it depends really.

If you got the cash, I will advice each room having their own ESP with the associated shield for cabled Ethernet. The ESP can then be connected to the relay and sensors needed for that room.These sensors can be the window or door for that room. That to me is the best approach, and it allows the MQTT topics to be better managed also.

As to the schematic, I haven’t built one before so not sure how to show you one. But since you have a light and sensors schematic, all you need to do is to edit it so each light connects to its room ESP. An Added advantage is that the ESP could also be used to sense contact closure for dumb low voltage wall switches, so either HA or the wall switch (while also reporting to HA) can control the lights locally.

Regards

Regards

0 Likes

#28

Ok so I will try to sketch this idea myself today or tomorrow and send it in this post. Thanks guys for your help and see all soon :slight_smile:

0 Likes

#29

When you say esp, I assume you mean arduino.

1 Like

#30

I think this is the idea @nockrout, @Odianosen25, @wills106 talked about. From arduino you have relays that control 5v > 230 V cirquit. You can switch relays on or off, plus you can control switches and sensor directly in each room. Sensor is connected to 230V (if Sonoff / Shelly) or 3,3 V separate UTP cable (mySensors, Arduino). These MQTT hardware can be controlled over Internet or Wifi.

Is this the idea? I can miss something. I’m learning this installation secrets day by day but I’m still not good at it…

0 Likes

#31

I am a bit confused by your Diagram.
Are you suggesting for example to be able to switch a relay on/off with both an Arduino and a Sonoff / ESP at the same time? I don’t understand the green wires from the Arduino to the relays.

If you use a Sonoff T1 Wall switch it is self contained, the relay to switch the light bulb on/off is built in to the wall switch.

You can turn the light on / off by either physically touching the switch or by using mqtt.

0 Likes

#32

I think you are going round in circles and getting yourself awfully tied up.

0 Likes

#33

I have reread the last few posts and I think the diagram you are after is as follows.

Yes I can’t spell…

Don’t Worry about the 10/100BaseT IEE802.3u and Ethernet. They are there just to get the point across that I am referring to using the Cat 5/5e/6 for it’s intended purpose.

Home Assistant using Cat 5 or what ever to the switch.
Switch connects to each Ethernet Shield (Running MQTT Client) in Room 1, Room 2 etc.
Ethernet Shield - Arduino
Arduino has sensors, relays, switches etc
Arduino passes sensor states back to Ethernet Shield.
Ethernet Shield converts sensor state into MQTT.
Ethernet Shield sends MQTT back down the ethernet cable where Mosquitto passes it to Home Assistant and does it’s thing.

1 Like

#34

@nickrout well you got me again, yes meant arduino :grin:

@wills106 u right on the spot, that’s what was meant.

@Michal_Nowakowski your diagram isn’t gonna do it. Please look into what @wills106 submitted and if you don’t understand we could take it up from there.

Regards

0 Likes

#35

Thanks guys this is what I’ve needed. A clear diagram how to do it. I will sketch it again and place for review. Then when I will have clear idea we all can decide what version is better for the structure.
@wills106
Arduino + shield + relay needs to fit inside wall can? Can I use FTP cable instead UTP ethernet cable (ftp is safer when it comes to noise reduction)?

Cheers

0 Likes

#36

Hi guys I’m back. Please check this connection. I can make some errors since I’m learning but please give me advice. When I will have some base, I will start new topic to compare this 2 methods (fully wired system vs mqtt base system)

0 Likes

#37

This looks good and I like your approach.

Though there is no “fully wired system vs mqtt based system”. They are both MQTT based, but it’s wired vs wireless systems.

Also not sure how the shields work, but as an overview you got that design.

There is this framework that allows noobs like me to write simple code of the ESP based chips like arduino. You can catch it here Esphomelib - library to greatly simplify Home Assistant integration with ESP32.

I haven’t used it, the comments looks great. It should make it easier for you to develop your code if deciding to go full blown MQTT.

I have asked the question of how his code responds to shield, but he is yet to respond. So once he does, will post it here.

Regards

0 Likes

#38

Arduinos are not esp based. The only connection between them is that you can program esp8266 based chips using the arduino programming environment. Esphomelib will not work with arduinos.

0 Likes

#39

Oh ok thanks for that. Well I don’t use them, so a bit ignorant abt how they function. For some reasons I always thought they were same :thinking:

0 Likes

#40

Hi with this idea… How to connect power 5v or 3.3v to Arduino when Arduino will be inside wall? By usb? i need to have usb cable also inside wall? This is problematic. Maybe ethernet shield will provide power?

0 Likes