burnnat / ha-hdhomerun

HDHomeRun integration for Home Assistant.
MIT License
15 stars 6 forks source link

Installation for Hass.io #1

Open WhimsySpoon opened 4 years ago

WhimsySpoon commented 4 years ago

Is it possible to install this component in Hassio? I notice the requirement for the libhdhomerun4 library, however I don't know if it's possible to install this in this environment.

burnnat commented 4 years ago

Unfortunately I don't have any experience with Hassio so I can't answer definitively. It seems like it might be possible but I guess you would have to modify the base docker image somehow to include the libhdhomerun package? If you ask on the Home Assistant forums or Discord you might get a better answer than I can give.

pssc commented 4 years ago

add os.system commands in the init of the component to install ?

WhimsySpoon commented 4 years ago

Thanks for the responses. I'll raise this on the forums and see what I can do.

jlvandusen commented 4 years ago

I added the component in my hassio docker by invoking apk add libhdhomerun this installed fine... I then reboot the hassio and I get the following error:

Error while setting up platform hdhomerun
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 158, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/config/custom_components/hdhomerun/sensor.py", line 46, in async_setup_entry
    'model': adapter.get_model_str(),
  File "/usr/local/lib/python3.7/site-packages/hdhr/adapter.py", line 178, in get_model_str
    return ascii_str(result)
  File "/usr/local/lib/python3.7/site-packages/hdhr/utility.py", line 7, in ascii_str
    return str(value, encoding='ascii')
TypeError: decoding to str: need a bytes-like object, NoneType found
burnnat commented 4 years ago

@jlvandusen Thanks for the report. This looks like a separate issue (not specific to Hass.io) so I've created #4 to track it.

k-rock commented 4 years ago

I am also trying to install with hassio with the community integrations... I tried adding the library w/ libhdhomerun4.. but it seems like it didn't actually install(?).... i get the following error for the integration:

OSERROR: Error loading shared library libhdhomerun.so: No such file or directory

WhimsySpoon commented 4 years ago

@jlvandusen would you be able to provide any insight on how you invoked the apk add method?

I have Hassio running on an Ubuntu Server VM. I've tried the SSH add on in Hassio but it doesn't work

povlhp commented 4 years ago

I am running hass.io on Armbian on a standard arm64 TV box (cheaper and faster than Pi 4) with 4GB RAM and 128GB eMMC.

To install it there, I just followed the instructions (from the shell of Armbian, not a shell inside hassio). I like hassio over raw hass due to the modularity and keeping things clean and easy to move.

 $ docker exec -it homeassistant /bin/bash
bash-5.0# apk add libhdhomerun
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/aarch64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/aarch64/APKINDEX.tar.gz
(1/2) Installing libhdhomerun-libs (20161117-r1)
(2/2) Installing libhdhomerun (20161117-r1)
Executing busybox-1.30.1-r2.trigger
OK: 179 MiB in 158 packages
bash-5.0#

Then add it to configuration.yaml and reboot.

jlvandusen commented 4 years ago

Agree with @povlhp as my docker in synology requires me to re-introduce the package each time I upgrade my home assistant build... so its lost because the container is destroyed.

The command you want is su root apk add libhdhomerun

From a bash command launched against the homeassistant container.

WhimsySpoon commented 4 years ago

Thanks both. The solution by @povlhp worked.

istaducati commented 4 years ago

I am stuck, I installed the prerequisite and setup the config file and this is the error in the log preventing HASS from fully starting up.

2020-07-16 21:43:38 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: hdhomerun

Scope666 commented 4 years ago

I really like this plugin, but it's challenging to use in a Hass.io environment. I wish there was a way for the plugin to automatically do the "apk add libhdhomerun". Right now I have to do that via Portainer's command line feature every time I update HA. I tried installing it on the system itself but Hass.io doesn't seem to "see" it. (Installed via HACS)

WhimsySpoon commented 4 years ago

I'm in the same boat. I really wanted this to work, but it's just not hassio friendly. Try the solution using the rest sensors here instead:

https://community.home-assistant.io/t/hdhomerun-sensors/70054/28

Scope666 commented 4 years ago

I'm in the same boat. I really wanted this to work, but it's just not hassio friendly. Try the solution using the rest sensors here instead:

https://community.home-assistant.io/t/hdhomerun-sensors/70054/28

Thanks! going to give this a shot.