Giter Site home page Giter Site logo

quakes's Introduction

Quakes

This was initially a proof-of-concept to send me some notifications about nearby earthquakes that I might care about, but I added some additional things because they seemed like they'd be useful:

  • Connects to an Owntracks MQTT broker to pick up location updates so that "nearby" earthquakes are determined by the location data sent by my phone
  • This sends pushover notifications to my phone
  • Connects to the Multnomah county bridge lift API to get updates about the bridges across the Willamette River in Portland, Oregon
  • Sends me Slack messages about the earthqueaks
  • Lets me control my Philips Hue lights via Slack messages

Requirements

  1. Location updates
  • Owntracks on your phone (http://owntracks.org/)
  • An MQTT broker you can access from wherever you run this application
  1. Pushover notifications (https://pushover.net/)
  • Pushover account
  • Pushover user token
  • Define a pushover application
  1. Multnomah County bridge lift API key.
  1. Slack integration
  • Team name
  • API token
  • Channel name
  1. Philips Hue integration
  • Bridge address
  • Username (you'll need to generate this separately)
  • Name of the application (this should go away)
  • Name of the device (this should go away)

How to start the Quakes application

  1. Run mvn clean install to build the application
  2. Run mvn clean package to package the jar
  3. Edit the quakes.yml file or add environment variables to provide the application configuration
  4. Start application with java -jar target/quakes-1.0-SNAPSHOT.jar server config.yml
  5. To check that your application is running enter url http://localhost:8080

There is no web interface available yet so this will return a 404

Health Check

To see application health enter url http://localhost:8081/healthcheck

Behavior while running

  • Earthquakes within the configured "WORRY" threshold will generate a notification
  • All earthquakes and bridge lift events will generate a log message for future reference.
  • Hue integration starts at application startup
  • Slack integration starts at application startup

Hue-Slack integration

Trigger Hue integration by starting a message with "light" or "lights"

  • lights [list|on|off]
    • list: list the lights that the Hue bridge can currently reach
    • on: turn on all the lights reachable from the Hue bridge
    • off: turn off all the lights reachable from the Hue bridge
  • light name, [on|off]
    • on: turn on the named light
    • off: turn off the named light

To Do

  • Send notification to subscribers
    • Currently it only sends notifications to one destination (me!) because that's all I need
  • Additional notification channels
  • Email?
  • Home automation lighting?
  • Prune out-of-date location and earthquake data instead of persisting them forever
  • Might as well admit that this has home automation dreams

quakes's People

Contributors

vigevenoj avatar

Watchers

 avatar James Cloos avatar

quakes's Issues

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.