syssi / xiaomi_airconditioningcompanion

Xiaomi Mi and Aqara Air Conditioning Companion integration for Home Assistant
Apache License 2.0
394 stars 93 forks source link

Frontend infinite loading and logs error #114

Closed gsotiriou closed 3 years ago

gsotiriou commented 3 years ago

With the latest code from 'dev' branch, my frontend gets stuck infinitely loading data and the logs display the following error:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 21, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 194, in handle_get_services
    descriptions = await async_get_all_descriptions(hass)
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 292, in async_get_all_descriptions
    contents = await asyncio.gather(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 257, in _load_services_file
    integration = await async_get_integration(hass, domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 466, in async_get_integration
    raise IntegrationNotFound(domain)
homeassistant.loader.IntegrationNotFound: Integration 'xiaomi_miio_airpurifier' not found.

My configuration is the following:

climate:
  - platform: xiaomi_miio_airconditioningcompanion
    name: Living room air-condition
    host: 192.168.1.168
    token: <token>
    target_sensor: sensor.temperature_158d0002271a0a
    scan_interval: 30

Home Assistant info:

arch: armv7
audio_input: null
audio_output: null
boot: true
image: homeassistant/raspberrypi3-homeassistant
ip_address: 172.30.32.1
last_version: 0.116.4
machine: raspberrypi3
port: 88
ssl: true
version: 0.116.4
version_latest: 0.116.4
wait_boot: 600
watchdog: true

Host system info:

chassis: embedded
cpe: cpe:2.3:o:home_assistant:hassos:4.15:*:production:*:*:*:rpi3:*
deployment: production
disk_free: 8.1
disk_total: 13.9
disk_used: 5.1
features:
- reboot
- shutdown
- services
- network
- hostname
- hassos
hostname: hassio
kernel: 4.19.127-v7
operating_system: HassOS 4.15
keniji commented 3 years ago

I have the same issue on my side, the homeassistant frontend keep loading and I see the same error after I enable the climate component:

2020-10-28 09:50:17 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140442675723232] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 21, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 194, in handle_get_services
    descriptions = await async_get_all_descriptions(hass)
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 292, in async_get_all_descriptions
    contents = await asyncio.gather(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 257, in _load_services_file
    integration = await async_get_integration(hass, domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 466, in async_get_integration
    raise IntegrationNotFound(domain)
homeassistant.loader.IntegrationNotFound: Integration 'xiaomi_miio_airpurifier' not found.

If I disable the climate component (by # the code), and restart homeassistant, the frontend can be loaded normally again. And the interesting thing is, if I enable the component and restart homeassistant again, the frontend is able to work until I reload the page...

My homeassistant is a docker incident and the image is up to date:

arch | x86_64
-- | --
dev | false
docker | true
hassio | false
installation_type | Home Assistant Container
os_name | Linux
os_version | 4.19.0-10-amd64
python_version | 3.8.5
timezone | Asia/Shanghai
version | 0.116.4
virtualenv | false
syssi commented 3 years ago

Please update the custom component. The issue is fixed!