-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
tvheadend: satip-client discovery not working(workaround) #16500
Comments
Can't use "eth0" in a package. It's not the same interface for all routers. |
It is indeed a bit of grey area to look where the fix should come from Package or Distro side and maybe no fix at all. Although tvheadend is running on the LAN interface/zone side OpenWrt, there is probably still some sort of blocking done on this multicast SSDP behaviour. For now personally I could workaround it with some /etc/rc.local and delay/restart hacking of the service. Besides looking at Luci multicast options under interfaces I noticed the package "igmpproxy" and "netifyd" also mention this multicast range. |
I noticed a new configuration for network devices was added in OpenWrt. Please try: |
Thanks for bringing this up, was this change a 21.02 (.1) point release change or was this already the case in 21.02? Will post back if I have tested. |
I don't know. BTW, I'm working on a new tvheadend package based on their master branch. I hope it will be ready next week. I would appreciate some testing. |
New version ready to test. |
Please close this issue if it's resolved. |
Haven't tested new version yet, but except from the multicast setting hint in Openwrt interfaces has anything related to satip/multicast detection been altered in the new tvheadend package? |
No. |
This checkbox is currently activated by default in snapshot but doesn't help detecting satip tuners!
Also noticed this strange popup about applying changes to network interface in that section of luci ,although nothing was altered or changed only upgraded to a stable point release of OpenWrt... In current snapshot TvHeadend still doesn't detect SATIP tuners out of the box nor after pressing detect button "Configuration>General>SATIP-Server>Discover SATIP-Servers" neither on lan or br-lan interface, although HDHomeRun tuners are listed instantly without a hitch: Using the previous workaround but this time in 'uci' syntax (generated by luci webinterface) instantly detects the SATIP tuners after pressing detect and survives reboots:
Maybe an idea to apply this 'uci' rule by default on the 'lan' interface when installing Tvheadend package? |
As I said, I don't have any SAT>IP available to test, but adding a route may upset other packages that use multicast, maybe even tvheadend's iptv. Also try this:
|
Dear @M95D this "option bindaddr" in /etc/config/tvheadend with the lan-address is indeed the solution and works both for the the current snapshot but also the current stable OpenWrt 21.02.1 which is now also able to detect and use both HDHomeRun and SAT-IP tuners. Now its not even required to add the "multicast route" discussed earlier, which had no effect at all on 21.02.1. Starting up the server manually both in 21.02.1 as root and SNAPSHOT tvheadend/dvb using the following commands did not work because "satip_bindaddr" is not a valid option:
However starting up the server manually both in 21.02.1 as root and SNAPSHOT tvheadend/dvb using the following commands did work the same as editing /etc/config/tvheadend offcourse the #option bindaddr were commented to check this command:
By proposing a general solution is it possible to add the following command as a post install action of the tvheadend 21.02.1/snapshot package to make the "bindaddr" option by default attach to the lan interface instead of 0.0.0.0 which doesn't work?
|
Glad to see that --bindaddr works. I already asked in OpenWrt forum and Jow's answer explained a lot. I'll try to make a script that sets bindaddr to LAN IP, following Jow's advice, but it's complicated and I never done this before. It will take a while. |
Indeed the comprehensive solution is to make it flexable to changes of the lan ipaddress or device even when these gets altered after tvheadend has been installed. I can only confirm that |
Permanent dynamic Fix (21.02.x/Snapshots) by only adding the
|
Another interesting fact... 🤦 🤦 🤦 I did most of the testing on a offline/passive connected RPi1 with its only ethernet interface being temporary used as a "wan" client to the internet for doing the But when adding the default gateway and route on the 'LAN' interface, tvheadend instantly detects the However I will try a more default router setup soon (wan+(w)lan+switch+HDHomeRun/SATIP tuners within LAN) but my guess is that the SATIP broadcasts will be passed upstream on the WAN if using the 0.0.0.0 preset of tvheadend and it will still not always work since its a hit/or miss according to this topic with multiple interfaces. Therefor I still think the solution posted in the former post above ^^^ is the way to go for 21.02.2/Snapshot. Sadly this default route insight had no effect on 19.07.8... |
Zyxel OpenWrt router tested with a complete default config first post edited with details but the result remains still the same... Tvheadend won't detect SATIP tuners without the --bindaddr fix. |
Yes, you are correct. It probably sends multicasts on the interface that has the default route (route to 0.0.0.0). It might not even be an issue specific to tvheadend. Probably all linux multicasts go out on the the interface having the default route, unless the app binds some another interface. And routers usually have 0.0.0.0 go out on the wan interface (because that's where the internet is). |
Thanks, I will test and close this ticket as soon it as been merged master and backported to stable 21.02.x. |
Tested successful both on RaspberryPi1(LAN-ip client active/passive) and Zyxel P-2812HNU-F1(normal router WAN/LAN config) running OpenWrt 21.02.2 with Tvheadend package are able to instantly detect SATIP-tuner (fritzbox 6490 v07.29, with static ip-address matching the LAN interface subnet of the OpenWrt devices) with this patched manually. |
Since this fix for master is merged and 21.02.x branch needs backporting, should we still care about 19.07.x and add a I already succesful tested having this option active in 19.07.8 by adding the following code to
Than adding a single specific/unique SATIP tuner of choice to
The only downside is that it will only work for 1 tuner, adding multiple satip_xml listings makes only the last work contrary to adding multiple
|
It would be better to update tvheadend version. |
If config parameter is not set, tvheadend will bind to LAN IP address by default. Fixes issue #16500 without requiring user modifications to config file. It's also more secure if firewall becomes disabled. Signed-off-by: Marius Dinu <m95d+git@psihoexpert.ro>
This current merged fix has been tested and verified working both under "OpenWrt SNAPSHOT r19075-ed364cd4b0" as of today master branch and "manually patched" 21.02.2 branch using a Raspberry Pi1 as OpenWrt router and Fritzbox 6490 as Satip server&tuner. It however still needs backporting to 21.02.x branch with simply a cherrypick and no further changes needed. Is it up to the maintainer @M95D or commiter @neheb to backport? |
Typically the former. |
Closing this since master and stable are just patched and old-stable 19.07.x will be EOL soon. |
If config parameter is not set, tvheadend will bind to LAN IP address by default. Fixes issue openwrt#16500 without requiring user modifications to config file. It's also more secure if firewall becomes disabled. Signed-off-by: Marius Dinu <m95d+git@psihoexpert.ro>
If config parameter is not set, tvheadend will bind to LAN IP address by default. Fixes issue openwrt#16500 without requiring user modifications to config file. It's also more secure if firewall becomes disabled. Signed-off-by: Marius Dinu <m95d+git@psihoexpert.ro> (cherry picked from commit 95cbfe8)
Maintainer: @M95D
Environments tested:
bcm2708, Raspberry Pi 1, (OpenWrt version snapshot r17454-f08b76b32f, old-stable 19.07.8, stable 21.02.2,
OpenWrt SNAPSHOT r18801-56256259a1, OpenWrt SNAPSHOT r18807-7fae1e5677)
lantiq/xrx200, ZyXEL P-2812HNU-F1, (OpenWrt 21.02.2 r16495-bf0c965af0)
Devices routers/tuners and configs:
-RPi1 running OpenWrt ext4 image, only disabled DHCP server on LAN for this device:
*passive (static ip no DHCP server no default route using the LAN interface)
*active (LAN interface gets ip by DHCP-client not the WAN, and default route/dns from main router)
-ZyXEL P-2812HNU-F1(for testing besides the Raspberry Pi1, because it has more interfaces):
*default OpenWrt Lan/Wan Router config only changed WAN "dsl0" to "eth0.2"
-FritzBox 6490 Sat-IP tuner disabled DHCP server on LAN for this device:
*passive (static ip matching subnet of main router no default route)
*active(LAN interface gets DHCP from openwrt router or main router depending or setup)
-HDHomeRun:
*active(LAN gets DHCP ip-address from main router or OpenWrt Router Rpi1/Zyxel)
Issue Description:
Discovery of SAT>IP server based network tuners is not working out of the box with Tvheadend web-interface on OpenWrt.
You can let the satip-client function scan for satip-server based tuners by pressing the following button in the Tvheadend webinterface "Configuration>General>SATIP-Server>Discover SATIP-Servers". This would normally list (multiple) network satip and HDhomerun tuners in the "Configuration>DVB Inputs>TV Adapters" section.
Assuming that all devices are connected with each other via ethernet and configured for the same subnet as the OpenWrt "Lan" interface is using. Only the Raspberry or the Zyxel were tested in a setup as being the OpenWrt device not both together!
Both test cases of having a default OpenWrt router WAN/LAN config with a 192.168.1.1 subnet on its LAN with a DHCP server or a OpenWrt config not running as a router but as a passive/active LAN client were tested a long the way. All configuraties have this issue of not detecting SATIP tuners by default, except the config were the RPI1 has the one and only interface have its default route 0.0.0.0 and gateway set on its own LAN interface.
Fix:
Thanks to @M95D insight its possible to let "tvheadend" know on which interface the broadcast packets for detecting SATIP needs to go out. By default this is 0.0.0.0 but this mostly incorrect.
All configs and devices tested running 21.02.x / Snapshot benefit from the following solution to detect SATIP tuners, by specifying the "--bindaddr" option /etc/init.d/tvheadend, which is immune to changes of LAN ip-address/ranges after tvheadend has been installed:
Older Workaround/Fixes:
Depricated Permanent static Fix using the "bindaddr" option /etc/config/tvheadend for both stable 21.02.1 and SNAPSHOT:
But satip-server based tuners cannot be detected unless the following shell command has been run on OpenWrt device before the discovery:
ip route add 239.255.255.250/32 dev eth0
. This has to be done every (re)boot, therefor requires a permanent prefered route/firewall rule?Permanent older fix with 'uci' rule:
Workaround (old-stable 19.07.8):
A workaround for manually and staticly adding a satip-server based tuner if you know the device specific/unique xml url can be done by adding the following example at the end of line 83 of /etc/init.d/tvheadend, this is the only solution for old-stable 19.07.8 all the former solutions/workaronds don't work:
Credit goes to Roland.A from the TvHeadend forum.
The text was updated successfully, but these errors were encountered: