-
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
Added client-side RPC #113
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
This reverts commit 822eb97.
…uino-sdk into feat_examples
Would be nice if it would be possible to create a new GitHub release for the changes and thanks for the quick merge :D. |
Hi @MathewHDYT , Thanks for your contribution, it is already created. |
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.
This pull request includes, additional and updated examples for the
ESP32
, when using server-sideRPC
.Additionally with some help of other people using this library with the
ESP8266
, some compilation and run-time issues could be fixed. Making theESP8266
usable again with the newest version of the library. Thanks to #107 and fixing #112.In addition I integrated an additional method that allows to simply call a method on the
ThingsBoard
class, and will handle passiveOTA
updates as well.Meaning as soon as a Shared attribute update is received in the background the update will be initiated. Additional attributes for the
OTA
update have been moved into the Callback class.Furthermore support for client-side RPC has now been added and all methods of the Library code now include a detailed doxygen comment about their respective functionality to make it more user-friendly to use. Adding the wanted feature of #110.
I also adjusted some of the methods to reflect their APIs more exactly meaning the device name when provisioning or the secret key when claiming are now optional, meaning a
nullptr
or empty string can simply be passed and it will not be sent to the cloud, which results in different behaviour from theThingsBoard
server. All those functionalities have been described in detail in the method doxygen comments.Additionally the provision API and example have been updated to not require a manual subscription before being able to call Provision Device, both Subscription and Unsubscription is now automatically handled by the
ThingsBoard
class itself.The provision API also now allows for any possible provisioning state with different constructor for each possiblity.
Moreover I added support for non ESP-boards with the inclusion of
#define
guards that check wheter the board actually supports the needed C++ STL functionalities, if not workarounds with the ArduinoString
, as well as basic c-style function pointers and c-style arrays have been integrated. Thanks to #111.Additionally the
FW_STATES
send by the device during anOTA
update have been updated to reflect the API as well, meaning theUPDATED
, has to be sent at the start of the firmware instead.This has also been added to the example to reflect this change more clearly.
In addition the
OTA
update now includes an additonal callback that is called whenever a chunk was successfully updated, with the current amount of downloaded chunks and the total chunks we need to download. Making it possible to track the progress of the update and display it for an end user on a screen or in the console.Last but not least I updated the version to 0.9.0, I have done this mainly because the changes in the Pull Request include breaking API changes, with new methods adjusted methods calls and renames to make the naming scheme more uniform.
Therefore I think only increasing the patch number might cause confusion.
I also added dependencies into both the config files used by
ArduinoIDE
andPlattformIO
, to set the needed libraries as dependencies, this should in future fix the issues where the user has to download the needed dependencies them self and instead can let their IDE do the job for them.If the changes could be integrated, that would be highly appreciated @imbeacon.