What about a mini MQTT broker on the ESP32?

Place your projects here
User avatar
cicciocb
Site Admin
Posts: 2784
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 592 times
Been thanked: 1990 times
Contact:

What about a mini MQTT broker on the ESP32?

Post by cicciocb »

Hi all,
I'm experimenting the implementation of a mini MQTT broker on the ESP32, using an existing MQTT broker library.

So far it seems to work well, stable and reliable (I'm actually using an ESP32-S3) so I'm implementing all the functionality to configure it easily using a terminal.

It should be limited at around 10 devices but I think that this is more than enough for a typical home use.

If someone is interested into testing it, I'll be happy to share.
peridot
Posts: 56
Joined: Mon Mar 08, 2021 4:54 am
Has thanked: 9 times
Been thanked: 106 times

Re: What about a mini MQTT broker on the ESP32?

Post by peridot »

I would be interested in helping to test this , it fits exactly into my "wiretool" current project which I have just posted an update to [Local Link Removed for Guests]
Monki
Posts: 79
Joined: Mon Feb 27, 2023 12:56 pm
Location: Berlin
Has thanked: 29 times
Been thanked: 18 times

Re: What about a mini MQTT broker on the ESP32?

Post by Monki »

Good morning Francesco,
I would also like to test it.
Are the normal functions available at the same time as the MqttBroker functionality?

Monki
Helmut_number_one
Posts: 163
Joined: Fri Dec 09, 2022 10:03 am
Location: Flensburg Deutschland
Has thanked: 114 times
Been thanked: 25 times

Re: What about a mini MQTT broker on the ESP32?

Post by Helmut_number_one »

That sounds really exciting, I would be very interested.
As I judge you, Francesco, it's going to be awesome.
Thank you for your time.
lyizb
Posts: 241
Joined: Fri Feb 12, 2021 8:23 pm
Has thanked: 121 times
Been thanked: 84 times

Re: What about a mini MQTT broker on the ESP32?

Post by lyizb »

I also would be interested (but might 16 devices be possible?).

What are the various benefits and drawbacks to MQTT, UDP, and ESP-Now--alone and together?

Do you see this MQTT option used in conjunction with the other communication methods?
User avatar
Electroguard
Posts: 1094
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 373 times
Been thanked: 392 times

Re: What about a mini MQTT broker on the ESP32?

Post by Electroguard »

I don't use MQTT (yet).
For those who do, and have more than 8 clients, perhaps it might be possible to have multiple Annex MQTT Servers each with up to 8 clients all able to co-exist (just a thought).
User avatar
cicciocb
Site Admin
Posts: 2784
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 592 times
Been thanked: 1990 times
Contact:

Re: What about a mini MQTT broker on the ESP32?

Post by cicciocb »

The actual implementation I did is just a MQTT broker inside an esp32, and the limit on the users is given by the SDK (the os inside). I'll try to see if this can coexist with Annex even if this will limit more the number of connections.
For who shown their availability for testing, thanks, I'll contact you as soon as I'll have something useable.
Helmut_number_one
Posts: 163
Joined: Fri Dec 09, 2022 10:03 am
Location: Flensburg Deutschland
Has thanked: 114 times
Been thanked: 25 times

Re: What about a mini MQTT broker on the ESP32?

Post by Helmut_number_one »

Is the memory limiting the number of topics and payloads?
User avatar
cicciocb
Site Admin
Posts: 2784
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 592 times
Been thanked: 1990 times
Contact:

Re: What about a mini MQTT broker on the ESP32?

Post by cicciocb »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Sun Oct 13, 2024 12:33 pm Is the memory limiting the number of topics and payloads?
Not really, in particular for modules with psram this should not be an issue. The limit is on the networks side as the TCP embedded code has a limited number of simultaneous connections.

info : https://github.com/alexCajas/EmbeddedMq ... -on-esp32-
peridot
Posts: 56
Joined: Mon Mar 08, 2021 4:54 am
Has thanked: 9 times
Been thanked: 106 times

Re: What about a mini MQTT broker on the ESP32?

Post by peridot »

The small number of TCP connections is not a huge problem to me (see my [Local Link Removed for Guests]) as if you want to use MQTT exclusively you would use , say ,use a RPI Zero instead, where you have the capability of 1000(s) of connections.

The advantage ,to me, is to give simply the ability of a MQTT broker within the ESP32 to allow the android display capabilities for an ESP32 project on an Android phone, so no LCD hardware and software development required.
Annex has lots of capability for other types of connections to sensors etc that can be used and then aggregate the data into groups and present to the broker via a single TCP connection.
This approach then leaves what TCP connections are available to use where individual device connections must be used.
Post Reply