fabianishere / udm-iptv

Helper tool for configuring routed IPTV on the UniFi Dream Machine (Pro)
GNU General Public License v2.0
399 stars 60 forks source link

Multiple decoders issue #247

Open kl4ver opened 1 year ago

kl4ver commented 1 year ago

What is your ISP? (if relevant)

KPN

Diagnostic Information

=== Configuration === WAN Interface: eth4 WAN VLAN: 4 (dev iptv) WAN DHCP: true (options "-O staticroutes -V IPTV_RG") WAN Ranges: 213.75.0.0/16 217.166.0.0/16 LAN Interfaces: br40 IGMP Proxy quickleave disabled: false IGMP Proxy debug: true === IP Link and Route === 62: iptv@eth4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 inet 10.142.32.5/22 brd 10.142.35.255 scope global iptv valid_lft forever preferred_lft forever 10.142.32.0/22 proto kernel scope link src 10.142.32.5 213.75.112.0/21 via 10.142.32.1 metric 262 === Service Logs === Mar 28 10:47:39 UDM udm-iptvd[3078]: RECV V2 member report from 192.168.40.5 to 224.0.252.136 Mar 28 10:47:39 UDM udm-iptvd[3078]: Updated route entry for 224.0.252.136 on VIF #0 Mar 28 10:47:39 UDM udm-iptvd[3078]: Adding MFC: 217.166.226.136 -> 224.0.252.136, InpVIf: 1 Mar 28 10:47:43 UDM udm-iptvd[3078]: The IGMP message was local multicast. Ignoring. Mar 28 10:47:43 UDM udm-iptvd[3078]: The IGMP message was local multicast. Ignoring. Mar 28 10:47:43 UDM udm-iptvd[3078]: RECV V2 member report from 192.168.40.1 to 224.0.0.251 Mar 28 10:47:43 UDM udm-iptvd[3078]: The IGMP message was from myself. Ignoring. Mar 28 10:47:43 UDM udm-iptvd[3078]: RECV V2 member report from 192.168.40.6 to 224.0.252.136 Mar 28 10:47:43 UDM udm-iptvd[3078]: Updated route entry for 224.0.252.136 on VIF #0 Mar 28 10:47:43 UDM udm-iptvd[3078]: Adding MFC: 217.166.226.136 -> 224.0.252.136, InpVIf: 1

Describe the Bug

With only one decoder it has working for month, now I added a second decoder and now the screens are freezing and giving the error code STB-NMC-400

We I remove the network cable from one of the decoders, doesnt matter which one, everything is working fine again.

Expected Behavior

No errors or freezing :)

wvdheiden commented 1 year ago

Did you switch on IGMP snooping?

kl4ver commented 1 year ago

Yes, only on the IPTV VLAN

tylerdola commented 1 year ago

I seem to be having the same problem, but by using the now built-in UDM-Pro IPTV support feature. One STB plugged in works fine, if I add another one, they freeze.

Someone in the comments on this video says that is a common issue when channels are changed with multiple STBs. :(

fabianishere commented 1 year ago

Try to see if disabling quickleave solves the problem.

kl4ver commented 1 year ago

@fabianishere already tried this, it doesn't fix the problem.

kl4ver commented 1 year ago

@fabianishere any news about this? How can I help to fix this problem?

reinierjh commented 1 year ago

Yes, only on the IPTV VLAN

Just to be sure. IPTV VLAN is vlan40 on the UDM? Do you use multiple switches (all unifi of others) are the decoders attached to the same switch or not etc.

kl4ver commented 1 year ago

Yes, IPTV is on vlan40. I have one decoder directly connected to the udm, the other one is connect through two unifi switches, an US-8 and a USW-lite-8

kl4ver commented 1 year ago

any updates?

fabianishere commented 1 year ago

Have you tried improxy instead of igmpproxy in the settings?

kl4ver commented 1 year ago

improxy gives errors, then it doesn't work at all

LiviusNL commented 1 year ago

@kl4ver You need to configure IGMP on your Unifi switches correctly to support multiple decoders. This is not supported through the UI of the Network Application. The system.cfg of a Unifi switch can be augmented using a configuration file.

The config.properties file

The config.properties file contains the following entries: system.cfg.<#>=<key>=<value> or system.cfg.<mac-address>.<#>=<key>=<value>

When there is 1 VLAN in you setup and and no switch specific configuration is required config.system_cfg.1=switch.igmp.header_checking=false config.system_cfg.2=switch.vlan.1.igmp_fastleave=true

When you have multiple VLANs, you need to determine the VLAN ID from the switch. The entry with change to config.system_cfg.2=switch.vlan.<vlan_id>.igmp_fastleave=true Login into your switch to get the VLAN ID for your VLAN by using this command grep id= /tmp/system.cfg It is very likely that VLAN 40, does not have VLAN ID 40

Your configuration file could end up looking like this: config.system_cfg.1=switch.igmp.header_checking=false config.system_cfg.f09fc2462a93.1=switch.vlan.2.igmp_fastleave=true config.system_cfg.f09fc29fb205.1=switch.vlan.4.igmp_fastleave=true

Check the /tmp/system.cfg file to check if the configuration has been applied.

kl4ver commented 1 year ago

@LiviusNL nice! This works! I only needed to manually provision the switches.

RaimondB commented 4 months ago

@LiviusNL @kl4ver I have tried the above, but I don't see the reprovision button in the UI anymore. How should I trigger the reprovision?

LiviusNL commented 4 months ago

Enabling/Disabling the device led is a workaround to reprovision a switch

RonaldBlom commented 3 months ago

@kl4ver You need to configure IGMP on your Unifi switches correctly to support multiple decoders. This is not supported through the UI of the Network Application. The system.cfg of a Unifi switch can be augmented using a configuration file.

  • Log in into your device hosting the Network Application
  • List the sites you have configured for your network application echo 'db.site.find({"desc": {"$ne":null}},{"name":1, "desc":1, "_id":0}).forEach(function(site){print(site.name+" :\t"+site.desc)})' | mongo --quiet 127.0.0.1:27117/ace
  • Create the directory containing the configuration file mkdir -p /srv/unifi/data/sites/<site_id>, where site_id is the id of the site For the default site: mkdir -p /srv/unifi/data/sites/default
  • Create the config.properties file with the IGMP configuration
  • Set the ownership of created directories and files to the Network Application user chown -R unifi:unifi /srv/unifi/data/sites
  • Restart the Network Application
  • Provision your Unifi switches

The config.properties file

The config.properties file contains the following entries: system.cfg.<#>=<key>=<value> or system.cfg.<mac-address>.<#>=<key>=<value>

When there is 1 VLAN in you setup and and no switch specific configuration is required config.system_cfg.1=switch.igmp.header_checking=false config.system_cfg.2=switch.vlan.1.igmp_fastleave=true

When you have multiple VLANs, you need to determine the VLAN ID from the switch. The entry with change to config.system_cfg.2=switch.vlan.<vlan_id>.igmp_fastleave=true Login into your switch to get the VLAN ID for your VLAN by using this command grep id= /tmp/system.cfg It is very likely that VLAN 40, does not have VLAN ID 40

Your configuration file could end up looking like this: config.system_cfg.1=switch.igmp.header_checking=false config.system_cfg.f09fc2462a93.1=switch.vlan.2.igmp_fastleave=true config.system_cfg.f09fc29fb205.1=switch.vlan.4.igmp_fastleave=true

Check the /tmp/system.cfg file to check if the configuration has been applied.

Hi, I had this in place when I had the USG and controller running in docker container. But now I have the UDR(dreamrouter) with the controller integrated. Is this also working with UDR, with the site and the config.properties file?

I tested this on UDR, but it is not working. I also do not see the "reprovision" option at the switches anymore, which I did have when running controller in docker. Instead I restarted the switch, but without any result.

LiviusNL commented 3 months ago

Hi, I had this in place when I had the USG and controller running in docker container. But now I have the UDR(dreamrouter) with the controller integrated. Is this also working with UDR, with the site and the config.properties file?

I tested this on UDR, but it is not working. I also do not see the "reprovision" option at the switches anymore, which I did have when running controller in docker. Instead I restarted the switch, but without any result.

Yes, as an UDR uses the same controller

RonaldBlom commented 3 months ago

Is the path to place the config.properties file the same for UDR as discribed above?

RonaldBlom commented 3 months ago

Have it working now. Was not working without the switch mac address in config.properties file. After adding that, it was picking it up.

RonaldBlom commented 2 months ago

You should put the config.properties file in /data/unifi/data/sites/default on a Dream Router. All others are symbolic links to this.