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

rockrobo.vacuum.v1 Error: No response from the device #536

Closed
pluskal opened this issue Aug 4, 2019 · 5 comments
Closed

rockrobo.vacuum.v1 Error: No response from the device #536

pluskal opened this issue Aug 4, 2019 · 5 comments
Labels

Comments

@pluskal
Copy link

pluskal commented Aug 4, 2019

Using mirobo, I am unable to connect with the vacuum.

The token is extracted from Mi Home logs version 5.4.49, vacuum fw 3.5.0_003476

sudo mirobo --ip 192.168.1.145 --token 7866XXXX716c -d

DEBUG:miio.vacuum_cli:Connecting to 192.168.1.145 with token 7866XXXX716c
DEBUG:miio.protocol:Unable to decrypt, returning raw bytes: b''
DEBUG:miio.device: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\x02\xf2>\t]F\x80J' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = b'\x02\xf2>\t' (total 4)
            ts = 2019-08-04 06:50:50
        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.device:Discovered 02f23e09 with ts: 2019-08-04 06:50:50, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.device:192.168.1.145:54321 >>: {'id': 1, 'method': 'get_status', 'params': []}
DEBUG:miio.device:Retrying with incremented id, retries left: 3
DEBUG:miio.protocol:Unable to decrypt, returning raw bytes: b''
DEBUG:miio.device: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\x02\xf2>\t]F\x80P' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = b'\x02\xf2>\t' (total 4)
            ts = 2019-08-04 06:50:56
        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.device:Discovered 02f23e09 with ts: 2019-08-04 06:50:56, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.device:192.168.1.145:54321 >>: {'id': 102, 'method': 'get_status', 'params': []}
DEBUG:miio.device:Retrying with incremented id, retries left: 2
DEBUG:miio.protocol:Unable to decrypt, returning raw bytes: b''
DEBUG:miio.device: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\x02\xf2>\t]F\x80U' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = b'\x02\xf2>\t' (total 4)
            ts = 2019-08-04 06:51:01
        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.device:Discovered 02f23e09 with ts: 2019-08-04 06:51:01, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.device:192.168.1.145:54321 >>: {'id': 203, 'method': 'get_status', 'params': []}
DEBUG:miio.device:Retrying with incremented id, retries left: 1
DEBUG:miio.protocol:Unable to decrypt, returning raw bytes: b''
DEBUG:miio.device: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\x02\xf2>\t]F\x80Z' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = b'\x02\xf2>\t' (total 4)
            ts = 2019-08-04 06:51:06
        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.device:Discovered 02f23e09 with ts: 2019-08-04 06:51:06, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.device:192.168.1.145:54321 >>: {'id': 304, 'method': 'get_status', 'params': []}
ERROR:miio.device:Got error when receiving: timed out
DEBUG:miio.click_common:Exception: No response from the device
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/miio/device.py", line 259, in send
    data, addr = s.recvfrom(1024)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/miio/device.py", line 259, in send
    data, addr = s.recvfrom(1024)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/miio/device.py", line 259, in send
    data, addr = s.recvfrom(1024)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/miio/device.py", line 259, in send
    data, addr = s.recvfrom(1024)
socket.timeout: timed out

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

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/miio/click_common.py", line 54, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1114, in invoke
    return Command.invoke(self, ctx)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/miio/vacuum_cli.py", line 69, in cli
    ctx.invoke(status)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/miio/vacuum_cli.py", line 105, in status
    res = vac.status()
  File "/usr/local/lib/python3.7/site-packages/miio/vacuum.py", line 171, in status
    return VacuumStatus(self.send("get_status")[0])
  File "/usr/local/lib/python3.7/site-packages/miio/device.py", line 290, in send
    return self.send(command, parameters, retry_count - 1)
  File "/usr/local/lib/python3.7/site-packages/miio/device.py", line 290, in send
    return self.send(command, parameters, retry_count - 1)
  File "/usr/local/lib/python3.7/site-packages/miio/device.py", line 290, in send
    return self.send(command, parameters, retry_count - 1)
  File "/usr/local/lib/python3.7/site-packages/miio/device.py", line 293, in send
    raise DeviceException("No response from the device") from ex
miio.exceptions.DeviceException: No response from the device
Error: No response from the device

It seems to be similar to #92, but I have my vacuum on internet-facing VLAN, connected to the same WiFi as the device I am running mirobo with the same subnet.

Any ideas what I can try next to debug it?

@rytilahti
Copy link
Owner

Sorry to hear that (and for the delay), I hope you got it figured out as there has been no updates.

In case not, did you check if this applies to your case https://python-miio.readthedocs.io/en/latest/troubleshooting.html#intermittent-connection-issues-timeouts-xiaomi-vacuum ?

@pluskal
Copy link
Author

pluskal commented Aug 27, 2019

No worries, I had no time to further proceed without instructions either.

I tried tips from #92, those are the same as you point out with troubleshooting section.

I tried also a standard setup, on a local network that is connected to the internet by NAT, with no VLANs, no local routing and FW rules. so Xiaomi vacuum and mirobo app were on the same network segment and still got the same log.

From the log, it seems that the vacuum sends a response that cannot be decrypted, so I would suspect the token, but that is extracted from logs so it should be ok. I checked it multiple times.

Another thing, the token and the checksum in the logs look suspicious.

@syssi
Copy link
Collaborator

syssi commented Aug 27, 2019

Did you check or extract the token multiple times? It's possible the token has changed.

@pluskal
Copy link
Author

pluskal commented Aug 27, 2019

I did.

I'll do the factory reset of Xiaomi vacuum that resets the token, and let's see.

@pluskal
Copy link
Author

pluskal commented Sep 22, 2019

Factory reset fixed the issue.

@pluskal pluskal closed this as completed Sep 22, 2019
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

3 participants