mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2026-04-08 03:53:41 +00:00
512086bdbb429f04b8b121a623a151439cd867bb
mqttStart() called MQTTAsync_create()/MQTTClient_create() on every
invocation, including reconnects from mqttEvery5Seconds(). This leaked
the old Paho client handle without destroying it. The old client's
internal threads would eventually reconnect using the same MQTT
clientID, causing the broker to disconnect the new client ("session
taken over"), creating a permanent connect/disconnect loop.
Fix: create the Paho client once (guarded by mqttClientCreated flag)
and reuse it on reconnect, matching the ESP32 implementation pattern.
Properly destroy the client in mqttStop().
Affects: hasp_mqtt_paho_async.cpp (Linux, macOS, Windows async builds)
hasp_mqtt_paho_single.cpp (Windows synchronous builds)
Does not affect: ESP32/ESP8266/STM32 (different MQTT implementations)
Fixes HASwitchPlate/openHASP#1005
Made-with: Cursor
openHASP firmware
Control your home-automation devices from a customizable touchscreen UI connected via MQTT.
This project is a re-implementation of the popular HASwitchPlate sketch created by aderusha. The HASPone project uses a Wemos D1 mini and requires a Nextion/TJC HMI display. This rewrite removes the Nextion/TJC hardware requirement by using the Light and Versatile Graphics Library on the MCU to drive a commodity display.
openHASP uses the ESP32 and STM32F4 to take advantage of the hardware capabilities.
Demo Screens
Getting Started
Check out the documentation for how-to's, information and frequently asked questions.
For support using openHASP, please join the #openHASP channel on Discord.
Donate
Description
HomeAutomation Switchplate based on lvgl for ESP32
arduinoaz-touchesp32homeassistanthomeautomationlanbonlvglm5stackmqttopenhabopenhaspsmarthomestm32duino
Readme
MIT
54 MiB
Languages
C++
85.7%
C
12.5%
Python
1.5%
RobotFramework
0.1%


