Home assistant bluetooth dongle

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

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

Comments

Describe the issue you are experiencing

I bought one of the recommended Bluetooth dongle (ZEXMTE BT-505) to use it with my homeassistant setup.

Sadly it doesn’t seem to work. The integration shows:
Retrying setup: Failed to start Bluetooth: adapter ‘hci0’ not found

What operating system image do you use?

What version of Home Assistant Operating System is installed?

Did you upgrade the Operating System.

Steps to reproduce the issue

Anything in the Supervisor logs that might be useful for us?

Anything in the Host logs that might be useful for us?

On the console of hassos I see this information about Bluetooth: # dmesg | grep -i bluetooth [ 0.374213] Bluetooth: Core ver 2.22 [ 0.374622] NET: Registered PF_BLUETOOTH protocol family [ 0.375140] Bluetooth: HCI device and connection manager initialized [ 0.375841] Bluetooth: HCI socket layer initialized [ 0.376140] Bluetooth: L2CAP socket layer initialized [ 0.377144] Bluetooth: SCO socket layer initialized [ 2.270814] usb 2-3: Product: Bluetooth 5.1 Radio [ 4.502208] Bluetooth: hci0: command 0x1001 tx timeout [ 12.886226] Bluetooth: hci0: RTL: HCI_OP_READ_LOCAL_VERSION failed (-110) # lsusb Bus 002 Device 004: ID 0bda:a725 Bus 003 Device 001: ID 1d6b:0003 Bus 002 Device 005: ID 0658:0200 Bus 001 Device 001: ID 1d6b:0001 Bus 001 Device 002: ID 0627:0001 Bus 002 Device 003: ID 1cf1:0030 Bus 002 Device 001: ID 1d6b:0002 >> Bus 002 Device 004 should be the Bluetooth dongle

System Health information

Additional information

The text was updated successfully, but these errors were encountered:

Читайте также:  Тип сетей bluetooth wi fi

Источник

Включаем блютуз в HASSOS под управлением Home Assistant.

Мы уже разбирали в данной статье как подключить по блютузу датчики температуры и влажности от компании Xiaomi. Но там способ описан специфический и подходящий только для некоторых устройств, конкретно от фирмы xiaomi.

В данной же статье я расскажу как включить блютуз и отслеживать обычные блютуз устройства, которые не имеют шифрования.

На самом деле все довольно просто и включается парой команд. Для этого в Configuration.yaml нужно добавить следующее:

device_tracker: - platform: bluetooth_tracker

