2021-01-12, 09:04 AM
(2021-01-11, 04:26 PM)sub Wrote:(2021-01-11, 08:20 AM)janoonk Wrote: Why don't you use the HDHomeRun API to check tuner availability?In addition to what was already said above...
https://info.hdhomerun.com/info/http_api
You could also just check the status page through a simple web API call for example http://192.168.11.105/tuners.html
and parse the results.
You can also just use auto in the url so a free tuner will be used, no need to specify the exact tuner.
And if you check the API docs you can read that if a call to http://192.168.11.105:5004/auto/v1
and if it fails, because all tuners are occupied, a 503 HTTP status code will be returned. It even returns more detailed info in the response headers:
X-HDHomeRun-Error: 805 All Tuners In Use
There would be no point in me checking what tuners are available at the time you schedule the recordings, since that in no way reflects what tuners will be available at some later time when the recordings are due to happen. ie, you might be watching live tv in some other software now, but it doesn't mean you will be later when the recordings are due to start. NextPVR has to assume that it can schedule recordings on any tuners you told it are available. ie, if you have four tuners which you've setup in NextPVR, it has to assume those four tuners will be available at recording time, so will allow you to schedule four recordings. When the recordings try to start, if a tuner isn't available, that recording will ultimately get an error.
If you're going to use the software in different applications, I'd recommend deleting a couple of the tuners in NextPVR, so that it's not working on the assumption that it can user all the tuners.
Of course. And reserving 1 tuner is a reasonably work-around.
But let me clarify a few things:
I meant watching *Live* TV with my HDHomeRun app. Secondly my first post of this thread is about making at the same time *ad hoc* recordings (4 times) from the TV guide. But as 1 of the tuners is occupied with watching live TV (for example by one of my kids) the fourth ad hoc recording fails. But the user is not getting a error about this. Even worse is that if you cancel 1 of the three that did succeed and try to re-record the fourth failed channel NextPVR still thinks it's recording that channel. You first have to "cancel" it. The very first time I used NextPVR, when I was doing research on a successor for TV Mosaic and was searching and testing all recording software, when I did this test I almost already gave up on NextPVR. How this case is currently handled is not a good user experience.
But as we already said maybe it's not worth the dev effort since it's a not so common use case and there's a workaround by reservering a tuner.