I want to make my new house smart using a central RaspberryPi board to manage and control. Some sensors collect data from the environment, and then some relays for turning on or turning off something like a lamp, fan, etc., depending on the program I defined on RaspberryPi.
But my problem is how to do connectivity between my sensors, relays and RaspberryPi board.
I want to use some sensors like temperature (BMP280 Barometer), fire detection (KY-026), photoresistor (OKY3105), motion detection(RCWL-0516)
So there are many wires from each sensor, and suppose I put two smart boxes of these sensors in each room, and the wires increase, so I want to do wires between sensors and my RaspberryPi board; it's something like this:
So suppose four or more rooms and many wires for sensors and relays to turn off or turn on the equipment. I think it's impossible because the pins of RaspberryPi are also limited, and the thickness of wires from sensors and the central RaspberryPi board is another problem, so my question is:
What is the best way to this scenario?
If I use thin pair wires (like network wires), doesn't it make a problem because of the length of the central board and sensors (100 meters) like a lake in data and also active relay for this length cause lose of voltage or amperage
I think more and have another scenario, but I don't know how much it works in reality. My plan is to put an Arduino Pro Mini for each box and connect my relays and sensors to it and then make connectivity between this Arduino board and RaspberryPi with serial or another connectivity protocol like this schema:
But how many wires does it need? Are two wires enough? RX/TX, for example, and how many Arduino can I connect to the RaspberryPi board? Suppose I have four rooms, and each room has two smart boxes (including those sensors and relays). The total of Arduino boards is eight, and these eight boards should connect to one RaspberryPi board, and the RaspberryPi board should collect data from these Arduinos or send commands to turn off or turn on something on that Arduinos.
The Arduino board is like an agent to operate the RaspberryPi board as a master
so what are your suggestions to do this plan?


