Code Monkey home page Code Monkey logo

spray-bus-alerter's Introduction

spray Bus Time Alerter

This project polls the BusTime api for when a bus is within range of a stop and sends an SMS text. It uses Spray and Akka for the endpoints and logic. SMS are sent using TextBelt

Follow these steps to get started:

  1. The following configuration settings are passed to the application by environment variables. They can also be set explicitly in the application.conf

  2. BUS_TIME_API_KEY

  3. BUS_STOP_ID

  4. SMS_NUMBER

  5. EXPRESS_BUS_LINE (this is optional if an express bus also visits the stop)

  6. Change directory into your clone:

     $ cd my-project
    
  7. Launch SBT:

     $ sbt
    
  8. Start the application:

     > re-start
    
  9. Browse to http://localhost:8080

  10. Stop the application:

     > re-stop
    

To run on a raspberry pi (requires jvm installed. For reasons I did not look into I had trouble running it with Java8):

  1. Create assembly jar:

     $ sbt assembly
    
  2. Copy created jar file to the raspberry pi

  3. Set above environment variables if not explicitly specified in application.conf

  4. Start the application:

     $ java -Xss1M -Xms64M -jar spray-bus-alerter-assembly-0.1.jar
    

This project was in part inspired by Control Group's work on the MTA kiosks.

spray-bus-alerter's People

Contributors

frosforever avatar

Watchers

James Cloos avatar  avatar  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.