Expected behavior
Should not raise a timeout error
Console output
Got error when receiving: timed out
Traceback (most recent call last):
File "/nix/store/j8h1i152rh4z58i78lfq2nnc7qbk69wb-python3-3.12.3-env/lib/python3.12/site-packages/miio/miioprotocol.py", line 200, in send
data, addr = s.recvfrom(4096)
^^^^^^^^^^^^^^^^
TimeoutError: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/nix/store/j8h1i152rh4z58i78lfq2nnc7qbk69wb-python3-3.12.3-env/lib/python3.12/site-packages/miio/miioprotocol.py", line 200, in send
data, addr = s.recvfrom(4096)
^^^^^^^^^^^^^^^^
TimeoutError: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/nix/store/j8h1i152rh4z58i78lfq2nnc7qbk69wb-python3-3.12.3-env/lib/python3.12/site-packages/miio/miioprotocol.py", line 200, in send
data, addr = s.recvfrom(4096)
^^^^^^^^^^^^^^^^
TimeoutError: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/nix/store/j8h1i152rh4z58i78lfq2nnc7qbk69wb-python3-3.12.3-env/lib/python3.12/site-packages/miio/miioprotocol.py", line 200, in send
data, addr = s.recvfrom(4096)
^^^^^^^^^^^^^^^^
TimeoutError: timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/nix/store/c7ycrgwv039nqglbif98yggx211sdbcl-python3-3.12.3/lib/python3.12/runpy.py", line 198, in _run_module_as_main
return _run_code(code, main_globals, None,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/c7ycrgwv039nqglbif98yggx211sdbcl-python3-3.12.3/lib/python3.12/runpy.py", line 88, in _run_code
exec(code, run_globals)
File "/home/antares/.vscode/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 39, in <module>
cli.main()
File "/home/antares/.vscode/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
run()
File "/home/antares/.vscode/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
runpy.run_path(target, run_name="__main__")
File "/home/antares/.vscode/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path
return _run_module_code(code, init_globals, run_name,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/antares/.vscode/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/home/antares/.vscode/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code
exec(code, run_globals)
File "/home/antares/Documents/GitHub/scripts/miiotest.py", line 11, in <module>
response = dev.get_properties(
^^^^^^^^^^^^^^^^^^^
File "/nix/store/j8h1i152rh4z58i78lfq2nnc7qbk69wb-python3-3.12.3-env/lib/python3.12/site-packages/miio/device.py", line 241, in get_properties
values.extend(self.send(property_getter, _props[:max_properties]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/j8h1i152rh4z58i78lfq2nnc7qbk69wb-python3-3.12.3-env/lib/python3.12/site-packages/miio/device.py", line 98, in send
return self._protocol.send(
^^^^^^^^^^^^^^^^^^^^
File "/nix/store/j8h1i152rh4z58i78lfq2nnc7qbk69wb-python3-3.12.3-env/lib/python3.12/site-packages/miio/miioprotocol.py", line 240, in send
return self.send(
^^^^^^^^^^
File "/nix/store/j8h1i152rh4z58i78lfq2nnc7qbk69wb-python3-3.12.3-env/lib/python3.12/site-packages/miio/miioprotocol.py", line 240, in send
return self.send(
^^^^^^^^^^
File "/nix/store/j8h1i152rh4z58i78lfq2nnc7qbk69wb-python3-3.12.3-env/lib/python3.12/site-packages/miio/miioprotocol.py", line 240, in send
return self.send(
^^^^^^^^^^
File "/nix/store/j8h1i152rh4z58i78lfq2nnc7qbk69wb-python3-3.12.3-env/lib/python3.12/site-packages/miio/miioprotocol.py", line 248, in send
raise DeviceException("No response from the device") from ex
miio.exceptions.DeviceException: No response from the device
Describe the bug the
get_properties()
call raises timeout if max_properties >= 4 (xiaomi.vacuum.c107).Version information (please complete the following information):
Device information:
To Reproduce Run
fails.
Changing the
max_properties
instatus()
call from 10 to 1,2,3 will fix this. max_properties >= 4 will cause the error.Above code always fails at 22nd loop of
which is processing
changing max_properties to 5, it fails at 17th loop when processing
so the cause should be
Expected behavior Should not raise a timeout error
Console output