This is the README file for the myth monitor program. Copyright (c) 2004,2007 David George (david|a|thegeorges|d|us) 1. About mythmon mythmon is a daemon running on a machine with a network connection to communicate with a MythTV backend and a serial port to communicate with an external LED box. The external LED box displays the state of the tuners in the MythTV system as well as a system status and message waiting indicator. 2. Hardware Mythmon uses an Allegro Microsystems, Inc (http://allegromicro.com) serial-input latched source driver to drive the LEDs. This chip comes in 10 (A6810), 12 (A6811), 20 (A6812), and 32 bit (A6818) versions. For a system with 8 tuner, 1 system, 1 MWI, and one piezo beeper (for audible system error), the 20 bit chip is fine. For more LEDs get the 32 bit. When figuring the number of bits you need, add two for each tuner LED, and one for each other LED. Several components are needed to interface the driver chip with an RS-232 port. Instructions for using RS-232 control are not currently documented. The GPIO port on the Commell LV-667 is directly supported and besides the resistors for the LEDs only one resistor is needed to pull up one of the digital I/O lines (the other two are already pulled up internally). Mythmon version 2 adds support for the Technologic Systems TS-7400 to provide a standalone monitoring system that draws very little power. All that is required is an ethernet connection and a regulated 5VDC power supply. The digital I/O built into the TS-7400 can drive up to 8 tuner LEDs and 2 status LEDs along with a buzzer for audible alarm. Parts List: Technologic Systems TS-7400 http://www.embeddedarm.com 5VDC PS (2.1mmx5.5mm female pos tip) 289182 http://www.jameco.com Hammond case 1455K1201BK (0.064" alum ends) http://www.mouser.com Hammond case 1455K1202BK (ABS plastic ends) http://www.mouser.com There are 8 bi-color LED's for up to 8 tuners. These LEDs will be in one of three states. Off indicates that the backend is reporting the tuner as bad. This could be either because the tuner is malfunctioning or there isn't a tuner with that number. Green is the default condition for an idle tuner. When a tuner is recording or watching live tv the LED will turn red. There is also a red system status LED. If the disk space falls below a configurable level this LED will flash. It will also flash if there is less than three days of guide data. If there is less than seven days of guide data the system LED will be on, but not flashing. The yellow message waiting LED will be lit when there are unplayed messages in voice mail. This is currently setup for the MythTAD plugin which hasn't been finished. I haven't looked at MythPhone yet to see if it could be of any use there yet. Both the freespace and voicemail notifications rely on commands that don't currently exist in the mythtv backend. Patches exist, but are seriously outdated. For now don't use these two features. 3. Installation make && sudo make install In order to view guidedata status, the myth backend will need to be patched. This patch has been accepted into CVS as of January 28th at 2am, so it will be included in mythtv 0.17. 4. Command line arguments --freespace amount set the freespace threshold in megabytes -d or --daemon run mythmon as a daemon (this should always be used) --comport port specify serial port to use for the LED box defaults to /dev/ttyS0 if not specified --guidedata perform guide data availability tests -h hostname or --host hostname specify hostname or IP address of the backend server to check -i int or --interval int specify the interval in seconds between backend queries --ioport ioport ioport for GPIO interface (instead of COM) (e.g. 0x208) supports the GPIO port on the Commell LV-667 --iotype type type of access to LED interface. 0=auto, 1=com, 2=LV667, 3=TS7400. -n emailaddr or --notify emailaddr notify email address on backend communications failure (think email paging to cellphone) -p portnum or --port portnum specify the port number on the backend 6543 used if not specified --protover specify MythTV backend protocol version -t max or --tuners max maximum number of tuners to check (mythmon maximum is 8) should be set to the number of tuners you have -v or --version display mythmon version --voicemail enables check for new voicemail messages 5. Examples mythmon -d --freespace 1000 --guidedata --host 192.168.1.1 --tuners 3 mythmon -d --freespace 1000 --guidedata --host 192.168.1.1 --voicemail 6. Coding style - 2 space indents (no hard tabs) - open brace goes at the end of the line (K&R style) if (test) { statement1; statement2; } - single statement conditions do not need braces if (test) statement; - space after if or while (they are not functions) - no space between function name and open parenthesis - no trailing spaces on any lines 7. Patch submission - send patches in diff -u format (unified diff) - patches should be sent as text/plain attachments 8. Todo - Tie in with the motherboard sensors to flash LED, sound buzzer for overtemp warning before shutdown. - Update freespace and voicemail patches for current mythtv backend. - Support Vonage message waiting indicator. 9. Credits James Armstrong (james|a|thearmstrongs|d|org) designed the original Allegro Microsystems LED box hardware. David George wrote the mythmon program, myth backend patch, and created the Technologic TS-7400 based system.