erdl / lonoa

Lonoa - A collection of notebooks that collects, reformat and document data from various sensors manufacturers.
3 stars 10 forks source link
api-client jupyter-notebook python

Introduction

This project contain scripts that interact to the database project of ERDL.

Sensors

Currently, lonoa supports the following sensors:

Setup

  1. manually create lonoa user on the server (only needed for the first lonoa installation on the server)
  2. switch to the lonoa user
    • su lonoa
  3. go to lonoa home directory and have your sensor and webctrl user ready
    • cd
  4. cd into lonoa home directory and clone lonoa repo. The folder name will be the project name.
    • git clone https://github.com/erdl/lonoa.git <project folder name>
  5. cd into repo
    • cd <project folder name>
  6. install python3 packages from requirements.txt (only needed for the first lonoa installation on the server)
    • sudo pip3 install -r requirements.txt
  7. manually create lonoa user on the database (only needed for the first lonoa installation on the server)
    • CREATE USER lonoa WITH CREATEDB
  8. run init_database.py
    • python3 init_database.py <database name>
  9. insert the webctrl username and password into api_authentication table
    • psql <database name> -c "INSERT INTO api_authentication(username,password) VALUES ('<apiusername>','<apipassword>')"
  10. import sensors into sensor_info table (An explanation of how to fill this table is provided in the next section below)
    • psql <database name> -c "\copy sensor_info from <csv filename> header csv"
  11. run init_crontab.py
    • python3 init_crontab.py

Sensor Info Table (Step 9)

Examples adding new active sensors

Examples updating sensor_info