Skip to content

Read temperature, humidity, and pressure from a BME280 sensor using Python and expose the data via a Flask web server. Designed for integration with INDI/INDILib-based systems.

License

Notifications You must be signed in to change notification settings

ecalandrini/bme280-websensor

Repository files navigation

bme280-websensor

A Python project to read environmental data from a BME280 sensor and publish it on a webserver built with Flask. The published sensor data can then be accessed and utilized by INDIlib for further processing.

Features

  • Reads temperature, humidity, and pressure data from the BME280 sensor using Python.
  • Serves sensor data in HTML format through Flask webserver.
  • Designed for integration with INDIlib for astronomical instrumentation and control.

Installation

  1. Clone this repository:

    git clone https://github.com/ecalandrini/bme280-websensor.git
    cd bme280-websensor
  2. (Optional) Create and activate a virtual environment:

    python3 -m venv .venv
    source .venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install the required Python packages:

    pip install -r requirements.txt

Usage

  1. Connect your BME280 sensor to the device running this script (e.g., Raspberry Pi). image info

  2. Start the Flask Server:

    python3 server_api.py
  3. Access sensor data:

    http://your-device-ip:5000/

  4. Move the driver configuration file "Weather Wather_config.xml" in the .indi folder

  5. Run the bash script with sudo privileges

    sudo bash install_service.sh

Project Structure

  • api_server.py — Flask application serving sensor data.

  • sensor.py — Python script handling communication with BME280 sensor.

  • requirements.txt — Python dependencies.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Read temperature, humidity, and pressure from a BME280 sensor using Python and expose the data via a Flask web server. Designed for integration with INDI/INDILib-based systems.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •