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.43k stars 341 forks source link

Can't update gateway stats #749

Closed Aliens1973 closed 1 year ago

Aliens1973 commented 2 years ago

Добрый день, постоянно получаю эту ошибку, в сутки несколько сотен. Система недавно установлена с нуля. Установка Home Assistant OS 8.0.rc3. шлюз: 1.5.0_0102

Эта ошибка возникла в кастомной интеграции.

Logger: custom_components.xiaomi_gateway3.core.gateway
Source: custom_components/xiaomi_gateway3/core/shell/__init__.py:30
Integration: Xiaomi Gateway 3 (documentation, issues)
First occurred: 10:17:27 (16 occurrences)
Last logged: 11:32:27

192.168.1.125 | Can't update gateway stats
Traceback (most recent call last):
  File "/config/custom_components/xiaomi_gateway3/core/gateway/gate_gw3.py", line 137, in gw3_update_serial_stats
    sh = await shell.connect(self.host)
  File "/config/custom_components/xiaomi_gateway3/core/shell/__init__.py", line 30, in connect
    resp: bytes = await asyncio.wait_for(coro, 3)
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.9/asyncio/streams.py", line 629, in readuntil
    raise exceptions.IncompleteReadError(chunk, None)
asyncio.exceptions.IncompleteReadError: 12 bytes read on a total of undefined expected bytes
AlexxIT commented 2 years ago

You should use english, so other users with same problem can understand you

Aliens1973 commented 2 years ago

I'm sorry, I don't speak English, I use a translator: Good afternoon, I constantly get this error, a few hundred a day. The system was recently installed from scratch. Installing Home Assistant OS 8.0.rc3. gateway: 1.5.0_0102. the bug is present in integration 2.0.1 and integration 2.1.0

This error occurred in custom integration.

Psytoshgen commented 2 years ago

got same issue after intalling "bluetooth fix" (shell_gw3.py) on 1.5.4 firmware

Logger: custom_components.xiaomi_gateway3.core.gateway
Source: custom_components/xiaomi_gateway3/core/shell/shell_gw3.py:147
Integration: Xiaomi Gateway 3 ([documentation](https://github.com/AlexxIT/XiaomiGateway3), [issues](https://github.com/AlexxIT/XiaomiGateway3/issues))
First occurred: 20:34:44 (1 occurrences)
Last logged: 20:34:44

192.168.31.3 | Can't update gateway stats
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/asyncio/streams.py", line 632, in readuntil
    await self._wait_for_data('readuntil')
  File "/usr/local/lib/python3.9/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 490, in wait_for
    return fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/xiaomi_gateway3/core/gateway/gate_gw3.py", line 137, in gw3_update_serial_stats
    sh = await session.login()
  File "/config/custom_components/xiaomi_gateway3/core/shell/__init__.py", line 43, in login
    await shell.login()
  File "/config/custom_components/xiaomi_gateway3/core/shell/shell_gw3.py", line 147, in login
    raw = await asyncio.wait_for(coro, timeout=3)
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 492, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
WarC0zes commented 2 years ago

Same error:

2022-06-12 05:36:10 WARNING (MainThread) [custom_components.xiaomi_gateway3.core.gateway] 192.168.1.xxx| Can't update gateway stats
Traceback (most recent call last):
File "/usr/local/lib/python3.9/asyncio/streams.py", line 632, in readuntil
await self._wait_for_data('readuntil')
File "/usr/local/lib/python3.9/asyncio/streams.py", line 517, in _wait_for_data
await self._waiter
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/asyncio/tasks.py", line 490, in wait_for
return fut.result()
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/xiaomi_gateway3/core/gateway/gate_gw3.py", line 137, in gw3_update_serial_stats
sh = await session.login()
File "/config/custom_components/xiaomi_gateway3/core/shell/__init__.py", line 43, in login
await shell.login()
File "/config/custom_components/xiaomi_gateway3/core/shell/shell_gw3.py", line 144, in login
raw = await asyncio.wait_for(coro, timeout=3)
File "/usr/local/lib/python3.9/asyncio/tasks.py", line 492, in wait_for
raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

LOGS:


{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2022.6.5",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.9.12",
    "docker": true,
    "arch": "aarch64",
    "timezone": "Europe/Paris",
    "os_name": "Linux",
    "os_version": "5.15.32-v8",
    "supervisor": "2022.05.3",
    "host_os": "Home Assistant OS 8.1",
    "docker_version": "20.10.14",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "spotcast": {
      "version": "v3.6.29",
      "requirements": [
        "spotify_token==1.0.0"
      ]
    },
    "multiscrape": {
      "version": "6.3.1",
      "requirements": [
        "lxml",
        "beautifulsoup4==4.10.0"
      ]
    },
    "browser_mod": {
      "version": "1.5.3",
      "requirements": []
    },
    "xiaomi_gateway3": {
      "version": "2.1.0",
      "requirements": [
        "zigpy>=0.33.0"
      ]
    },
    "xiaomi_miio_fan": {
      "version": "2022.4.0.0",
      "requirements": [
        "construct==2.10.56",
        "python-miio>=0.5.11"
      ]
    },
    "hacs": {
      "version": "1.25.5",
      "requirements": [
        "aiogithubapi>=22.2.4"
      ]
    },
    "localtuya": {
      "version": "3.2.1",
      "requirements": []
    },
    "ytube_music_player": {
      "version": "20220205.01",
      "requirements": [
        "ytmusicapi==0.19.5",
        "pytube==10.5.1",
        "integrationhelper==0.2.2"
      ]
    },
    "livebox": {
      "version": "1.7.6",
      "requirements": [
        "aiosysbus==0.2.0"
      ]
    },
    "fontawesome": {
      "version": "2.1.5",
      "requirements": []
    },
    "meross_lan": {
      "version": "2.5.7",
      "requirements": []
    },
    "myEnedis": {
      "version": "1.5.1",
      "requirements": [
        "packaging>=20.8"
      ]
    },
    "smart_thermostat": {
      "version": "2021.11.1",
      "requirements": []
    },
    "garbage_collection": {
      "version": "4.7.8",
      "requirements": [
        "python-dateutil>=2.8.2"
      ]
    },
    "alarmo": {
      "version": "v1.9.4",
      "requirements": []
    },
    "zha_toolkit": {
      "version": "v0.8.11",
      "requirements": []
    }
  },
  "integration_manifest": {
    "domain": "xiaomi_gateway3",
    "name": "Xiaomi Gateway 3",
    "config_flow": true,
    "documentation": "https://github.com/AlexxIT/XiaomiGateway3",
    "issue_tracker": "https://github.com/AlexxIT/XiaomiGateway3/issues",
    "codeowners": [
      "@AlexxIT"
    ],
    "dependencies": [
      "http"
    ],
    "requirements": [
      "zigpy>=0.33.0"
    ],
    "version": "2.1.0",
    "iot_class": "local_push",
    "is_built_in": false
  },
  "data": {
    "version": "3d126a5",
    "options": {
      "host": "***",
      "token": "***",
      "telnet_cmd": "{\"method\":\"set_ip_info\",\"params\":{\"ssid\":\"\\\"\\\"\",\"pswd\":\"123123 ; passwd -d admin ; echo enable > /sys/class/tty/tty/enable; telnetd\"}}",
      "ble": true,
      "stats": true,
      "debug": [],
      "buzzer": false,
      "memory": false,
      "zha": false
    },
    "errors": [],
    "device": {
      "type": "gateway",
      "model": "lumi.gateway.mgl03",
      "fw_ver": "1.5.0_0102",
      "available": true,
      "decode_time": 23,
      "encode_time": 60196,
      "entities": {
        "alarm": "disarmed",
        "command": {
          "state": "unknown",
          "value": null
        },
        "data": {
          "state": "unknown",
          "value": null
        },
        "cloud_link": "on",
        "led": "on",
        "gateway": "on"
      },
      "gateways": [
        "54ef44273cc1"
      ],
      "stats": {
        "bluetooth_tx": 709,
        "bluetooth_rx": 110152198,
        "bluetooth_oe": 65847,
        "zigbee_tx": 1231025,
        "zigbee_rx": 3744279,
        "zigbee_oe": 3693,
        "network_pan_id": "0xEB20",
        "radio_tx_power": 7,
        "radio_channel": 15,
        "free_mem": 3952,
        "load_avg": "2.01|2.13|2.29|4/92|26263",
        "rssi": -54,
        "uptime": "10 days, 10:15:48"
      },
      "unique_id": "54ef44273cc1"
    },
AlexxIT commented 1 year ago

Please reopen the issue if it is still relevant