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

Can't reach my mirobo #145

Closed
battosai30 opened this issue Dec 15, 2017 · 8 comments
Closed

Can't reach my mirobo #145

battosai30 opened this issue Dec 15, 2017 · 8 comments

Comments

@battosai30
Copy link

battosai30 commented Dec 15, 2017

Hi,

I tried everything but I can't join my mirobo. Discover seems to work as I get the right IP but mirobo return this :

root@BatServer:~# mirobo discover --handshake 1
INFO:mirobo.device:Sending discovery to <broadcast> with timeout of 5s..
INFO:mirobo.device:  IP 192.168.1.7: default - token: b'ffffffffffffffffffffffffffffffff'
root@BatServer:~# mirobo --ip 192.168.1.7 --token 55525xxxxxxxxxxxxxxxxxxxxx747a
ERROR:mirobo.vacuum_cli:Unable to read the stored msgid: [Errno 2] No such file or directory: '/tmp/python-mirobo.seq'
ERROR:mirobo.device:Got error when receiving: timed out
WARNING:mirobo.device:Retrying with incremented id, retries left: 3
ERROR:mirobo.device:Got error when receiving: timed out
WARNING:mirobo.device:Retrying with incremented id, retries left: 2
ERROR:mirobo.device:Got error when receiving: timed out
WARNING:mirobo.device:Retrying with incremented id, retries left: 1
ERROR:mirobo.device:Got error when receiving: timed out
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/mirobo/device.py", line 156, 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.5/dist-packages/mirobo/device.py", line 156, 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.5/dist-packages/mirobo/device.py", line 156, 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.5/dist-packages/mirobo/device.py", line 156, 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/bin/mirobo", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 1043, in invoke
    return Command.invoke(self, ctx)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/mirobo/vacuum_cli.py", line 87, in cli
    ctx.invoke(status)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/mirobo/vacuum_cli.py", line 117, in status
    res = vac.status()
  File "/usr/local/lib/python3.5/dist-packages/mirobo/vacuum.py", line 92, in status
    return VacuumStatus(self.send("get_status")[0])
  File "/usr/local/lib/python3.5/dist-packages/mirobo/device.py", line 177, in send
    return self.send(command, parameters, retry_count-1)
  File "/usr/local/lib/python3.5/dist-packages/mirobo/device.py", line 177, in send
    return self.send(command, parameters, retry_count-1)
  File "/usr/local/lib/python3.5/dist-packages/mirobo/device.py", line 177, in send
    return self.send(command, parameters, retry_count-1)
  File "/usr/local/lib/python3.5/dist-packages/mirobo/device.py", line 178, in send
    raise DeviceException from ex
mirobo.device.DeviceException

Can you help me ?

Regards

Infos :
System : Debian 9
Token extracted with aSQLiteManager from miio2.db
python-miio v0.3.2
Mirobo firmware : 3.3.9_003077

@gacu
Copy link

gacu commented Dec 15, 2017

Hi,
Exactly same issue here.

@fanthos
Copy link
Contributor

fanthos commented Dec 15, 2017

Downgrade to construct==2.8.16 should be temporary fix for this.

@gacu
Copy link

gacu commented Dec 15, 2017

Thanks fanthos, yes I found solution few minutes ago in #142 as well.

Pawel

@rytilahti
Copy link
Owner

This is either fixed with #142 or it is a dupe of #92, and should be closed as such.

@battosai30
Copy link
Author

Ok so I updated protocol.py and device.py with your correction but it did nothing.

I downgraded construct and seems ok :

root@BatServer:~# mirobo
ERROR:mirobo.vacuum_cli:Unable to read the stored msgid: [Errno 2] No such file or directory: '/tmp/python-mirobo.seq'
State: Charging
Battery: 100 %
Fanspeed: 90 %
Cleaning since: 0:27:36
Cleaned area: 28.9625 m²

ERROR:mirobo.vaccum is normal ?

I unchanged the modification and I get no error now

@rytilahti
Copy link
Owner

Yes, that error is normal if there is no such file / you have not run mirobo after the reboot of the device. That msgid is just used to keep track what id to send during the next invocation of mirobo, as the device requires increasing its value between messages.

Did you try it out already with the recent master from git? There has been no release with the fix yet.

@battosai30
Copy link
Author

Nop I used protocol.py and device.py you pushed here #142

But I am not good at all in Python so maybe I forgot something. I will try again when master will be updated to see if issue still happens

@zhkufish
Copy link

@fanthos I Downgrade to construct==2.8.16 fix timeout error. but I had new error..
Power: off
Temperature: 37
Traceback (most recent call last):
File "/srv/homeassistant/homeassistant_venv/bin/miplug", line 11, in
sys.exit(cli())
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args[1:], **kwargs)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/miio/plug_cli.py", line 81, in status
click.echo("Load (W): %s" % res.load_power)
AttributeError: 'PlugStatus' object has no attribute 'load_power'

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

No branches or pull requests

5 participants