Stu2 - W7IY

Jabber and Siteplayer


Connects a Siteplayer embedded web server to a Jabber instant messaging server. This allows a user to send a command to the embeded web server using an instant message. (e.g. using GAIM) In this project, the IM command toggles the status for one of eight different items. (e.g. status of a web server, up/down.) The status is indicated by a light on the development board or the web page of the embedded server.

Nagios, which is a network monitoring program, can send an instant message to a user with an alert. Linking all three together (nagios, jabber and siteplayer) allows a network alarm (e.g. web server is down) to trigger a remote light over the Internet using IP. The embedded web server could be built into a status board or connected to a set of control relays.


Nagios -> IM via Internet -> Jabber Server -> IM to PC script -> LAN -> siteplayer

Siteplayer is programmed with an IP address and the UDP ports are enabled. (22F0 = 1) Commands are sent to the siteplayer from two scripts. "" logs into a jabber server and emulates a user. The script listens for an Instant Message (IM) and passes the command to another script, "," which sends a single UDP packet to the site player. Siteplayer recieves the packet, strips the header info and sets the appropriate register. Examine the scripts for the gory details.

The siteplayer server can be viewed using a web browser. The main web page checks the status of the io register and displays the proper gif image using the following line:

<img src = "LED^io1.gif"><a href="nagios.spi?io1=^io1~1">Message Waiting</a>

There are two gif files loaded into the siteplayer; LED0.gif and LED1.gif. Using a variable for the forth character allows the proper gaphic to be displayed. For example, if io1 is 0, the image will be LED0.gif, which is a graphic of a red dot.

The siteplayer IO lines are available on the site player module. They can drive a transistor, which could control a relay or some sort of light. Only 8 lines are available and the development board only breaks out the first three lines. Obviously, the siteplayer could drive a decoder chip (PIC) to expand the number of possible status indicators.

One last note. There is no security built into these scripts. A production system would need to take this into account. For example, the siteplayer doesn't check for a password or use an encrpted link. So the ethernet command link between the PC and siteplayer should be protected.



Reference Materials