This demo showcases a Django application with WebSocket support for bidirectional communication between Device applications, mobile clients (Flutter), and web applications.
This page simulates a Device application connecting to the WebSocket server. It acts as the source of truth for the system's state and processes commands from remote clients.
Open Device SimulationThis page simulates a remote client (Flutter/Web) connecting to the WebSocket server. It can send commands to the Device application and receive real-time state updates.
Open Remote ClientThe WebSocket server provides a REST API for authentication and Device instance discovery. All state updates and commands are sent via WebSocket.
/api/auth/login/ - Get JWT token for authentication/api/device/ - List available Device instances/api/device/{device_id}/ - Get connection details for a specific Device instancews://host/ws/device/{device_id}/host?token={jwt_token} - Connect as Devicews://host/ws/device/{device_id}/remote?token={jwt_token} - Connect as Remote Clientemail: admin@example.com
Password: adminpassword
Device Instances: name_1, name_2