PC
NOTE: Example for ESP32 board using MQTT is available here.
The following examples show how to use a PC (desktop or laptop computer) to stream live webcam image to GUI-O application. Image streaming is supported for MQTT and Local WiFi connections.
GUI-O Local WiFi live image stream
This example uses Python to continuously capture images from a webcam and stream them over a Local WiFi connection.
NOTE: This requires GUI-O app version 1.0.87 or greater.
Download the script and follow the steps below:
Open the Python script and make sure that all imported modules are installed (paho-mqtt and opencv-python)
Set the "server_ip" variable to the IP address of your PC device
IMPORTANT NOTE: Make sure that the device running the Python script has a camera (e.g., laptop webcam)
Run the Python script (to stream color image instead of grayscale, enable the "useColor" variable within the script)
Open GUI-O app
Tap "Add -> Local" from GUI-O app home screen and create a new device using the "server_ip" and "server_port" values set within the Python script
Navigate to GUI-O app home screen, tap "Connect" and select your device
GUI-O MQTT live image stream
This example uses Python to continuously capture images from a webcam and stream them over an MQTT connection.
Download the script and follow the steps below:
Open GUI-O app
Tap "Add -> IoT (Create device)" from GUI-O app home screen and create a new device
Note the "In" topic of the created device!
Navigate to GUI-O app home screen, tap "Connect" and select your device
Open the Python script and make sure that all imported modules are installed (paho-mqtt and opencv-python)
Set the "pubTopic" variable in the Python script to the "In" topic of the created device
IMPORTANT NOTE: Make sure that the device running the Python script has a camera (e.g., laptop webcam)
Run the Python script (to stream color image instead of grayscale, enable the "useColor" variable within the script)
Connect . Create . Control