Giter Club home page Giter Club logo

flypi's Introduction

Flypi

Flipy is a web-based user interface to interact with data that comes from Pi-in-the-sky lora-gateway project.

Installation

Clone this repository and access on it

git clone https://github.com/riqui99/flypi
cd flypi

Then, using pip package manager for Python, install all dependencies:

sudo pip install bottle
sudo pip install gevent-websocket
sudo pip install pymongo==3.5
// or
sudo pip install -r requirements.txt

You need to install: sudo apt-get install python-dev.

For save data on database: sudo apt-get install mongodb-server.

Note: For performance, Flypi allows you to save the sessions of flights in MongoDB, but this is not a requirement. If you do not have MongoDB installed and running on the system, it is automatically detected and the sessions being stored on file system instead of database.

How to run this application

python server.py (Expected Pi-in-the-sky lora-gateway be running and receiving data)

If you want change some parameter, or you want run this software in simulation mode (without lora-gateway), you should call the server with -c argument and configure config.json file.

python server.py -c "config.json"

The config file is a json file (you can found it on the project root path) with the follow parameters:

  • server port: (integer) The port where the server is running.
  • mongo_host: (string) If you want to use MongoDB remotely, you can define the host using this parameter.
  • mongo_port: (integer) Port for MongoDB connection.
  • simulate: (boolean) Set value to true for use this software without lora-gateway or use with a simulated flight. Set to false for use with lora-gateway.

Some features

View position of balloon in a map. map_view

View trajectory of balloon in a three-dimensional graph. graph_view

Save sessions with data of the flights and view usefull graphs. session_view

Run the tests:

python test/tests.py

Todos

  • Reconnection socket
  • Add more statistics in session section
  • Use all JS dependencies locally (leaflet, material icons, highcharts)
  • Improve popups (now are using javascript native for confirmations - create session)
  • Add navigation to follow the balloon on live with map.
  • Share in social media (create a public area in another server to sync sessions amd make public flights)
  • Store images on database
  • Create video - as a gif - with all images of the flight
  • Write Tests
  • Add Night Mode

License

MIT

flypi's People

Contributors

didaquis avatar riqui99 avatar olga89 avatar

Stargazers

Jordi Orts avatar  avatar Alex Gómez Borrego avatar

Watchers

 avatar  avatar

Forkers

didaquis olga89

flypi's Issues

Refactor: move default file session to protected folder

Now the users can create a new session with the same name of default session file: This is a potentially bug.

Suggestion: move the default file to another folder. This change would allow the user to create a file with the same name without causing an error

Timestamp does not work in sessions

The timestamp does not always work correctly. At the moment when it failed, the operating system was on time (checked by executing the command date in the terminal).

foto

I tried to reproduce this error on two different devices, but seems working fine.

I'm opening this issue to leave a record.

Application throws an error if `Unknown Session.txt` doesn't exist

Flypi software throws an error if sessions/Unknown Session.txt doesn't exist.

For prevent this error, I have temporarily added that file to the repository and added this line on sessions/.gitignore file: !Unknown Session.txt. This changes prevent the error on first boot of the applicattion.

The final solution will be add some code for create this expected file on file system if doesn't exist and then remove !Unknown Session.txt line from file sessions/.gitignore. Remember delete sessions/Unknown Session.txt file after solve this issue.

Autodetect lora

When starts server try to autodetect gateway, and if cannot connect, show alert in web

Sockets failing on disconect client

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/bottle.py", line 862, in _handle
return route.call(**args)
File "/usr/local/lib/python2.7/dist-packages/bottle.py", line 1740, in wrapper
rv = callback(*a, **ka)
File "server.py", line 86, in handle_websocket
data_ws = json.loads(wsock.receive())
File "/usr/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer
WebSocketError, finish thread

Functionality: log in terminal startup message

When the application is starting begin to check if MongoDB service is running. This may take some several seconds.

Will be interesting log in terminal a message like "The application is starting, please wait..."

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.