This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
projects:bewaesserung:installation [2021/03/29 07:14] ferdi |
projects:bewaesserung:installation [2021/03/31 12:09] (current) ferdi |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ===== Installation ===== | ===== Installation ===== | ||
| + | === Fr. 26.03.2021 === | ||
| Zur Installation der Webseite auf einem USB-Stick gehe ich wie folgt vor:\\ | Zur Installation der Webseite auf einem USB-Stick gehe ich wie folgt vor:\\ | ||
| Ich folge der Installationsanleitung aus dem Readme: https:// | Ich folge der Installationsanleitung aus dem Readme: https:// | ||
| Line 69: | Line 70: | ||
| immer noch nichts... | immer noch nichts... | ||
| + | |||
| + | === Mo. 29.03.2021 === | ||
| + | Habe Ubuntu auf dem Rechner [[computer: | ||
| + | Python version ist: Python 3.8.5\\ | ||
| + | jetzt funktioniert | ||
| + | sudo apt install python3-venv | ||
| + | ohne Fehlermeldung.\\ | ||
| + | sudo apt install python3-pip\\ | ||
| + | sudo apt-get install git-all | ||
| + | git version | ||
| + | | ||
| + | cd Documents/ | ||
| + | mkdir FME | ||
| + | cd FME | ||
| + | mkdir IP15_Bewaesserung | ||
| + | cd IP15_Bewaesserung | ||
| + | git clone https:// | ||
| + | Bei der Passworabfrage gebe ich meine G-mail Adresse und mein gitlab Passwort ein. | ||
| + | cd bewaesserung-ip | ||
| + | source bin/ | ||
| + | | ||
| + | WARNING: The script sqlformat is installed in '/ | ||
| + | Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. | ||
| + | WARNING: The script django-admin is installed in '/ | ||
| + | Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. | ||
| + | WARNING: The scripts isort and isort-identify-imports are installed in '/ | ||
| + | Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. | ||
| + | WARNING: The script netatmo is installed in '/ | ||
| + | Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. | ||
| + | WARNING: The scripts epylint, pylint, pyreverse and symilar are installed in '/ | ||
| + | Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. | ||
| + | ansonsten alles OK. | ||
| + | python3 manage.py migrate | ||
| + | Username (leave blank to use ' | ||
| + | Email address: meier.ferdinand@gmail.com | ||
| + | Password: " | ||
| + | Password (again): | ||
| + | Superuser created successfully. | ||
| + | | ||
| + | cd frontend/ | ||
| + | npm install | ||
| + | Command ' | ||
| + | sudo apt install npm | ||
| + | added 2012 packages from 1471 contributors and audited 2017 packages in 51.965s | ||
| + | 98 packages are looking for funding | ||
| + | run `npm fund` for details | ||
| + | found 1 low severity vulnerability | ||
| + | run `npm audit fix` to fix them, or `npm audit` for details | ||
| + | | ||
| + | npm run serve | ||
| + | |||
| + | cable cross sections | ||
| + | DONE Compiled successfully in 9375ms | ||
| + | App running at: | ||
| + | Local: | ||
| + | Network: http:// | ||
| + | |||
| + | installed gimp and inkscape\\ | ||
| + | |||
| + | open a new window:\\ | ||
| + | {{: | ||
| + | Activate the virtual environment: | ||
| + | source bin/ | ||
| + | starte django webserver: | ||
| + | python3 manage.py runserver localhost: | ||
| + | jetzt kann die Seite localhost: | ||
| + | {{: | ||
| + | |||
| + | Installiere Visual Studio Code:\\ | ||
| + | sudo snap install --classic code | ||
| + | |||
| + | Habe in netatmofetch.py den usernamen und passwort eingetragen. | ||
| + | Beim ausführen von / | ||
| + | |||
| + | ./ | ||
| + | Timestamp Datei erzeugt und auf 0 gesetzt. | ||
| + | error invalid_grant https:// | ||
| + | None | ||
| + | Traceback (most recent call last): | ||
| + | File " | ||
| + | with open(csv_file_path, | ||
| + | FileNotFoundError: | ||
| + | |||
| + | Habe jetzt den richtigen login für netatmo von Prof.Nebe und habe ihn in netatmofetch.py eingetragen.\\ | ||
| + | Wenn ich jetzt netatmo_first_import.sh ausführe: | ||
| + | ./ | ||
| + | bekomme ich folgende Meldung: | ||
| + | Timestamp Datei erzeugt und auf 0 gesetzt. | ||
| + | [] | ||
| + | Traceback (most recent call last): | ||
| + | File " | ||
| + | with open(csv_file_path, | ||
| + | FileNotFoundError: | ||
| + | Ich habe die Datei netatmo_station.csv mit \\ | ||
| + | touch netatmo_station.csv | ||
| + | erzeugt.\\ | ||
| + | Jetzt bekomme ich | ||
| + | Timestamp Datei erzeugt und auf 0 gesetzt. | ||
| + | [] | ||
| + | Einträge werden in die Datenbank übertragen... | ||
| + | | ||
| + | 0 Einträge Übertragen | ||
| + | |||
| + | Bin noch einmal zurück in IP15_Bewaesserung/ | ||
| + | ~/ | ||
| + | (django-vue) fablab@fablab-OptiPlex-7010: | ||
| + | (django-vue) fablab@fablab-OptiPlex-7010: | ||
| + | usage: csv_to_database.py [-h] [-i] [-gt] [-w] | ||
| + | optional arguments: | ||
| + | -h, --help | ||
| + | -i, --init | ||
| + | -gt, --get-timestamp | ||
| + | -w, --write | ||
| + | |||
| + | Habe den cronjob gestartet: | ||
| + | python3 manage.py crontab add | ||
| + | no crontab for fablab | ||
| + | adding cronjob: (73bb14f920c56753f62140cb4e1eee0b) -> ('*/15 * * * *', ' | ||
| + | |||
| + | sensorda**t**a.py ausgeführt | ||
| + | |||
| + | python3 sensordata.py | ||
| + | Trying to connect to: eu.thethings.network: | ||
| + | Connected with result code: 0 | ||
| + | Subscribed to topic: +/ | ||
| + | |||
| + | === Mi. 31.03.2021 === | ||
| + | Der chronjob scheint zu laufen: | ||
| + | Schreibe Daten in die Datenbank... | ||
| + | Daten erfolgreich in die Datenbank Geschrieben! | ||
| + | TOPIC: hsrw_iotlab_lse01/ | ||
| + | PAYLOAD: {' | ||
| + | | ||
| + | Unter http:// | ||
| + | Leider habe ich das Passwort nicht. | ||
| + | |||
| + | Habe mit\\ | ||
| + | python3 manage.py createsuperuser | ||
| + | einen superuser erstellt.\\ | ||
| + | Jetzt klappt der Login:\\ | ||
| + | {{: | ||
| + | {{: | ||