https://github.com/ryangst/sensors-queue
PoC: DHT11, Raspberry PI 4 and rabbitmq
https://github.com/ryangst/sensors-queue
deno iot rabbitmq raspberrypi system-design
Last synced: about 2 months ago
JSON representation
PoC: DHT11, Raspberry PI 4 and rabbitmq
- Host: GitHub
- URL: https://github.com/ryangst/sensors-queue
- Owner: RyanGst
- Created: 2025-05-25T22:36:21.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-01T20:41:04.000Z (about 1 year ago)
- Last Synced: 2025-06-20T02:05:24.966Z (about 1 year ago)
- Topics: deno, iot, rabbitmq, raspberrypi, system-design
- Language: Python
- Homepage:
- Size: 69.3 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DHT11, Python, RabbitMQ and Deno Example
This project demonstrates a simple system for publishing and consuming sensor data (simulated temperature and humidity) using RabbitMQ as a message broker.
## Demo in 🇧🇷
[](https://www.youtube.com/watch?v=HlxMgqI8xFM)
It consists of two main components:
1. **Python Publisher (`src/app.py`):**
* Simulates reading data from a sensor (e.g., a DHT11).
* Publishes these readings as JSON messages to a RabbitMQ queue named `sensor_data`.
* Configured to connect to a RabbitMQ instance, potentially running locally via Docker (`compose.yaml`) or a remote instance.
2. **Deno Consumer (`consumer/main.ts`):**
* Connects to the same RabbitMQ instance.
* Subscribes to the `sensor_data` queue.
* Receives and processes the JSON messages published by the Python application. This can be extended for various purposes like logging, alerting, or data analysis.

## Technology Stack
* **Python:** For the data publishing application.
* `pika`: RabbitMQ client library.
* **Deno:** For the data consuming application.
* `amqplib`: RabbitMQ client library.
* **RabbitMQ:** Message broker for decoupling the publisher and consumer.
* Can be run locally using the provided `compose.yaml` or connected to a remote instance.
* **Docker:** Used for containerizing RabbitMQ and potentially for deploying the consumer application.