Updated README and added requirements.txt
This commit is contained in:
@@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
Code for the indoor Weather Station
|
Code for the indoor Weather Station
|
||||||
|
|
||||||
|
## Step 0: Copy file to Raspberry Pi and setup
|
||||||
|
|
||||||
|
`scp -r [!.]* weather@weatherstation:~/weather-station`
|
||||||
|
|
||||||
|
Create the `.env` and the .venv for python and install the requirements
|
||||||
|
|
||||||
## Step 1: Install and Pass the "Variable"
|
## Step 1: Install and Pass the "Variable"
|
||||||
|
|
||||||
Move the template file to the system folder and reload the daemon:
|
Move the template file to the system folder and reload the daemon:
|
||||||
@@ -15,14 +21,14 @@ Move the template file to the system folder and reload the daemon:
|
|||||||
|
|
||||||
Now, when you enable and start the service, you **append your actual username** right after the `@` symbol.
|
Now, when you enable and start the service, you **append your actual username** right after the `@` symbol.
|
||||||
|
|
||||||
If your username was `pi-user`:
|
If your username was `weather`:
|
||||||
|
|
||||||
* **Enable it to start on boot:**
|
* **Enable it to start on boot:**
|
||||||
|
|
||||||
`sudo systemctl enable weather-station@pi-user.service`
|
`sudo systemctl enable weather-station@weather.service`
|
||||||
* **Start the script right now:**
|
* **Start the script right now:**
|
||||||
|
|
||||||
`sudo systemctl start weather-station@pi-user.service`
|
`sudo systemctl start weather-station@weather.service`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -30,12 +36,12 @@ If your username was `pi-user`:
|
|||||||
|
|
||||||
* **To see if it's running:**
|
* **To see if it's running:**
|
||||||
|
|
||||||
`sudo systemctl status weather-station@pi-user.service`
|
`sudo systemctl status weather-station@weather.service`
|
||||||
* **To read the live console output (like seeing the print statements):**
|
* **To read the live console output (like seeing the print statements):**
|
||||||
|
|
||||||
`sudo journalctl -u weather-station@pi-user.service -f`
|
`sudo journalctl -u weather-station@weather.service -f`
|
||||||
*(Press `Ctrl+C` to exit the log view)*
|
*(Press `Ctrl+C` to exit the log view)*
|
||||||
|
|
||||||
* **To manually restart it (if you update your code):**
|
* **To manually restart it (if you update your code):**
|
||||||
|
|
||||||
`sudo systemctl restart weather-station@pi-user.service`
|
`sudo systemctl restart weather-station@weather.service`
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user