通过 miot-spec 自动集成所有小米设备到 HomeAssistant,支持 Wi-Fi、BLE、ZigBee 设备。
通过 miot-spec 自动集成所有小米设备到 HomeAssistant,支持 Wi-Fi、BLE、ZigBee 设备。
English | 简体中文
MIoT-Spec: The protocol specification for Xiaomi IoT devices, is a standard designed by the Xiaomi IoT platform to describe the function definition of hardware products according to the networking mode of hardware products, the characteristics of product functions, the characteristics of user usage scenarios and the user's requirements for hardware product use experience specification.
This component uses the miot protocol to automatically integrate Xiaomi devices into HomeAssistant, and currently supports most Xiaomi IoT devices. And it supports HA Web UI, and you can easily integrate Xiaomi devices into HA without configuring yaml.
HACS > Integrations > ➕ EXPLORE & DOWNLOAD REPOSITORIES >
Xiaomi Miot> DOWNLOAD THIS REPOSITORY
HACS > Integrations >
Xiaomi Miot> UPDATE / Redownload
Download and copy
custom_components/xiaomi_miotfolder tocustom_componentsfolder in your HomeAssistant config folder
wget -O - https://get.hacs.vip | DOMAIN=xiaomi_miot bash -
# Or
wget -O - https://raw.githubusercontent.com/al-one/hass-xiaomi-miot/master/install.sh | ARCHIVE_TAG=latest bash -
configuration.yamlshell_command:
update_xiaomi_miot: |-
wget -O - https://get.hacs.vip | DOMAIN=xiaomi_miot bash -
service: shell_command.update_xiaomi_miot in Developer Tools⚙️ Configuration > Devices and Services > Integrations > ➕ Add Integration > Search
Xiaomi Miot
Starting from the v0.4.4 version, the component has added support for selecting the connection device mode when integrated by account:
Note: For Local mode, some devices require Home Assistant to be on the same subnet/VLAN. They will not respond to requests from a different subnet. A workaround is to NAT your Home Assistant IP to the device's subnet.
Suitable for devices support miot-spec protocol in LAN
Config Xiaomi cloud for the devices integrated by host/token
# configuration.yaml
xiaomi_miot:
username: xiaomi_username
password: xiaomi_password
# server_country: cn # Location of xiaomi cloud: cn(default), de, i2, ru, sg, tw, us
# http_timeout: 15 # Timeout (seconds) for requesting the xiaomi apis
⚙️ Configuration > Devices and Services > Integrations > Xiaomi Miot > Options > ☑️ Enable miot cloud
Looking forward to your contribution.
# configuration.yaml
xiaomi_miot:
language: zh # Using the built-in dictionary, currently only `zh` is supported
# https://github.com/al-one/hass-xiaomi-miot/blob/master/custom_components/xiaomi_miot/core/translation_languages.py
translations:
# Global dictionary
idle: '空闲'
busy: '工作中'
# Dictionary for specifying fan modes
fan.mode:
straight wind: '直吹模式'
natural wind: '自然风'
# Dictionary for specifying the drying modes of the washer
washer.drying_level:
moist: '微湿'
extra: '特干'
…
Too many entity attributes will make your HA's database very large. If some entity attributes are useless to you, you can configure
exclude_state_attributesto ignore them.
# configuration.yaml
xiaomi_miot:
exclude_state_attributes:
- miot_type
- stream_address
- motion_video_latest
This component has added support for configuration reloading (to avoid having to restart HomeAssistant instance after a YAML configuration change):
Developer tools > YAML Configuration > YAML configuration reloading > Look for
Xiaomi Miot(almost at the bottom of the list)
This component uses the polling method to obtain the device state, so it cannot listen the events of some devices in real time.
Since the HA support service response has been for some time, this component no longer triggers events starting from v0.7.18.
xiaomi_miot.set_propertyservice: xiaomi_miot.set_property
data:
entity_id: camera.isa_hlc7_xxxx
field: camera_c
暂无开放 Issues,或尚未同步最近议题。