Coder Social home page Coder Social logo

omega-logserver's Introduction

Onion Omega Logging Server

Bottle.py based server application logging messages from devices in Omega's local network into a JSON file. This application assumes that you are using a Omega2 and have a microSD card inserted extending the /overlays path. It also includes a HTML based overview and management page for configuration, data download and device management. That page is still under construction.

Roadmap

The next steps to be implemented are:

  • RESTful endpoints for device management
  • device overview on the dashboard
  • show last logs on dashboard
  • Substitute / Add a database approach for saving logs
  • download options
  • integrate CRONs for passing data (aggregates) to a remote server
  • implement handlers for aggregating data, that shall be passed to a remote server
  • implement GSM (for connecting to remote server)
  • implement TTN (for connecting to remote server)
  • add a linux service file & setup script

Install

omega-logserver is based on bottle.py, which is as of now the only requirement. After downloading the source files, the config.json.default has to be copied to a new file called config.json and you need to place your configuration there. Alternatively, you can download the latest release on Github, where this file is already created.

Warning

In case you want to update an existing project, do not downlaod the release as this will overwrite your configuration. Make a git pull instead.

Using the source files, log into you Omega and open the console (or ssh everything). In case python3 and git are not installed yet:

opkg install python3-light
opkg install git
opkg install git-http
opkg install ca-bundle

Clone the repo:

git clone https://github.com/kit-hyd/omega-logserver.git
cd omega-logserver
pip install -r requirements.txt
cp config.json.default config.json

And then start the server:

cd omega-logserver
python3 logserver.py

Now you can point a browser to the Onion. The address is depending on the configuration in the config.json. The default host_ip is 192.168.3.1. This is the IP of the onion omega in its own AP network. Therefore you will have to log into the Omega network and point a browser to http://192.168.3.1:5555. In case your omega is also connected to your home network, you can change the setting to the local address of that network, this is however not recommended as there is no security layer implemented into this package.

Service

There is also an procd file in the repository. That file can be copied to /etc/init.d/logserver to create a logserver service.

cd omega-logserver
cp logserver /etc/init.d/logserver
chmod +x /etc/init.d/logserver

Now, you can manually start and stop the logserver

service logserver start
service logserver stop

If you want the logserver to automatically start at system startup, you can enable the service

service logserver enable

This will start the service on next system boot.

Important

The procd service assumes that you are using the python3 interpreter and have the repository at /root/omega-logserver/. In case you change this location, you'll have to adjust the service file.

omega-logserver's People

Contributors

mmaelicke avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar Conrad Jackisch avatar Lucas Reid avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.