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

Xiaomi trouver lds finder doesn't work #1928

Open
Ping7123 opened this issue Apr 14, 2024 · 3 comments
Open

Xiaomi trouver lds finder doesn't work #1928

Ping7123 opened this issue Apr 14, 2024 · 3 comments
Labels

Comments

@Ping7123
Copy link

Ping7123 commented Apr 14, 2024

Describe the bug

Cant use trouver lds finder vacuum in any way.

Version information:

  • OS: Linux
  • python-miio: miiocli, version 0.6.0.dev0

Device information:
If the issue is specific to a device [Use miiocli device --ip <ip address> --token <token> info]:

command returns: miio.exceptions.DeviceException: Unable to discover the device (ip)

  • Model: dreame.vacuum.p2036
  • Hardware version: TROUVER Robot LDS Vacuum-Mop
  • Firmware version: 3.5.8_1021 (from mi home)

To Reproduce
Steps to reproduce the behavior:

  1. Use trouver lds finder with xiaomi Mi home
  2. get token and ip through cloud command
  3. try to use any command
    (device with miio-cli and vacuum in same subnet)

Expected behavior
it should clean my room, or make funny noises, but it just throws errors at me :c

Console output
miiocli device --ip (iphere) --token (token) info
returns
miio.exceptions.DeviceException: Unable to discover the device (ip)

miiocli -d dreamevacuum --ip (ip) --token (token) --model dreame.vacuum.p2036 sensors
returns

Running command sensors
DEBUG:miio.descriptorcollection:Adding descriptors from <DreameVacuum: (ip) (token: TOKEN)>
DEBUG:miio.miioprotocol:Got a response: Container: 
    data = Container: 
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container: 
        data = b'!1\x00 \x00\x00\x00\x00\x17[Y-f\x1b\xd6\xe9' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = unhexlify('175b592d')
            ts = 2024-04-14 13:15:21+00:00
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.miioprotocol:Discovered 175b592d with ts: 2024-04-14 13:15:21+00:00, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.descriptorcollection:Adding descriptors from <class 'miio.integrations.dreame.vacuum.dreamevacuum_miot.DreameVacuumStatus'>
WARNING:miio.device:'DreameVacuum' does not specify any descriptors, please considering creating a PR.

miiocli -d dreamevacuum --ip (ip) --token (token) --model dreame.vacuum.p2036 play_sound
returns

Running command play_sound
DEBUG:miio.miioprotocol:Got a response: Container: 
    data = Container: 
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container: 
        data = b'!1\x00 \x00\x00\x00\x00\x17[Y-f\x1b\xd7\xaa' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = unhexlify('175b592d')
            ts = 2024-04-14 13:18:34+00:00
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.miioprotocol:Discovered 175b592d with ts: 2024-04-14 13:18:34+00:00, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:10.0.1.2:54321 >>: {'id': 1,
 'method': 'action',
 'params': {'aiid': 2, 'did': 'call-7-2', 'in': [], 'siid': 7}}
DEBUG:miio.miioprotocol:Retrying with incremented id, retries left: 3
DEBUG:miio.miioprotocol:Got a response: Container: 
    data = Container: 
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container: 
        data = b'!1\x00 \x00\x00\x00\x00\x17[Y-f\x1b\xd7\xaf' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = unhexlify('175b592d')
            ts = 2024-04-14 13:18:39+00:00
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.miioprotocol:Discovered 175b592d with ts: 2024-04-14 13:18:39+00:00, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:10.0.1.2:54321 >>: {'id': 102,
 'method': 'action',
 'params': {'aiid': 2, 'did': 'call-7-2', 'in': [], 'siid': 7}}
DEBUG:miio.miioprotocol:Retrying with incremented id, retries left: 2
DEBUG:miio.miioprotocol:Got a response: Container: 
    data = Container: 
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container: 
        data = b'!1\x00 \x00\x00\x00\x00\x17[Y-f\x1b\xd7\xb5' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = unhexlify('175b592d')
            ts = 2024-04-14 13:18:45+00:00
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.miioprotocol:Discovered 175b592d with ts: 2024-04-14 13:18:45+00:00, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:10.0.1.2:54321 >>: {'id': 203,
 'method': 'action',
 'params': {'aiid': 2, 'did': 'call-7-2', 'in': [], 'siid': 7}}
