2024年11月23日星期六 下午3:56:43

[Discovery]Home Assistant New devices discovered Series:如何判断一个智能设备能否接入home assistant?(含小米设备接入ha的各种协议插件介绍)

2 年 前
#17609 引用
Xiaomi Miot Auto - mi home app


Xiaomi Miot Auto

Automatic integrate all Xiaomi devices to HomeAssistant via miot-spec, support



使用小米账号登录,通过miot云端协议获取米家相关设备,


优点:简单方便、支持控制小爱音箱、文档详细、作者工作不饱和Image

缺点:比较依赖云端、大部分设备断网不可用


项目地址:https://github.com/al-one/hass-xiaomi-miot

需要注意的是使用miot云端协议是通过调用小米服务接口获取设备信息,所以设备的及时性可能没什么保障,断网之后设备全部会失联。

实际测试本地化可用设备列表  Lan Control

Yeelight.celing21
Yeelight.celing26
Yeelight.color8





如果你想拥有更好的体验,建议使用小米网关3 + Xiaomi Miot Auto,或购买支持miio协议的设备(断网可用)

Xiaomi Gateway 3 vs Xiaomi MIoT vs Xiaomi miot auto

网关可以用插件Xiaomi Gateway 3;

局域网使用Xiaomi MIoT

Xiaomi miot auto更侧重云端控制,你集成的时候可以选择局域网试试。

xiaomi miot auto

# configuration.yaml
homeassistant:
  customize: !include customize.yaml

# 通过设备型号自定义
xiaomi_miot:
  # https://github.com/al-one/hass-xiaomi-miot/blob/master/custom_components/xiaomi_miot/core/device_customizes.py
  device_customizes:
    chuangmi.plug.212a01:
      miot_local: true
      chunk_properties: 7


或者直接用Xiaomi MIoT插件集成米家设备再桥接到homekit
0
2 年 前
#17611 引用
1
0
2 年 前
#17612 引用
1
0
2 年 前
#17741 引用
Check that your device is visible with an mDNS tool

netdisco is a standalone package that used to be used for zeroconf discovery in Home Assistant, but it has long since been replaced by the zeroconf integration.

netdisco is not used by Home Assistant to discover HomeKit devices, so if it can’t see your device the problem is more likely to be environmental than with Home Assistant itself.



pip3 install netdisco


python3 -m netdisco


Discovered devices:
homekit:
[ {'host': '192.168.17.5',
  'hostname': 'Philips-hue.local.',
  'name': 'Philips hue - xxxx',
  'port': 8080,
  'properties': {'c#': '21',
                 'ci': '2',
                 'ff': '1',
                 'id': 'AA:BB:CC:DD:EE:FF',
                 'md': 'BSB002',
                 'pv': '1.1',
                 's#': '1',
                 'sf': '0'}},



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

https://www.home-assistant.io/integrations/homekit_controller
0
1 年 前
#18882 引用
python3 -m netdisco dump



root@raspberrypi:~# python3 -m netdisco dump
Discovered devices:
Discovered 0 devices


Raw Data

Zeroconf
[]

SSDP
[<UPNPEntry http://192.168.2.106:1790/ - upnp:rootdevice>,
<UPNPEntry http://192.168.2.106:1790/ - uuid:8f7b636c-5d7d-4cce-a3c0-24d242d88122>,
<UPNPEntry http://192.168.2.106:1790/ - urn:schemas-upnp-org:device:MediaRenderer:1>,
<UPNPEntry http://192.168.2.106:1790/ - urn:schemas-upnp-org:service:AVTransport:1>,
<UPNPEntry http://192.168.2.106:1790/ - urn:schemas-upnp-org:service:ConnectionManager:1>,
<UPNPEntry http://192.168.2.106:1790/ - urn:schemas-upnp-org:service:RenderingControl:1>,
<UPNPEntry http://192.168.2.108:9999/58d3caae-dee1-4637-ae8a-f909481590fd.xml - urn:schemas-upnp-org:service:RenderingControl:1>,
<UPNPEntry http://192.168.2.108:9999/58d3caae-dee1-4637-ae8a-f909481590fd.xml - urn:schemas-upnp-org:service:AVTransport:1>,
<UPNPEntry http://192.168.2.108:9999/58d3caae-dee1-4637-ae8a-f909481590fd.xml - urn:xiaomi-com:service:Favorites:1>,
<UPNPEntry http://192.168.2.108:9999/58d3caae-dee1-4637-ae8a-f909481590fd.xml - urn:schemas-upnp-org:device:MediaRenderer:1>,
<UPNPEntry http://192.168.2.108:9999/58d3caae-dee1-4637-ae8a-f909481590fd.xml - urn:xiaomi-com:service:Playlist:1>,
<UPNPEntry http://192.168.2.108:9999/58d3caae-dee1-4637-ae8a-f909481590fd.xml - urn:schemas-tencent-com:service:QPlay:1>,
<UPNPEntry http://192.168.2.108:9999/58d3caae-dee1-4637-ae8a-f909481590fd.xml - upnp:rootdevice>,
<UPNPEntry http://192.168.2.108:9999/58d3caae-dee1-4637-ae8a-f909481590fd.xml - urn:xiaomi-com:service:Queue:1>,
<UPNPEntry http://192.168.2.108:9999/58d3caae-dee1-4637-ae8a-f909481590fd.xml - uuid:58d3caae-dee1-4637-ae8a-f909481590fd>,
<UPNPEntry http://192.168.2.108:9999/58d3caae-dee1-4637-ae8a-f909481590fd.xml - urn:schemas-upnp-org:service:ConnectionManager:1>,
<UPNPEntry http://192.168.2.1:1900/igd.xml - upnp:rootdevice>,
<UPNPEntry http://192.168.2.1:1900/igd.xml - uuid:8c15e41f-3d83-41c1-b35d-B15B85D1BD70>,
<UPNPEntry http://192.168.2.1:1900/igd.xml - urn:schemas-upnp-org:device:InternetGatewayDevice:1>,
<UPNPEntry http://192.168.2.1:1900/igd.xml - urn:schemas-upnp-org:device:WANDevice:1>,
<UPNPEntry http://192.168.2.1:1900/igd.xml - urn:schemas-upnp-org:device:WANConnectionDevice:1>,
<UPNPEntry http://192.168.2.1:1900/igd.xml - urn:schemas-upnp-org:service:Layer3Forwarding:1>,
<UPNPEntry http://192.168.2.1:1900/igd.xml - urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1>,
<UPNPEntry http://192.168.2.1:1900/igd.xml - urn:schemas-upnp-org:service:WANIPConnection:1>,
<UPNPEntry http://192.168.2.50:40000/device.xml - upnp:rootdevice>,
<UPNPEntry http://192.168.2.50:40000/device.xml - UUID:998EEEC4-5D80-4CF5-B47B-4A4DE5E6F32B>,
<UPNPEntry http://192.168.2.50:40000/device.xml - urn:home-assistant.io:device:HomeAssistant:1>,
<UPNPEntry http://192.168.2.50:40001/device.xml - upnp:rootdevice>,
<UPNPEntry http://192.168.2.50:40001/device.xml - UUID:5CFF126B-2A76-4181-B101-F128C85ED86B>,
<UPNPEntry http://192.168.2.50:40001/device.xml - urn:home-assistant.io:device:HomeAssistant:1>]






0
1 年 前
#20085 引用
1
0
1 年 前
#20156 引用
1

0
1 年 前
#20172 引用
1
0
1 年 前
#20242 引用
1
0
1 年 前
#20243 引用
1
0