That's pretty awesome what you're doing here. I'd love to learn more about some specifics off-line sometime if you're up for it.
I've also written comms software which I use to communicate with microcontrollers (ESP, Arduino etc etc). Oftentimes, I need much more precise timing than the Pi micro-computer can handle, so I use a controller to perform certain tasks, then either poll or read from the microcontrollers for the data they've accumulated.
My community has 20 houses on the edge of a lake. Recently, I designed a system that replaced the manual work in the water purification "plant":
- Arduino Metro:
- Monitor chlorine mixture tank volumes
- Monitor various mixture content levels
- Monitor liquid and plant temperature and other environmental aspects
- Engage 120v (mains) pumps to fill liquids, with flow-sensors to monitor and ensure the correct mixture of chemicals/h20
- Manage various water and chemical solenoids to stop/start flow
- Set emergency and warning flags, and disable parts of the system if issues are detected
- ESP8266-12E NodeMCU:
- Is outside of the purification plant house, facing towards a building on my property about 400 metres away. It is attached to the main device that's inside the building via a 30' Cat-6 Ethernet cable. This cable supplies 12v power along with a Tx and Rx serial line
- It polls the inside unit for all of its data using the serial interface
- It uses its Wifi connection to a Raspberry Pi on the outside of the building by my house to send all of the data to me
- Raspberry Pi
- Is on the side of a building beside my house
- Is connected via Ethernet to a "dumb" cheap D-Link Wifi-Ethernet bridge
- Accepts communication from the ESP over Wifi, forces it through the D-Link on another Wifi connection, which I can access from home
- Responsible for simply sending the data to me