Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cassiancc/humidity-final-project
https://github.com/cassiancc/humidity-final-project
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/cassiancc/humidity-final-project
- Owner: cassiancc
- Created: 2024-04-23T21:20:07.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-05-01T23:41:53.000Z (8 months ago)
- Last Synced: 2024-05-02T14:26:39.183Z (8 months ago)
- Language: Python
- Size: 5.64 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CIT 381 Final Project
Install
```
git clone https://github.com/cassiancc/Humidity-Final-Project
cd Humidty-Final project
python3 -m venv env
source env/bin/activate
python3 -m pip install adafruit-circuitpython-dht
pip install flask
python3 humidity.py
```You'll need to provide an Accuweather API key as key.txt for the service to work.
## Create service
Create a service file named humidity.
```bash
sudo nano /etc/systemd/system/humidity.service
```
Add the following content to the file.
```
[Unit]
Description = Humidity final project
After = network.target[Service]
Type = simple
ExecStart=/home/cassian/final-project/env/bin/python3 /home/cassian/final-project/humidity.py
WorkingDirectory=/home/cassian/final-project
User = cassian
Group = cassian
Restart = on-failure
SyslogIdentifier = humidity
RestartSec = 5
TimeoutStartSec = infinity[Install]
WantedBy = multi-user.target
```
Start the service
```bash
systemctl enable humiditysystemctl daemon-reload
systemctl start humidity
```