<br><br><div class="gmail_quote">On Nov 11, 2007 2:06 PM, Worldnet &lt;<a href="mailto:onley@worldnet.att.net">onley@worldnet.att.net</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>&gt; On 11/11/07, David Shay &lt;david[at]shay.net&gt; wrote:<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; &lt;snip&gt;<br><br><br><br><br>&gt;&gt; Reading the database is not really the right approach - querying the<br>&gt;&gt; backend via the protocol would 
be.Even that is not necessary for this<br>&gt;&gt; piece of information -- it isavailable via the status port on 6544. In<br>&gt;&gt; this case, you can get quite abit of info from the XML status on<br>&gt;&gt; <a href="http://my.myth.ip:6544/xml" target="_blank">
http://my.myth.ip:6544/xml</a> You get alist of encoders, and if one is<br>&gt;&gt; recording, you will see what program,callsign, and channel it is tuned<br>&gt;&gt; to.<br><br>&gt; A complete solution could look like this:
<br>&gt; * Local .lircrc entries on each frontend with appropriate irexec entries<br>&gt; forthe keys which you want to use to control the STB. I am assuming<br>&gt; these willhave to be a unique set of navigation and &quot;enter&quot; keys since
<br>&gt; otherwise theywould conflict with the function and meaning of those in<br>&gt; myth. These irexecentries would call a script on the local frontend<br>&gt; which would:<br>&gt; * call wget on the backend status port. Parse this to determine which the
<br>&gt; video-on-demand tuner. Personally, I would cache this output for a minute<br>&gt; or two locally to avoid repeated unnecessary calls to the status port.<br>&gt; Oncethe tuner was determined use &quot;rexec&quot; or the remote-execution
<br>&gt; mechanism ofyour choice to call an &quot;irsend&quot; script on the backend with<br>&gt; the desiredparameters.<br>&gt;<br>&gt;<br><br><br>I need to look into the remote execution, I&#39;ve never done that before.
<br>Once I<br>learn how to do the that this idea addresses almost all of my issues<br><br>The only issue left is with the info from the status port, it only lists<br>what encoder is on what channel. This will work if one frontend is watching
<br>OnDemand but if two frontends are watching OnDemand then they will both<br>show that they are watching channel 1 and since the content is independent<br>of myth there will be no program info to differentiate the two. I found
<br>this<br>table in the database which gives the info that I need. I agree that direct<br>access to the database is not the prefered route as a change to the<br>database<br>will render my work null not to mention the security and integrity issues.
<br><br><br><br>*************************** 6. row ***************************<br> &nbsp; &nbsp; &nbsp; &nbsp;chanid: 1171<br> &nbsp; &nbsp; starttime: 2007-11-10 21:00:00<br> &nbsp; &nbsp; &nbsp; chainid: live-bedroom-2007-11-10T20:36:29<br> &nbsp; &nbsp; &nbsp;chainpos: 1<br>discontinuity: 0
<br> &nbsp; &nbsp; &nbsp;watching: 0<br> &nbsp; &nbsp;hostprefix: myth://192.168.1.200:6543/<br> &nbsp; &nbsp; &nbsp;cardtype: MPEG<br> &nbsp; &nbsp; &nbsp; &nbsp; input: S-Video 1<br> &nbsp; &nbsp; &nbsp;channame: 171<br> &nbsp; &nbsp; &nbsp; endtime: 2007-11-10 21:30:01<br><br>This table tells me which encoder is feeding the frontend host so I
<br>have confirmation of which STB I am watching<br><br><br>This may seem slightly absurd on the surface but the reason we want the<br>OnDemand is the kids love the content and it is quite possible that there<br>will be two frontends watching different things at the same time. I&#39;m
<br>reluctant to roll out the myth system to the family until I know that it<br>will work so that there is no rebelion. I love the myth system but if the<br>rest of the family revolts then I&#39;m finished.<br><br>Thanks David
<br>_______________________________________________<br>mythtv-users mailing list<br><a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a><br><a href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users" target="_blank">
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users</a><br></blockquote></div><br>What mysql query did you use to get that report from the database?&nbsp; Which is the STB id and which is the frontend id?&nbsp; You can execute mysql queries from bash so it shouldn&#39;t be that hard to write the parsing script.
<br><br>Chris<br><br>