[mythtv-users] Checking status via API

Marc Rawji mrawji at gmail.com
Wed Mar 8 05:09:07 UTC 2017


On Mon, Mar 6, 2017 at 12:32 PM, Hika van den Hoven <hikavdh at gmail.com>
wrote:

> Hoi Roger,
>
> Monday, March 6, 2017, 7:30:40 PM, you wrote:
>
> > On 06/03/17 17:03, Peter Bennett wrote:
> >>
> >>>
> >> The backend already has the feature built in. If you set "Idle shutdown
> >> timeout" in mythtv-setup, it will automatically shut down the server
> >> when idle using the "server halt command" that you specify. Is there
> >> some reason this does not work for you?
> >>
> >> Peter
> >>
>
Thanks Peter. I'll give that a go... the server isn't exclusively a
mythbackend, so I've been using the "turnoff" script (and took over
maintenance) from
https://www.mythtv.org/wiki/ACPI_Wakeup#Helper_script:_TurnOff


> > I suspect it's turned it off because the backend doesn't currently
> > register API Service users as frontends/clients. So it will go idle and
> > shutdown even whilst the Http server is in use.
>
> > It's worth tracking https://code.mythtv.org/trac/ticket/12089 for this.
>
> > However, has the OP actually tried it ?
>
I have not. I'll give it a quick try when I get some time.


> > Even though the Kodi PVR does use some services, I believe it uses the
> > internal protocol for playback. If it does it right then then you may
> > find that it already prevents shutdown during playback.
>

It doesn't prevent shutdown via 'mythshutdown -c' (it reports idle). I am
not sure if it prevents shutdown via the "Idle Shutdown Timer".


> > For the same reason you may also see playback started/stopped events,
> > that your script could handle.
> > https://www.mythtv.org/wiki/MythTV_System_Events


Good pointer, I'll check on that.

>
> You can look for alternative ways to check. For instance as I
> understand Kodi needs nfs or cifs for accessing the recordings. See if
> you can do a check on that front. Or if all frontends are dedicated,
> do a ping check. Or set a local file (for instance /ect/kodiplay.txt
> to contain a 1 on starting kodi and reset it to 0 on stopping it. Etc.
>
> Kodi doesn't use NFS or CIFS... My backend doesn't export content via NFS
or CIFS and I didn't configure it on the tablets.

For ping checks, i have multiple tablets that aren't dedicated, so it isn't
a good option for my setup, but could work for others. Similarly for
setting a localfile, from a remote android tablet isn't straight forward.


> Tot mails,
>   Hika                            mailto:hikavdh at gmail.com
>
>
Thanks for your help everyone!
Marc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20170307/a3c26797/attachment.html>


More information about the mythtv-users mailing list