[mythtv-users] Scripts to monitor recording times

Hika van den Hoven hikavdh at gmail.com
Fri Oct 14 15:40:55 UTC 2022


Hoi Stephen,

Friday, October 14, 2022, 4:01:28 PM, you wrote:

> Hoi Stephen,

> Friday, October 14, 2022, 5:38:11 AM, you wrote:

>> On Fri, 14 Oct 2022 04:15:34 +0200, you wrote:

>>>Hoi All,
>>>
>>>I'm currently working on upgrading my network to reduce energy use.
>>>
>>>My backend is also my samba, nfs, ldap, dns server and several other
>>>things. I already have set my frontends and workstation to wake the
>>>server. I am now setting up a pi as the spider in the network that can
>>>suspend and wake the other machines at need and will serve the
>>>essentials needed 24/7.
>>>
>>>The most complex part is knowing when the backend should be awake for
>>>recordings. In the past I have ones or twice seen people sharing
>>>scripts just for that. I'm wondering if they can share them again.
>>>It would speedup things, as I won't have to invent the wheel again.

>> My "gaps" program (Python) works out when there are gaps between
>> recordings, so it will have code that does what you want:

>> http://www.jsw.gen.nz/mythtv/gaps

>> Note that gaps does not account for the "soft" pre- and post-roll
>> settings.  I have 60 seconds of pre- and post-roll (which I think is
>> the default) so the actual start of a gap between recordings is 60
>> seconds after when gaps calculates it, and the actual end of a gap is
>> 60 seconds before what it calculates.
>> _______________________________________________

> Thanks! that was the one I remember. It works although it complains
> that I am stil on 0.27, but I have the python3 bindings installed. It
> gives me a start point on the the bindings as I never worked with
> them.
> I fabricated a script around `mythbackend --printsched` but that is
> not ideal. There the pre- and post-roll are included so I guess those
> could also be extracted through the bindings. My default is 5 min, but
> I have exception, like zero pre-roll for the news, extra post-roll for
> movies and shows on the Flemish channels as they still have to invent
> time! ;-( In the day 50% starts early and in the evening 80% late,
> while on their site they give timings in seconds!)

> Tot mails,
>   Hika                            mailto:hikavdh at gmail.com

I've analyzed the output from the bindings command
'Dvr/GetUpcomingList'.
- First you are using the recording start/end times
  (['Recording']['StartTs']/['Recording']['EndTs']), not the programme
  start/end times (['StartTime']/['EndTime']). So they are with the
  pre- and post-roll included.
- Secondly those timings are all rounded to 5 minutes and thus
  inaccurate.
- Thirdly I now realize that these do not include any follow-up jobs,
  so the backend could be active longer. This is not a real problem as
  a job is not time bound and would simply continue after a resume,
  but it's neater to take these into account.

Is there a command to check the job-queue? And one to check on
current activity? The latter could be used to postpone a suspend.
Could there be a subcommand to not round the timings?

Tot mails,
  Hika                            mailto:hikavdh at gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens



More information about the mythtv-users mailing list