Thanks for your feedback.
If I understand well that you using 3 clients with 7 topics.
Again, if I understand well the "broker" ESP32-S3 is also the one that receive the UDP messages from the sensors.
I suppose that the ESP32-S3 do not have a PSRAM (otherwise you should have much more memory free available) and this is a very good news .
Yes, in this case the broker has a quite small background activity and it should be able to handle the task without problems.
So, good news so far, I'm also happily surprised on how the broker works well inside Annex in parallel with other activities.
Next step is to test in parallel with the BLE and see if the broker can also exchange with a bluetooth application
edit:
how long are your json messages? Actually I limited the payloads at 256 characters (because I'm using a queue and the goal is to limit the ram memory usage) but I could increase this at 512
What about a mini MQTT broker on the ESP32?
- cicciocb
- Site Admin
- Posts: 2516
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 531 times
- Been thanked: 1788 times
- Contact:
Re: What about a mini MQTT broker on the ESP32?
This is terrific and aspirational. Can you share the code for your "Annex House" graphic?[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Mon Oct 28, 2024 9:23 amI am receiving data from approx 30 sensors via UDP in json strings, over 7 topics, I am also monitoring ramfree in another topic so I can graph it.
- cicciocb
- Site Admin
- Posts: 2516
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 531 times
- Been thanked: 1788 times
- Contact:
Re: What about a mini MQTT broker on the ESP32?
OK, I left the broker running for around 24 hours and I'm happy to say that there are no memory leaks and it still work great.
I tested the link with the Iot MQTT panel on my Iphone and also works perfectly.
I tested the link with the Iot MQTT panel on my Iphone and also works perfectly.
Re: What about a mini MQTT broker on the ESP32?
Hi, Early morning here. Running some 12 hrs no errors or resets in the log, ramfree is same.
Actually your comment re my chip not having psram is a good one as I thought it should have. I have not wanted to stop it running at the moment to investigate. I guess I shouldn't have to do anything to use the psram? if it is present then Annex should use and recognise it?
The longest json string I have is 161 char, that's for the Cumulus (Weather Software), actually its a good point you raise as 256 may not be sufficient for a full cumulus string as this currently is only testing. How difficult etc would it be to allow a larger string?
IOT Panel is a great program and now we have MQTT saves having to create an interface.
Actually your comment re my chip not having psram is a good one as I thought it should have. I have not wanted to stop it running at the moment to investigate. I guess I shouldn't have to do anything to use the psram? if it is present then Annex should use and recognise it?
The longest json string I have is 161 char, that's for the Cumulus (Weather Software), actually its a good point you raise as 256 may not be sufficient for a full cumulus string as this currently is only testing. How difficult etc would it be to allow a larger string?
IOT Panel is a great program and now we have MQTT saves having to create an interface.
You do not have the required permissions to view the files attached to this post.
Re: What about a mini MQTT broker on the ESP32?
Hi Lyizb,
Mike
If I understand you? its not code its an Android program called MQTT IOT Panel, I find it very useful , easy to use and making a display is easy.This is terrific and aspirational. Can you share the code for your "Annex House" graphic?
Mike
- cicciocb
- Site Admin
- Posts: 2516
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 531 times
- Been thanked: 1788 times
- Contact:
Re: What about a mini MQTT broker on the ESP32?
Hi, the PSRAM is automatically taken into account, if installed.[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Mon Oct 28, 2024 9:09 pm Hi, Early morning here. Running some 12 hrs no errors or resets in the log, ramfree is same.
Actually your comment re my chip not having psram is a good one as I thought it should have. I have not wanted to stop it running at the moment to investigate. I guess I shouldn't have to do anything to use the psram? if it is present then Annex should use and recognise it?
2024-10-29 08_06_14-Lolin WeMos S3 Mini - ESP32-S3 Wifi Bluetooth IoT Development Board — Mozilla Fi.png
The longest json string I have is 161 char, that's for the Cumulus (Weather Software), actually its a good point you raise as 256 may not be sufficient for a full cumulus string as this currently is only testing. How difficult etc would it be to allow a larger string?
IOT Panel is a great program and now we have MQTT saves having to create an interface.
2024-10-29 07_41_47-MQTT Explorer.png
In your case, with only 3/4 clients, the broker do not require too much RAM. In my test case, with 12 clients connected, I have plenty of RAM free (the PSRAM is 8MB) but the "very precious" RAM, the internal one used by the internal functions is also ~130KB.
I can say that, so far, the only limit I found is the max number of clients allowed simultaneously that is limited by the OS itself.
Increasing the size of the payloads is not a problem, is just a question of determine the good value or enabling the choice using an option somewhere.
My config still runs without any issues since 2 days ...
-
- Posts: 61
- Joined: Mon Feb 27, 2023 12:56 pm
- Location: Berlin
- Has thanked: 21 times
- Been thanked: 13 times
Re: What about a mini MQTT broker on the ESP32?
Hello Francesco,
I did some tests today with my Shelly weather station and the Shelly motion sensor, and I noticed that some status messages in the Shelly's JSON format actually contain more than 256 characters.
It would be an advantage if you could optionally specify the buffer size for the messages.
Greetings
I did some tests today with my Shelly weather station and the Shelly motion sensor, and I noticed that some status messages in the Shelly's JSON format actually contain more than 256 characters.
It would be an advantage if you could optionally specify the buffer size for the messages.
Greetings
- cicciocb
- Site Admin
- Posts: 2516
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 531 times
- Been thanked: 1788 times
- Contact:
Re: What about a mini MQTT broker on the ESP32?
A little demo of the broker with 9 tasmota / openbeken.
In parallel, there are 3 additional ESP32 modules connected in MQTT (for a total of 12 devices)
In parallel, there are 3 additional ESP32 modules connected in MQTT (for a total of 12 devices)
-
- Posts: 145
- Joined: Fri Dec 09, 2022 10:03 am
- Has thanked: 92 times
- Been thanked: 17 times
Re: What about a mini MQTT broker on the ESP32?
Yes, The app ( IO-Panel )is super good, a little poorly described, but great options.[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Mon Oct 28, 2024 9:23 am OT Panel, was fantastisch ist.....