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

cli: --model overrides unsupported model warning #1358

Closed
MPThLee opened this issue Mar 14, 2022 · 0 comments · Fixed by #1359
Closed

cli: --model overrides unsupported model warning #1358

MPThLee opened this issue Mar 14, 2022 · 0 comments · Fixed by #1359
Labels

Comments

@MPThLee
Copy link
Contributor

MPThLee commented Mar 14, 2022

Describe the bug
I was trying to use miio with --model until #1357 is released to stable. As i described there, It shares va2 miot protocols so i'm using that model. But here's what happend.
WindowsTerminal_2022-03-15_06-07-55
Unsupported model warning is overridden by --model

Version information (please complete the following information):

  • OS: Windows
  • python-miio: 0.5.11

Device information:

  • Model: zhimi.airp.mb5

To Reproduce
Steps to reproduce the behavior:

  1. Use info command on unsupported model with --model.

Expected behavior
It should print real model(not overridden one). I think?

Console output

> python -m miio.cli --debug airpurifiermiot --ip <removed> --token <removed> --model zhimi.airp.va2 info
INFO:__main__:Debug mode active
DEBUG:miio.miioprotocol:Got a response: Container:
    data = Container:
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container:
        data = b'<removed>' (total 16)
        value = Container:
            length = 32
            unknown = 0
            device_id = unhexlify('<removed>')
            ts = <removed>
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.miioprotocol:Discovered <removed>with ts: 1970-01-03 19:57:38, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:<removed>:54321 >>: {'id': 1, 'method': 'miIO.info', 'params': []}
DEBUG:miio.miioprotocol:<removed>:54321 (ts: <removed>, id: 1) << {'id': 1, 'result': {'life': <removed>, 'uid': <removed>, 'model': 'zhimi.airp.mb5', 'token': '<removed>', 'ipflag': 1, 'fw_ver': '2.2.1', 'mcu_fw_ver': '0023', 'miio_ver': '0.0.9', 'hw_ver': 'esp32', 'mmfree': <removed>, 'mac': '<removed>', 'wifi_fw_ver': '', 'ap': {'ssid': '<removed>', 'bssid': <removed>', 'rssi': -39, 'primary': 10}, 'netif': {'localIp': '<removed>', 'mask': '<removed>', 'gw': '<removed>'}}, 'exe_time': 50}
DEBUG:miio.device:Detected model zhimi.airp.mb5
WARNING:miio.device:Found an unsupported model 'zhimi.airp.va2' for class 'AirPurifierMiot'. If this is working for you, please open an issue at https://github.com/rytilahti/python-miio/
Model: zhimi.airp.mb5
Hardware version: esp32
Firmware version: 2.2.1
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