2024年11月24日星期日 上午4:11:12

Home Assistant Bluetooth integration on rpi 3b+

2 年 前
#18825 引用
Bluetooth integration

Requirements

Bluetooth integration的正常运行,有以下要求:

硬件


树莓派硬件 蓝牙芯片 版本


软件

操作系统内核

与蓝牙相关的软件版本

The D-Bus socket must be accessible to Home Assistant.
The Bluetooth adapter must be accessible to D-Bus and running BlueZ >= 5.43. It is highly recommended to use BlueZ >= 5.63 as older versions have been reported to be unreliable.
The D-Bus implementation should be dbus-broker.
The host system should be running Linux kernel 5.15.62 or later.

Bluetooth integration通过D-bus和BlueZ进行通信。

ha version Requirements

Home Assistant 2022.8 or later.



Bluetooth Requirements for Linux systems

For 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. It is highly recommended to use BlueZ >= 5.63 as older versions have been reported to be unreliable.
The D-Bus implementation should be dbus-broker.
The host system should be running Linux kernel 5.15.62 or later.

ADDITIONAL REQUIREMENTS BY INSTALL METHOD
Home Assistant Operating System: Upgrade to Home Assistant OS version 9.0 or later.
Home Assistant Container: The host system must run BlueZ, and the D-Bus socket must be accessible to Home Assistant inside the container.
Home Assistant Supervised: The host system must run BlueZ, and the D-Bus socket must be accessible to Home Assistant inside the container.
Home Assistant Core: The system must run BlueZ, and the D-Bus socket must be accessible to Home Assistant.







Step 1:Update host Operation System to debian 11.5


detail:https://www.home-assistant.io/integrations/bluetooth#requirements-for-linux-systems


useful links


https://peyanski.com/xiaomi-bluetooth-home-assistant-integration/

https://peyanski.com/home-assistant-xiaomi-temperature-humidity-sensor/



0
2 年 前
#18826 引用

Software Requirement


.Server  software
Raspberry Pi 3B
└── .Debain 11 OS
    ├── Bluetooth    --> is active?
    │   ├── Bluetooth management interface 1.14 initialized
    │   │   ├── /home/homeassistant/.homeassistant/configuration.yaml
    │   │   ├── turn_light_off_lounge.yaml
    │   │   ├── turn_light_on_bedroom.yaml
    │   │   └── home-assistant_v2.db  --> /home/homeassistant/.homeassistant/home-assistant_v2.db
    │   ├── say_hello.yaml
    │   └── sensors
    │       └── react.yaml
    ├── service  -->/etc/systemd/system/[email protected]
    ├── ssh server
    ├── nginx with let’s
    ├── frp
    └── git

Make Python virtual environment + Home Assistant Core run automatically



/etc/systemd/system
0
2 年 前
#18830 引用
1
0
2 年 前
#18831 引用
Step 2:Add bluetooth integration
0
1 年 前
#20205 引用
`1
0
1 年 前
#20206 引用
1
0
1 年 前
#20207 引用
dbus

Enable and restart service on rpi


/etc/init.d/dbus start
/etc/init.d/dbus enable
/etc/init.d/avahi-daemon start
/etc/init.d/avahi-daemon enable



root@raspberrypi:~# /etc/init.d/dbus status
● dbus.service - D-Bus System Message Bus
     Loaded: loaded (/lib/systemd/system/dbus.service; static)
     Active: active (running) since Tue 2023-01-31 00:42:24 CST; 2 days ago
TriggeredBy: ● dbus.socket
       Docs: man:dbus-daemon(1)
   Main PID: 338 (dbus-daemon)
      Tasks: 1 (limit: 2200)
     Memory: 1.6M
        CPU: 47min 22.723s
     CGroup: /system.slice/dbus.service
             └─338 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only



0
9 个月 前
#28543 引用
Add bluetooth integration

output

No unconfigured Bluetooth adapters found. There are 0 ignored adapters.
0
8 个月 前
#29586 引用
添加bluetooth集成后,如果周围有支持的蓝牙设备,ha就会自动发现、并提醒你配置.
有的设备点一下提交就完事儿了,比如小米的花花草草传感器;
稍微复杂一点的,按提示输入密钥等参数即可,比如小米的蓝牙温湿度计。

没有发现蓝牙设备的原因只有两个:不支持、收不到信号(不在通信范围没电没开等)
0
8 个月 前
#29587 引用
然后你应该,在集成界面,点击添加集成,搜索xiaomi ble,点击,应该就能发现蓝牙设备了。
ps:针对小米的蓝牙设备
0