Все, после этого необходимо перезапустить север зайдя в Настройки->Сервер->Перезапустить и после перезагрузки начнется сканирование блютуз устройств и записывание их в файл “known_devices.yaml” ( Если конечно же на вашем сервере имеется блютуз. В моем случае HassOS установлена на raspberry pi 4, у нее с этим нет проблем.

Выглядеть файл “known_devices.yaml” будет следующим образом после нахождения неких устройств:

oneplus_5: name: OnePlus 5 mac: BT_94:65:2D:A8:36:27 icon: picture: track: true desktop_820q8e3: name: DESKTOP-820Q8E3 mac: BT_B4:6B:FC:C3:46:56 icon: picture: track: true

В данном случае нашел несколько устройств, а именно мой смартфон и ноутбук. Как видите, здесь указано имя найденного устройства, а также его мак адрес. Эти данные нам могут послужить при добавлении данных устройств.

Например бывают устройства как телевизор Sony Bravia он может управляться в Home Assistant какраз по Bluetooth. И в этом случае нам какраз и понадобится данный способ сканирования устройств.

Источник

Home Assistant Container Part 11: Bluetooth support

You may have purchases some Xiaomi temperature and humidity sensors after reading my blog post from a while back.

Since then, Nabu Casa (the organisation behind Home Assistant) has somewhat taken over the ESPHome project and have been doing their best to incorporate the best of both worlds. One feature that’s of particular relevance is this story, is the native support for Bluetooth LE devices within HA and the addition of the Bluetooth Proxy component to ESPHome.

So from now on, you no longer need to add keys etc. for your Xiaomi BLE sensors to your ESPHome config. You can connect directly from your Home Assistant system, provided it has a bluetooth chip, or sprinkle some ESP32 (configured as BLE proxy) around.

Читайте также:  Наушники блютуз качественный звук

The ESPHome method ¶

If you already have some ESP32 around the house, maybe because you were using the method of my old blog post, this is by far the easiest solution.

In your ESP32 you probably had a section looking like this:

esp32_ble_tracker:  sensor:  # LYWSD03MMC - Advertising Type: Mi Like  - platform: xiaomi_lywsd03mmc  mac_address: "XX:XX:XX:XX:XX:XX" # Replace with MAC Address of sensor  bindkey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # Replace with bind key, use a dummy value when flashed with custom firmware  temperature:  name: "$ - Temperature"  humidity:  name: "$ - Humidity"  battery_level:  name: "$ - Battery Level" 

All of this can be removed from the ESPHome config and be replaced by:

esp32_ble_tracker:  bluetooth_proxy:  active: false # Default 

Bluetooth devices will now appear as new integrations in Home Assistant. You may need to enter the bindkey from your old ESPHome config when adding the devices to HA, so Home Assistant can decrypt the bluetooth packages.

The built-in Bluetooth method ¶

This method is useful for when the system you’re running Home Assistant on has a built-in Bluetooth chip or you’re using a Bluetooth USB dongle. If you want to use a Bluetooth dongle, make sure you check the Bluetooth Integration documentation for the list of known-working adapters.

To then get Home Assistant to recognize your Bluetooth chip/adapter, follow these steps:

  1. Install DBus-broker package sudo apt install dbus-broker
  2. Enable system service sudo systemctl enable dbus-broker.service
  3. Install BlueZ package sudo apt install bluez
  4. Forward the Dbus socket to HA container by mapping it as a volume in your docker-compose.yaml .
volumes:  - /opt/homeassistant/config:/config  - /etc/localtime:/etc/localtime:ro  - /run/dbus:/run/dbus:ro # 

Once Home Assistant has rebooted, it’ll show a new integration for your Bluetooth adapter. After adding that integration, it’ll start discovering BLE devices and showing them as discovered integrations.

New Bluetooth integration available

This update to ESPHome and Home Assistant has made it even easier to work with Bluetooth sensors.

BTHome ¶

Ideally, you’d also flash the sensors so they would communicate/advertise using the BTHome open standard.

BTHome is an open standard for broadcasting sensor data and button presses over Bluetooth LE

Home Assistant supports it out of the box, and the process for flashing your Xiaomi sensors is the same but it uses an updated Telink Flasher.

Источник

Добавляем поддержку BLE (bluetooth) устройств в Home Assistant

В последней публикации из своей трилогии я расскажу, как добавить поддержку Bluetooth устройств в умный дом на Home Assistant, а также напомню способ установки кастомных компонентов.

Translation to English is here . Также основной канал в telegram .

Первая часть заключалась в том, что я описал купленный стик:

Во второй части я описал как добавить поддержку сервисов Bluetooth в Linux, если таковой у Вас еще нет:

И вот — настало время все соединить воедино. Как я уже объяснил в прошлой статье, на сайте Home Assistant есть как минимум три интеграции, но они нам не нужны. Мы будем использовать интеграцию Passive BLE Monitor integration . Она себя зарекомендовала и множество (тысячи) пользователей установили ее себе и отметили ее на GitHub звездой.

Есть 2 способа установить эту интеграцию: а) Через HACS: писал про это тут:

б) Создаем рядом с файлом конфигурации Home Assistant папку custom_components и копируем в него интеграцию прямо с GItHub из этой папки .

Для копирования файлов на сервер очень удобно использовать ftp. Как его настроить, например, на Windows — писал тут:

1. Копируем файлы в папку или ставим из HACS (↑ описано выше ↑).

2. Далее перезагружаем HA и переходим в интеграции и набираем в поиске BLE. Если пункт №1 выполнен правильно, то найдется интеграция Passive BLE monitor

3. Выберем ее и нажмем «установить»

4. Как только установка закончится, появится менюшка. Если Bluetooth адаптер настроен верно, то мы увидим его в списке ниже(hcl0). Проверим что на нем стоит галка.

4. Я дополнительно установил галку на пункте «авто рестарт», но не уверен, что это требуется — скорее перестраховался.

5. После того, как я нажал кнопку «ок», в квартире мгновенно нашлись 4 устройства. Все устройства были от Xiaomi.

6. Нажимаем «финиш». Интеграция отображается в общем списке. Также показываются устройства и сущности.

7. Давайте нажмем на «устройства»:

8. Давайте нажмем на сущности:

Устройства заведенные в HA таким образом работают точно также как и WiFi или ZigBee устройства. За 2 недели у меня не было пока никаких проблем ни с одним из них. Не требуются никакие сопряжения устройств и прочие танцы с бубном, что я нахожу очень удобным. Всем добра!

Подпишитесь , чтобы не пропускать следующий контент.
Нажмите лайк , если интересно, так я пойму какие публикации больше нужны моей публике.
Также публикации можно найти на других площадках: Instagram , telegram ( RU , EN , DE ), Medium , LiveJournal , YouTube .

Мой блог является некоммерческим, поэтому позитивный комментарий, лайк или репост поможет публикациям выходить чаще ☺.

Источник

Оцените статью
Adblock
detector