fablab-bergamo / Fab-O-matic

RFID machine access solution for a Fab Lab, based on ESP32. Uses modern C++ with Arduino framework. Hardware project is included.
https://www.fablabbergamo.it/2024/06/03/fabomatic1/
MIT License
2 stars 3 forks source link

Technological choices #5

Closed PBrunot closed 1 year ago

PBrunot commented 1 year ago

The current implementation has an MQTT client only with MongoDB database. There is no MQTT broker for the boards to connect. In my opinion a"self-contained" python server with minimal external dependencies could be desiderable.

Protocols for the boards, options I see:

For database, options I see :

My personal preference would be API REST + SQLite.

valerionew commented 1 year ago

I don't have any opinion on this. We may ask @lorossi and @MauroMombelli perhaps if they have anything to add

PBrunot commented 1 year ago

ok so for MQTT the libraries will be :

valerionew commented 1 year ago

Why did you pick these two libraries instead of the more common PubSubClient for esp32 and mosquitto for the server side?

The choice is fine, I'm just wondering if there is any reason to not use the two most widespread libraries/softwares

PBrunot commented 1 year ago

I actually used mosquitto on PC to test the ESP32 client library, it is easy to use. But I was hoping to have only one python program (without external programs) for server side, using Python libraries for Database, web server, MQTT broker. But maybe that's a wrong approach. I don't know if it's easy to "bundle & configure" things in Raspberry Pi.

For ESP32, I picked 256dpi/MQTT because it seems actively maintained (PubSubClient last commit is 3 years ago) and it was available in platformio repository. Licenses are the same (MIT). I can easily change to PubSubClient if this is a more common choice.

PBrunot commented 1 year ago

Now that I have a Raspberry Pi Zero, I understand better the approach. Mosquitto is running fine on Raspberry and I will use it as broker.