Giter Site home page Giter Site logo

animesh0203 / healthsense Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.07 MB

This project demonstrates how to set up a real-time sensor data dashboard using a Raspberry Pi, Apache Kafka, and Streamlit.

Python 100.00%
dht11 iot kafka python3 raspberry-pi

healthsense's Introduction

Real-Time Sensor Data Dashboard

This project demonstrates how to set up a real-time sensor data dashboard using a Raspberry Pi, Apache Kafka, and Streamlit. The setup involves a Raspberry Pi that reads temperature and humidity data from a DHT11 sensor, a Kafka producer to send the data to a Kafka topic, a Kafka consumer to receive the data and store it in a CSV file, and a Streamlit app to visualize the data in real-time.

Table of Contents

Prerequisites

  1. Raspberry Pi with DHT11 sensor connected.
  2. Apache Kafka installed and running.
  3. Python installed on both the Raspberry Pi and the consumer machine.
  4. Necessary Python packages installed.

Setup Kafka

  1. Download and install Kafka from Apache Kafka.
  2. Start the Kafka server and create a topic named sensor_data.
bin/zookeeper-server-start.sh config/zookeeper.properties
bin/kafka-server-start.sh config/server.properties
bin/kafka-topics.sh --create --topic sensor_data --bootstrap-server localhost:9092 --partitions 1 --replication-factor 1

Producer Setup

pip install kafka-python adafruit-circuitpython-dht psutil
sudo apt-get install libgpiod2

Consumer Setup

pip install kafka-python pandas

Streamlit Dashboard

pip install streamlit pandas

Running the Project

  1. Put the producer python file on the Raspberry and customize it according to the sensors you are using.
  2. The consumer python file will be ran on the system.
  3. To view the data in realtime put the app python file in the same folder as the consumer and run it.
  4. Running only consumer python file without the app will just store all the data sent from the producer and can be viewed later.

healthsense's People

Contributors

animesh0203 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.