Coder Social home page Coder Social logo

mhupman / website-down-alarm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from frijol/website-down-alarm

0.0 2.0 0.0 152 KB

Pings a URL and causes an alarm light to flash if the status code is not 200.

License: Apache License 2.0

JavaScript 100.00%

website-down-alarm's Introduction

website-down-alarm

This Tessel project pings a URL and causes an alarm light to run continuously if the status code is not 200.

If your website goes down, you want to be the first to know. Make it obvious when there's a problem by hooking up a big alarm light to a Tessel, which will ping your website every few seconds to check for trouble.

Light patterns

  • Continuously off: all is well
  • Continuously on: website being monitored is down
  • Two-second bursts (on or off): system error; monitoring isn't working (reset the Tessel)

Materials

Tools

  • Screwdriver
  • Wire strippers (scissors work, if you're careful)
  • Computer for programming

Setting up the hardware

  1. Unscrew the switch from the lamp cord (if you don't have a light with a switch, cut one side of the light's power cord)
  2. Peel back the cut ends and use the wire strippers to expose the copper
  3. Using a screwdriver to press down on the tabs, insert both exposed copper ends into the two sides of Relay 1 on the Relay Module
  4. Plug the Relay Module into Port A on the Tessel
  5. Plug in power to the lights
  6. USB power the Tessel (plug it in to your computer to program)

To run

  1. Clone this repo
  2. From within the repo, npm install to install dependencies
  3. Ensure your hardware is set up properly by running tessel run relay-test.js. If nothing happens, check your connections and refer to the Relay Guide
  4. In index.js, change the wifi settings and site to monitor to suit your needs
  5. To run temporarily with logs, tessel run index.js
  6. To program for long-term use, tessel push index.js
  7. You can now unplug Tessel from your computer and power externally according to the guide

website-down-alarm's People

Contributors

frijol avatar

Watchers

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