multiple arduino sensor network over ethernet

Hi,

I have an automation project,
want to use star topology and ethernet for transmission,
multiple arduinos with multiple sensors and ethernet shield will be connected to the router (nodes),
and one other arduino with connection to the relays will be connected also to the same router (master)
like the picture attached.

sensor nodes have temperature and presence sensors,
normally master arduino should check the temperature sensors time to time (lets say once in a minute)
when a presence is detected it should communicate with master immediately and
relay should be closed as soon as possible. Also i will connect with master arduino with pc over same network and check the values of sensors and directly control relays(may be arduino can be connected to a rasp. pi with web server)

How can i do it ? using tcp/ip and all arduinos as both client/servers, or udp ?

I have made some research;
if i use tcp/ip only one node can be connected to master arduino at one time,
so if request comes when the master arduino is polling the nodes there will be problem.
udp seems more logical as far as i researched
which protocol should i use for communication ?

(don't want to use rs-485)

thanks in advance for your ideas

e9102b7293cad8efadc67b5f60ac0f13.jpg

Do a little reading on "MQTT"; this would be the standard protocol for these types of devices.

I would suggest that your master be hardware of a more robust design such as a Raspberry Pi or Yun or just a plain old computer so you can avoid connection limit problems. You can still hang an Arduino off a computer USB port to handle any "relay switching" as required.

ESP8266-based devices like NodeMCU are inexpensive and offer a Wifi capability. They would work great for your sensor nodes.

now i am checking mqtt and publisher/subscriber models
i want to use wired connection, we have already so many electromagnetic waves floating around us do not want to add anymore :slight_smile:
but thanks.