Skip to content

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

Closed
@PRO-2684

Description

@PRO-2684

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'}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions