Kodi 17.6 and HDHomerun Add-on Problem

Kodi Community Development

Moderator: TVJunkie198

Post Reply
mrfreeze1963
Posts: 11
Joined: Thu Nov 15, 2018 8:18 am

Kodi 17.6 and HDHomerun Add-on Problem

Post by mrfreeze1963 »

Has anyone had any luck with the latest stable version of the HDHomerun Add-on in Kodi?

I ask because I can't get mine to work at all since the firmware upgrade. Here's my story:

I had the 2017 version of the add-on and, it worked perfectly with my Kodi set-up to my Prime. When the August 2018 firmware update came out for the Prime, I upgraded the Prime. The add-on stopped working. I waited for the release of the 2018.9.6 version of the HDHomerun add-on for Kodi and upgraded to that version. When I try to open the app, it can't detect my Prime at all.

I also tried a tip from one of the users that was having problems with their ELEC setup and reinstalled Kodi, then reinstalled the add-on. Same error message, same failure. :cry:

Here's something ironic/weird: It works fine with my WX system that I use to do the firmware update. I also have Shield, and it loves it. However, my reason for having a Kodi setup on another platform is a backup plan for if my Shield goes bad. But, if I can't get Kodi to work again, then my planning just went out the window.

Please help...

dugiehowsa
Posts: 123
Joined: Sat Mar 21, 2015 1:19 pm

Re: Kodi 17.6 and HDHomerun Add-on Problem

Post by dugiehowsa »

I had a similar problem where the 2018 addon didn't work properly in the confluence skin. Have you tried this version of the addon?

viewtopic.php?f=119&t=69506&p=328932#p328906

mrfreeze1963
Posts: 11
Joined: Thu Nov 15, 2018 8:18 am

Re: Kodi 17.6 and HDHomerun Add-on Problem

Post by mrfreeze1963 »

Hi @dugiehowsa,

No, I didn't hear about the beta versions at all. I've been dealing with the stable version that's in the default Kodi repository.

When I get some free time from grad school, I'll give it a try.

Thank you,

mrfreeze1963

jamessahm
Posts: 4
Joined: Sun Dec 16, 2018 11:43 am

Re: Kodi 17.6 and HDHomerun Add-on Problem

Post by jamessahm »

I too updated to latest OSMC/Kodi release 17.x Kodi. I updated the HDHomerun CC box to August 18 firmware. All Kodi boxes (of various flavors, including Kodi 18) have the same issue... if a burp in the buffer happens, it can't recover. It becomes pixelated and if you change the channel and chage it back, it will "reset", however, if it stays on the same channel, it will simply throw splotches of pixels until you exit and restart HD Homerun View Add-on, or change the channel. Seems to be a buffer recovery issue of sorts. I have tried nearly every setting to try and effect change, but nothing seems to help. If there no burp in the buffer happens, it will run fine until that happens... could be 5 minutes, or 5 hours... this is all with the 9-6-2018 Add-on version. Is there a way to load an older version of the plugin? Are they available anywhere??

Thanks,
Jim

mrfreeze1963
Posts: 11
Joined: Thu Nov 15, 2018 8:18 am

Re: Kodi 17.6 and HDHomerun Add-on Problem

Post by mrfreeze1963 »

Hi @dugiehowsa,

I just got some free time to play with Kodi and the add-on you gave me. Bad news: Still couldn't detect my devices at all. :cry: I uninstalled the previous one I got from the Kodi repository, restarted Kodi, loaded the plugin, and launched it..., only to get the same error message. Not sure what happened, but I can't use Kodi at all as a backup to my Shield. I'm going to have to do something else.

Thanks for the help, though,

mrfreeze1963

mrfreeze1963
Posts: 11
Joined: Thu Nov 15, 2018 8:18 am

Re: Kodi 17.6 and HDHomerun Add-on Problem

Post by mrfreeze1963 »

jamessahm wrote:
Sun Dec 16, 2018 12:07 pm
I too updated to latest OSMC/Kodi release 17.x Kodi. I updated the HDHomerun CC box to August 18 firmware. All Kodi boxes (of various flavors, including Kodi 18) have the same issue... if a burp in the buffer happens, it can't recover. It becomes pixelated and if you change the channel and chage it back, it will "reset", however, if it stays on the same channel, it will simply throw splotches of pixels until you exit and restart HD Homerun View Add-on, or change the channel. Seems to be a buffer recovery issue of sorts. I have tried nearly every setting to try and effect change, but nothing seems to help. If there no burp in the buffer happens, it will run fine until that happens... could be 5 minutes, or 5 hours... this is all with the 9-6-2018 Add-on version. Is there a way to load an older version of the plugin? Are they available anywhere??

Thanks,
Jim
I don't think you can, Jim. The older versions have been pulled offline altogether when the new firmware and software versions were posted in August 2018.

Also, if you attempt to roll back to the previous Kodi plugin version, it'll fail. Why? You'd also have to roll back the firmware update on your HDHR device(s) as well. The 201808 device firmware wouldn't work with the 2017 version(s) of the Kodi plugin (it happened to me the moment I upgraded my Prime's firmware).

As far as I know, it seems like Windows, IOS-based, and Android-based devices are your best bet until things on the Kodi side of the house are figured out. According to the link @dugiehowsa posted, folks are having problems with this, too, especially if they use it in either the Confluence or Estuary skins. However, I've tried to run the program in a couple of other skins, and it still wouldn't work for me.

mrfreeze1963

mrfreeze1963
Posts: 11
Joined: Thu Nov 15, 2018 8:18 am

Re: Kodi 17.6 and HDHomerun Add-on Problem

Post by mrfreeze1963 »

I believe I have found the problem of why the add-on isn't finding the devices -- Firewalld.

I know it sounds rather stupid, but I tried it myself and got quite the surprise!

I installed the latest Kodi version on a fresh install of Fedora 31 (18.6 according to RPMFusion). I installed the HDHomeRun video add-on inside Kodi and attempted to launch it. It kicked back, complaining that it couldn't find any devices. I opened Terminal and issued:

sudo service firewalld stop

I retried the add-on and everything worked. However, I didn't want to run my PC without the firewall. I turned the firewall daemon/service back on, and the add-on stopped working within 60 sec. I thought about it a bit and, it hit me: UPnP/SSDP. By default, the Fedora spins use the public zone in its firewall configuration. Its configuration allows mDNS, dhcpv6-client, and ssh by default. I found an article that says SSDP/UPnP services were added to the firewall (https://github.com/firewalld/firewalld/issues/25). Here are the changes you'll need to make to the firewall:

sudo firewall-cmd --permanent --zone=public --new-service=ssdp
sudo firewall-cmd --reload


SSDP in the command can be substituted with upnp-client. It'll work either way. For double insurance, you can do:

sudo firewall-cmd --permanent --zone=public --new-service=ssdp --new-service=upnp-client
sudo firewall-cmd --reload


Be sure to check your Linux distro's man files or help files to confirm the command structure.

mrfreeze1963

mrfreeze1963
Posts: 11
Joined: Thu Nov 15, 2018 8:18 am

Re: Kodi 17.6 and HDHomerun Add-on Problem

Post by mrfreeze1963 »

Update to 6/24/2020 post:

