I have a box at home that gets lots of information, but is more of an appliance then most of my machines. I would like it to be able to send events that get displayed to my MythTV frontends, but installing mythtvosd isn’t an option. Fortunately, in this case, MythTV uses a non encrypted XML over UDP scheme to get messages sent to the various frontend nodes. This means I can use netcat in UDP mode to just shoot an xml file out over my network and get the data I want on my TV screen without having to shoehorn mythtvosd onto the appliance.
I’ve created a file called message.xml that has the message that I would like to display on my TV in the format of my choosing. I prefer the scroller, but you can use the CID or alert XML schemas if you so choose. See the main.c source code file for mythtvosd in the contrib directory for the schemas.
<?xml version=”1.0″?>
<mythnotify version=”1″><container name=”news_scroller”><textarea name=”text_scroll”><value>Testing</value></textarea></container></mythnotify>
Then I just use netcat to send that message via UDP to my main frontend. I could broadcast this out to all of my frontend nodes, but prefer to do these messages in a targeted manner.
cat message.xml | nc -uv -q1 serenity 6948
The end result is that I can now get messages on my TV for everything from RSS updates to stock reports to firewall alerts. Anything that can be sent as a text string can be displayed!