DEBUG:miio.miioprotocol:Retrying with incremented id, retries left: 1
DEBUG:miio.miioprotocol:Got a response: Container: 
    data = Container: 
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container: 
        data = b'!1\x00 \x00\x00\x00\x00\x17[Y-f\x1b\xd7\xba' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = unhexlify('175b592d')
            ts = 2024-04-14 13:18:50+00:00
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.miioprotocol:Discovered 175b592d with ts: 2024-04-14 13:18:50+00:00, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:10.0.1.2:54321 >>: {'id': 304,
 'method': 'action',
 'params': {'aiid': 2, 'did': 'call-7-2', 'in': [], 'siid': 7}}
ERROR:miio.miioprotocol:Got error when receiving: timed out
ERROR:miio.click_common:Exception: No response from the device
Traceback (most recent call last):
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/miio/miioprotocol.py", line 200, in send
    data, addr = s.recvfrom(4096)
                 ^^^^^^^^^^^^^^^^
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/miio/miioprotocol.py", line 200, in send
    data, addr = s.recvfrom(4096)
                 ^^^^^^^^^^^^^^^^
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/miio/miioprotocol.py", line 200, in send
    data, addr = s.recvfrom(4096)
                 ^^^^^^^^^^^^^^^^
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/miio/miioprotocol.py", line 200, in send
    data, addr = s.recvfrom(4096)
                 ^^^^^^^^^^^^^^^^
TimeoutError: timed out

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

Traceback (most recent call last):
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/miio/click_common.py", line 55, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pinguin/clearbot/venv/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/miio/click_common.py", line 306, in wrap
    result = kwargs["result"] = func(*args, **kwargs)
                                ^^^^^^^^^^^^^^^^^^^^^
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/click/decorators.py", line 92, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/miio/click_common.py", line 271, in command_callback
    return miio_command.call(miio_device, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/miio/click_common.py", line 219, in call
    return method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/miio/click_common.py", line 186, in _wrap
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/miio/integrations/dreame/vacuum/dreamevacuum_miot.py", line 561, in play_sound
    return self.call_action_from_mapping("play_sound")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/miio/click_common.py", line 186, in _wrap
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/miio/miot_device.py", line 113, in call_action_from_mapping
    return self.call_action_by(action["siid"], action["aiid"], params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/miio/click_common.py", line 186, in _wrap
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/miio/miot_device.py", line 131, in call_action_by
    return self.send("action", payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/miio/device.py", line 98, in send
    return self._protocol.send(
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/miio/miioprotocol.py", line 240, in send
    return self.send(
           ^^^^^^^^^^
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/miio/miioprotocol.py", line 240, in send
    return self.send(
           ^^^^^^^^^^
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/miio/miioprotocol.py", line 240, in send
    return self.send(
           ^^^^^^^^^^
  File "/home/(username)/clearbot/venv/lib/python3.11/site-packages/miio/miioprotocol.py", line 248, in send
    raise DeviceException("No response from the device") from ex
miio.exceptions.DeviceException: No response from the device
@Ping7123 Ping7123 added the bug label Apr 14, 2024
@Ping7123 Ping7123 changed the title xIaomi trouver lds finder doesn't work Xiaomi trouver lds finder doesn't work Apr 14, 2024
@Ping7123
Copy link
Author

It was already implemented earlier, but now it is broken
#1042

@Ping7123
Copy link
Author

Ping7123 commented Apr 14, 2024

ok, when i reboot the vacuum i can use it with cli, but after few minutes it breaks again with miio.exceptions.DeviceException: No response from the device. (MI home app works normaly :/)

probably related to #1751

@Ping7123
Copy link
Author

Quickfix #550 (comment)

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

No branches or pull requests

1 participant