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

Error in new mirobo/protocol.py #54

Closed
SelmaUrban opened this issue Sep 4, 2017 · 1 comment
Closed

Error in new mirobo/protocol.py #54

SelmaUrban opened this issue Sep 4, 2017 · 1 comment

Comments

@SelmaUrban
Copy link

SelmaUrban commented Sep 4, 2017

Hello rytilahti,
the new protocol.py caused an error:

File "/mirobo/protocol.py", line 42, in verify_token
raise ValueError("Token must be of length 32")
ValueError: Token must be of length 32

This is the code block:

    @staticmethod
    def verify_token(token: bytes):
        if not isinstance(token, bytes):
            raise TypeError("Token must be bytes")
        if len(token) != 32:
            raise ValueError("Token must be of length 32")

I think

if len(token) != 32:

must be

if len(token) != 16:

because of "bytes".


Short question:
Why is
# click.echo("DND enabled: %s" % res.dnd)
# click.echo("Map present: %s" % res.map)
# click.echo("in_cleaning: %s" % res.in_cleaning)
comment out in vacuum_cli.py?


Greetings

syssi added a commit to syssi/python-miio that referenced this issue Sep 4, 2017
@rytilahti
Copy link
Owner

Ah, sorry, I missed that, thanks for noticing. Regarding to your question, those values are in the response from the vacuum but they are not useful or accurate based on my own experiences.

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