I'm working on a project where I need multiple devices to connect to a shared server that can exchange data in realtime. I was approaching this problem by creating a websocket server on a Raspberry Pi 4 which connects to various Raspberry Pi Pico W's that send JSON data at a specific path.
However, trying to actually code the Raspberry Pi Pico W, I quickly found a replacement of "asyncio" for MicroPython, but couldn't find anything for "websockets". These are the libraries I found:
micropython-async_websocket_client is for ESP32 devices
uwebsockets is for ESP8266 devices
I'm installing these packages onto my Raspberry Pi Pico W using Thonny editor but it returns with a non-zero exit status from pip. I could switch to using MQTT with the "micropython-umqtt.simple" package, but I'd prefer websockets.
Is there a solution that could fit my requirements, or do I have to switch to using MQTT?