al-one / Hass Xiaomi Miot
Programming Languages
Projects that are alternatives of or similar to Hass Xiaomi Miot
Xiaomi Miot For HomeAssistant
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-Spec to automatically integrate Xiaomi devices into HomeAssistant, and currently supports most Xiaomi MIoT devices. And it supports HA Web UI, and you can easily integrate Xiaomi devices into HA without configuring yaml.
Installing
Download and copy
custom_components/xiaomi_miot
folder tocustom_components
folder in your HomeAssistant config folder
wget https://github.com/al-one/hass-xiaomi-miot/archive/master.zip
unzip master.zip
cp -rf hass-xiaomi-miot-master/custom_components/xiaomi_miot ~/.homeassistant/custom_components/
rm -rf hass-xiaomi-miot-master
Or you can install component with HACS
Config
HomeAssistant GUI
⚙️ Configuration > 🧩 Integrations > ➕ Add Integration > 🔍 Search
Xiaomi Miot Auto
Configuration variables:
- host(Required): The IP of your device
- token(Required): The Token of your device
- name(Optional): The name of your device
- model(Optional): The model of device, required if config by yaml
Configuration Xiaomi Cloud:
If your device unavailable or return code -4004 or -9999 in logs, You can try this way.
# configuration.yaml
homeassistant:
customize: !include customize.yaml
xiaomi_miot:
username: xiaomi_username
password: xiaomi_password
# server_country: cn # location of xiaomi cloud: cn(default), de, i2, ru, sg, us
# customize.yaml (Configuration > Customize > Select Entity > Add Other Attribute)
camera.your_entity_id:
miot_cloud: true # Enable miot cloud for entity (read, write, action)
# miot_cloud_write: true # (Optional) Enable miot cloud (only write)
# miot_cloud_action: true # (Optional) Enable miot cloud (only action)
# miot_did: '123456789' # (Optional) Your miot device id (Get form cloud if empty)
Enabled miot cloud for device:
⚙️ Configuration > 🧩 Integrations > Xiaomi Miot Auto > Options > Enable miot cloud
Customize entity
# configuration.yaml
homeassistant:
customize: !include customize.yaml
# customize.yaml
climate.your_entity_id:
bind_sensor: sensor.temperature_entity,sensor.humidity_entity # Sensor entities
camera.your_entity_id:
video_attribute: 1 # https://github.com/al-one/hass-xiaomi-miot/issues/11#issuecomment-773054167
check_lan: true # Check LAN connection in cloud mode
doamin.your_entity_id:
chunk_properties: 10 # Chunk miot properties on update state
Recommended: Customization Using The UI
⚙️ Configuration > 🖌 Customize > 🔍 Select Entity > Add Other Attribute
Supported Devices
-
HomeAssistant Domain
-
- vacuum (Don't support clean area/point)
Debug
Get Entity State Attributes
🔨 Developer tools > ℹ️ State > 🔍 Filter Entity
Get Debug Logs
# configuration.yaml
logger:
default: warning
logs:
custom_components.xiaomi_miot: debug
Obtain miio token
- Use MiHome mod by @vevsvevs
- Down apk from СКАЧАТЬ ВЕРСИЮ 6.x.x
- Create folder
/sdcard/vevs/logs/
⚠️ - Find token from
vevs/logs/misc/devices.txt