[mythtv-users] Query backend status

Bill Meek keemllib at gmail.com
Sun May 4 19:51:45 UTC 2014


On 05/04/2014 01:17 PM, Robert Dege wrote:
> Is it possible to query the backend to determine if a frontend is
> connected?  I currently have two frontends.  One runs on the backend
> system, and the other connects over the network.
>
> I'd like to verify that no one is wacthing a show or video before
> installing system updates, or reboot (if necessary).

Hi,

Ask the frontend directly through the Services API.

Try this:

     wget --output-document=- --quiet <yourHostNameOrIP>:6547/Frontend/GetStatus

--output-document=- will send the response to your screen
rather than the default (in this case it would be a file
named GetStatus.) It's handy for testing.

The output will change as the MythTV UI page changes. Or,
you'll get nothing if the frontend isn't running.

Examples:

At the Watch Recordings screen:
     <Key>currentlocation</Key>
     <Value>playbackbox</Value>

At the Main Menu:
     <Key>currentlocation</Key>
     <Value>mainmenu</Value>

You'll see that the entire response is returned on a single
line. If you test using a browser, rather than wget, you'll
likely see no changes as the UI changes. I can't explain that
(some kind of caching?)

-- 
Bill


More information about the mythtv-users mailing list