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

Unable to discover vacuum cleaner: Xiaomi Mi Robot Vacuum Mop (aka dreame.vacuum.mc1808) #1086

Closed
StarterCraft opened this issue Jun 26, 2021 · 3 comments
Labels

Comments

@StarterCraft
Copy link
Contributor

StarterCraft commented Jun 26, 2021

Bug Information: general description
A Mi Robot Vacuum Mop (aka dreame.vacuum.mc1808) is connected to the same network as the computer running miio commands. Robot's connecting information is retrieved via this program, and the token looks legit, according to the docs of miio. Various commands fail to connect to the robot, behaving as stated in the following:

G:\Work\Code>miiocli discover
INFO:miio.miioprotocol:Sending discovery to <broadcast> with timeout of 5s..
INFO:miio.miioprotocol:Discovery done
INFO:miio.discovery:Discovering devices with mDNS for 5 seconds...
//As you can see, discovering command does not seem to discover anything

G:\Work\Code>mirobo --ip "192.168.0.110" --token <myToken>
ERROR:miio.miioprotocol:Got error when receiving: timed out
Error: No response from the device
//That's the typical response while the 'mirobo' command is executed, however,
//I have got an unusual response once, stating the following:

G:\Work\Code>mirobo --ip "192.168.0.110" --token <myToken>
Error: Unable to discover the device 192.168.0.110

According to existing info in the miio documentation, the unable to discover error is appearing pretty often, but I didn't manage to find exact instructions for fixing this error.

Version information:

  • OS: Windows 10 version 1909
  • python-miio: 0.5.6

Device information:
Model: dreame.vacuum.mc1808
Hardware version: Linux
Firmware version: 3.5.8_1096

To Reproduce:

  1. If you have the Mi Robot Vacuum Mop at your's, try to run mirobo --ip {yourIP} --token {yourToken}

Expected behavior:
I expected a standard mirobo information message, and some data about the device discovery while using miiocli discover command.

Console output:

INFO:miio.cli:Debug mode active
INFO:miio.miioprotocol:Sending discovery to <broadcast> with timeout of 5s..
INFO:miio.miioprotocol:Discovery done
INFO:miio.discovery:Discovering devices with mDNS for 5 seconds...

G:\Work\Code>mirobo --debug --ip "192.168.0.110" --token {myToken} info
INFO:miio.vacuum_cli:Debug mode active
DEBUG:miio.vacuum_cli:Read stored sequence ids: {'seq': 203, 'manual_seq': 0}
DEBUG:miio.vacuum_cli:Connecting to 192.168.0.110 with token {myToken}
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\x18\xbcy@`\xd7\x16\xda' (total 16)
        value = Container:
            length = 32
            unknown = 0
            device_id = unhexlify('18bc7940')
            ts = 2021-06-26 12:00:26
        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 18bc7940 with ts: 2021-06-26 12:00:26, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:192.168.0.110:54321 >>: {'id': 204, 'method': 'miIO.info', 'params': []}
DEBUG:miio.miioprotocol:192.168.0.110:54321 (ts: 2021-06-26 12:00:26, id: 204) << {'partner_id': '', 'id': 204, 'code': 0, 'message': 'ok', 'result': {'hw_ver': 'Linux', 'fw_ver': '3.5.8_1096', 'ap': {'ssid': 'inet', 'bssid': '1C:7E:E5:D0:89:D7', 'rssi': -49}, 'netif': {'localIp': '192.168.0.110', 'mask': '255.255.255.0', 'gw': '192.168.0.1'}, 'miio_ver': 'miio-client 3.5.8', 'model': 'dreame.vacuum.mc1808', 'mac': '7C:25:DA:55:10:35', 'token': '54726c554e42716d5a31654661374c66', 'life': 250182}}
dreame.vacuum.mc1808 v3.5.8_1096 (7C:25:DA:55:10:35) @ 192.168.0.110 - token: {myToken}
DEBUG:miio.vacuum_cli:Full response: {'ap': {'bssid': '1C:7E:E5:D0:89:D7', 'rssi': -49, 'ssid': 'inet'},
 'fw_ver': '3.5.8_1096',
 'hw_ver': 'Linux',
 'life': 250182,
 'mac': '7C:25:DA:55:10:35',
 'miio_ver': 'miio-client 3.5.8',
 'model': 'dreame.vacuum.mc1808',
 'netif': {'gw': '192.168.0.1',
           'localIp': '192.168.0.110',
           'mask': '255.255.255.0'},
 'token': '54726c554e42716d5a31654661374c66'}
DEBUG:miio.vacuum_cli:Writing {'seq': 204, 'manual_seq': 0} to C:\Users\Starter\AppData\Local\python-miio\python-miio\Cache/python-mirobo.seq```
@StarterCraft
Copy link
Contributor Author

StarterCraft commented Jun 26, 2021

While running mirobo --ip "192.168.0.110" --token {myToken} info command, the console once returned the following response, but the response was never received again:

dreame.vacuum.mc1808 v3.5.8_1096 (7C:25:DA:55:10:35) @ 192.168.0.110 - token: {myToken}

@StarterCraft
Copy link
Contributor Author

StarterCraft commented Jun 27, 2021

While using miiocli dreamevacuummiot --ip 192.168.0.110 --token {myToken}, the issue remains the same, but the command sometimes has been randomly reacting to the command properly without any obvious reason to work or not to work.

@StarterCraft
Copy link
Contributor Author

Fixed using code modification from #1066.

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