Using Bluetooth with Home Assistant Container

Поделиться
HTML-код
  • Опубликовано: 31 май 2024
  • Setting up the new Bluetooth Home Assistant integration on Home Assistant Container. I show you how to map the DBus socket, install BlueZ and solve a couple of problems I ran into.
    Links:
    Upgrading BlueZ on Linux: www.homeautomationguy.io/home...
    Automatically turn on Bluetooth after container restart: www.homeautomationguy.io/home...
    Home Assistant Bluetooth integration: www.home-assistant.io/integra...
    My Docker Compose Playlist: • Why I Use Docker for m...
    Chapters:
    00:00 - Intro
    01:12 - Choosing a USB Bluetooth Adaptor for Home Assistant
    01:42 - Setting up Docker Compose for Bluetooth
    02:27 - Installing BlueZ on Linux
    02:56 - Adding the Home Assistant Bluetooth integration
    03:25 - Solving the problem: Invalid Arguments in Method Call
    04:08 - Solving the problem: Bluetooth Resource Not Ready
    04:58 - Don't forget to Subscribe!
  • ХоббиХобби

Комментарии • 79

  • @HomeAutomationGuy
    @HomeAutomationGuy  Год назад +3

    If you run into an error "Failed to start Bluetooth: [org.bluez.Error.NotReady] Resource Not Ready"
    Check out this blog post on how to fix it: www.homeautomationguy.io/home-assistant-tips/failed-to-start-bluetooth-org-bluez-error-notready-resource-not-ready/

    •  6 месяцев назад

      Thanks man, you helped me a lot! A donation is on the way :) Just maybe can you make a tutorial on how to fix the bluethooth issue on the latest Ubuntu 23.10 version? Seems like there's a kernel issue and the only manual fix is to patch it. Trying to figure it out myself at. But the dbus forwarding does not work.
      Throwing this error atm : hci0 (E4:5F:01:F1:81:71): Failed to start Bluetooth: [org.freedesktop.DBus.Error.ServiceUnknown] The name org.bluez was not provided by any .service files

  • @philipprau3937
    @philipprau3937 Год назад +2

    I am on a Mac mini with integrated Bluetooth, mapped the dbus as you described and installed bluez (first try and directly installed 5.64). Homeassistant configuration worked fine. 2min of work, thanks!!

  • @antinmatkassa1982
    @antinmatkassa1982 Год назад

    Solid tutorial and a spot on solution to get BT seen by the HA container - thanks Alan! Next - how to read the Ruuvitag BLE sensors.

  • @drwhowhogrub3908
    @drwhowhogrub3908 Год назад

    Hi, been loving your videos, this just worked right away with Integrated Bluetooth.
    Thanks for all your advice

  • @darrenoshaughnessy3921
    @darrenoshaughnessy3921 4 месяца назад

    Thank you! I had the exact same experience - searching tech blogs for why my seemingly correctly installed Bluetooth adaptor wasn't working - to no avail. Turning the Bluetooth service ON from within the container did the trick. 😃

  • @smartassist9700
    @smartassist9700 Год назад

    God Bless my new friend. I look forward to learning from you. Offline I can teach you “tons” of different related material.

  • @darrrkmanxxx
    @darrrkmanxxx Год назад

    Awesome video man! I did it before your guide and run into exact same issues on my Raspberry Pi 4. Btw, didn't we all have the same error message on the Printer integration when its off:) Cheers to that!

  • @PaulRichards1
    @PaulRichards1 Год назад +2

    Do you know if the process would be similar if I'm running HA in a container on a Synology NAS?

  • @Random-ch9my
    @Random-ch9my Год назад

    Thanks for the excellent tutorial!
    Have you faced any issues when you can see the added bluetooth device to the docker container, but you are unable to add it as integration?
    I used the HA container shell to lookup the device and using hciconfig and hcitool and the device is visible there, along with the correct MAC address. Frmo the HA GUI, trying to add the Bluetooth integration spits out the "No unconfigured Bluetooth adapters found. There are 0 ignored adapters." error message

  • @lucifer123ag
    @lucifer123ag Год назад

    Thanks! This was very useful!

  • @B-a_s-H
    @B-a_s-H Год назад +1

    Had no problems setting up BT on my Rpi4 hass container. After mapping DBus it (hass) immediately detected my devices. Using it primarily now with the SwitchBot bot's and doorsensors atm but planning to get some curtains in the future too.

  • @ericbastaastrophotography73
    @ericbastaastrophotography73 Год назад

    If you can - can you find a way to install home assistant on mac docker desktop with a work around for lack of network=host on docker desktop?

  • @ictstelucjam3604
    @ictstelucjam3604 Год назад

    Great Alan! Thanks for the video.. I just startet again with HA / Docker on a OdroidM1. I have a question, I have a little LCD screen on my Odroid, Now its constantly jellying about , Bluetooth unknown advertisements. Any idea how to get rid of these messages? A form of " Be Quit" :-)

  • @rasbe6863
    @rasbe6863 Год назад

    Great video man. I wish it was going to be that easy to get Bluetooth working in unraid home assistant core. Maybe I can adapt what you did to get it to work for us

    • @HomeAutomationGuy
      @HomeAutomationGuy  Год назад

      All the best! I am sure a lot of the steps will be similar, but you might need to map the adaptor through slightly differently.

  • @PAPUMONTY
    @PAPUMONTY Год назад

    How many devices can you connect with Asus BT400 at a time? Is Asus BT500 better than BT400? What if you reach the limit and want to add more devices. I run Home Assistant OS on an Intel-based computer. Your reply shall be appreciated. Thanks.

  • @Kai-vq6xf
    @Kai-vq6xf Год назад

    Will this work on HA on VM using Proxmox server install on an intel NUC?

  • @97Giorgos97
    @97Giorgos97 4 месяца назад

    All I needed for raspberry pi 4 was the dbus line in docker-compose! Works now!

    • @HomeAutomationGuy
      @HomeAutomationGuy  4 месяца назад +1

      Glad you got it working!

    • @97Giorgos97
      @97Giorgos97 4 месяца назад

      @@HomeAutomationGuy Thanks again! It was that simple yet was bugging me for a while 😅

  • @flyingcows1007
    @flyingcows1007 Год назад +1

    Can you do a video on how to create a custom service on Docker Container and then use that service in the HA UI? Or a video on how to use a curl request as an Action in an automation?

  • @smartassist9700
    @smartassist9700 Год назад

    Bluetooth frequencies……. Are they strong enough to reach through walls to other rooms? Or do you have a PI in each room to gather WiFi signals and send them to home assistant server?
    New Subscriber! Alton. New tinkerer. Lol
    Sir Paul Hibbert sent me over! Glad he did. (I love Paul’s humor and knowledge).
    You are the 4th Brit from across the pond I subscribe to!

    • @HomeAutomationGuy
      @HomeAutomationGuy  Год назад +1

      Welcome to the channel! My production qualities are far lower than Paul's, and he's far funnier than I am, but I'm trying my best here!
      Bluetooth signals are strong enough to get through most normal drywall style walls for 3 or 4 meters (that's like 12 feet I think for you imperials). If you're a home assistant (Home Assistant!) user then you don't need a pi in each room, you can use a cheaper ESP thingie to spread out your WiFi receivers. I'll be making a video about it soon.

  • @benilev7328
    @benilev7328 Год назад

    Home Assistant PROXMOX Install (With NUC Alternative)i am getting the error: “Retrying setup: Failed to start Bluetooth: adapter ‘hci0’ not found” help?

  • @Teleport73
    @Teleport73 Год назад

    Thanks for this. I'm currently deciding whether to use this approach, or add Bluetooth via an ESP32 Proxy in ESPHome. I think I may go with your approach, as it'll likely be up to handling traffic more devices, should the need be later on.

    • @HomeAutomationGuy
      @HomeAutomationGuy  Год назад

      ESP proxies are pretty damn good. If you're already using ESPHome or Shelly devices elsewhere in your home then it's a no brainer to turn those on first. You won't need any extra hardware

  • @techniktreff
    @techniktreff Год назад

    Hi. I bought the same bt adapter. I'm runing HA in docker on a Synology NAS. How can I check the bluez Version on Synology? Great Videos, thx😀

  • @loganadams7547
    @loganadams7547 11 месяцев назад

    Thank you!

  • @MrSupersidewinder
    @MrSupersidewinder Год назад

    Thanks as always for taking one for the team!!! Did you connect it to any bt devices???? Which adapter did you go with?? Does it restart when rebooting???

    • @HomeAutomationGuy
      @HomeAutomationGuy  Год назад

      I've not connected any BT devices, because I don't actually have one to connect. I used the Asus BT400 adapter that's in the thumbnail.
      And it seems that I need to rerun the up command after a restart.

    • @MrSupersidewinder
      @MrSupersidewinder Год назад

      @@HomeAutomationGuy Sorry, missed it in the thumb... hope there is a way to restart the adapter after a reboot...👍😁 Lots of us are curious, keep posting when you add devices... Please...

    • @HomeAutomationGuy
      @HomeAutomationGuy  Год назад +1

      I fixed it, check out my blog post: www.homeautomationguy.io/home-assistant-tips/failed-to-start-bluetooth-org-bluez-error-notready-resource-not-ready/

  • @malakies999
    @malakies999 Год назад

    I installed HA in a VM (esxi), i have a few lights working only. I can see when i log into homeassistant:8123 there is a ha > prompt. I cant work how how to then modify the yaml file to do the dbus business.. can it it be done via the ha > prompt? After inserting a BT dongle, I could see on startup BT support OK.. and in the VM (Edit configuration) it seemed to find the USB BT dongle ok.. but thats where I am stuck. Thanks..
    Thanks to the author.. much appreciated.

  • @fredarmstrong6418
    @fredarmstrong6418 Год назад

    Thanks Alan, I look forward to trying this myself soon. I am curious to know if the bluetooth inside your container needs to be turned on again after redeploying the container - i.e. after the monthly update....

    • @HomeAutomationGuy
      @HomeAutomationGuy  Год назад

      I need to turn it on again after the container restarts, but I'm looking to automate this in my docker compose file. (I'll post a blog about it when I figure it out exactly)

    • @HomeAutomationGuy
      @HomeAutomationGuy  Год назад +1

      I fixed it, check out my blog post: www.homeautomationguy.io/home-assistant-tips/failed-to-start-bluetooth-org-bluez-error-notready-resource-not-ready/

  • @joaosousa3640
    @joaosousa3640 Год назад

    Very clear video thanks. I want to use the Bluetooth proxy of the Shelly Gen2 devices in a docker container. Did anyone tried already?

  • @MolehillTech
    @MolehillTech Год назад +1

    Great video 👍🏻 I’m really curious what the use case is for BT in home assistant, as the range is fairly limited. So it could only manage devices that are in close proximity. I have SwitchBot curtain drivers that work on Bluetooth, but because they are not close to my Hass system I needed a bridge anyway.
    Don’t get me wrong I’m sure people have really good use-cases for it, but I’m just curious!

    • @HomeAutomationGuy
      @HomeAutomationGuy  Год назад

      I'm curious too!

    • @ivlis32
      @ivlis32 Год назад +1

      I'm getting a 50ft Bluetooth range through the walls on raspberry pi zero w2. Also Bluetooth BLE5 is good for passive sensors, although I wouldn't use HA for that anyway.

    • @cjwaasdorp2478
      @cjwaasdorp2478 Год назад +1

      Some sensors use BLE to communicate directly to your phone... but monitoring via phone is annoying and less optimal than continuous monitoring with HA. E.g. the airthings wave radon monitor. There are a number of solar powered weather stations which struggle to keep up with solar when updating over wifi, but do great over BLE. Getting a sensor close to your sensor can be difficulty though, but fortunately, you can use bluetooth proxy to make a network of cheap ESP32 devices that'll effectively extend your range. Also, if you build a network of these cheap devices, you can capitalize on BLE's short range to make each of these a short range sensor and watch for your phone. Based on which device is closest to you phone/smart watch/etc. you can do micro location tracking and make home assistant build automations based on this presence detection that is specific to different rooms within your home. Lots of cool stuff that you can do in spite of, or perhaps because of, BLE's short range.

  • @markloughtonUK
    @markloughtonUK Год назад +2

    Done the dbus map but when I try to install the integration it says 'No unconfigured Bluetooth adapters found. There are 0 ignored adapters.'. I can enter the dockers terminal and use Bluetoothctl to scan for Bluetooth devices and this works so don't know why the integration throws that warning up and then doesn't install :(

    • @onterrahdgaming
      @onterrahdgaming 6 месяцев назад

      Did you find a solution to this? I have the same problem

    • @markloughtonUK
      @markloughtonUK 6 месяцев назад

      @@onterrahdgaming Yes. I had to delete the :RO from the end of the line. Worked perfectly then.

  • @jordaynerjr
    @jordaynerjr Месяц назад

    I'm using home assistant green what kind of USB hub do I need

  • @nehajain2974
    @nehajain2974 Год назад

    I have been searching for a way to connect more than one bluetooth speaker to a raspberry pi running on bullseye and play music on these connected Bluetooth speakers.
    Could you please do a tutorial on how to do this !!! 🙏

  •  Год назад

    Thanks for your sharing video. I wonder can we using build-in bluetooth on NUC and why you need to buy a new one instead of using build-in bluetooth ?

    • @HomeAutomationGuy
      @HomeAutomationGuy  Год назад

      I am sure you can, you would just need to make sure you enable the built-in Bluetooth in the NUC BIOS and then it should work much like a USB dongle. The performance and range may not be as good though.

  • @StraightBar
    @StraightBar Год назад +1

    Do you have an idea how to deal with built in BT for RPI 3B, HA is installed in container and uses Alpine-Linux?
    "bluetoothctl
    Waiting to connect to bluetoothd...dbus[135]: arguments to dbus_connection_get_object_path_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5921.
    This is normally a bug in some application using the D-Bus library.
    D-Bus not compiled with backtrace support so unable to print a backtrace"

    • @saadchaaban5007
      @saadchaaban5007 Год назад +1

      try adding
      privileged: true
      below the volumes in your compose file. it seems that this fixed that error for me today :D

    • @StraightBar
      @StraightBar Год назад

      @@saadchaaban5007 i tried, didn't help, also I have a problem with access to gpio via container node red...will do mqtt on regular node red moat likely :/

  • @benilev7328
    @benilev7328 Год назад +1

    i am getting the error: “Retrying setup: Failed to start Bluetooth: adapter ‘hci0’ not found”! i Install Home Assistant PROXMOX With NUC Alternative

  • @dwayne75
    @dwayne75 Год назад

    Pete Tong! there is a blast from the past

    • @HomeAutomationGuy
      @HomeAutomationGuy  Год назад +1

      I saw him play live two weeks ago outside of London!

    • @dwayne75
      @dwayne75 Год назад

      @@HomeAutomationGuy Nice, I saw him multiple times in the late 90s. lol

  • @custodiojustino2429
    @custodiojustino2429 Год назад

    hello, I'm looking for your videos that compare several scene buttons. can you pass me the link. your videos are exceptional

  • @tommek47
    @tommek47 9 месяцев назад

    hmmm im getting this error: DBus service not found; docker config may be missing `-v /run/dbus:/run/dbus:ro`: {ex}. Which is funny because i did add the volume for this. What i've been wondering specifically is the "{ex}" at the end of the error message, no idea what this means....

    • @markloughtonUK
      @markloughtonUK 8 месяцев назад

      Try deleting the :RO bit off the end. Thats what I had to do. So you will be mapping /run/dbus:/run/dbus

    • @tommek47
      @tommek47 8 месяцев назад +1

      @@markloughtonUK yes that did the job, forgot to update my comment :) thanks for the comment!

  • @asopok
    @asopok Год назад

    How do I pair Bluetooth devices after the integration? Using Pi4

    • @HomeAutomationGuy
      @HomeAutomationGuy  Год назад

      Check out the Home Assistant Bluetooth integration page for more info

  • @lee-he3ey
    @lee-he3ey Год назад

    installed first time with a random BT dongle from mpow. No luck in getting it to discover anything though

  • @yonigold5304
    @yonigold5304 Год назад

    Where is the docker-compose file stored??? i cant figure out where or how to access it

    • @HomeAutomationGuy
      @HomeAutomationGuy  Год назад

      You need to create it yourself. Check out my Docker video for more information: ruclips.net/video/S-itdbqwj4I/видео.html

  • @JohanLander
    @JohanLander Год назад

    I am using pax fan that is connected with Bluetooth ...

  • @Cyberbeni
    @Cyberbeni 3 месяца назад

    I need to stop and then start bluetooth.service via systemctl and then do the bluetoothctl power on after every restart. Also, you don't need to do it in the HA container, doing it outside has the same result.

  • @Felipe-ij2lu
    @Felipe-ij2lu 11 месяцев назад

    do you actually need to run the container in privileged mode?

  • @milicsantiago
    @milicsantiago Год назад

    Wow, what a nightmare!

  • @irtibatkisileri222
    @irtibatkisileri222 Год назад

    sudo apt install glib2.0 dbus-1-dbg build-essential libdbus-glib-1-dev libgirepository1.0-dev libudev-dev libical-dev libreadline-dev python-docutils
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Package dbus-1-dbg is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    However the following packages replace it:
    dbus-tests
    E: Unable to locate package glib2.0
    E: Couldn't find any package by glob 'glib2.0'
    E: Package 'dbus-1-dbg' has no installation candidate
    end back to command line

    • @irtibatkisileri222
      @irtibatkisileri222 Год назад

      before trying legacy method i went for workaround method and get above error. after installing bluez homeassistant container grab the bluetooth and integration submitted succesfully.

  • @Liam-ok7mu
    @Liam-ok7mu Год назад

    pr໐๓໐Ş๓

  • @MrFleit
    @MrFleit 6 месяцев назад

    I am not a fan of those tutorials where everything is already working and you don't show how it's done. :(

    • @HomeAutomationGuy
      @HomeAutomationGuy  6 месяцев назад

      My apologies

    • @MrFleit
      @MrFleit 6 месяцев назад

      @@HomeAutomationGuy No worries, I was just having some trouble with getting Bluetooth running and was so frustrated :D

  • @509McGavin
    @509McGavin 6 месяцев назад

    I wouldn't call connecting the blue tooth adapter "using" it. What do you do next?