mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2025-08-03 13:13:30 +08:00
Compare commits
3 Commits
94583a23d1
...
v0.4.0
Author | SHA1 | Date | |
---|---|---|---|
8cbb451153 | |||
0fee02ae5c | |||
580ff87e7f |
16
CHANGELOG.md
16
CHANGELOG.md
@ -1,4 +1,20 @@
|
||||
# CHANGELOG
|
||||
## v0.4.0
|
||||
### Added
|
||||
- Add the watch as the device tracker entity. [#1189](https://github.com/XiaoMi/ha_xiaomi_home/pull/1189)
|
||||
- Add the wifi speaker and the television as the media player entity. [#706](https://github.com/XiaoMi/ha_xiaomi_home/pull/706)
|
||||
- Add an option in CONFIGURE to set the cover closed position. [#1242](https://github.com/XiaoMi/ha_xiaomi_home/pull/1242)
|
||||
- Add notifications to show the status of the local connection to the central hub gateway. [#1280](https://github.com/XiaoMi/ha_xiaomi_home/pull/1280)
|
||||
- Import the device from the third party cloud. [#1258](https://github.com/XiaoMi/ha_xiaomi_home/pull/1258)
|
||||
### Changed
|
||||
- Add an alongside switch entity for viomi.waterheater.m1. [#1255](https://github.com/XiaoMi/ha_xiaomi_home/pull/1255)
|
||||
- Do not subscribe BLE device online/offline state message. [#1264](https://github.com/XiaoMi/ha_xiaomi_home/pull/1264)
|
||||
### Fixed
|
||||
- Keep the first element of the discovered ip address list as the recently added address when getting mdns result. [#1250](https://github.com/XiaoMi/ha_xiaomi_home/pull/1250)
|
||||
- Subscribe local topics every time when connected to the central hub gateway. [#1266](https://github.com/XiaoMi/ha_xiaomi_home/pull/1266)
|
||||
- Record the "closing" and "closed" status that occur frequently in the motor-controller, the window-opener and the curtain service. [#1262](https://github.com/XiaoMi/ha_xiaomi_home/pull/1262)
|
||||
- Fix xiaomi.aircondition.c24 total power consumption unit, adp.motor.adswb4 motor switch, cgllc.airm.cgd1st environment temperature, and shhf.light.sflt11 fan switch status. [#1256](https://github.com/XiaoMi/ha_xiaomi_home/pull/1256)
|
||||
|
||||
## v0.3.4
|
||||
### Added
|
||||
- Exclude the unsupported device models. [#1205](https://github.com/XiaoMi/ha_xiaomi_home/pull/1205)
|
||||
|
@ -83,9 +83,9 @@ Xiaomi Home Integration and the affiliated cloud interface is provided by Xiaomi
|
||||
|
||||
## FAQ
|
||||
|
||||
- Does Xiaomi Home Integration support all Xiaomi Home devices?
|
||||
- Does Xiaomi Home Integration support all Xiaomi smart devices?
|
||||
|
||||
Xiaomi Home Integration currently supports most categories of Home device. Only a few categories are not supported. They are Bluetooth device, infrared device and virtual device.
|
||||
Xiaomi Home Integration currently supports most categories of the smart device. Only a few categories are not supported. They are Bluetooth device, infrared device and virtual device.
|
||||
|
||||
- Does Xiaomi Home Integration support multiple Xiaomi accounts?
|
||||
|
||||
@ -93,7 +93,7 @@ Xiaomi Home Integration and the affiliated cloud interface is provided by Xiaomi
|
||||
|
||||
- Does Xiaomi Home Integration support local control?
|
||||
|
||||
Local control is implemented by [Xiaomi Central Hub Gateway](https://www.mi.com/shop/buy/detail?product_id=15755&cfrom=search) (firmware version 3.4.0_0000 above) or Xiaomi home devices with built-in central hub gateway (software version 0.8.0 above) inside. If you do not have a Xiaomi central hub gateway or other devices having central hub gateway function, all control commands are sent through Xiaomi Cloud. The firmware for Xiaomi central hub gateway including the built-in central hub gateway supporting Home Assistant local control feature has not been released yet. Please refer to MIoT team's notification for upgrade plans.
|
||||
Local control is implemented by [Xiaomi Central Hub Gateway](https://www.mi.com/shop/buy/detail?product_id=15755&cfrom=search) (firmware version 3.3.0_0023 and above) or Xiaomi smart devices with built-in central hub gateway (software version 0.8.9 and above) inside. If you do not have a Xiaomi central hub gateway or other devices having central hub gateway function, all control commands are sent through Xiaomi Cloud. The firmware for Xiaomi central hub gateway including the built-in central hub gateway supporting Home Assistant local control feature has not been released yet. Please refer to MIoT team's notification for upgrade plans.
|
||||
|
||||
Xiaomi central hub gateway is only available in mainland China. In other regions, it is not available.
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
"cryptography",
|
||||
"psutil"
|
||||
],
|
||||
"version": "v0.3.4",
|
||||
"version": "v0.4.0",
|
||||
"zeroconf": [
|
||||
"_miot-central._tcp.local."
|
||||
]
|
||||
|
@ -99,6 +99,10 @@
|
||||
"device_list_offline": "\n**{count} Geräte offline:** \n{message}",
|
||||
"network_status_online": "Online",
|
||||
"network_status_offline": "Offline",
|
||||
"central_state_changed_title": "Verbindungsstatus des Zentral-Gateways",
|
||||
"central_state_changed": "**{nick_name}({uid}, {cloud_server})** Lokale Verbindungsstrecke des Zentral-Gateways: {conn_status}",
|
||||
"central_state_connected": "verbunden",
|
||||
"central_state_disconnected": "getrennt",
|
||||
"device_exec_error": "Fehler bei der Ausführung"
|
||||
}
|
||||
},
|
||||
|
@ -99,6 +99,10 @@
|
||||
"device_list_offline": "\n**{count} devices offline:** \n{message}",
|
||||
"network_status_online": "Online",
|
||||
"network_status_offline": "Offline",
|
||||
"central_state_changed_title": "Central Hub Gateway Connection Status",
|
||||
"central_state_changed":"**{nick_name}({uid}, {cloud_server})** local connection to Xiaomi central hub gateway: {conn_status}",
|
||||
"central_state_connected": "Connected",
|
||||
"central_state_disconnected": "Disconnected",
|
||||
"device_exec_error": "Execution error"
|
||||
}
|
||||
},
|
||||
|
@ -99,6 +99,10 @@
|
||||
"device_list_offline": "\n**{count} dispositivos sin conexión:** \n{message}",
|
||||
"network_status_online": "En línea",
|
||||
"network_status_offline": "Desconectado",
|
||||
"central_state_changed_title": "Estado de conexión de la puerta de enlace central",
|
||||
"central_state_changed": "**{nick_name}({uid}, {cloud_server})** enlace de conexión local de la puerta de enlace central: {conn_status}",
|
||||
"central_state_connected": "conectado",
|
||||
"central_state_disconnected": "desconectado",
|
||||
"device_exec_error": "Error de ejecución"
|
||||
}
|
||||
},
|
||||
|
@ -99,6 +99,10 @@
|
||||
"device_list_offline": "\n**{count} appareils hors ligne :** \n{message}",
|
||||
"network_status_online": "En ligne",
|
||||
"network_status_offline": "Hors ligne",
|
||||
"central_state_changed_title": "État de connexion de la passerelle centrale",
|
||||
"central_state_changed": "**{nick_name}({uid}, {cloud_server})** liaison de connexion locale de la passerelle centrale : {conn_status}",
|
||||
"central_state_connected": "connecté",
|
||||
"central_state_disconnected": "déconnecté",
|
||||
"device_exec_error": "Erreur d'exécution"
|
||||
}
|
||||
},
|
||||
|
@ -99,6 +99,10 @@
|
||||
"device_list_offline": "\n**{count} dispositivi offline:** \n{message}",
|
||||
"network_status_online": "Online",
|
||||
"network_status_offline": "Offline",
|
||||
"central_state_changed_title": "Stato di connessione del gateway centrale",
|
||||
"central_state_changed": "**{nick_name}({uid}, {cloud_server})** collegamento locale del gateway centrale: {conn_status}",
|
||||
"central_state_connected": "connesso",
|
||||
"central_state_disconnected": "disconnesso",
|
||||
"device_exec_error": "Errore di esecuzione"
|
||||
}
|
||||
},
|
||||
|
@ -99,6 +99,10 @@
|
||||
"device_list_offline": "\n**{count} デバイスがオフライン:** \n{message}",
|
||||
"network_status_online": "オンライン",
|
||||
"network_status_offline": "オフライン",
|
||||
"central_state_changed_title": "中枢ゲートウェイ接続ステータス",
|
||||
"central_state_changed": "**{nick_name}({uid}, {cloud_server})** 中枢ゲートウェイのローカル接続リンク: {conn_status}",
|
||||
"central_state_connected": "接続済み",
|
||||
"central_state_disconnected": "切断されました",
|
||||
"device_exec_error": "実行エラー"
|
||||
}
|
||||
},
|
||||
|
@ -99,6 +99,10 @@
|
||||
"device_list_offline": "\n**{count} apparaten offline:** \n{message}",
|
||||
"network_status_online": "Online",
|
||||
"network_status_offline": "Offline",
|
||||
"central_state_changed_title": "Verbindingsstatus van centrale gateway",
|
||||
"central_state_changed": "**{nick_name}({uid}, {cloud_server})** Lokale verbinding van centrale gateway: {conn_status}",
|
||||
"central_state_connected": "verbonden",
|
||||
"central_state_disconnected": "verbinding verbroken",
|
||||
"device_exec_error": "Uitvoeringsfout"
|
||||
}
|
||||
},
|
||||
|
@ -99,6 +99,10 @@
|
||||
"device_list_offline": "\n**{count} dispositivos offline**: \n{message}",
|
||||
"network_status_online": "online",
|
||||
"network_status_offline": "offline",
|
||||
"central_state_changed_title": "Status de conexão do gateway central",
|
||||
"central_state_changed": "**{nick_name}({uid}, {cloud_server})** conexão local do gateway central: {conn_status}",
|
||||
"central_state_connected": "conectado",
|
||||
"central_state_disconnected": "desconectado",
|
||||
"device_exec_error": "Erro na execução"
|
||||
}
|
||||
},
|
||||
|
@ -99,6 +99,10 @@
|
||||
"device_list_offline": "\n**{count} dispositivos offline**: \n{message}",
|
||||
"network_status_online": "Online",
|
||||
"network_status_offline": "Offline",
|
||||
"central_state_changed_title": "Estado da ligação do gateway central",
|
||||
"central_state_changed": "**{nick_name}({uid}, {cloud_server})** ligação local do gateway central: {conn_status}",
|
||||
"central_state_connected": "ligado",
|
||||
"central_state_disconnected": "desligado",
|
||||
"device_exec_error": "Erro de execução"
|
||||
}
|
||||
},
|
||||
|
@ -99,6 +99,10 @@
|
||||
"device_list_offline": "\n**{count} устройств недоступно:** \n{message}",
|
||||
"network_status_online": "В сети",
|
||||
"network_status_offline": "Не в сети",
|
||||
"central_state_changed_title": "Статус подключения центрального шлюза",
|
||||
"central_state_changed": "**{nick_name}({uid}, {cloud_server})** локальное подключение центрального шлюза: {conn_status}",
|
||||
"central_state_connected": "подключено",
|
||||
"central_state_disconnected": "разъединено",
|
||||
"device_exec_error": "Ошибка выполнения"
|
||||
}
|
||||
},
|
||||
|
@ -99,6 +99,10 @@
|
||||
"device_list_offline": "\n**{count} 个设备离线**: \n{message}",
|
||||
"network_status_online": "在线",
|
||||
"network_status_offline": "离线",
|
||||
"central_state_changed_title": "中枢网关连接状态",
|
||||
"central_state_changed":"**{nick_name}({uid}, {cloud_server})** 中枢网关本地连接链路: {conn_status}",
|
||||
"central_state_connected": "已连接",
|
||||
"central_state_disconnected": "断连",
|
||||
"device_exec_error": "执行错误"
|
||||
}
|
||||
},
|
||||
|
@ -99,6 +99,10 @@
|
||||
"device_list_offline": "\n**{count} 個設備離線:** \n{message}",
|
||||
"network_status_online": "在線",
|
||||
"network_status_offline": "離線",
|
||||
"central_state_changed_title": "中枢網關連接狀態",
|
||||
"central_state_changed":"**{nick_name}({uid}, {cloud_server})** 中枢網關本地連接鏈路: {conn_status}",
|
||||
"central_state_connected": "已連接",
|
||||
"central_state_disconnected": "断連",
|
||||
"device_exec_error": "執行錯誤"
|
||||
}
|
||||
},
|
||||
|
@ -1115,8 +1115,10 @@ class MIoTClient:
|
||||
_LOGGER.info('local mips state changed, %s, %s', group_id, state)
|
||||
mips = self._mips_local.get(group_id, None)
|
||||
if not mips:
|
||||
_LOGGER.error(
|
||||
_LOGGER.info(
|
||||
'local mips state changed, mips not exist, %s', group_id)
|
||||
# The connection to the central hub gateway is definitely broken.
|
||||
self.__show_central_state_changed_notify(False)
|
||||
return
|
||||
if state:
|
||||
# Connected
|
||||
@ -1150,6 +1152,7 @@ class MIoTClient:
|
||||
if sub and sub.handler:
|
||||
sub.handler(did, MIoTDeviceState.OFFLINE, sub.handler_ctx)
|
||||
self.__request_show_devices_changed_notify()
|
||||
self.__show_central_state_changed_notify(state)
|
||||
|
||||
@final
|
||||
async def __on_miot_lan_state_change(self, state: bool) -> None:
|
||||
@ -1915,6 +1918,23 @@ class MIoTClient:
|
||||
self._show_devices_changed_notify_timer = self._main_loop.call_later(
|
||||
delay_sec, self.__show_devices_changed_notify)
|
||||
|
||||
@final
|
||||
def __show_central_state_changed_notify(self, connected: bool) -> None:
|
||||
conn_status: str = (
|
||||
self._i18n.translate('miot.client.central_state_connected')
|
||||
if connected else
|
||||
self._i18n.translate('miot.client.central_state_disconnected'))
|
||||
self._persistence_notify(
|
||||
self.__gen_notify_key('central_state_changed'),
|
||||
self._i18n.translate('miot.client.central_state_changed_title'),
|
||||
self._i18n.translate(key='miot.client.central_state_changed',
|
||||
replace={
|
||||
'nick_name': self._entry_data.get(
|
||||
'nick_name', DEFAULT_NICK_NAME),
|
||||
'uid': self._uid,
|
||||
'cloud_server': self._cloud_server,
|
||||
'conn_status': conn_status
|
||||
}))
|
||||
|
||||
@staticmethod
|
||||
async def get_miot_instance_async(
|
||||
|
@ -6,6 +6,8 @@ urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-c20:1:
|
||||
unit: none
|
||||
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-c20:2: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-c20:1
|
||||
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-c24:1:
|
||||
prop.8.6:
|
||||
unit: kWh
|
||||
prop.10.6:
|
||||
unit: none
|
||||
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-c24:2: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-c24:1
|
||||
@ -26,6 +28,12 @@ urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-mt0:1:
|
||||
prop.10.6:
|
||||
unit: none
|
||||
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-mt0:2: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-mt0:1
|
||||
urn:miot-spec-v2:device:air-monitor:0000A008:cgllc-cgd1st:1:
|
||||
prop.3.7:
|
||||
value-range:
|
||||
- -30
|
||||
- 100
|
||||
- 0.1
|
||||
urn:miot-spec-v2:device:air-monitor:0000A008:cgllc-s1:1:
|
||||
prop.2.5:
|
||||
name: voc-density
|
||||
@ -153,6 +161,9 @@ urn:miot-spec-v2:device:light:0000A001:shhf-sfla10:1:
|
||||
urn:miot-spec-v2:device:light:0000A001:shhf-sfla12:1:
|
||||
prop.8.11:
|
||||
name: on-a
|
||||
urn:miot-spec-v2:device:light:0000A001:shhf-sflt11:1:0000C802:
|
||||
prop.11.14:
|
||||
name: on-power
|
||||
urn:miot-spec-v2:device:magnet-sensor:0000A016:linp-m1:1:
|
||||
prop.2.1004:
|
||||
name: contact-state
|
||||
@ -168,6 +179,9 @@ urn:miot-spec-v2:device:motion-sensor:0000A014:lumi-acn001:1:
|
||||
- read
|
||||
- notify
|
||||
unit: mV
|
||||
urn:miot-spec-v2:device:motor-controller:0000A01D:adp-adswb4:1:0000C837:
|
||||
prop.2.1:
|
||||
name: motor-switch
|
||||
urn:miot-spec-v2:device:occupancy-sensor:0000A0BF:ainice-3b:1: urn:miot-spec-v2:device:occupancy-sensor:0000A0BF:ainice-3b:2
|
||||
urn:miot-spec-v2:device:occupancy-sensor:0000A0BF:ainice-3b:2:
|
||||
prop.2.8:
|
||||
|
Reference in New Issue
Block a user