From 2008e054db504eb125edd727cb522e462bd65488 Mon Sep 17 00:00:00 2001 From: Daniel Ledda Date: Sun, 30 Jul 2023 17:57:03 +0200 Subject: [PATCH] updated readme --- README.md | 9 ++++++--- server/.env | 8 ++++---- setup.sh | 1 - 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6492552..90f1382 100644 --- a/README.md +++ b/README.md @@ -7,16 +7,19 @@ Linux packages (apt) Python3 packages (pip3) > adafruit-circuitpython-dht mh-z19 -The setup script installs these for you. +The setup script installs the python packages for you, you will have to install the apt packages yourself. ## Setup -1. Pull the repository. +1. Clone the repository. 1. Fill out your specific config options in `./server/.env` 1. Ensure `./server/scripts/climate-pinger.py` has the correct pin for your adafruit-dht22 device and/or edit the script for your specific setup. -1. Run `./setup.sh` as administrator +1. Run `sudo apt-get install python3 libgpiod2 npm mariadb-server` +1. Run `sh ./setup.sh` as user for the server +1. Make sure the server user has access to MySQL/MariaDB, and is in the groups `gpio` and `dialout`. 1. Start the server: > npm start +1. Have fun! ## Usage diff --git a/server/.env b/server/.env index 0524d20..cf20b00 100644 --- a/server/.env +++ b/server/.env @@ -1,7 +1,7 @@ -PORT=4040 +PORT=4000 SERVER_ROOT=/climate MYSQL_ADDRESS=localhost -MYSQL_USERNAME=admin -MYSQL_PW= +MYSQL_USERNAME=claypi +MYSQL_PW=climate SENSOR_PING_INTERVAL=30 -DEV=false \ No newline at end of file +DEV=false diff --git a/setup.sh b/setup.sh index 0fdd16c..4dd967a 100644 --- a/setup.sh +++ b/setup.sh @@ -1,6 +1,5 @@ #!/bin/sh -apt-get install python3 libgpiod2 npm mariadb-server pip3 install adafruit-circuitpython-dht mh-z19 npm install (cd ./server && npm install) & (cd ./dashboard && npm install && npm run build)