<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Mar 6, 2017 at 12:32 PM, Hika van den Hoven <span dir="ltr"><<a href="mailto:hikavdh@gmail.com" target="_blank">hikavdh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hoi Roger,<br>
<span class="gmail-"><br>
Monday, March 6, 2017, 7:30:40 PM, you wrote:<br>
<br>
> On 06/03/17 17:03, Peter Bennett wrote:<br>
>><br>
>>><br>
>> The backend already has the feature built in. If you set "Idle shutdown<br>
>> timeout" in mythtv-setup, it will automatically shut down the server<br>
>> when idle using the "server halt command" that you specify. Is there<br>
>> some reason this does not work for you?<br>
>><br>
>> Peter<br>
>><br></span></blockquote><div>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 <a href="https://www.mythtv.org/wiki/ACPI_Wakeup#Helper_script:_TurnOff">https://www.mythtv.org/wiki/ACPI_Wakeup#Helper_script:_TurnOff</a></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">
> I suspect it's turned it off because the backend doesn't currently<br>
> register API Service users as frontends/clients. So it will go idle and<br>
> shutdown even whilst the Http server is in use.<br>
<br>
> It's worth tracking <a href="https://code.mythtv.org/trac/ticket/12089" rel="noreferrer" target="_blank">https://code.mythtv.org/trac/<wbr>ticket/12089</a> for this.<br>
<br>
> However, has the OP actually tried it ?<br></span></blockquote><div>I have not. I'll give it a quick try when I get some time.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">
> Even though the Kodi PVR does use some services, I believe it uses the<br>
> internal protocol for playback. If it does it right then then you may<br>
> find that it already prevents shutdown during playback.<br></span></blockquote><div><br></div><div>It doesn't prevent shutdown via 'mythshutdown -c' (it reports idle). I am not sure if it prevents shutdown via the "Idle Shutdown Timer".</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">
> For the same reason you may also see playback started/stopped events,<br>
> that your script could handle.<br>
> <a href="https://www.mythtv.org/wiki/MythTV_System_Events" rel="noreferrer" target="_blank">https://www.mythtv.org/wiki/<wbr>MythTV_System_Events</a></span></blockquote><div><br></div><div>Good pointer, I'll check on that. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-"><br>
</span>You can look for alternative ways to check. For instance as I<br>
understand Kodi needs nfs or cifs for accessing the recordings. See if<br>
you can do a check on that front. Or if all frontends are dedicated,<br>
do a ping check. Or set a local file (for instance /ect/kodiplay.txt<br>
to contain a 1 on starting kodi and reset it to 0 on stopping it. Etc.<br>
<br></blockquote><div>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.</div><div><br></div><div>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.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Tot mails,<br>
  Hika                            mailto:<a href="mailto:hikavdh@gmail.com">hikavdh@gmail.com</a><br><div class="gmail-HOEnZb"><div class="gmail-h5"><br></div></div></blockquote><div><br></div><div>Thanks for your help everyone!</div><div>Marc </div></div></div></div>