Skip to content

frosforever/spray-bus-alerter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Spray backed application providing SMS alerts on bus arival.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages