Clone this repository
https://github.com/sumedhasmile/MQTT.git
Go into the repository
$ cd MQTT
Build the Docker
$ docker-compose build
Run the Docker
$ docker-compose up -d
Go to the below URL of FastAPI using any browser
If want to fetch the data without the above built-in URL then below are the URLs for fetching data separately.
http://localhost:8080/get_last_ten_readings/{sensor-type}/ -> Here sensor-type is humidity or temperature
http://localhost:8080/get_readings/{sensor-type}/{start}/{end} -> here sensor-type is humidity/temperature, the start is start-date, the end is end-date in the ISO format (yyyy-mm-ddThh:mm:ss) eg:-2023-09-16T08:40:40