home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.8k stars 30.5k forks source link

Sense HAT Integration Missing Depenency RTIMU In Hass.io #32692

Closed AgalmicVentures closed 4 years ago

AgalmicVentures commented 4 years ago

The problem

Sense HAT integration appears to be missing a dependency in the Hass.io default installation.

Followed the steps in the documentation (linked below) in a fresh install of Hass.io and got the backtraces (also below). It appears that the dependency RTIMU is missing.

Environment

Problem-relevant configuration.yaml

#Default from documentation
light:
  - platform: sensehat

sensor:
  - platform: sensehat
    display_options:
      - temperature
      - humidity
      - pressure

Traceback/Error logs

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config.py", line 739, in async_process_component_config
    platform = p_integration.get_platform(domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 275, 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 "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/src/homeassistant/homeassistant/components/sensehat/light.py", line 4, in <module>
    from sense_hat import SenseHat
  File "/usr/local/lib/python3.7/site-packages/sense_hat/__init__.py", line 2, in <module>
    from .sense_hat import SenseHat, SenseHat as AstroPi
  File "/usr/local/lib/python3.7/site-packages/sense_hat/sense_hat.py", line 10, in <module>
    import RTIMU  # custom version
ModuleNotFoundError: No module named 'RTIMU'

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config.py", line 739, in async_process_component_config
    platform = p_integration.get_platform(domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 275, 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 "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/src/homeassistant/homeassistant/components/sensehat/sensor.py", line 6, in <module>
    from sense_hat import SenseHat
  File "/usr/local/lib/python3.7/site-packages/sense_hat/__init__.py", line 2, in <module>
    from .sense_hat import SenseHat, SenseHat as AstroPi
  File "/usr/local/lib/python3.7/site-packages/sense_hat/sense_hat.py", line 10, in <module>
    import RTIMU  # custom version
ModuleNotFoundError: No module named 'RTIMU'

Additional information

This issue has come up in the past without a resolution for Hass.io: https://community.home-assistant.io/t/using-sensehat-with-hass-io/91544/10

A similar issue was also closed as stale: https://github.com/home-assistant/core/issues/24866

I think this requires just adding a requirement to https://github.com/home-assistant/core/blob/dev/homeassistant/components/sensehat/manifest.json but I don't have time at the moment to set up a development environment to test in.

AgalmicVentures commented 4 years ago

It may also be that no one is interested in working on this, and in that case, it seems SenseHat should be removed from the HomeAssistant documentation -- it's not actually supported in the default installation and hasn't been for over a year.

stale[bot] commented 4 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

AgalmicVentures commented 4 years ago

Sadly it looks like this issue will be closed again. This highlights the danger of not having assigned maintainers for each bit of hardware; it would be like the Linux kernel not having driver maintainers.

If truly no one is interested in supporting the SenseHat, it should be removed entirely. Leaving it in as a land mine for new users to step on only serves to undermine interest in the HomeAssistant project.

denics commented 4 years ago

Can we please open this again? I agree with @AgalmicVentures . ATM the integration does not work, it is missing a dependency in HassOS, so better add the dependency or remove the integration. Thanks

denics commented 4 years ago

@AgalmicVentures I have shared my configuration, I think that using hassio-addons-development could be the right solution.

denics commented 3 years ago

Great news! I got the lights working and I have submitted a PR with the instructions. I have now problems with the sensors, but let's see.