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

some concern about the new version #3

Closed
brianping7 opened this issue Apr 14, 2017 · 2 comments
Closed

some concern about the new version #3

brianping7 opened this issue Apr 14, 2017 · 2 comments

Comments

@brianping7
Copy link

Hi,

just saw the new version, why we try to get the device id and serial no every time? is it because it will change? i thought config it will be nice. reduce the network traffic

@rytilahti
Copy link
Owner

It's because we don't know what's "device id" nor "serial" for real. To my understanding some people have their robots with the same "device id" as I do, meaning that it's possible to detect them nicely, but some others do not (different hardware/firmware?).

In order to make it easy for people to try the lib & script out it's easier to force a hello packet during the initial connection. This could be optimized to avoid sending the discovery and to reduce the network traffic, but currently I doubt it's worth it.

For users of the library part it's possible to just use the context manager to execute multiple commands without requiring separate discovery calls:

with Vacuum('123.123.123.123') as v:
    if v.status() == 12: # error
        v.home()  # return home

@brianping7
Copy link
Author

sure, thanks for the explanation. :)

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

2 participants