Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to start clean, Dreame Vacuum (model: dreame.vacuum.mc1808) #1854

Closed
slavaspirit opened this issue Oct 23, 2023 · 1 comment · Fixed by #1855
Closed

Failed to start clean, Dreame Vacuum (model: dreame.vacuum.mc1808) #1854

slavaspirit opened this issue Oct 23, 2023 · 1 comment · Fixed by #1855
Labels

Comments

@slavaspirit
Copy link

slavaspirit commented Oct 23, 2023

Describe the bug
Get error on miiocli dreamevacuum --ip [IP] --token [token] start. See below.

P.S.:
Any actions doesn't work. Looks like because of missed descriptors... I'm new here, so if you explain, how to find and set proper descriptions, I will try to find them :)
Command status returns empty results, but commands such fan_speed returns proper values. set_... commands also works fine.

Version information (please complete the following information):

  • OS: Ubuntu 22.04.3 LTS
  • python-miio: miiocli, version 0.6.0.dev0

Device information:

  • Model: dreame.vacuum.mc1808
  • Hardware version: Linux
  • Firmware version: 4.3.3_1122
  • Supported using: DreameVacuum

To Reproduce
Steps to reproduce the behavior:

  1. Run command miiocli dreamevacuum --ip [IP] --token [token] start

Expected behavior
Expecting cleaning start

Console output

Running command start
WARNING:miio.device:'DreameVacuum' does not specify any descriptors, please considering creating a PR.
ERROR:miio.click_common:Exception: Unable to find action 'start_clean'
Traceback (most recent call last):
  File "/home/sergeev/.local/lib/python3.11/site-packages/miio/device.py", line 336, in call_action
    act = self.actions()[name]
          ~~~~~~~~~~~~~~^^^^^^
  File "/usr/lib/python3.11/collections/__init__.py", line 1126, in __getitem__
    raise KeyError(key)
KeyError: 'start_clean'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/sergeev/.local/lib/python3.11/site-packages/miio/click_common.py", line 54, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sergeev/.local/lib/python3.11/site-packages/miio/click_common.py", line 305, in wrap
    result = kwargs["result"] = func(*args, **kwargs)
                                ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sergeev/.local/lib/python3.11/site-packages/miio/click_common.py", line 270, in command_callback
    return miio_command.call(miio_device, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sergeev/.local/lib/python3.11/site-packages/miio/click_common.py", line 218, in call
    return method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sergeev/.local/lib/python3.11/site-packages/miio/click_common.py", line 185, in _wrap
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sergeev/.local/lib/python3.11/site-packages/miio/integrations/dreame/vacuum/dreamevacuum_miot.py", line 526, in start
    return self.call_action("start_clean")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sergeev/.local/lib/python3.11/site-packages/miio/click_common.py", line 185, in _wrap
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sergeev/.local/lib/python3.11/site-packages/miio/device.py", line 338, in call_action
    raise ValueError("Unable to find action '%s'" % name)
ValueError: Unable to find action 'start_clean'
@rytilahti
Copy link
Owner

Hi, sorry, that was broken by a recent change.. The linked PR should fix the issue, I'll merge it later after adding some tests to avoid such in the future.

Btw. for miot devices like this vacuum, you can also use the generic miot integration (miiocli genericmiot) like described in https://python-miio.readthedocs.io/en/latest/#controlling-modern-miot-devices

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants