There are two kinds of methods to directly send data from Web Browser to sensors/devices: via HTTP request and via WebSocket. Therefore, there are two methods to directly control devices via Web Browser. Each method has its own advantages
Control via HTTP Request
- Simple to create
- Useful to control discrete states of devices (e.g. turn on/off LED)
Control via WebSocket
- Convenient to create Graphic User Interface
- Useful to control continuous states of devices (e.g. turn on/off LED)