-
Notifications
You must be signed in to change notification settings - Fork 124
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
Overhaul Library API Design #223
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… either null or empty.
@imbeacon Would be nice if this could be merged as it would resolve all currently open issues of the library. As well as some not yet reported bugs in the implementation that have been fixed as well (Especially with Thingsboard dynamic mode). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overhauled the library API usage, to decrease the code size of the
ThingsBoard.h
file from 1900 to 800 lines of code.Achieved by seperating the individual ThingsBoard APIs (Shared Attribute Update, Attribute Request, ...) into seperate classes that can be subscribed to the main
ThingsBoard.h
file. Allows to seperate connection to MQTT Broker (Thingsboard.h
) from specific API handling (IAPI_Implementation.h
). Furthermore this now also allows to define and subscribe custom APIs, making the library even more flexible. Closes #211, closes #187.Additionally the internal usages of timers have been reworked for non
ESP32
devices to now work correctly. Closes #182 and closes #206.Ajudsted examples to changes, closes #210, closes #228, closes #207
Adjusting
Configuration.h
so it enablesESP
components for the exact version the required methods were implemented at. Closes #215.Fixing problems with
THINGSBOARD_ENABLE_DYNAMIC
, where not enough space was allocated, closes #216 and closes #225. Additionally added optional argument to hardcap the allocation done by this automatic calculation to prevent huge memory allocations from malicious payloads.Fixed OTA API so it actually utilizes the request id parameter required by the API. Added additional callback method to the OTA update process so we can stop all other processes and unsubscribe from everything before subscribing to chunk requests or receiving the first chunk.
Fix problems were default initalization left variables unitialized, ensure direct initalization occurs with
= {};
. Additionaly adjusted OTA failure messages to reset fw error text on success and send correct states. Closes #221.Adjusted response handling to fix transformation of JsonDocument as JsonObject. Closes #222
Furthermore this pull request includes the relevant changes from other Pull requests. Closes #217 and closes #209.
Add additional checks to login to make sure that existing but empty strings do not cause the underlying clients to assume that MQTT Basic Credentials authentication method is choosen. Closes #224
Adjust OTA hash check to actually check the string representation of the hash instead of comparing byte and string version. Closes #219
@imbeacon Would be nice if this could be merged and released as
v0.14.0
on ArduinoIDE, PlattformIO and EspressifIDF Registry.