burnnat / ha-hdhomerun Goto Github PK
View Code? Open in Web Editor NEWHDHomeRun integration for Home Assistant.
License: MIT License
HDHomeRun integration for Home Assistant.
License: MIT License
I tried to install it; but ha fails to detect the addon
Continuation of #2, before falling back to raw channel from "status" call, attempt to fetch virtual channel number by using "program" and "streaminfo" APIs.
After installing this hdhomerun plugin and adding code to configuration.yaml
hdhomerun:
sensor:
- host: 192.168.1.10
Restarted entire HomeAssistant server but sensor doesn't show up. After looking at logs, this is what I saw below. Let me know if I can help in anyway. Thanks.
Logger: homeassistant.core
Source: custom_components/hdhomerun/config_flow.py:5
First occurred: 12:16:16 AM (1 occurrences)
Last logged: 12:16:16 AM
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 100, in async_init
flow = await self.async_create_flow(handler, context=context, data=data)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 504, in async_create_flow
integration.get_platform("config_flow")
File "/usr/src/homeassistant/homeassistant/loader.py", line 277, in get_platform
f"{self.pkg_path}.{platform_name}"
File "/usr/local/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/config/custom_components/hdhomerun/config_flow.py", line 5, in
from hdhr.adapter import HdhrUtility
File "/usr/local/lib/python3.7/site-packages/hdhr/adapter.py", line 13, in
from hdhr.externals import *
File "/usr/local/lib/python3.7/site-packages/hdhr/externals.py", line 5, in
import hdhr.libhdhr
File "/usr/local/lib/python3.7/site-packages/hdhr/libhdhr.py", line 14, in
library = cdll.LoadLibrary(_FILEPATH)
File "/usr/local/lib/python3.7/ctypes/init.py", line 442, in LoadLibrary
return self._dlltype(name)
File "/usr/local/lib/python3.7/ctypes/init.py", line 364, in init
self._handle = _dlopen(self._name, mode)
OSError: Error loading shared library libhdhomerun.so: No such file or directory
Attempting to load the HDHomeRun sensor causes the following traceback.
HDHR libraries are installed and can be accessed via hdhomerun_config
binary.
Not sure if there is something I'm missing…
Traceback
2020-05-09 09:56:44 ERROR (MainThread) [homeassistant.components.sensor] hdhomerun: Error on device update!
Traceback (most recent call last):
File "/home/administrator/.homeassistant/custom_components/hdhomerun/sensor.py", line 77, in async_update
self._state = self.fetch_channel()
File "/home/administrator/.homeassistant/custom_components/hdhomerun/sensor.py", line 82, in fetch_channel
return self.fetch_channel_raw()
File "/home/administrator/.homeassistant/custom_components/hdhomerun/sensor.py", line 119, in fetch_channel_raw
active = next(x for x in streaminfo if x.program == program)
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/administrator/.pyenv/versions/3.7.5/envs/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
await entity.async_device_update(warning=False)
File "/home/administrator/.pyenv/versions/3.7.5/envs/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 470, in async_device_update
await self.async_update()
RuntimeError: coroutine raised StopIteration
I think part of the issue is that .translations/ should now be translations/
On startup, I get this error in the log. I use HDHomeRun EXPAND. 4 tuners.
Model: HDHR3-4DC
Firmware: 20190621
None of the tuners in use.
BTW: Would be nice with camera style integration. Or at least a way to get the channel list.
Then I could likely do something to display it in a live webview.
The list from: http://192.168.1.178/lineup.html
Then channel numbers and names available. And I can make my own webtv views.
http://192.168.1.123:5004/auto/v2
2020-02-21 09:17:33 ERROR (MainThread) [hdhr.adapter] Could not get tuner vstatus (0).
2020-02-21 09:17:33 ERROR (MainThread) [hdhr.adapter] Could not get tuner vstatus (0).
2020-02-21 09:17:33 ERROR (MainThread) [hdhr.adapter] Could not get tuner vstatus (0).
2020-02-21 09:17:33 ERROR (MainThread) [hdhr.adapter] Could not get tuner vstatus (0).
Heho
I have the the HDHR Expand and getting the following error from HomeAssistant.
The connection to HDHR works even with command line tools.
Is there something to fix this?
HDHomeRun EXPAND
Model: HDHR5-4DC
Firmware: 20200907
Screenshot from Home-Assistant
2020-10-08 13:43:28 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.hdhomerun_tuner_1420xxxx_0 fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/config/custom_components/hdhomerun/sensor.py", line 77, in async_update
self._state = self.fetch_channel()
File "/config/custom_components/hdhomerun/sensor.py", line 82, in fetch_channel
return self.fetch_channel_raw()
File "/config/custom_components/hdhomerun/sensor.py", line 113, in fetch_channel_raw
streaminfo = self._adapter.get_tuner_streaminfo()
File "/usr/local/lib/python3.8/site-packages/hdhr/adapter.py", line 259, in get_tuner_streaminfo
unparsed = ascii_str(raw_str.value)
File "/usr/local/lib/python3.8/site-packages/hdhr/utility.py", line 7, in ascii_str
return str(value, encoding='ascii')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 860: ordinal not in range(128)
EDIT: Updated issue
since hacs/default#1978
there is a needed manifest with integration version, seem this repo hasnt one and it got removed
2020-01-04 19:20:40 DEBUG (MainThread) [custom_components.hdhomerun.sensor] Scanning network for HDHomeRun devices
2020-01-04 19:20:41 DEBUG (MainThread) [custom_components.hdhomerun.sensor] Detected 4 tuners for device: 1251E8E2
2020-01-04 19:20:41 DEBUG (MainThread) [custom_components.hdhomerun.sensor] Fetching status for tuner: 1251E8E2-1
2020-01-04 19:20:41 ERROR (MainThread) [hdhr.adapter] Could not get tuner vstatus (0).
2020-01-04 19:20:41 ERROR (MainThread) [homeassistant.components.sensor] hdhomerun: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 459, in async_device_update
await self.async_update()
File "/config/custom_components/hdhomerun/sensor.py", line 69, in async_update
(vstatus, raw_data) = self._adapter.get_tuner_vstatus()
File "/usr/local/lib/python3.7/site-packages/hdhr/adapter.py", line 191, in get_tuner_vstatus
raise Exception(message)
Exception: Could not get tuner vstatus (0).
2020-01-04 19:20:41 DEBUG (MainThread) [custom_components.hdhomerun.sensor] Fetching status for tuner: 1251E8E2-3
2020-01-04 19:20:41 ERROR (MainThread) [hdhr.adapter] Could not get tuner vstatus (0).
2020-01-04 19:20:41 ERROR (MainThread) [homeassistant.components.sensor] hdhomerun: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 459, in async_device_update
await self.async_update()
File "/config/custom_components/hdhomerun/sensor.py", line 69, in async_update
(vstatus, raw_data) = self._adapter.get_tuner_vstatus()
File "/usr/local/lib/python3.7/site-packages/hdhr/adapter.py", line 191, in get_tuner_vstatus
raise Exception(message)
Exception: Could not get tuner vstatus (0).
2020-01-04 19:20:41 DEBUG (MainThread) [custom_components.hdhomerun.sensor] Fetching status for tuner: 1251E8E2-0
2020-01-04 19:20:41 ERROR (MainThread) [hdhr.adapter] Could not get tuner vstatus (0).
2020-01-04 19:20:41 ERROR (MainThread) [homeassistant.components.sensor] hdhomerun: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 459, in async_device_update
await self.async_update()
File "/config/custom_components/hdhomerun/sensor.py", line 69, in async_update
(vstatus, raw_data) = self._adapter.get_tuner_vstatus()
File "/usr/local/lib/python3.7/site-packages/hdhr/adapter.py", line 191, in get_tuner_vstatus
raise Exception(message)
Exception: Could not get tuner vstatus (0).
2020-01-04 19:20:41 DEBUG (MainThread) [custom_components.hdhomerun.sensor] Fetching status for tuner: 1251E8E2-2
2020-01-04 19:20:41 ERROR (MainThread) [hdhr.adapter] Could not get tuner vstatus (0).
2020-01-04 19:20:41 ERROR (MainThread) [homeassistant.components.sensor] hdhomerun: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 459, in async_device_update
await self.async_update()
File "/config/custom_components/hdhomerun/sensor.py", line 69, in async_update
(vstatus, raw_data) = self._adapter.get_tuner_vstatus()
File "/usr/local/lib/python3.7/site-packages/hdhr/adapter.py", line 191, in get_tuner_vstatus
raise Exception(message)
Exception: Could not get tuner vstatus (0).
Apparently some devices don't report a model name. Sample 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
Getting the following warning that you need to add versioning to the integration in the future or HA will not load the files.
No 'version' key in the manifest file for custom integration 'hdhomerun'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'hdhomerun'
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.
Getting this warning in my logs
("The HDHomeRun (hdhomerun) integration is setting a connection_class when calling the 'register_discovery_flow()' method in its config flow. The connection class has been deprecated and will be removed in a future release of Home Assistant. If 'hdhomerun' is a custom integration, please contact the author of that integration about this warning.",)
Hello,
I have an issue with my HDHR5-4DT wich has the latest firmware 20200225 :
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, 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 47, in async_setup_entry
'sw_version': adapter.get_version(),
File "/usr/local/lib/python3.7/site-packages/hdhr/adapter.py", line 335, in get_version
raise error_for_result(result, message)
ConnectionError: Could not get firmware version (-1).
I am using the master branch via HACS on HassIO.
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.