loading

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.

This project can also be viewed on the Tessel Projects Page.

Step 1: Materials

You will need:

You'll also need the following tools:

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

Step 2: Hack the Light

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)

Step 3: Expose the Copper

Peel back the cut ends and use the wire strippers to expose the copper.

Step 4: Insert the Exposed Wires Into the Relay

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.

When the relay is latched "on", the two ends of the wire will connect, completing the circuit.

Step 5: Plug Things In

  1. Plug the Relay Module into Port A on the Tessel
  2. Plug in power to the lights
  3. USB power the Tessel (plug it in to your computer to program)

Step 6: Program the Tessel

Now we're going to add the logic to make the Tessel go online and check on your website. Note that you don't have to be a programmer in order to make this work– I've already written the code! You just have to copy it.

Please poke around in the code, and feel free to comment with any questions!

If you haven't used a Tessel before, you should follow the instructions on this page first to install it.

Programming your alarm light:

  1. Clone this repo ("repo" = repository for code. This might be a helpful read: https://help.github.com/articles/fork-a-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

Congratulations, your light should be working!
It can be a little anticlimactic, since when everything is working properly, nothing should happen...

Here are the light patterns you should expect to see:

  • 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)
Healthcare.gov cold have used this last year lol political humor but it is seriously awesome
<p>Very True.</p>
would there be a way to make this where it would let you know if your network is down
<p>You would have to define your criteria for deciding if your network was Up or Down. But if you have a device on your network that is always on and pingable, such as a PC or NAS, you could just replace the var siteToMonitor value with that device's network ip address. Or you could modify the code to ping more than one device on your network, but the principle is the same. If this device can reach another device on your network, the network is Up.</p>
<p>Thanks for the post. If nothing else it introduced me to the Tessel! Great looking product and I can't wait to get my hands on one!</p>
Nice :-)
<p>I love interfacing things like websites to real world things like your light. And you did this very well! Love the idea and the exicution! </p>
<p>Thank you!</p>

About This Instructable

19,798views

356favorites

Bio: An engineer, seamstress, cook, coder, and overall maker. Spent a summer at Instructables; got a degree in E: Neural Engineering at Olin College; made a ... More »
More by SelkeyMoonbeam:Orienteering Using a Thumb Compass How to Pack Hangers How to Make a 3D-Printable CAD Model from MR Scans 
Add instructable to: