MQTT data logins with ESP32

Gienek
Posts: 10
Joined: Wed Dec 21, 2022 11:09 am

MQTT data logins with ESP32

Postby Gienek » Wed Dec 21, 2022 11:22 am

Hi,
I'm software engineer in medical related company. We would like to introduce data logging for our products using ESP32C3 and MQTT. I used to work with STM32 and don't have much experience with ESP32 despite some Arduino projects.
I've briefly read doc https://docs.espressif.com/projects/esp ... index.html about setting up Espressife IDE, FreeRTOS and ESP-IDF.
Then built several examples https://github.com/espressif/esp-idf/tr ... ocols/mqtt
THen get to know what are components, build my own, prepared CMAKEs and unittests with unity.

There will be around 10000 devices with logging rarely 1kB payloads to single broker (Python script + Postrgres in Azure).

I have a bad feeling about documentation - it says that I can start making my project based on examples from github. Examples builds and works. But details are IMO black boxes. Are those examples for hobbist or can be used in proffessional solutions?

Using only datasheet I won't be able to recreate those examples. How can I get indepth knowledge?
What is proffesional path in creating this kind of software? I dont want to make blackboxed solution based on examples because I won't be sure if I can deploy it to production.

ESP_Sprite
Posts: 9568
Joined: Thu Nov 26, 2015 4:08 am

Re: MQTT data logins with ESP32

Postby ESP_Sprite » Thu Dec 22, 2022 2:56 am

The examples are there to get people started; as you say, it's hard to get the setup of things 100% correct first try if you're unfamiliar with APIs etc, as the full capabilities of some APIs can be overwhelming. From my experience, once you have some feeling for the APIs, you can generally whip them up using the API documentation and your experience with them. The examples try to build understanding: what is required in e.g. setting up a MQTT connection? As such, they're generally not a 'full' project: e.g. some lack error handling in order to clarify the workings and all will need adaptation to your particular use case.

On that documentation: you have seen that the entire API is documented? There's both low-level reference documentation for all APIs here (e.g. for mqtt, it's here) as well as guides for things that don't have a particular API.

ESP-IDF is intended as a general solution for both professionals as well as advanced-enough hobbyists and has a lot of commercial products built on top of it, it certainly isn't a 'toy' SDK.

Gienek
Posts: 10
Joined: Wed Dec 21, 2022 11:09 am

Re: MQTT data logins with ESP32

Postby Gienek » Tue Jan 03, 2023 7:19 am

Thank you for quick reply. Reference documentation is what I needed, and ofc comments in code. Not everything is clear to me, but it started clearing out as I'm working.
I've bought some books but they are mostly focused on playing with ESP. One book about concepts of IoT was quite helpful. Documentation and content on this forum and stackoverflow seems sufficient.

Who is online

Users browsing this forum: No registered users and 79 guests