nergal / homeassistant-vacuum-viomi

Integration of a Xiaomi Viomi vacuum to a Home Assistant
MIT License
54 stars 14 forks source link

Doesn't show up in integrations #16

Closed oskarax closed 2 years ago

oskarax commented 2 years ago

Hi, after hacs install it's not visible under add integration.

mateuszdrab commented 2 years ago

I think you're having the same issue as me, try: https://community.home-assistant.io/t/xiaomi-miio-not-working-since-release-2021-10-x/346401/10

It fixed it for me.

Strixx76 commented 2 years ago

It is due to dependency problems. There is a mismatch with the native Xiaomi Miio integrations dependency.

I change manifest.json to:

"requirements": [
        "construct>=2.10.56",
        "python-miio>=>=0.5.6"
    ],

Now I can add my vacuum cleaner, but I can not be shore that it works perfectly. Maybe this package actually need a never version of construct?

nergal commented 2 years ago

There are a few words about this issue in parallel thread #17. Newest v0.0.3 should work well

JulesLassara commented 2 years ago

Hello !

I'm trying to use it with my Viomi V2 (viomi.vacuum.v6) My config is that :

vacuum:
  - platform: xiaomi_viomi
    host: 192.168.1.34
    token: xxx
    name: Viomi V2

But it still doesn't work, I tried to change the requirements as said above, but nothing happen. Do you have any solution ? I'm using the v0.0.3.

If the problem is solved and if the entity is shown, then I could test all the integration !

nergal commented 2 years ago

@JulesLassara can you please share a full log of your HA instance (preferably after the reboot to reduce)? I'm interested in the list of modules that is loaded on stage 2 and possible errors during the initialization

JulesLassara commented 2 years ago

[fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] done. [services.d] starting services [services.d] done. 2022-01-18 10:15:03 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2022-01-18 10:15:03 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration xiaomi_cloud_map_extractor which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2022-01-18 10:15:03 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration tapo_control which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2022-01-18 10:15:03 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration xiaomi_viomi which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2022-01-18 10:15:07 WARNING (MainThread) [homeassistant.components.http] The 'base_url' option near /config/configuration.yaml:85 is deprecated, please remove it from your configuration 2022-01-18 10:15:08 WARNING (MainThread) [homeassistant.components.lovelace] Lovelace is running in storage mode. Define resources via user interface 2022-01-18 10:15:30 WARNING (MainThread) [homeassistant.helpers.entity] Update of camera.xiaomi_cloud_map_extractor is taking over 10 seconds 2022-01-18 10:15:40 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05 2022-01-18 10:15:50 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05 2022-01-18 10:15:55 WARNING (MainThread) [homeassistant.helpers.entity] Update of camera.xiaomi_cloud_map_extractor is taking over 10 seconds 2022-01-18 10:15:55 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05 2022-01-18 10:16:05 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05 2022-01-18 10:16:20 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05 2022-01-18 10:16:20 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: ffmpeg, hacs, usb 2022-01-18 10:16:23 ERROR (MainThread) [homeassistant.components.vacuum] The xiaomi_viomi platform for the vacuum integration does not support platform setup. Please remove it from your config. 2022-01-18 10:16:32 WARNING (MainThread) [homeassistant.setup] Setup of hacs is taking over 10 seconds. 2022-01-18 10:16:32 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05 2022-01-18 10:16:38 WARNING (MainThread) [homeassistant.helpers.entity] Update of camera.xiaomi_cloud_map_extractor is taking over 10 seconds 2022-01-18 10:16:38 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05 2022-01-18 10:16:43 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05 2022-01-18 10:16:53 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05 2022-01-18 10:17:04 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05 2022-01-18 10:17:09 WARNING (MainThread) [homeassistant.helpers.entity] Update of camera.xiaomi_cloud_map_extractor is taking over 10 seconds 2022-01-18 10:17:10 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05 2022-01-18 10:17:15 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05

I'm still a beginner with HA configuration, I hope I gave you the good logs.

nergal commented 2 years ago

@JulesLassara oh, I've found the issue, it is described in the line

2022-01-18 10:16:23 ERROR (MainThread) [homeassistant.components.vacuum] The xiaomi_viomi platform for the vacuum integration does not support platform setup. Please remove it from your config.

I need some time to dig in and elaborate on that

Strixx76 commented 2 years ago

@JulesLassara oh, I've found the issue, it is described in the line

2022-01-18 10:16:23 ERROR (MainThread) [homeassistant.components.vacuum] The xiaomi_viomi platform for the vacuum integration does not support platform setup. Please remove it from your config.

The problem is that @JulesLassara is using config.yaml to setup you custom component, but you only have code to handle config flow setups. Maybe you should adjust README.md?

JulesLassara commented 2 years ago

@JulesLassara oh, I've found the issue, it is described in the line

2022-01-18 10:16:23 ERROR (MainThread) [homeassistant.components.vacuum] The xiaomi_viomi platform for the vacuum integration does not support platform setup. Please remove it from your config.

The problem is that @JulesLassara is using config.yaml to setup you custom component, but you only have code to handle config flow setups. Maybe you should adjust README.md?

Then, do you have any idea of what I'm doing wrong ? I'm still stuck 😒

Strixx76 commented 2 years ago

I see that the installation instructions in REAMDE.md is change now. Just follow them and it should work.

Jimmyboy83 commented 2 years ago

Same issue with viomi.vacuum.v6. Configured via UI. In logs:

Error while setting up xiaomi_viomi platform for vacuum Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/xiaomi_viomi/vacuum.py", line 111, in async_setup_entry await async_setup_platform(hass, config_entry, async_add_entities) File "/config/custom_components/xiaomi_viomi/vacuum.py", line 99, in async_setup_platform viomi = ViomiVacuumIntegration(name, vacuum, config_entry, unique_id) File "/config/custom_components/xiaomi_viomi/vacuum.py", line 119, in init super().init(name, device, entry, unique_id) File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/device.py", line 71, in init self._model = entry.data[CONF_MODEL] KeyError: 'model'

Logger: miio.device Source: /usr/local/lib/python3.9/site-packages/miio/device.py:155 First occurred: January 29, 2022, 22:36:15 (1 occurrences) Last logged: January 29, 2022, 22:36:15

Found an unsupported model 'viomi.vacuum.v6' for class 'RoborockVacuum'. If this is working for you, please open an issue at https://github.com/rytilahti/python-miio/

P. S. Если Π½ΡƒΠΆΠ½Ρ‹ Π΅Ρ‰Ρ‘ ΠΊΠ°ΠΊΠΈΠ΅-Π½ΠΈΠ±ΡƒΠ΄ΡŒ Π΄Π°Π½Π½Ρ‹Π΅ ΠΌΠΎΠ³Ρƒ ΠΏΠΎΠΌΠΎΡ‡ΡŒ с этим

nergal commented 2 years ago

@JulesLassara I've made an update to support platform configuration so now the yaml in the readme works fine

@Jimmyboy83 the issue with the model key was fixed in the latest 0.0.4. As for the unsupported model message - since this package is based on top of python-miio, it is nesting python-miio's notification. In general, this is just a notification that doesn't lead to any consequences, so would be great if you can do some quick verification of features that we have here so we can be sure that v6 works fine :)