IoT

Esp32 real-time IoT & WebSocket

February 27, 2025
Francisc Lz.
1 year ago

Interactive WebSocket-based control system between a Laravel-powered web application and an ESP32 microcontroller.

I developed an interactive WebSocket-based control system that enables seamless communication between a Laravel-powered web application and an ESP32 microcontroller. Built with Laravel, Tailwind CSS, and Livewire, this system provides real-time command execution and status feedback through Laravel Reverb WebSockets.

 

Key Features:

  1. Two-Way WebSocket Communication – Commands sent from the Livewire interface are delivered to the ESP32 via WebSocket messages. The ESP32 responds on a separate WebSocket channel, updating the interface with real-time status feedback.
  2. On-Device Display – Messages sent from Laravel are displayed on the ESP32’s OLED screen, utilizing the SSD1306Wire library.

  3. Asynchronous Processing – Laravel Events broadcast commands, while Listeners handle incoming WebSocket messages, which are queued and processed efficiently.

  4. Optimized Server Architecture – The system runs on Nginx, using Supervisor to manage Laravel Reverb WebSockets and queue workers for handling ESP32 responses.

  5. ESP32 Firmware – The ESP32 runs firmware built with Arduino.h, ArduinoJson.h, SPIFFS, WiFiManager, HTTPClient, and WebSocketsClient, ensuring robust network management and message handling.

 

This project demonstrates my expertise in real-time IoT communication, WebSocket integration, and asynchronous processing, bridging the gap between Laravel applications and embedded systems.

Gallery

Gallery Image 1
Gallery Image 2
Gallery Image 3
Gallery Image 4
Gallery Image 5

Article Info

Published: Feb 27, 2025
Category: IoT
Author: Francisc Lz.
Read Time: 2 min read