Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server: Setup #17

Open
JohnnyD1 opened this issue Sep 13, 2019 · 0 comments
Open

Server: Setup #17

JohnnyD1 opened this issue Sep 13, 2019 · 0 comments
Assignees
Milestone

Comments

@JohnnyD1
Copy link
Collaborator

JohnnyD1 commented Sep 13, 2019

Set up a server that responds with the current parking lot usage or the closest parking lot when a client requests for it.

It will also receive trigger events from the Raspberry Pi on a car entering and exiting and relay the information to the clients.

Task Test:

  • Change current directory to server/ inside the root directory of the project
  • If you do not yet have the required virtual environment installed:
    • virtualenv -p python3 venv
    • source venv/bin/activate
    • pip install -r requirements.txt
  • Open two other terminal windows with directory set to the same as above: server/
  • Activate the virtualenv in these windows as well using source venv/bin/activate
  • In one window, execute: python3 app.py local. *Note: This must be the first file you run. *
  • In another window, execute: python3 test_raspberry.py.
  • In the final window, execute: python3 test_client.py.
  • Wait for a few seconds, and you should see the client receiving the current state of the parking lots as JSON formatted output in its stdout in the window where you ran the test_client file.
@JohnnyD1 JohnnyD1 changed the title Server communicating raspberry pi with application Server Sep 13, 2019
@sanchitcop19 sanchitcop19 added this to the Sprint1 milestone Sep 15, 2019
sanchitcop19 referenced this issue Sep 23, 2019
Only socket-based events for now, will add endpoints somewhere in the
next series of commits. The test_client and test_raspberry files are for
testing the server only, will not play a role in the eventual server.
@sanchitcop19 sanchitcop19 changed the title Server Server: Setup Sep 24, 2019
@JohnnyD1 JohnnyD1 reopened this Sep 24, 2019
@sanchitcop19 sanchitcop19 reopened this Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants