HDHomerun Sensors

For anyone in this group still wanting an HACS installable version of the hdhomerun sensor, I’ve forked the one referenced earlier and made it auto-install all dependencies with a restart of HASS, rather than having to go in to do an apk install.

The new repo is here:


Gave this a shot, got this error:

Damn. Back to the drawing board then.
I wonder why my one worked with a completely fresh container then, that’s strange.

1 Like

Here’s all the version info if it helps. It’s the full Supervised version running on Debian Buster. (Officially supported)

Right - seems happier now.
Just pushed v0.1.0 with some python module imports - give it a go now?

1 Like

Just tried it again, getting this:

2021-05-09 22:41:33 ERROR (SyncWorker_9) [homeassistant.util.package] Unable to install package pyhdhomerun: ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-108aaz2h/pyhdhomerun/setup.py'"'"'; __file__='"'"'/tmp/pip-install-108aaz2h/pyhdhomerun/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-x491enmx
         cwd: /tmp/pip-install-108aaz2h/pyhdhomerun/
    Complete output (10 lines):
    ERROR:root:Could not load HDHR library from [/usr/lib/libhdhomerun.so].
    Traceback (most recent call last):
      File "/tmp/pip-install-108aaz2h/pyhdhomerun/pyhdhomerun/hdhr.py", line 16, in get_hdhr
        get_hdhr.instance = cdll.LoadLibrary(constants.HDHR_FILEPATH)
      File "/usr/local/lib/python3.8/ctypes/__init__.py", line 451, in LoadLibrary
        return self._dlltype(name)
      File "/usr/local/lib/python3.8/ctypes/__init__.py", line 373, in __init__
        self._handle = _dlopen(self._name, mode)
    OSError: Error loading shared library /usr/lib/libhdhomerun.so: No such file or directory
    Could not load HDHomeRun library: Error loading shared library /usr/lib/libhdhomerun.so: No such file or directory
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 20.2.4; however, version 21.1.1 is available.
You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.
2021-05-09 22:41:47 INFO (MainThread) [custom_components.blueiris.api.blue_iris_api] Updating data from BI Server (BlueIris)```

Also got this:

So for whatever reason, libhdhomerun isn’t being installed. I need to work out how to do an “apk add libhdhomerun” on package instantiation.


I already have it installed from my last attempt a few weeks ago, although this is on the host, maybe the Docker container OS can’t “see” it:

[email protected]:~$ sudo apt install libhdhomerun4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libhdhomerun4 is already the newest version (20180817-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

@WhimsySpoon If you’re still around, do you have a note of where you got the channel logo pack from?

I’m trying to set up something similar to what you describe above. It’s all working fine, except I’m struggling to find a decent logo pack for the entity pics/icons.

Could you let me know your source, or perhaps share your one if you can’t remember the original source?

I’m certainly still around, at least I think so!

From memory, I think I just Googled and icon pack, but had to create a PS script to modify the filenames to support lookups from the template sensor. I will download it from my HA server, zip it up and upload it somewhere friendly for you now.

Here you go. I created it a while ago, so new channels are probably missing and it’s likely Freeview specific.

This looks like a good resource too GitHub - Jasmeet181/mediaportal-uk-logos: British and Irish TV and radio logos for Mediaportal 1’s LogoManager plugin

1 Like

Thanks for that.

Some of them (especially the BBC) seem to be getting rather cropped and messed up, but I can play with that and edit things. I’m also on Freeview UK, so it covers most of what I need anyway.

I think that was my poor PS script. I was attempting to resize all in one go.

No worries. I’m going to look at tweaking the css to remove the circular mask anyway and see how that looks (both for the HDHR and everything else).

I’d love to se the code for that. I did have a bit of a play with that myself but eventually lost interest.

From what I can see with a quick test, and also based on this post I don’t think it’s possible to do.

The security measures (shadowDOM) block such changes via css overriding as far as I can see.

I’ll go back to plan A and just adjust those picons which don’t fit by editing them. Your pack covers most of the channels, and I’ve found a few others that should have the missing channels in them.

1 Like

@WhimsySpoon - asked how to do it in another thread, and now have a fully working solution will full-sized icons and no masking.

That’s brilliant, thank you! I’ll get that added to my dashboard today.

@uvjim has made an excellent custom component that works brilliantly. Avoids the need for REST sensors and Lovelace yaml for the logos.

Highly recommended - Custom Integration: HDHomeRun