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

DeviceError when trying to turn on my Xiaomi Mi Smart Pedestal Fan #1100

Closed
PRO-2684 opened this issue Jul 21, 2021 · 2 comments
Closed

DeviceError when trying to turn on my Xiaomi Mi Smart Pedestal Fan #1100

PRO-2684 opened this issue Jul 21, 2021 · 2 comments
Labels

Comments

@PRO-2684
Copy link
Contributor

PRO-2684 commented Jul 21, 2021

Describe the bug
I can get information about the fan using:

import miio
fan = miio.Fan(ip='...', token='...')
print(fan.info())
# Output: dmaker.fan.p5 v2.1.3 (**:**:**:**:**:**) @ 192.168.**.*** - token: ********

However, when trying to turn it on using fan.on() and get its status using print(fan.status()), I got miio.exceptions.DeviceError: {'code': -9999, 'message': 'user ack timeout'}. I've retried several times, but the error still occurs. The Mijia app works, however.

Version information (please complete the following information):

  • OS: Windows 10
  • python-miio: 0.5.6

Device information:

  • Model: dmaker.fan.p5
  • Hardware version: esp8266
  • Firmware version: 2.1.3

To Reproduce
Run the code below.

import miio

ip = '***'
token = '***'
fan = miio.Fan(ip=ip, token=token)
fan.on()

Expected behavior
I expected the fan to be turned on.

Console output

Traceback (most recent call last):
  File "d:\Code\Python\modules\Mi Smart Home\fan.py", line 6, in <module>
    fan.on()
  File "C:\Users\PRO\AppData\Roaming\Python\Python39\site-packages\miio\fan.py", line 330, in on
    return self.send("set_power", ["on"])
  File "C:\Users\PRO\AppData\Roaming\Python\Python39\site-packages\miio\device.py", line 178, in send
    return self._protocol.send(
  File "C:\Users\PRO\AppData\Roaming\Python\Python39\site-packages\miio\miioprotocol.py", line 214, in send
    self._handle_error(payload["error"])
  File "C:\Users\PRO\AppData\Roaming\Python\Python39\site-packages\miio\miioprotocol.py", line 274, in _handle_error
    raise DeviceError(error)
miio.exceptions.DeviceError: {'code': -9999, 'message': 'user ack timeout'}
@PRO-2684 PRO-2684 added the bug label Jul 21, 2021
@PRO-2684
Copy link
Contributor Author

The result of test_properties:

>>>miiocli fan --ip *** --token *** test_properties on
Running command test_properties
Testing properties ('on',) for dmaker.fan.p5
Testing on   ERROR:miio.device:Got an array as response: [False, 'normal', 35, False, 140, 0, False, False, False, 2]
[False, 'normal', 35, False, 140, 0, False, False, False, 2] <class 'list'>
Found 1 valid properties, testing max_properties..

Please copy the results below to your report
### Results ###
Model: dmaker.fan.p5
Total responsives: 1
Total non-empty: 1
All non-empty properties:
{'on': [False, 'normal', 35, False, 140, 0, False, False, False, 2]}
Max properties: -1
Done

@PRO-2684
Copy link
Contributor Author

Using fan = miio.Fanp5 solves the problem.

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

No branches or pull requests

1 participant