-
-
Notifications
You must be signed in to change notification settings - Fork 598
Bug when having multiple network interfaces (discovery) #9
Description
i feel kinda dumb but i'm not succeding to make it work...
(homeassistant) homeassistant@hassbian:~/.homeassistant/config $ mirobo discover
INFO:mirobo.vacuum:Sending discovery to <broadcast> with timeout of 5s..
INFO:mirobo.vacuum:Discovery done
Maybe i found a bug ?
My raspberry is wired, and i connect to it via SSH via cable.
If i a laptop on the robot's wifi and start a "mirobo discover" from the raspberry, i see no broadcast UDP packet. With the same laptop connected on my wired network i see the broadcasts. (of course my robot doesnt see the requests and doesnt give out the token)
My guess is that the discovery packet isnt using my wlan0 connection. maybe adding a interface parameter would be good ?
I think i've finally got the token (via : #5 (comment)) but when i try to use it i get :
mirobo --ip 10.11.0.78 --token 4D61447643524D63
ERROR:mirobo.vacuum:got error when receiving: timed out
Traceback (most recent call last):
File "/srv/homeassistant/bin/mirobo", line 11, in <module>
sys.exit(cli())
File "/srv/homeassistant/lib/python3.4/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/srv/homeassistant/lib/python3.4/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/srv/homeassistant/lib/python3.4/site-packages/click/core.py", line 1043, in invoke
return Command.invoke(self, ctx)
File "/srv/homeassistant/lib/python3.4/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/srv/homeassistant/lib/python3.4/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/srv/homeassistant/lib/python3.4/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/srv/homeassistant/lib/python3.4/site-packages/mirobo/cli.py", line 46, in cli
ctx.invoke(status)
File "/srv/homeassistant/lib/python3.4/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/srv/homeassistant/lib/python3.4/site-packages/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args[1:], **kwargs)
File "/srv/homeassistant/lib/python3.4/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/srv/homeassistant/lib/python3.4/site-packages/mirobo/cli.py", line 59, in status
res = vac.status()
File "/srv/homeassistant/lib/python3.4/site-packages/mirobo/vacuum.py", line 150, in status
return VacuumStatus(self.send("get_status")[0])
File "/srv/homeassistant/lib/python3.4/site-packages/mirobo/vacuum.py", line 121, in send
data, addr = s.recvfrom(1024)
socket.timeout: timed out
But if i use the ip of my laptop (on my home wifi, same as the one now used by the robot), i can see the packets sent by mirobot command line...
or do i miss something ?
