Since a few months I am working on a prototype for a smart home system. At the moment one Arduino controls all systems (shutters, lights, connection to the internet...). Because of the recent crashes of this one Arduino, I decided to use a decentralized system of several Arduinos (one controls the lights, another the shutters, ...). The question is now, what would be a suitable protocol for this project. This protocol should be fail-safe (5 out of 7 Arduinos should be able to fail, so that the other two can still communicate without problems) and if possible it should also be able to handle if 2 Arduinos try to communicate with 2 other Arduinos at the same time.
I have no idea why you posted in the covid 19 section for project advice.
Your topic was Moved to it's current location / section as it is more suitable.
Could you also take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.
Depending on distance between arduinos, a proper protocol would be RS-485. Multiple arduinos can be connected on the same bus, and communicate with any of the other arduino on the bus. There are shields for RS-485. Note: I have no experience with it; I've looked into it for a project, but didn't end up using it.
You would have to figure out your own error resolution if a certain node is offline.
But I would also suggest figuring out why your main arduino keep crashing. Arduinos are not supposed to do that. Is the crash caused by the hardware or software? Check you have an adequate power supply and decoupling, any places in your program where it hangs waiting for something, ect...
@ballscrewbob
I appreciate your suggestion. I have read the articles above and will try to pay more attention to them in the future.
Thanks for your advice regarding the RS-485 protocol. One of the skin problems is that when the relay switches, the web socket (from the network shield) crashes. I have been trying for a long time to fix this problem without success. One of my attempts was to run two independent Arduinos from two independent power sources, one with a network shield, the other with a relay, but the network shield crashed anyway. The only thing that worked so far was a relatively thick metal shield, which is not possible due to lack of space. I have to say that the relay switches a shutter which is not state of the art anymore and therefore needs more power than normal at the beginning.
Shielded cables and boxes etc can play a large part in stopping those types of crashes.
Are you using relay modules or some home made relay devices ?
SSR's may help there too.
Shielded cables and boxes etc can play a large part in stopping those types of crashes.
I know that I could possibly prevent the problem by shielding everything, but for me that would only be the last option. At the moment I use a purchased relay module with 12V and 30A - the strongest I could find.