How to handle simultaneous data from multiple ESP32 devices without mixing data in Django + DRF?
I’m working on my thesis and building a Django web application that receives height, weight, and temperature data from multiple ESP32 devices.
Each ESP32 has a unique device_id and sends all three measurements to my Django backend using Django REST Framework (via HTTP POST with JSON).
The issue happens when two ESP32 devices send data at the same time. The backend sometimes mixes their data, with measurements from one device overwriting or merging with another’s entry in the cache.
Question: What’s the best way to handle simultaneous data submissions from multiple devices in Django + DRF, ensuring each device’s data stays separate and accurate?
i tried to make the web app scan available devices or online esp32 devices, now the problem is whenever the esp32 sends data saying that it is available, it stack showing multiple devices in the selection.