Compare commits
No commits in common. "ae012a6378dfd1c907b78d60ebdbadfbc77e52ea" and "fc98a1283e979544e951bf974588578f8f94e4e5" have entirely different histories.
ae012a6378
...
fc98a1283e
2 changed files with 52 additions and 33 deletions
71
README.md
71
README.md
|
@ -1,16 +1,23 @@
|
|||
# PiWebSense
|
||||
|
||||
## Git
|
||||
This Repo gets pushed to three git hosts in the following order:
|
||||
- [git.miaig.dev](https://git.miaig.dev/mia/abschlussarbeit)
|
||||
- [git.gay](https://git.gay/mia/abschlussarbeit)
|
||||
- [github.com](https://github.com/miaig/abschlussarbeit)
|
||||
## Milestones
|
||||
|
||||
### Milestone 1
|
||||
|
||||
The Goal is to display and visualize data received/measured from a Raspberry Pi on a webinterface.
|
||||
|
||||
### Milestone 2
|
||||
|
||||
The Raspberry Pi should be integratable to a Home Assistant Server and be used as as sensor input and opitionally logic level output.
|
||||
|
||||
### Milestone 3
|
||||
|
||||
Data should be sent and received via MQTT to an ESP32. The Pi acts as a sensor gateway.
|
||||
|
||||
## Tech Stack / Hardware Requirements
|
||||
|
||||
- Raspberry Pi Model 4 for the sensors
|
||||
- A Second Pc/Laptop/Server/Pi that'll host the Webserver
|
||||
- **Programming languages used**: Python, jinja, HTML, CSS, JavaScript
|
||||
- **Raspberry Pi**: Model 4
|
||||
- **Programming languages**: Python, jinja, HTML, CSS, JavaScript
|
||||
- **Frameworks/tools/Libraries**:
|
||||
- Webserver:
|
||||
- flask
|
||||
|
@ -31,17 +38,14 @@ This Repo gets pushed to three git hosts in the following order:
|
|||
- digitalio
|
||||
- RPI.GPIO
|
||||
|
||||
- **Exxmple Sensors**:
|
||||
- **Sensors**:
|
||||
- LDR (Lightsensor)
|
||||
- Sound Detector
|
||||
- Temperature and humidity
|
||||
|
||||
## Docs
|
||||
|
||||
This Program aims to receive Data from a dynamic amount of Sensors and Display the data on the Webserver. This can be done using the example Sensors in the sensor folder or by just writing your own ones using the further down documented Json file. The server and port get defined in sensors/sender.py. That file can be imported as shown in the examples.
|
||||
|
||||
The Webserver distiguishes between two update formats: live and history.
|
||||
The data needs to be providet in the following format to be considered a history update. To be considered a live update the fielts type and unit have to be removed from the transmission.
|
||||
- The data needs to be providet in the following format:
|
||||
|
||||
```Json
|
||||
{
|
||||
|
@ -86,19 +90,48 @@ The data needs to be providet in the following format to be considered a history
|
|||
- `.envrc`
|
||||
This is also a bit of linux nixos magic to automatically set up the development environment using direnv
|
||||
- `main.py`
|
||||
This file starts all sensors at once for easy deployment at a site.
|
||||
The main file for the project
|
||||
|
||||
## Instalation
|
||||
### Git Help
|
||||
|
||||
### Sensors
|
||||
To Install the exmple Sensors, simply install all the Requiered packages mentioned further above
|
||||

|
||||
|
||||
## Acknowledgments
|
||||
### MarkDown Help
|
||||
|
||||

|
||||
|
||||
### Html Help
|
||||
|
||||

|
||||
|
||||
### Css Help
|
||||
|
||||

|
||||
|
||||
### JavaScript Help
|
||||
|
||||

|
||||
|
||||
### Jinja Help
|
||||
|
||||

|
||||
|
||||
|
||||
## Arbeitsaufträge / Aufgabeneinteilung
|
||||
|
||||
|
||||
| Mia | Chiara |
|
||||
| --------------------------------- | --------------------------------------------- |
|
||||
| Git | Daten von RPI erfassen und sauber abspeichern |
|
||||
| Readme | Präsentation |
|
||||
| Daten an einem Webserver anzeigen | |
|
||||
|
||||
### Acknowledgments
|
||||
|
||||
[Chiara](https://git.miaig.dev/chiara)
|
||||
[Mia](https://git.miaig.dev/mia)
|
||||
|
||||
## License
|
||||
### License
|
||||
|
||||
PiWebSense
|
||||
Copyright (C) 2025 Mia, Chiara
|
||||
|
|
14
main.py
14
main.py
|
@ -10,17 +10,3 @@
|
|||
# 1. Start all the Sensors
|
||||
# 2. Start the Webserver
|
||||
# 3. Somehow transfer data from the Sensors to the Webserver
|
||||
|
||||
import subprocess
|
||||
|
||||
programs = [
|
||||
["python", "sensors/lichtwiderstandsSensor.py"],
|
||||
["python", "sensors/mikrofonSensor.py"],
|
||||
["python", "sensors/temperaturSensor.py"]
|
||||
]
|
||||
|
||||
# Start each one in parallel
|
||||
processes = []
|
||||
for prog in programs:
|
||||
p = subprocess.Popen(prog)
|
||||
processes.append(p)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue