<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>On Sep 5, 2013, at 3:09, David Whyte &lt;<a href="mailto:david.whyte@gmail.com">david.whyte@gmail.com</a>&gt; wrote:</div><div><br></div><blockquote type="cite"><div><div dir="ltr"><div><div><div><div><div><div><div>Hi All,<br><br></div>I have been looking at MythTV System Events ( <a href="http://www.mythtv.org/wiki/MythTV_System_Events">http://www.mythtv.org/wiki/MythTV_System_Events</a> ) since I would like to monitor what is happening and where in my mythtv environment (i.e., which FEs are playing what recordings, where do recordings get deleted, etc).<br>

<br></div>I realise I could configure each of the event handlers in mythTV backend to perform an action (i.e. log the event) but I was hoping I could just use the python bindings to write a script which snoops for such events and them performs an action (i.e. log the event).<br>

<br></div>The benefit here is that I leave the actual event handlers free to configure in the future should I need to use them locally for that FE.&nbsp; Another benefit is that I can configure many actions to perform for specific events.&nbsp; And I also get to play with the bindings. :)<br>
<br></div>I didn't get very far with the Python bindings though.&nbsp; I could make it so I saw all internal system events which was way more than I needed.<br><br></div>Has anyone here tried to do anything similar?&nbsp; Any pointers on what I should be looking at?&nbsp; Is the dev list a better audience for this question?<br>
<br></div>I am currently running 0.26-fixes.</div></div></div></blockquote><br><div>There is a BEEventMonitor class that does almost what you're looking for.</div><div><br></div><div><span style="font-family: '.HelveticaNeueUI'; font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); -webkit-text-size-adjust: none; "><a href="http://code.mythtv.org/cgit/mythtv/tree/mythtv/bindings/python/MythTV/methodheap.py#n386">http://code.mythtv.org/cgit/mythtv/tree/mythtv/bindings/python/MythTV/methodheap.py#n386</a></span></div><div><span style="font-family: '.HelveticaNeueUI'; font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); -webkit-text-size-adjust: none; "><br></span></div><div><span style="font-family: '.HelveticaNeueUI'; font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); -webkit-text-size-adjust: none; ">You'll need to subclass it and have the _neweventconn method use a level of 3, which it is not currently set up to do. &nbsp;Note that this is really only intended for debugging and developmental purposes. &nbsp;I only wrote it in the first place so I could watch what events fired at different times to figure out how to use them. &nbsp;Also note that System Events are unlike most other BACKEND_MESSAGES in that it only gets sent to one application per host. &nbsp;If you already have another MythTV application listening from that host, you'll need to get your script to report a different profile name, by feeding it a different config.xml with a custom LocalHostName.</span></div></body></html>