Home‎ > ‎

Arduino Notifier with telnet interface


The Notifier was my first project using the Arduino.  The objective was to create a simple mechanism to alert when tickets in our service desk were getting close to their SLA limits.  It was easy enough to fit all together:
  • A Nagios plugin monitors our OTRS service desk
  • When certain ticket queues are close to violating their SLAs the plugin runs a script that opens a telnet session with the Notifier, checks the current status and then executes the appropriate alerts
  • The plugin turns off the LED when the ticket(s) in violation has been handled.

The telnet interface and commands

Telnet is an ancient protocol from a more civilized age.  It's simple to use and script into other open source systems.  Below is the help menu for the notifier:

The commands are easy:  br <enter> starts the LED blinking red and o <enter> turns it off.  The current LED status can be read with s <enter>.
So far I have configured five colors (red, green, blue, yellow and white) and a 5 second beep.

The hardware

The schematic

Circuit Description

The high output LED is a VERY powerful light and would require additional driver circuitry if one wanted to use it to its maximum.  In this case, the 220 ohm resistor turns the LEDs on at only 10% their maximum power --less than 20mA.  As shown in the video below, the brightness is plenty for the required application.  20mA is half of what each digital pin on the arduino can source.  All together the 3 LED channels only require max 60 mA so our arduino can handle this just fine.  Add another 13mA or so for the beeper and we are still well within the limits.

Notifier Demonstration

The Code

There are two versions of the code.  One is for static routing and the other uses DHCP to set up the IP address, gateway and DNS.

You must have following additional libraries installed for the version with DHCP to work:
  • EthernetDHCP
  • EthernetDNS
Both can be found at: http://gkaindl.com/software/arduino-ethernet

The telnet reference code was found on the arduino forum:

Things to Do

I am not a programmer and I just hacked this together from other people's examples..maybe someone could help with the following:
  • Add a simple password mechanism
  • Figure out why multiple sessions don't work
  • Create a telnet server library that is more elegant that the version shown here...perhaps with full words or multiple words as commands instead of one or two letters
Bentley Born,
Dec 21, 2011, 3:29 PM
Bentley Born,
Dec 21, 2011, 3:29 PM