[mythtv-users] Remotely monitor Backend is running

Stuart Auchterlonie stuarta at squashedfrog.net
Tue Oct 12 14:27:02 UTC 2021


On 12/10/2021 05:34, Mark Perkins wrote:
> 
> 
>     I have also added code to check for services_api and prompt you to
>     install that if it is not present.  That is a bit problematic.  It is
>     in the libmyth-python package, but depending on the system you are
>     running test-mythbackend.py <http://test-mythbackend.py> from, the
>     correct version of
>     libmyth-python to match the v30 on your backend box may or may not be
>     available.  And installing libmyth-python will drag in a number of
>     other packages, including bits of MythTV.  I am not sure just how much
>     would need to be installed to satisfy the dependencies of
>     libmyth-python, but it could extend up to a complete MythTV backend
>     system with database, and that is not really what you would want on
>     that PC.  It might be necessary to see if you could just copy bits of
>     the correct libmyth-python package across from your backend box,
>     rather than install the full libmyth-python package.  If that is even
>     possible.
> 
>     So I think I need to create a virtual PC running a similar setup to
>     the PC you want to run this on and try it out and see what happens. So
>     what is that PC running?  And your current backend box is running
>     MythTV v30, but what version of Ubuntu is it running?
>     _______________________________________________
> 
> Wondering if there is a different way of going about this (brainstorming?):
> - use System Event / Client Disconnected on the BE to run a script that 
> throws a message to wherever when nominated FE disconnects?
> - use the Frontend Services API / GetStatus maybe state field has 
> something useful?
> - use the Frontend Services API / SendKey to trigger script on FE from 
> desktop that then throws message to wherever?
> 

It could be as simple as querying the backend API.

$ curl http://<backend_ip>:6544/Status/GetStatus

Returns data *only* in XML, of the backend status
(we are working on a proper endpoint that can return
the data in the format you request)

There is also

$ curl http://<backend_ip>:6544/Status/GetStatusHTML

This returns *only* html and is used by both mythweb
and the "webfrontend"


Regards
Stuart



More information about the mythtv-users mailing list