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

Viomi S9 does not expose hv_wer #1082

Closed
rytilahti opened this issue Jun 24, 2021 Discussed in #1081 · 0 comments · Fixed by #1083
Closed

Viomi S9 does not expose hv_wer #1082

rytilahti opened this issue Jun 24, 2021 Discussed in #1081 · 0 comments · Fixed by #1083
Labels

Comments

@rytilahti
Copy link
Owner

Discussed in #1081

Originally posted by fokcuk June 24, 2021
Hi
I am trying to do some basic cli testing of commands as I am not that good at Python to write code from scratch.
I have a Viomi S9 vacuum. When I try to run this command I get an error about hw_ver:

─# miiocli viomivacuum --ip 192.168.1.124 --token 78326372527131116c6a436a4a6c3744 info                                                                 2 ⨯
Traceback (most recent call last):
  File "/usr/local/bin/miiocli", line 8, in <module>
    sys.exit(create_cli())
  File "/usr/local/lib/python3.9/dist-packages/miio/cli.py", line 63, in create_cli
    return cli(auto_envvar_prefix="MIIO")
  File "/usr/local/lib/python3.9/dist-packages/miio/click_common.py", line 59, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/miio/click_common.py", line 285, in wrap
    result_msg = result_msg_fmt.format(**kwargs)
  **File "/usr/local/lib/python3.9/dist-packages/miio/device.py", line 88, in hardware_version
    if self.data["hw_ver"] is not None:
KeyError: 'hw_ver'**

I have seen this error in another project that is connecting to Xiaomi devices. What I ended up doing there was to modify device.py and comment out all lines that tried to check for hardware_version.

Just trying to get to it working one line at a time and would appreciate some help

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

Successfully merging a pull request may close this issue.

1 participant