I need some advice for my smart home project regarding communication between 1 master arduino and multiple slave arduinos.
I want to reduce the use of WiFi connections from smart devices in my home (+- 200 of them) and rather use wired communication. For this I plan to use 1 master Arduino per room/function which connects to the central hub via an Ethernet LAN module & MQTT. All the +-20 devices within the room will be connected to the master. Most of the devices use the esp8266 module and have the pins TX, RX, GPI0, GND and V+ available which means I2C is not an available.
My thought is that the master should send all commands to all devices simultaneously, e.g. from TX master to each RX of all devices so that the devices are synchronized. BUT my master Arduino is limited in RX input pins and cant receive all the communication from the devices simultaneously this way. What options do I have?
You can try an RS485 bus
The broadcast message from the master should contain some sort of an addressing information so that only the addressed slave respond
if you can includ some more hardware maybe RS485 and implementing a MODBUS master-slave network would be suitable...
one more link
hope that helps...
Are you changing the architecture because of performance problems on your 200 node WiFi network?
Bear in mind that a single WiFi access point only uses one of the 11 channels available in the 2.4GHz spectrum. Adding more WiFi access points on different channels would expand the available spectrum and therefore reduce congestion.
Yeah, RS485 was also a thought I had. The addressing information would need to be automated on initial startup of the master, but could be managed somehow. I would need a lot of RS485 modules though.
I just had another idea while writing my response. Maybe I should use the onboard Rx/Tx for debugging only and create 1 virtual software Tx to send to all messages and multiple virtual Rxs to receive from each slave instead... hmm. Would having 1 master Tx with multiple Rxs work instead of having 1 set of virtual Rx+Tx per slave?
Its not an issue with managing the WiFi network, its more a philosophical approach. Just to mention some advantages with wiring up everything:
- Wired communication is less prone to interference which increases stability
- Each Master ensures that the system runs with the basic functions should the smart home hub need maintenance or has issues.
- Less electrosmog
- Increased network security which is easier to maintain.
- Branched approach with specialized firmware for certain tasks which reduces communication & serverload
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.