Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't try to load bluetooth component on unsupported platforms #76278

Closed
amigan opened this issue Aug 5, 2022 · 7 comments
Closed

Don't try to load bluetooth component on unsupported platforms #76278

amigan opened this issue Aug 5, 2022 · 7 comments

Comments

@amigan
Copy link
Contributor

amigan commented Aug 5, 2022

The problem

2022-08-05 02:13:21.189 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing component homeassistant.components.bluetooth
Traceback (most recent call last):
  File "/usr/home/hass/env/lib/python3.10/site-packages/homeassistant/loader.py", line 638, in get_component
    cache[self.domain] = importlib.import_module(self.pkg_path)
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/home/hass/env/lib/python3.10/site-packages/homeassistant/components/bluetooth/__init__.py", line 14, in <module>
    from bleak import BleakError
  File "/usr/home/hass/env/lib/python3.10/site-packages/bleak/__init__.py", line 81, in <module>
    raise BleakError(f"Unsupported platform: {platform.system()}")
bleak.exc.BleakError: Unsupported platform: FreeBSD
2022-08-05 02:13:21.194 ERROR (MainThread) [homeassistant.setup] Setup failed for bluetooth: Unable to import component: Exception importing homeassistant.components.bluetooth

What version of Home Assistant Core has the issue?

2022.8.1

What was the last working version of Home Assistant Core?

2022.7.7

What type of installation are you running?

Home Assistant Core

Integration causing the issue

bluetooth

Link to integration documentation on our website

https://www.home-assistant.io/integrations/bluetooth/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@probot-home-assistant
Copy link

bluetooth documentation
bluetooth source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (bluetooth) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@amigan
Copy link
Contributor Author

amigan commented Aug 5, 2022

And before it is suggested, I really don't think forcing me to stop using default_config is the answer. Nothing else in default_config has ever had a problem on FreeBSD, and I don't want to lose out on being able to use it. This is like having zwavejs or zigbee in default_config.

@frenck
Copy link
Member

frenck commented Aug 5, 2022

bleak.exc.BleakError: Unsupported platform: FreeBSD

The Home Assistant project doesn't support FreeBSD, please use a supported system.
When running into issues with an unsupported system, they are yours to solve.

../Frenck

@frenck frenck closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2022
@aliekiddo
Copy link

I have the exact same issue and setup, I am not using a Bluetooth adapter either.

@amigan
Copy link
Contributor Author

amigan commented Aug 15, 2022

@aliekiddo it seems this project does not want to entertain allowing people even to self-support on FreeBSD, unfortunately. You can work around this particular problem by removing default_config and ensuring each component (minus bluetooth) listed in https://github.com/home-assistant/core/blob/dev/homeassistant/components/default_config/manifest.json appears as a top level map node (if they do not already) in your configuration.yaml. Because of this hostility to users of home-assistant core, I have begin evaluating alternatives for my use, as I fear there will come a day when an incompatibility will be introduced that cannot be worked around on FreeBSD.

@aliekiddo
Copy link

Thanks @amigan I posted because I wanted to show some solidarity with yourself facing as I found the solution too dismissive. This has forced me to make the jump to TrueNAS Scale, which was always inevitable, as the developer of the TrueNAS Core HA plugin has stopped developing the project because of this.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants