Skip to content

Implement Connection State Cycle #257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

MathewHDYT
Copy link
Contributor

@MathewHDYT MathewHDYT commented Feb 28, 2025

Improved the underlying IMQTT _Client Interface, with the option to either subscribe a callback that is informed whenever the underyling connection changes state (Connected, Connecting, Disconnected, Disconencting) or to directly read the current state. Additionally the exact error reason for the failure to connect is also received in the callback and can be read from the client as well.

This allows to better manage the current state of the client, because the Espressif_MQTT_Client, does not connect in a blocking way like Arduino_MQTT_Client, but instead sends a connect request and then returns immediately and will be informed again once the connection was successfull.

For thesse new features a new example 0020-espressif_esp32_connection_state has been created as well.


Furthermore multiple issues have been fixed including fixed of other Pull Requests. Closes #254, closes #242.

Additionally I've also updated the GitHub Workflow Actions to update deprecated packages, so that they run again.

Array class has been adjusted to fix compilation issue, because setting the template parameter to 0 was possible. Closes #239.

Arduino_HTTP_Client has issues in combination with ESP-IDF Arduino, because of changes in Interface. Should have been reverted. Closes #240.

Adjust code to append additional null termination to Attribute Request char array. Closes #245.

Fix provisioning and ota unsubscribe call causing disconnect with cloud and connect cloud not even doing anything at all. Closes #247. Closes #248.

Additionally fixed an edge case where the connected state was set to true in the Arduino_MQTT_Client, even tough the connect method timed out or failed, because of invalid credentials. Closes #258, closes #256.

Fix typo and adjust examples. Closes #238, closes #250, closes #241, closes #243, closes #246.

Includes chagnes from other PRs closes #260.

@imbeacon Would be nice if this could be merged and released as v0.15.0 on PlatformIO, Arduino and Espressif Registry, as it includes a lot of vital bug fixes for provisioning as well as sending telemetry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment