Streaming ESP32-CAM Images to Multiple Browsers via MQTT

In this tutorial, you'll learn how to publish images from an ESP32-CAM board to multiple browser clients using MQTT (Message Queuing Telemetry Transport). This setup will enable you to create a platform that functions similarly to a live video stream, viewable by an unlimited number of users.

Prerequisites

Before diving in, make sure you have completed the following prerequisite tutorials:

Introduction to ESP32 for Beginners Using the Xedge32 Lua IDE

What Is the ESP32?

The ESP32 is an incredible microcontroller developed by Espressif Systems. Based on its predecessor's legacy, the ESP8266, the ESP32 boasts dual-core processing capabilities, integrated Wi-Fi, and Bluetooth functionalities. Its rich features and cost-effectiveness make it a go-to choice for creating Internet of Things (IoT) projects, home automation devices, wearables, and more.

What Is Xedge32?

Xedge32, built upon the Barracuda App Server C Code Library, offers a comprehensive range of IoT protocols known as the "north bridge." Xedge32 extends the Barracuda App Server's Lua APIs and interfaces seamlessly with the ESP32's GPIOs, termed the "south bridge." 

Beginner’s Guide to Embedded Systems and Secure IoT Communication

If you are new to embedded programming or if you are new to the complex world of setting up secure IoT devices requiring X.509 certificate and PKI management, then the SharkSSL IDE for ESP32 is a great starting point. With this IDE, even a "Noob" can be up and running with the first RTOS-powered IoT device in 30 minutes.

In addition to many C code examples, the SharkSSL IDE also includes a project that lets developers with no C code experience program the ESP32 using a high level programming language called Lua.

Easy IoT and Device Management for Non-C Coders

If you have an interest in learning how to program microcontrollers for home monitoring DIY projects or looking at developing commercial IoT products, but lack C code experience, look no further. This hands-on tutorial shows how to get your project up and running really fast using a high level language called Lua. You do not need any C experience, and you can easily install the ready to use the microcontroller firmware by following a few instructions.

Lua - easy for kids to learn and also powerful enough for developing professional IoT solutions!

Certificates for Internal Servers

I often get the question from customers "How do I make a browser trust my internal Intranet web server". Is it possible to use trusted certificates for Intranet servers? The short answer is yes. It is possible, and I'll show you two ways this can be solved. But what exactly is an Intranet server?

What Is an Intranet Server?

An Intranet (internal) server is one that runs on a private (home/business) network with a non-public IP address -- that is, any IPv4 address in the RFC 1918 range (e.g. 10.0.0.0, 172.16.0.0, 192.168.0.0) and any IPv6 address in the RFC 4193 range.

Setting Up Your Own Arduino IoT Cloud Server

If you have had a chance to play around with some of the new Arduino-enabled hardware platforms such as the ESP8266 Wi-Fi SoC, you may already have used an online IoT service for your project. In this article, we will show you how to set up your own online service by setting up a Virtual Private Server (VPS) and server software for your Arduino IoT project.

You may also like: Building an IoT System Using Arduino and IoT Cloud Platform

In addition to setting up your own VPS, we will show you how to install a simple example that lets you control LEDs, lights, etc., by using a browser. The following figure shows how any number of devices can be controlled in real-time by navigating to your own VPS using a browser. The online VPS functions as a proxy and makes it possible for any number of users to control the devices via the online server.

IoT as an Alternative to VPN for Secure Remote Device Access

Embedding web servers have traditionally been used as an easy solution for managing equipment by using any standard browser. Unless a tunnel such as Virtual Private Network (VPN) is used, managing the equipment is limited to the local Intranet where the equipment is installed. However, setting up and operating a VPN solution is challenging, technical, and costly if IT personnel are needed for the VPN setup and maintenance.

A configuration-less alternative to VPN is to use a type of IoT solution known as IoT bridge mode. A device can act both as a web server for local use and as an IoT edge node for remote use. The following figure depicts such a setup.