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 vacuum, manual moving mode: duration definition incorrect #62

Closed
kollaesch opened this issue Sep 5, 2017 · 6 comments
Closed

Comments

@kollaesch
Copy link

Hi!
first off: thanks a lot for providing us this communication platform!

I found during my usage on cli and by my trials to implement movement-path-scripts into home-assistant that the definition of the duration at running the method a second time are incorrect.

specific example for testing in python interpreter

m=mirobo.Vacuum(ip,token)

params1 = {"omega": -0.8 , "velocity": 0.29 , "seqnum": 1 , "duration": 5000 }
params2 = {"omega": -0.8 , "velocity": 0.29 , "seqnum": 2 , "duration": 1000 }
params3 = {"omega": -0.8 , "velocity": 0.29 , "seqnum": 3 , "duration": 1000 }
params4 = {"omega": -0.8 , "velocity": 0.29 , "seqnum": 4 , "duration": 1000 }
params5 = {"omega": -0.8 , "velocity": 0.29 , "seqnum": 5 , "duration": 1000 }

m.raw_command('app_rc_start', 0)
m.raw_command('app_rc_move', [params1])
m.raw_command('app_rc_move', [params2])
...

Result: the robot will only move for 5 seconds for the first method call.
However, the second movement (and all after that) will be also for 5 seconds and not just 1s as given by the current method call.

Please fix that. Thanks!

@rytilahti
Copy link
Owner

I have not completely understood all the parameters, and especially the duration seems to work unexpectedly. This may however be a problem in the device's firmware and there may be nothing we can do (if not stopping the manual control and activating it again for the next call).

If someone wants to analyze this further it would be nice. However, as I'm not using it myself, I'm not going to concentrate my time and efforts on this at this point.

@kollaesch
Copy link
Author

Ok, try to dig in myself a bit. Would allow other to use "alexa/mycroft vacuum kitchen" ...

Any hint on 'sniffing' the traffic? I can't find the wifi-traffic with wireshark :/

@rytilahti
Copy link
Owner

Maybe sniffing it from the router its connected to? It is a bit more hassle indeed.. Another way would apparently be to use an Android emulator and bind it with the device, and sniff the traffic of that emulator.

@syssi
Copy link
Collaborator

syssi commented Sep 6, 2017

If you use a fritzbox: https://hardez.de/tcpdump-mit-der-fritzbox/

This article suggests bluestacks to run the app on a desktop: https://github.com/jghaanstra/com.robot.xiaomi-mi

@kollaesch
Copy link
Author

I'm still confused. How can traffic be 'cloaked' if the wifi-interface is set to promiscuous? - Strange.
I'll check dumping on my router instead. Thanks !

@rytilahti
Copy link
Owner

The problem related to handling of duration is something we cannot really fix, so I'm closing this for now. Anyone willing to improve the interface to take this into account will be appreciated, though.

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

3 participants