How to find next "no recording scheduled" timeslot?

Help and support for HDHomeRun DVR and HDHomeRun software for Windows 10, Mac, Android, XBox, etc.
HenryGab
Posts: 3
Joined: Sat Feb 16, 2008 4:28 pm

How to find next "no recording scheduled" timeslot?

Postby HenryGab » Sat Feb 02, 2019 10:09 pm

I've been a LONG time user of Silicon Dust tuners across multiple products.

I've finally moved away from WMC, and am happily running their DVR service (which I supported via kickstarter). But, I still need to periodically update the machine that the service is running on. I'd like to do this at a time that does not impact the recording of shows.

Q: How can I determine which shows are going to record over the next 24 hours?

I'd really like to be able to view a "schedule" based listing of what is going to record. I want this for the above, but also because I think it's not always recording from multiple channels at the same time... and it's REALLY hard to speak with any authority as to what it SHOULD be doing on any given night.

HELP PLEASE … even if it's some command-line script that dumps text output or to a CSV file, how do I get a schedule of what it thinks it will be recording in the near future?

Thank you!

HenryGab
Posts: 3
Joined: Sat Feb 16, 2008 4:28 pm

Re: How to find next "no recording scheduled" timeslot?

Postby HenryGab » Sun Feb 03, 2019 1:10 am

I have hacked together the following powershell script. the output format is JSON, which I then load into Excel.

This is ugly. I wish something like this was exposed in the UI, just so we know when we can plan maintenance windows for the box running the DVR service (which is considered critical in my home).

Code: Select all

function Get-HDHR-Discovery { $result = @(); $discovery = Invoke-RestMethod -Uri 'http://ipv4-api.hdhomerun.com/discover'; $justDevices = $discovery |? { $_.PSObject.Properties.name -contains 'DeviceId' -and $_.DiscoverURL.Length -ne 0 } |? { $_.PSObject.Properties.name -contains 'DiscoverURL' -and $_.DiscoverURL.Length -ne 0 }; $justDevices |% { $result += Invoke-RestMethod -Uri $_.DiscoverURL; } return ,$result; } function Get-HDHR-Tasks { $result = @(); $devices = Get-HDHR-Discovery; $devices |% { $Parameters = @{ 'DeviceAuth' = $_.DeviceAuth }; $result += Invoke-RestMethod -Method Get -Uri 'https://api.hdhomerun.com/api/recording_rules' -Body $Parameters } return ,$result; } function Get-HDHR-Episodes { $result = @(); $devices = Get-HDHR-Discovery; [String[]]$seriesIds = Get-HDHR-Tasks |% { $_.SeriesID }; $devices |% { $Parameters = @{ 'DeviceAuth' = $_.DeviceAuth }; $seriesIds |% { $p2 = $Parameters; $p2['SeriesID'] = $_; $t = Invoke-RestMethod -Method Get -Uri 'https://api.hdhomerun.com/api/episodes' -Body $Parameters if ((-not !$t) -and ($t -ne 'null')) { $result += $t; } } } return ,$result; } $episodes = Get-HDHR-Episodes; $episodes |% { $item = $_; [int]$s = $item.StartTime; [double]$ds = 25569.0 + (($s * 1.0)/60/60/24); [int]$e = $item.EndTime; [double]$de = 25569.0 + (($e * 1.0)/60/60/24); Add-Member -InputObject $item -MemberType NoteProperty -Name 'StartDateTime' -Value $ds; Add-Member -InputObject $item -MemberType NoteProperty -Name 'EndDateTime' -Value $de; } $episodes | ConvertTo-Json | Out-File -LiteralPath 'c:\t\episodes.json'


Return to “HDHomeRun Software Setup & Troubleshooting (Live & DVR)”

Who is online

Users browsing this forum: jjm1982 and 12 guests