AlexxIT / XiaomiGateway3

Home Assistant custom component for control Xiaomi Multimode Gateway (aka Gateway 3), Xiaomi Multimode Gateway 2, Aqara Hub E1 on default firmwares over LAN
https://github.com/AlexxIT/Blog
MIT License
2.48k stars 349 forks source link

Fix illuminance for Aqara Motion Sensor E1 after v4 #1322

Closed LiuYaKu closed 7 months ago

LiuYaKu commented 7 months ago

image Diagnostic logs

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2024.4.1",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.12.2",
    "docker": true,
    "arch": "aarch64",
    "timezone": "Asia/Shanghai",
    "os_name": "Linux",
    "os_version": "6.6.20-haos",
    "supervisor": "2024.03.1",
    "host_os": "Home Assistant OS 12.1",
    "docker_version": "24.0.7",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "midea_ac": {
      "version": "0.2.4",
      "requirements": [
        "msmart==0.2.4",
        "pycryptodome",
        "pycryptodomex",
        "click"
      ]
    },
    "ble_monitor": {
      "version": "12.10.4",
      "requirements": [
        "pycryptodomex>=3.18.0",
        "janus>=1.0.0",
        "aioblescan>=0.2.14",
        "btsocket>=0.2.0",
        "pyric>=0.1.6.3"
      ]
    },
    "localtuya": {
      "version": "3.2.5",
      "requirements": []
    },
    "bemfa": {
      "version": "1.4.0",
      "requirements": [
        "paho-mqtt==1.6.1"
      ]
    },
    "midea_ac_lan": {
      "version": "v0.3.22",
      "requirements": []
    },
    "xiaomi_miot_raw": {
      "version": "v1.3.1",
      "requirements": [
        "construct",
        "python-miio>=0.5.3"
      ]
    },
    "haier": {
      "version": "0.1.3",
      "requirements": []
    },
    "ds_air": {
      "version": "1.3.3",
      "requirements": []
    },
    "xiaomi_gateway3": {
      "version": "4.0.2",
      "requirements": []
    },
    "sonoff": {
      "version": "3.6.0",
      "requirements": [
        "pycryptodome>=3.6.6"
      ]
    },
    "hacs": {
      "version": "1.34.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "xiaomi_miot": {
      "version": "0.7.17",
      "requirements": [
        "construct>=2.10.68",
        "python-miio>=0.5.12",
        "micloud>=0.5"
      ]
    },
    "deebot": {
      "version": "v0.0.0",
      "requirements": [
        "deebot-client==5.1.0",
        "numpy>=1.23.2"
      ]
    }
  },
  "integration_manifest": {
    "domain": "xiaomi_gateway3",
    "name": "Xiaomi Gateway 3",
    "codeowners": [
      "@AlexxIT"
    ],
    "config_flow": true,
    "dependencies": [
      "zha"
    ],
    "documentation": "https://github.com/AlexxIT/XiaomiGateway3",
    "iot_class": "local_push",
    "issue_tracker": "https://github.com/AlexxIT/XiaomiGateway3/issues",
    "requirements": [],
    "version": "4.0.2",
    "is_built_in": false
  },
  "data": {
    "version": "98eba74",
    "options": {
      "host": "192.168.110.11",
      "token": "7758414b4934546e773866674363794c",
      "key": "r0yaM8bJnXWz6wBx",
      "stats": true,
      "debug": []
    },
    "errors": [],
    "device": {
      "available": true,
      "extra": {
        "did": "lumi.54ef441000b29fe5",
        "type": "zigbee",
        "ieee": "54:ef:44:10:00:b2:9f:e5",
        "nwk": "0xa9fd",
        "fw_ver": 10,
        "hw_ver": 0,
        "cloud_did": "704934561",
        "cloud_name": "\u53a8\u623f\u4f20\u611f\u5668e1",
        "cloud_fw": "0.0.0_0010",
        "market_brand": "Aqara",
        "market_name": "Motion Sensor E1",
        "market_model": "RTCGQ15LM",
        "nwk_parent": "0xfe19",
        "lqi": 144,
        "rssi": -64,
        "seq": 166
      },
      "last_seen": {
        "54ef445f04df": "36s"
      },
      "listeners": 5,
      "model": "lumi.motion.acn001",
      "params": {
        "motion": true,
        "battery_voltage": 2968,
        "battery": 53,
        "battery_low": false
      },
      "ttl": "2h50m",
      "uid": "0x54ef441000b29fe5",
      "last_report": {
        "motion": true
      },
      "last_report_gw": {
        "host": "192.168.110.11",
        "mac": "54:ef:44:5f:04:df",
        "name": "Xiaomi Smart Home Hub 2",
        "model": "lumi.gateway.mcn001",
        "fw_ver": "1.0.7_0021"
      },
      "last_report_ts": "36s"
    }
  }
}
AlexxIT commented 7 months ago

You need to collect debug logs

LiuYaKu commented 7 months ago

image 2024/4/6 21:33:49node: debug 1 sensor.0x54ef441000b29fe5_illuminance : msg.payload : string[7] "unknown" image

AlexxIT commented 7 months ago

Integration debug logs. For some time. Maybe 1-2 hours.

As you can see. There is no illuminance in "params" from your diagnostics.

LiuYaKu commented 7 months ago

home-assistant_xiaomi_gateway3_2024-04-06T15-41-40.550Z.log gateway3 debug logs

AlexxIT commented 7 months ago

Thanks, fixed in master version

AlexxIT commented 7 months ago

https://github.com/AlexxIT/XiaomiGateway3/releases/tag/v4.0.4