After I made the changes to the firewall policy in Fedora, the HDHomeRun add-on in Kodi appeared to have worked...., until I closed the add-on. When I attempted to relaunch the add-on, it stopped detecting my Prime. :( :oops:

Today, I downloaded Wireshark to figure out what was going on. :idea: Come to find out, there's a brief UDP-based conversation to three network hosts:
  • the network's broadcast address to find the tuner
  • the tuner - query and reply
  • the DVR engine (if you have one)
The three-host UDP conversation is necessary before invoking TCP to finish establishing the session. There is one more problem - the source UDP ports vary each time the add-on launches. Majority of the source ports range 40000-62000/UDP. Here's the full damage of what commands you have to run to configure firewalld to permit the add-on's functionality:

sudo firewall-cmd --permanent --zone=public --add-service=mdns
sudo firewall-cmd --permanent --zone=public --add-service=ssdp
sudo firewall-cmd --permanent --zone=public --add-service=upnp-client
sudo firewall-cmd --permanent --zone=public --add-port=40000-62000/udp
sudo firewall-cmd --reload


(The 3rd line ending with upnp-client is only necessary if your system is using other software, like VLC or Dragon Media Player, to connect to UPnP/DLNA-enabled servers. This line opens the firewall's source port to 1900/udp.)

Important Tip: Be sure to have your host behind a firewall and not directly connected to the Internet. Otherwise, your system will be victim to UPnP hacks, UDP port scans, recon, and other attacks.

Good luck!

NedS
Silicondust
Posts: 1366
Joined: Mon Dec 10, 2018 12:38 pm

Re: Kodi 17.6 and HDHomerun Add-on Problem

Post by NedS »

I've been told it's possible to modify the Kodi add-on to force it to use a specific destination port: https://github.com/Silicondust/script.h ... w/issues/2

mrfreeze1963
Posts: 11
Joined: Thu Nov 15, 2018 8:18 am

Re: Kodi 17.6 and HDHomerun Add-on Problem

Post by mrfreeze1963 »

That's interesting, @NedS. Sounds like that's only doable when you use the Kodi tarball.

Does that work for those that install Kodi from their OS' repository (e.g., RPMFusion, Debian, Ubuntu, etc.)?

jasonl
Expert
Posts: 15299
Joined: Sun Oct 28, 2007 9:23 pm

Re: Kodi 17.6 and HDHomerun Add-on Problem

Post by jasonl »

The correct answer is to understand how the firewall works on your distro and be smarter than the firewall. Create firewall ruless to allow all incoming traffic from the MAC address of the HDHomeRun and DVR (best), IP address of the HDHomeRun and DVR (good, but make sure if you're using DHCP to reserve the IPs, or from source port 65001/udp (fine, but will only work for discovery but not UDP/RTP streaming in something like MythTV). I've never used firewalld because, eww, Redhat, but just from a few minutes looking at the Googles it looks like it should be simple to define a new zone for HDHomeRun sources (devices/DVR) and then set that zone to allow all incoming while leaving the rest of your firewall in place.

mrfreeze1963
Posts: 11
Joined: Thu Nov 15, 2018 8:18 am

Re: Kodi 17.6 and HDHomerun Add-on Problem

Post by mrfreeze1963 »

@jasonl,

That's what I did - I created a separate zone and started from scratch to figure what Kodi needed from Fedora. That's how I figured out the ports and settings. Anything that wasn't declared was implicitly denied. The problem left over is the initial search for UPnP/SSDP-enabled devices. The article that @NedS found seems to indicate that setting a static UDP port (outbound) would work for those that have the Kodi tarball. However, I just now gained from free time to see if there's some way of making the same change in the version I got from RPMFusion's repos.

In the meantime, there's one other thing I've learned since I last touched my Kodi setup - Internet outages stink. If your home network has an outage, and you launch the add-on from Kodi, the add-on will stall and not work. Be sure to have a non Internet-dependent backup solution, like VLC for Linux handy.

mrfreeze1963
Posts: 11
Joined: Thu Nov 15, 2018 8:18 am

Re: Kodi 17.6 and HDHomerun Add-on Problem

Post by mrfreeze1963 »

@NedS

I just had some downtime to play with my Kodi PC. I downloaded the tarball from GitHub and made the change to the hdhr/discovery.py file (the line containing s.bind(....)). Once that's done, I created an archive (.zip) of the entire directory structure and saved the archive so that I could access it within Kodi. I uploaded into Kodi via the "Install from zip" option, and it uploaded beautifully.

The port number I chose for the Python file - I set both the source port and destination port on firewall-cmd to ensure the HDHR discovery traffic wasn't blocked:

sudo firewall-cmd --permanent --zone=public --add-port=<port_of_choice>/udp
sudo firewall-cmd --permanent --zone=public --add-source-port=<port_of_choice>/udp
sudo firewall-cmd --permanent --zone=public --remove-port=40000-62000/udp
sudo firewall-cmd --reload


I launched the modified add-on and, I became a happy man. I had full access to all of my shows and movies in my DVR. I did make sure that the Kodi notifies me of add-on updates before installing, just in case my setting gets overwritten. @NedS thank you for giving me a backup way to access my HDHR setup, in case my Shield breaks. 8-)

Post Reply