Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport] Add setting to use HTTP-based tuner discovery #135

Merged
merged 1 commit into from
Mar 4, 2022

Conversation

djp952
Copy link
Contributor

@djp952 djp952 commented Mar 4, 2022

Backport of PR #133 - "Add setting to use HTTP-based tuner discovery" for Matrix, which reads:

Refers to Issue #116 - "Use ip address instead of device discovery"

This Pull Request adds a new setting to the addon that allows users to opt into using the SiliconDust API "HTTP Discovery" (at least that's what I've always it) to find their tuner devices. The normal UDP broadcast discovery doesn't work when the tuner(s) are on a different subnet than the client.

The HTTP discovery data can become "stale", as any device the user had turned on and connected will stay in this list for up to 24 hours after it's been turned off or disconnected. As such, the only data points used from the API are "DeviceID", which indicates the device has tuners and "LocalIP". The LocalIP address is used to then contact the device and gather the discovery information normally via libhdhomerun. This allows stale devices to be ignored.

If no devices are found via HTTP, there is a fallback to try UDP discovery as well. I felt this important since this API might disappear in the future.

@phunkyfish phunkyfish merged commit 1eaab85 into kodi-pvr:Matrix Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants