al-one / hass-xiaomi-miot

Automatic integrate all Xiaomi devices to HomeAssistant via miot-spec, support Wi-Fi, BLE, ZigBee devices. 小米米家智能家居设备接入Hass集成
https://miot-spec.com
Apache License 2.0
4.65k stars 664 forks source link

login failed, no devices, got 'auth err' after update v0.7.21 #1899

Closed MBRjun closed 2 weeks ago

MBRjun commented 4 weeks ago

all entities unavailable

some logs:

None device in xiaomi cloud: (MAIL)
Get xiaomi message for (ID) failed: {'code': 0, 'message': 'auth err'}
Got xiaomi devices for (MAIL) failed: {'code': 0, 'message': 'auth err'}
Get xiaomi scene history for (ID) (number) failed: {'code': 0, 'message': 'auth err'}

rollback to v0.7.20 can fix this problem

btw: i noticed v0.7.21 "improve login to xiaomi cloud" in 9b715d0, is this caused by this?

metricss commented 3 weeks ago

我升级到 0.7.21 后,所有的实体都变成不可用。 在「集成」中新添加新的Xiaomi Miot Auto集成,会提示:无法加载配置向导: {"message":"Invalid handler specified"}

已存在的实体,点开详情,会提示:「集成“xiaomi_miot”不再提供此实体。如果实体不再使用,可以在“设置”中删除它。」

After upgrading to version 0.7.21, all entities became unavailable. When trying to add the new Xiaomi Miot Auto integration in "Integrations," it displays the message: "Failed to load configuration wizard: {'message':'Invalid handler specified'}."

For existing entities, when you open the details, it shows the message: "The integration 'xiaomi_miot' no longer provides this entity. If the entity is no longer in use, you can delete it in 'Settings.'"

DyAxy commented 3 weeks ago
2024-10-27 16:42:35.133 ERROR (MainThread) [custom_components.xiaomi_miot.sensor] Unexpected error fetching xiaomi_miot-mihome-scene-history-*********_********* data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 271, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_miot/sensor.py", line 754, in fetch_latest_message
    res = await self.cloud.async_request_api('scene/history', data={
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_miot/core/xiaomi_cloud.py", line 213, in async_request_api
    rsp = await self.async_request_rc4_api(api, params, method, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_miot/core/xiaomi_cloud.py", line 747, in async_request_rc4_api
    session = self.api_session(**{'async': True})
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_miot/core/xiaomi_cloud.py", line 662, in api_session
    raise MiCloudException('Cannot execute request. service token or userId missing. Make sure to login.')

应该还会有个这个,禁用米家场景历史实体 解决了

metricss commented 3 weeks ago

"/config/custom_components/xiaomi_miot/core/xiaomi_cloud.py", line 662, in api_session raise MiCloudException('Cannot execute request. service token or userId missing. Make sure to login.') 应该还会有个这个,禁用米家场景历史实体 解决了

您好!可否请您帮忙讲讲“禁用米家场景历史实体”是怎么操作呀? 我理解是全删掉,然后再新增么?但我这边点击新增集成,也是报错的。

DyAxy commented 3 weeks ago

"/config/custom_components/xiaomi_miot/core/xiaomi_cloud.py", line 662, in api_session raise MiCloudException('Cannot execute request. service token or userId missing. Make sure to login.') 应该还会有个这个,禁用米家场景历史实体 解决了

您好!可否请您帮忙讲讲“禁用米家场景历史实体”是怎么操作呀? 我理解是全删掉,然后再新增么?但我这边点击新增集成,也是报错的。

在配置集成时可以勾上的

lujiashun1 commented 3 weeks ago

"/config/custom_components/xiaomi_miot/core/xiaomi_cloud.py", line 662, in api_session raise MiCloudException('Cannot execute request. service token or userId missing. Make sure to login.') 应该还会有个这个,禁用米家场景历史实体 解决了

您好!可否请您帮忙讲讲“禁用米家场景历史实体”是怎么操作呀? 我理解是全删掉,然后再新增么?但我这边点击新增集成,也是报错的。

在配置集成时可以勾上的

不行 还是提示账号下没有设备

yjwu-leadstec commented 3 weeks ago

回滚到上一个版本能暂时解决。

al-one commented 3 weeks ago

尝试master分支。

wget -O - https://get.hacs.vip | DOMAIN=xiaomi_miot ARCHIVE_TAG=master bash -
MBRjun commented 3 weeks ago

尝试master分支。

wget -O - https://get.hacs.vip | DOMAIN=xiaomi_miot ARCHIVE_TAG=master bash -

works 👍

junolym commented 3 weeks ago

尝试master分支。

wget -O - https://get.hacs.vip | DOMAIN=xiaomi_miot ARCHIVE_TAG=master bash -

👍

al-one commented 2 weeks ago

Fixed in v0.7.22