Skip to content
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

Request for Additional ESP-IDF Examples in Thingsboard C++ SDK #175

Closed
hayschan opened this issue Dec 21, 2023 · 5 comments
Closed

Request for Additional ESP-IDF Examples in Thingsboard C++ SDK #175

hayschan opened this issue Dec 21, 2023 · 5 comments

Comments

@hayschan
Copy link
Contributor

Hello Thingsboard Team,

I'm writing to express my interest in the Thingsboard C++ SDK, specifically regarding the examples provided for different frameworks. First and foremost, I'd like to commend the team for the comprehensive set of examples available for the Arduino framework. It's evident that a lot of effort has gone into making these resources accessible and useful.

As a user primarily working with the ESP-IDF framework, I've noticed that the current example set primarily caters to the Arduino framework. While the existing espressif_ prefixed examples (0014-espressif_esp32_send_data and 0015-espressif_esp32_process_OTA_MQTT) are quite insightful, it would be incredibly beneficial to have a broader range of examples for the ESP-IDF framework.

Given the versatility and increasing popularity of ESP-IDF in various IoT projects, additional examples covering the full feature set of the Thingsboard C++ SDK would be highly advantageous. This includes:

  • Device attribute publish
  • Server-side RPC
  • Client-side RPC
  • Request attribute values
  • Attribute update subscription
  • Device provisioning
  • Device claiming

These examples would not only aid developers like myself in better understanding and implementing the SDK in ESP-IDF based projects but also enrich the SDK's overall utility for a wider user base.

Understanding the time and resources required for such development, I sincerely appreciate any consideration given to this request. I, along with the ESP-IDF community, look forward to potentially seeing more espressif_ prefixed examples in the near future.

Thank you for your time and continued efforts in improving the Thingsboard ecosystem.

Best regards,

Hays Chan

@MathewHDYT
Copy link
Contributor

Thanks a lot for your kind feedback. The main reason why there are many more Arduino examples is that the library only recently integrated Espressif IDF support namely v0.12.0.

That is also the reason why there is no implementation for the IHTTP_Client for the Espressif IDF currently, meaning the ThingsBoardHttp client can currently not be used with the Espressif IDF if it isn't implemented by the user itself. (Additional reason is that I started to implement it, but ran into a few weird issues and didn't have the time to fix them).


Additionally most examples from Arduino, don't differentiate themselves that much from the Espressif examples. Overall the only thing one needs to do is change to the Espressif_MQTT_Client and then initalize the WiFi connection in the Espressif IDF way. The remaining methods or callback classes remain the same.

That's the main reason 0014-espressif_esp32_send_data was implemented, because it allows to see the difference to 0003-esp8266_esp32_send_data. Which then allows to see which changes need to be made when using Espressif IDF or Arduino.


I hope those tips somewhat help implementing the features more easily, until I can add additional examples in the future. Because it will probably take a while. Mainly because I am currently working on some other fixes for currently open issues and additional improvements to the library.

@hayschan
Copy link
Contributor Author

I have added the missing examples in the PR #199 . This issue can be closed.

@hayschan
Copy link
Contributor Author

hayschan commented May 24, 2024

To do list of adding examples to the ESP-IDF platform:

  • Send data (_send_data)
  • Process shared attribute update (_process_shared_attribute_update)
  • Claim device (_claim_device)
  • Provision device (_provision_device)
  • Handle OTA updates via MQTT (_process_OTA_MQTT)
  • Handle RPC (_rpc)
  • Subscribe to OTA updates via MQTT (_subscribe_OTA_MQTT)
  • Request shared attribute (_request_shared_attribute)
  • Request RPC (_request_rpc)

I am going to add the claim and provision device examples as well soon.

@MathewHDYT
Copy link
Contributor

MathewHDYT commented Jun 7, 2024

@imbeacon This issue can now be closed because the pull request has been merged, thanks :D.

@hayschan
Copy link
Contributor Author

hayschan commented Jun 7, 2024

I can close this issue as well.

@MathewHDYT

@imbeacon imbeacon closed this as completed Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants