Skip to content

Downloads data from logstar-online.de API adds data to database and attaches Grafana

License

Notifications You must be signed in to change notification settings

zalf-rdm/Logstar-online-Stream

Repository files navigation

Logstar API Connector

API-Docs via http://dokuwiki.weather-station-data.com/doku.php?id=:en:start

Installation

install psql-dev

sudo apt install unixodbc-dev python3-dev postgresql-server-dev-10

install pip requirments

pip install -r requirments.txt

before starting the logstar-receiver.py. Load settings into environment. This can be done creating a load-config.sh based on the load-config.sh-example. Load config into environment(Linux) via:

source load-config.sh

Uses specified pyodbc driver. To run against pqsl-database set driver to "PostgreSQL"

Docker

To test Logstar-online_Stream run a local database via docker

to run a Postgresql-database container:

docker run --network host -e POSTGRES_USER=postgres -e POSTGRES_PASS=postgres -e POSTGRES_DBNAME=logstar  kartoza/postgis

or to run a mssql-database container

docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=MyPassword!' -p 1433:1433 -d mcr.microsoft.com/mssql/server:2017-latest

Run Grafana Container

docker run --network host grafana/grafana

Start Program

Run programm in download mode. Downloads data in from startdate to enddate and stores it in the database

python logstar-receiver.py

if writing to csv files make sure that the folder you write to is empty. Else logstar-receiver will append the data to the current files.

Example usage of processing step FilterColumnsPS with a number of columns to filter:

python logstar-receiver.py -m sensor_mapping.json -nodb  -co data/ -ps BlacklistFilterColumnsPS columns="battery_voltage signal_strength"

To find out more about processing steps lookup the additional docs.

About

Downloads data from logstar-online.de API adds data to database and attaches Grafana

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published