[mythtv-users] Talking directly to server on port 6543

Tom Clark tom at elvenhouse.e7even.com
Thu Oct 7 19:43:00 UTC 2004


Hi!
I'm working on a little Perl script that can talk just enough Myth protocol
to be able to send a couple of queries to the server and interpret the
response.
The reason being I own an original Slimp3 player
(http://www.slimdevices.com) and I thought it would be neat if I could be
notified via the display when Myth was starting to record something.
 
So, first I looked into the DB for answers, not much help... Then I looked
at MythWeb and it looked more promising, I took a look at the PHP and saw
that scheduled_recordings.php made a call to
get_backend_rows('QUERY_GETALLPENDING', 2), so I looked up get_backend_rows
in includes/mythbackend.php and saw that it calls backend_command which in
turn calls backend_command2.
 
"Right" I thought as I reverse engineered the PHP into Perl, "this shouldn't
be too hard".
 
A few sockets later I had a call to "MYTH_PROTO_VERSION 1" returning: "12
ACCEPT[]:[]1" and "ANN server.mydomain.com 0" returning "2       OK".
"Excellent" I thought.
 
However, when I tried to call "QUERY_GETALLPENDING" I fell down flat.
 
The script hangs (Because it's waiting for input) and the following is
logged into mythbackend.log "2004-10-07 20:37:58 unknown socket"
 
So there we have it, all advice and comments appreciated!
 
Regards,
Tom Clark
tclark54 at gmail.com




More information about the mythtv-users mailing list