Cable Channel Scan parameters

Want to write your own code to work with a HDHomeRun or work with the HDHomeRun DVR? We are happy to help with concepts, APIs, best practices.
Post Reply
mski
Posts: 11
Joined: Sun Aug 06, 2017 10:34 am

Cable Channel Scan parameters

Post by mski »

Hi, All -

I'm looking to automate a bit around channel scanning. I've discovered the obvious end points:

Code: Select all

curl -v -X POST http://hdhomerun.local/lineup.post?scan=start
curl -v -X POST http://hdhomerun.local/lineup.post?scan=abort
curl -v -X GET http://hdhomerun.local/lineup_status.json
curl -v -X GET http://hdhomerun.local/lineup.json
I've found some parameters in github such as lineup.json?show=found, lineup.json?show=all, and lineup.json?tuning.

Is there documentation about these end points and their parameters?

Is the scan configurable? I'd like to only use a single tuner and leave the additional tuners available for use.

Thanks all!

mski
Posts: 11
Joined: Sun Aug 06, 2017 10:34 am

Re: Cable Channel Scan parameters

Post by mski »

I found some official documentation:
https://info.hdhomerun.com/info/http_api
https://www.silicondust.com/hdhomerun/h ... opment.pdf
https://github.com/Silicondust/documentation/wiki


Found an end point to favorite and hide channels.

Code: Select all

curl -v -X POST http://hdhomerun.local/lineup.post?favorite=+3
curl -v -X POST http://hdhomerun.local/lineup.post?favorite=x3
curl -v -X POST http://hdhomerun.local/lineup.post?favorite=-3
Last edited by mski on Thu May 28, 2020 3:02 pm, edited 1 time in total.

mski
Posts: 11
Joined: Sun Aug 06, 2017 10:34 am

Re: Cable Channel Scan parameters

Post by mski »

mski wrote: Wed Apr 22, 2020 2:16 pm Is the scan configurable? I'd like to only use a single tuner and leave the additional tuners available for use.
I haven't tripped accross a HTTP endpoint that sets up server side single tunner scanning. As documented elsewhere, the thick configuration app supports per tuner scanning.

Code: Select all

~/libhdhomerun-master$ hdhomerun_config <id> scan <tuner>
I assume this "does the right thing" and updates the channel list for all tuners while used with a PRIME. I seem to recall some models had multiple inputs and per tuner multiple channel lists but haven't seen any documentation on that.

NedS
Silicondust
Posts: 1511
Joined: Mon Dec 10, 2018 12:38 pm
x 41

Re: Cable Channel Scan parameters

Post by NedS »

I'll have to check with our CTO, Nick, but I believe the command line tool is the only way to specify a specific tuner for scanning. I'll also see if we can update the info.hdhomerun.com page today to answer your other questions and also consolidate more of the documentation. I've been meaning to add something for the blacklist/favoriting, and a few other tricks that aren't currently properly documented, but now is as good of a time as any to get cracking on that.

jasonl
Expert
Posts: 15341
Joined: Sun Oct 28, 2007 9:23 pm
x 7

Re: Cable Channel Scan parameters

Post by jasonl »

Single-tuner scanning doesn't exist, at least in a useful fashion for updating the website or xml/json data. The scan that updates the stored data on the device always uses all tuners, period. The hdhomerun_config scan doesn't update information stored on the device and is generally only useful for recording signal metrics and, excluding anything using a tuning adapter, which virtual channels are present on a given physical channel.

mski
Posts: 11
Joined: Sun Aug 06, 2017 10:34 am

Re: Cable Channel Scan parameters

Post by mski »

mski wrote: Thu May 14, 2020 7:40 am I assume this "does the right thing" and updates the channel list
jasonl wrote: Thu May 14, 2020 7:47 pm hdhomerun_config scan doesn't update information stored on the device
Thank you! This is an important tidbit of information.

NOYB
Posts: 161
Joined: Thu Dec 12, 2013 2:12 am

Re: Cable Channel Scan parameters

Post by NOYB »

Can't get the http post scan start to work. What am I doing wrong?

PowerShell 4.0

Code: Select all

Invoke-WebRequest -Uri 'http://192.168.2.202/lineup.post' -Method POST -Body @{"scan"="start"}
Returns status 400 Bad Request

Posting with browser also returns status 400 Bad Request

Code: Select all

<html>
    <form action='http://192.168.2.202/lineup.post' method='post'>
        <input type="text" name="scan" value="start">
    </form>
</html>
Wireshark POST:

Code: Select all

HTML Form URL Encoded: application/x-www-form-urlencoded
    Form item: "scan" = "start"
        Key: scan
        Value: start
HDHomeRun CONNECT
Model: HDHR4-2US
Device ID: 1040dddd
Firmware: 20200907

signcarver
Expert
Posts: 9247
Joined: Wed Jan 24, 2007 1:04 am
Device ID: 10802091 131B34B7 13231F92 1070A18E 1073ED6F 15300C36
x 15

Re: Cable Channel Scan parameters

Post by signcarver »

why are you putting it in body... though I have seen some documentation of Invoke-WebRequest state it will put the body as parameters but one usually just adds the parameters to the url such as

Code: Select all

Invoke-WebRequest -Uri 'http://192.168.2.202/lineup.post?scan=start' -Method POST

NOYB
Posts: 161
Joined: Thu Dec 12, 2013 2:12 am

Re: Cable Channel Scan parameters

Post by NOYB »

For some reason was thinking needed to send a form.
Thanks

Post Reply