-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
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
Switchbot not working in 2022.7 Docker Container #74621
Comments
Hey there @Danielhiversen, @RenierM26, mind taking a look at this issue as it has been labeled with an integration ( switchbot documentation |
Try adding the :z label at the mounted volume: That worked for me |
@Chreece sadly that din't change anything |
Same problem here in a Home Assistant Container installation in a Rsapberry Pi. Log information from HA-Container:
I suppose that this integration is affected by the Python bluetooth changes but there is no reference in Breaking Changes of the blog about this integration being affected. |
You also need to map your dbus into your container like shown above and then it should in theory work |
@jannis3005 I had the 'connection failed' error before (unrelated to this issue) and adding the following options to container definition resolved it for me: |
This solved it also for me. Thank you. I think this should be in the integration documentation. Thank you very much. |
First, I had the @emailforos's issue. Then, I added the
|
@ljaquier, I don't have this error in my logs. Only for checking: Did you add the :z at the end of the volume mapping? |
I've tried both with and without the
|
Same issue for me. Only that I'm running HA in a VM on Proxmox 7.2-4. It was working fine before the migration to bleak. |
I updated HA to 2022.7.5 and Switchbot stop working again (after being able to work with @Chreece suggestion). The message that appears in HA log is:
I did not touch anything except to perform the update. Any idea? |
@emailforos Do you have more than one Bluetooth device (e.g. native from the system and an adapter)? I had the same issue, it seem the solution uses I am not sure why this is happening, but once I realized that was the issue, I simply removed one of the interfaces (i.e. unplugged the USB Bluetooth dongle), restarted the server, and it worked ever since. However, you could also change the code of the integration like this. I did try disabling, filtering and/or swapping the interfaces at the operating system level but that was not very fruitful for me. A more long-term fix should be handled natively to explore all available interfaces, I feel. |
Thank you for your reply. Unfortunately, I'm not a programmer and change the inside code of my HA scares me a lot. I will need a step by step manual and the answer to other issue is not for the switchbot so the steps to follow I'm not sure to be able to follow them. On the other hand, I have only one bluetooth device (no hub, directly from my raspberry pi) and nothing changed in my system before the 2022.7 breaking change in home assistant. I think that the origin of the error in this integration is clear. Unfortunately both programmers of this integration may be busy and they don't have enough time to review it. It's comprensible, they have their own jobs and HA is their hobby. |
If someone is interested. Until the official integration is solved, I'm using it with this mqtt solution: https://github.com/fphammerle/switchbot-mqtt |
Thank you for reaching out. The above are all problems with dbus configuration not specifically related to the integration. We use GitHub for tracking issues, not for providing support. If you want help with a setup, you should try our Community Forum: Configuration. If you have additional questions, feel free to join our Discord chat server. Thanks! 👍 |
D-Bus and BlueZ are required on LinuxFor Bluetooth to function on Linux systems, the D-Bus socket must be accessible to Home Assistant. The Bluetooth adapter must be accessible to D-Bus and running BlueZ >= 5.43.
|
The problem
With the Update to 2022.7 the Switchbot Integration stopped working for me. First, it gave an error related to dbus_next saying it couldn't find a file or directory. I figured, with the recent python/bluetooth changes i'd have to do something like adding '- /var/run/dbus/:/var/run/dbus/' to the volumes section inside my docker-compose file.
That made the error go away - However, now it just loads for a short moment and then just says connection failed - and there is literally nothing in the log hinting at what the Problem could be.
Bluetooth itself is working fine on the device and it is definitely powered on. Since I could not find any error related to the switchbot integration, I have no idea where to search for one and how to solve this.
What version of Home Assistant Core has the issue?
2022.7
What was the last working version of Home Assistant Core?
2022.5
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Switchbot
Link to integration documentation on our website
https://www.home-assistant.io/integrations/switchbot
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
The text was updated successfully, but these errors were encountered: