Quozl's Kitsrus Kit 74 Distributed Event Notifier |
| quozl@us.netrek.org
| up |
|
The source code is kept in my darcs repository. The old direct access program is k74.c, the new one is k74-ppdev.c
Thanks to Jeff Piazza for testing a similar method.
Building on his previous work in 2000, Quozl has enhanced his Kitsrus Parallel Port Utility Programs (below) to fit a special case.
Quozl uses his k74 now as an event notifier. When particular events occur, one of the LEDs and relays is turned on. When Quozl has responded to the event, it is turned off using keyboard shortcuts. The array of LEDs then becomes a list of things to do.
For example:
LED | Meaning | Implementation |
---|---|---|
1 | Work trouble ticket arrived | trigger script |
2 | Work e-mail arrived | procmailrc rule |
3 | End of work day | crontab entry |
4 | Coffee break | crontab entry |
5 | Home e-mail arrived | procmailrc rule |
6 | Wife e-mail arrived | procmailrc rule |
7 | Internet connection lost | ppp ip-down.d script |
8 | OpenVPN connection lost | openvpn/client.conf route-up script |
Particularly important events can then be linked through the relays to various sound or visual cue devices, according to changing priorities.
But the coffee machine is in a different room. While responding to the coffee break alarm, standing in the other room, other alarms cannot be seen easily.
So a remote graphical interface was written. It has two parts, a server which extends the local k74 driven parallel port over TCP/IP, and a client that connects to the server.
7299 stream tcp nowait root /usr/local/bin/k74 k74 watch
Here is a screen shot of the network client window with LEDs 2, 4 and 5 turned on. The --horizontal option was used.
The image is assembled from components:
LED off (made with The Gimp) | |
LED on (made with The Gimp) | |
Stars (from Netrek) |
7201 stream tcp nowait root /usr/local/bin/k74 k74 0 set 7202 stream tcp nowait root /usr/local/bin/k74 k74 1 set 7203 stream tcp nowait root /usr/local/bin/k74 k74 2 set 7204 stream tcp nowait root /usr/local/bin/k74 k74 3 set 7205 stream tcp nowait root /usr/local/bin/k74 k74 4 set 7206 stream tcp nowait root /usr/local/bin/k74 k74 5 set 7207 stream tcp nowait root /usr/local/bin/k74 k74 6 set 7208 stream tcp nowait root /usr/local/bin/k74 k74 7 set 7301 stream tcp nowait root /usr/local/bin/k74 k74 0 clear 7302 stream tcp nowait root /usr/local/bin/k74 k74 1 clear 7303 stream tcp nowait root /usr/local/bin/k74 k74 2 clear 7304 stream tcp nowait root /usr/local/bin/k74 k74 3 clear 7305 stream tcp nowait root /usr/local/bin/k74 k74 4 clear 7306 stream tcp nowait root /usr/local/bin/k74 k74 5 clear 7307 stream tcp nowait root /usr/local/bin/k74 k74 6 clear 7308 stream tcp nowait root /usr/local/bin/k74 k74 7 clear